//--------------------------------------------------------------------------------------------------------------
//NOTES: This file includes functions that control:
//Multi Select list JScript
//Delete and Re-Instate Confirmation
// Update Confirmation
//Colour switching selected form elements
//Managing Parent Dropdown values
//--------------------------------------------------------------------------------------------------------------
function DeleteConfirm(strURL, strMessage)
	{
		var doit
		if (!strMessage)
			{
				doit = window.confirm('Are you sure you want to delete this item?');
			}			
		else
			{
				doit = window.confirm(strMessage);
			}		
		if (doit)
			{
				window.location.href = strURL;
			}
		else
			{
				document.focus();
			}
	}	
	
function UpdateConfirm(strURL, strMessage)
	{
		var doit
		doit = window.confirm('Are you sure you want to ' + strMessage + ' this item');
		if (doit)
			{
				window.location.href = strURL;
			}
		else
			{
				document.focus();
			}
	}		
	
function ReInstateConfirm(strURL)
	{			
		var doit = window.confirm('Are you sure you want to re-instate this item?');
				
		if (doit)
			{
				window.location.href = strURL;
			}
		else
			{
				document.focus();
			}
				

	}
					
function chgColour(currObj,strHex)
{
	currObj.style.backgroundColor = strHex;
}

function AddToOptionList(objVal,objText,objSet) {
	var ddObj = eval('document.ADMINFORM.'+objSet);
	ddObj[ddObj.length] = new Option(objText,objVal);
	ddObj.selectedIndex = (ddObj.length - 1);
	ddObj.focus();
}

function mngParent(objVal,objText,objSet) {
	window.opener.AddToOptionList(objVal,objText,objSet);
	window.close();
}
