<!--
// need this to track a check box click and set the value accordingly
function checkboxClick(osrc)
{
	//alert('Here');
	if (!osrc)
		osrc = window.event.srcElement;
	
	var oInput = osrc.previousSibling;
	oInput.value = osrc.checked;
	//alert(oInput.value);
}

function ForceNumber(osrc)
{
	if (!osrc)
		osrc = window.event.srcElement;
	
	var oInput = osrc;	
	var strField = oInput.value
	
	fieldName = oInput.parentNode.previousSibling.innerHTML;
	var tempField = fieldName.substring(0,fieldName.length-2).split(">");
	tempField = tempField[1].split("<");
	fieldName= tempField[0];
	
	var i = 0;

	for (i = 0; i < strField.length; i++)
	{
		if (strField.charAt(i) < '0' || strField.charAt(i) > '9') 
		{
			alert(fieldName +" must be a valid numeric entry.  Please do not use commas or dollar signs or any non-numeric symbols.");
			oInput.focus();
			return false;
		}
	}
	return true;
}
//Function to Enforce to Enter Numbers and Decimals
function ForceDecimalNumber(osrc)
{
	if(!osrc)
		osrc = event.target;
	
	if(osrc.value != "")
	{
		if(isNaN(parseFloat(osrc.value)))
		{
			osrc.value = "";	
			alert("Field must be a valid numeric entry.  Please do not use commas or dollar signs or any non-numeric symbols other than a decimal point.");
			return false;
		}
		else
		{
			var lastIndex = osrc.value.length - 1;
			if(osrc.value.substr(lastIndex, 1) != "." || osrc.value.indexOf(".") != lastIndex)
				osrc.value = parseFloat(osrc.value);
		}
	}
	
	return true;
}

//New Function to Validate the string Field should not Exceed 1000 Characters
function ForceStrings(osrc)
{
	if (navigator.appVersion.indexOf("MSIE")!=-1)
	{
			if (!osrc)
			alert(osrc);
			osrc = window.event.srcElement;
			var oInput = osrc;	
			var strField = oInput.value;
			fieldName = oInput.parentNode.previousSibling.innerHTML;
			fieldName = fieldName.substring(0,fieldName.length-2);
			if ((strField.length)>1000)
			{
				oInput.value="";	
				oInput.focus();
				return false;			
			}
	}
}

//New Function to Validate the Long Text Should not Exceed 4000 Characters
function ForceLText(osrc)
{
	if (!osrc)
		osrc = window.event.srcElement;
		var oInput = osrc;	
		var strField = oInput.value;
		fieldName = oInput.parentNode.previousSibling.innerHTML;
		fieldName = fieldName.substring(0,fieldName.length-2);
		if ((strField.length)>4000)
		{
			//oInput.value="";	// PD 10 Aug
			oInput.focus();
			return false;			
		}
}
//function ConfirmDelete(strURL)
//{
	//var win="";	
	//win = window.showModalDialog("../DesktopNLSIMP/ShowConfirm.htm",strURL,"dialogWidth:300px;dialogHeight:150px;status:no;center:true;help:no");
	//if(win=="OK")
	//{
		//window.location.replace( strURL );
		//return true;
	//}
	//else
		//return false;
//}

function ConfirmDelete(strURL)
{
	var Res;
	Res=confirm('Are you sure to remove this data?');	
	if(Res==true)
	{
		window.location.replace(strURL);
		return true;
	 }
	if(Res==false)
	   return false;
}

//-->

//update SUIListingHistory
function UpdateSUIListing(recordid,pointerid,groupid,statusid)
{
window.location = "Confirm.aspx?recordID=" +recordid + "&gid=" + groupid + "&pid=" +pointerid +"&id="+ statusid;
Modalbox.hide();
}

function closeMe()
{
	if(navigator.appName=="Microsoft Internet Explorer")
	{
		window.opener = "who";
		window.close();
	}
	else
	{
		var win = window.open("","_self");
		win.close();
	}
}
