function openWin(loc) 
{
	aWindow = window.open("","thewindow","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=350,height=400");
	aWindow.location.href = loc;
	if(aWindow == null) aWindow = window;
}

var validNums = '0123456789.';
var validInt = '0123456789';
var validLetters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';

function validateKeyPress(e, validSet)
{
	var key;
	var keychar;
	
	if(window.event || !e.which) // IE
	key = e.keyCode; // IE
	else if(e) 
	key = e.which; // Netscape
	else
	return true; // no validation
	
	keychar = String.fromCharCode(key);
	validSet += String.fromCharCode(8);
	
	if (validSet.indexOf(keychar) < 0)
	return false;
	
	return true; 
}

function toggle(val) {
	var itm = document.getElementById(val);
	var txt = document.getElementById(val+"text");
	var icon = document.getElementById(val+"icon");
	// turn off menu tip display
    if (txt.style.display=="none") {
		icon.innerHTML="<b>-</b>";
		txt.style.display="block";
									}
	else	{
		icon.innerHTML="<b>+</b>";
		txt.style.display="none";
									}
}

function on(val) 
{

   // get specific div item, identified by node index
   var itm = document.getElementById(val);
   var txt = document.getElementById(val+"text");
  
   // turn on menu tip display
   txt.style.display="block";

}

// turn off menu highlighting
function off(val) 
{

   // get specific div item, identified by node index
   var itm = document.getElementById(val);
   var txt = document.getElementById(val+"text");

   // turn off menu tip display
   txt.style.display="none";

   // set style properties
   txt.style.display="none";
}


//for document downloading
function loadFrame(txtSRC){
	document.all.downloadFrame.src = txtSRC;
}

//for search Box
function search_onclick()
{
	if (document.searchForm.q1.value == "Enter Your Search")
	{
		document.searchForm.q1.value = "";
	}
}
