function disableRightClick()
{
	var message="Sorry, but Right Clicking is not allowed on this page.";
	function click(e)
	{
		if (document.all) {
			if (event.button == 2) {
				alert(message);
			return false;
			}
		}
		if (document.layers) {
			if (e.which == 3) {
				alert(message);
				return false;
			}
		}
	}
	
	if (document.layers) {
		document.captureEvents(Event.MOUSEDOWN);
	}
	document.onmousedown=click;
}

function doselect(theBox)
{
	xState = theBox.checked;
	if (xState != null)
	{
		elm = theBox.form.elements;
		for (i=0;i<elm.length;i++)
		{
			if (elm[i].type=="checkbox")
			{
			
				if (elm[i].disabled == false)
					elm[i].checked=xState;
			}
		}
	}
	else
	{
		oItem = spanChk.children;
		theBox = oItem.item(0);
		xState = theBox.checked;
		elm = theBox.form.elements;
		for (i=0;i<elm.length;i++)
		{
			if (elm[i].type=="checkbox")
			{
				if((elm[i].name != "chkDefault1")&&(elm[i].name != "chkDefault2"))
					elm[i].checked=xState;
			}
		}
	}
}

function MoveRight(Left, Right)
{
	for (i=Left.options.length-1;i>=0;i--)
	{
		if (Left.options[i].selected == true)
		{
			var fldName = Left.options[i];
			var charLength = fldName.text.indexOf('-') - 1;
			Right.options[Right.options.length]=new Option(fldName.text.substr(0,charLength),fldName.value + '-' + fldName.text);
			Left.options[i]=null;
		}
	}
	sortSelect(Right)
}

function MoveLeft(Left, Right)
{
	for (i=Right.options.length-1;i>=0;i--)
	{
		if (Right.options[i].selected == true)
		{
			var fldName = Right.options[i];
			var charLength = fldName.value.indexOf('-') - 1;
			Left.options[Left.options.length]=new Option(fldName.value.substr(charLength+2, fldName.Length),fldName.value.substr(0,charLength));
			Right.options[i]=null;
		}
	}
	sortSelect(Left)
}

function sortSelect (select) 
{
  var options = new Array (select.options.length);
  for (var i = 0; i < options.length; i++)
    options[i] = new Option (select.options[i].text,select.options[i].value);
  options.sort(compareText);
  select.options.length = 0;
  for (var i = 0; i < options.length; i++)
    select.options[i] = options[i];
}

function compareText (option1, option2) {
  return option1.text < option2.text ? -1 : 
    option1.text > option2.text ? 1 : 0;
}