/*************************************************
	              function.js
	Created by Subhasish Nag 6th February 2005
*************************************************/
function setCheckBox(theForm,theStatus)
{
	var sus=eval("window.document."+theForm+".elements.length");
	for(j=0;j<sus;j++)
	{
		if(window.document.frm.elements[j].type=="checkbox")
		{
			window.document.frm.elements[j].checked=theStatus;
		}
	}
}
function delete_something(theURL,theValue,theMsg)
{
	var str="Are you sure to delete this "+theMsg+" : "+theValue+" ?    ";
	choice=confirm(str);
	if(choice)
	{
		window.location.href=theURL;
	}
	else
	{
		return false;
	}
}
function setFocus(theForm,theElement)
{
	eval("window.document."+theForm+"."+theElement+".focus()");
}
function setCombo(theForm,theElement,theMessage)
{
	if(eval("window.document."+theForm+"."+theElement+".selectedIndex")==0)
	{
		var str="Please select a "+theMessage+"    ";
		alert(str);
		eval("window.document."+theForm+"."+theElement+".focus()");
		return false;
	}
}
function popUp(theURL,theWindow,theProperty)
{
	window.open(theURL,theWindow,theProperty);
}
function do_Number(theForm,theElement,theMessage)
{
	if(isNaN(eval("window.document."+theForm+"."+theElement+".value"))==true)
	{
		var str="" + theMessage + " can contains numeric only.    ";
		alert(str);
		eval("window.document."+theForm+"."+theElement+".focus()");
		eval("window.document."+theForm+"."+theElement+".select()");
		return false;
	}
}