function deleteConfirm(msg)
{
	if (confirm(msg))
		return true;
	else
		return false;
}

function getObject(id)
{
	return document.getElementById(id);
}

function putIdToHiddenTextbox(ListBoxId, HiddenTextId, TextBoxId, EditButtonId)
{
	var ListBox = getObject(ListBoxId);
	var TextBox = getObject(TextBoxId);
	var HiddenText = getObject(HiddenTextId);
	var EditButton = getObject(EditButtonId);

	TextBox.value = ListBox.options(ListBox.selectedIndex).text;
	HiddenText.value = ListBox.options(ListBox.selectedIndex).value;
	
	EditButton.disabled = false;
}

function setButtonStatus(ListBoxId, btnDeleteId, btnSelect)
{
	var ListBox = getObject(ListBoxId);
	var ButtonSelect = getObject(btnSelect);
	var ButtonDelete = getObject(btnDeleteId);
	
	if (ListBox.options(ListBox.selectedIndex).value < 0)
	{
		ButtonSelect.disabled = true;
		ButtonDelete.disabled = true;
	}
	else
	{
		ButtonSelect.disabled = false;
		ButtonDelete.disabled = false;
	}
}

function openEditor(url,name)
{
	window.open(url,name);//,'width=100% height=100% top=175px left=0px'
}
function openDetail(url,name)
{
	window.open(url,name);//,'top=180px left=185px width=100% height=100%'
}
function closeDetail(url,name)
{
	self.close();
}
function opendualEditor(url,name,type)
{
	if(type=='1')
	{
		try
		{
			TEXTAREA_ID=T1_ID;
			window.open(url,name,'width=550px height=400px top=100px left=100px');
		}
		catch(ex)
		{
		}
	}
	if(type=='2')
	{
		try
		{
			TEXTAREA_ID=T2_ID;
			window.open(url,name,'width=550px height=400px top=100px left=100px');
		}
		catch(ex)
		{
		}
	}
}

function getTextarea()
{
	return document.getElementById(TEXTAREA_ID);
}
