// JavaScript Document

function openWindow(pge,widthh,heightt)
{
	opnWin = window.open(pge,'newOpenWindow','status=no,height='+heightt+',width='+widthh+',scrollbars=yes,resizable=yes');
	opnWin.focus();
}
function openWin(pge)
{
	openWindow(pge,650,400);
}


function contactUs(path)
{
	contact  = window.open(path+"contact_us.php","temp2","width=600,height=350,scrollbars=yes");
	contact.focus();
}



function tellYourFriend()
{
	//alert("ss");
	var  newDoc= document.getElementById("tellYourFriend");
	alert(newDoc.type)
	newDoc.document.getElementById("senderName").value="ss";
	
}

function showScore()
{
	//frm = (document.getElementById("testForm"));
	objs = document.getElementById("testForm").elements;
	total=0;
	for(ctr=0;ctr<objs.length;ctr++)
	{
		if(objs[ctr].checked && isNumeric(objs[ctr].value))
		total+=parseInt(objs[ctr].value);
	}
	document.getElementById("finalScore").value=total;
	document.getElementById("scoreChart").style.visibility= "visible";
	return false;
}

function isNumeric(sText)

{
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
}