function SetFocus(objID)
{
	var obj = document.getElementById(objID);
	if(obj != null)	obj.focus();
}

function ClearContent(obj)
{
	if(obj.value == "mm/dd/yyyy") obj.value = "";
}

function ShowHideLMP(RadioButtonList)
{
	var sex;
	var obj;
	
	for(var i=0;i<2;i++)
	{
		obj = document.getElementById(RadioButtonList.id+"_"+i);
		if(obj.checked) sex = obj.value;
	}

	tblLMP.style.display = (sex=="M")?"none":"block";
}

var selected = false;
function ForwardFocus(currentControl)
{

	if (window.getSelection)
	{
		var txt = window.getSelection();
		
		if(txt!='')
		{
			return;	
		}
		//foundIn = 'window.getSelection()';
	}
	else if (document.getSelection)
	{
		//txt = document.getSelection();
		//foundIn = 'document.getSelection()';
	}
	else if (document.selection)
	{
		//txt = document.selection.createRange().text;
		//foundIn = 'document.selection.createRange()';
		if(document.selection.type!='None')
		{
		var tr=document.selection.createRange();
		if(tr.parentElement()==currentControl )
		return;
		}
	}
	
	
	
	var nextControlID = currentControl['id'];
	
	nextControlID = nextControlID.replace("2","3");
	
	nextControlID = nextControlID.replace("1","2");
	
	if(currentControl.value.length == currentControl['maxLength'])
	{
	
		SetFocus(nextControlID);
	}
	
}

var LastCheck = false;
function rbCheck(senderID)
{
	LastCheck = document.getElementById(senderID).checked;
}
function rbRemoveCheck(senderID)
{
	
	if(LastCheck) document.getElementById(senderID).checked = false;
	LastCheck=false;
}
