function newWin(urltoopen) // for new window
{
	myWindow=window.open(urltoopen,'','toolbar=no,location=no, directories=no,status=no, scrollbars=yes,resizable=yes, copyhistory=no,left=10,top=20,width=590,height=600');
}

function dothis(str,des)
{
	var value;
  value=confirm("Do you Really want to :\n\n "+str+" "+des+"\n\nAre you sure you want to do this?");
	if(value)
		return true;
	else
		return false;
}

function show()
{
	if(document.form1.bankExpenses.value=='2')
	{
	    document.all.item('Layer1').style.visibility='visible';
	}
	else
	{
	    document.all.item('Layer1').style.visibility='hidden';
	}
}

function change(myselect, mytarget)
{ 
  for(var i=0; i<myselect.options.length; i++)
  {
    if(myselect.options[i].selected) 
    {
      mytarget.value = myselect.options[i].title;
   }
  } 
}

function doTotals(myform)
{   
  var theTotal=0;
  theTotal = myform.amount.value * myform.qty.value;
  myform.totalamount.value = theTotal;  
} 

function recal() // Add Email address to your domain name  
{
	total=0;
	total= total + parseInt(document.myform.pack.value)
	year=1;
	if(parseInt(document.myform.pack.value)==28)
	{
		year=2;
	}

	if(document.myform.registerdomain.checked)
	{
		total= total + 9 * year;
	}

	total= total + parseInt(document.myform.extraspace.value) * year;	//extra space
	total= total + parseInt(document.myform.extraaccounts.value) * 5 * year;	//extra accounts

	document.myform.total_charge.value=total;
}

function recalDomainRate(cc)
{  
	if(cc.checked)
	{  
		if(document.orderInfo.DomainName.value != "")
		{  
			check_in(document.orderInfo.DomainName);
		}
		else
		{
			document.orderInfo.domain_reg_charge.value=cc.value;
		}
	}
	else
	{
		document.orderInfo.domain_reg_charge.value=0;
	}
	document.orderInfo.Totalcharges.value=parseInt(document.orderInfo.Webspacecharges.value) + parseInt(document.orderInfo.domain_reg_charge.value);
	document.orderInfo.duration.value=1;
	document.orderInfo.Grand_Total.value=parseInt(document.orderInfo.Webspacecharges.value) + parseInt(document.orderInfo.domain_reg_charge.value);
}

function check_in(ext)
{
	domainname = ext.value;
	if(!(domainname.match('.co.in') || domainname.match('.net.in') || domainname.match('.org.in') || domainname.match('.gen.in') || domainname.match('.firm.in') || domainname.match('.ind.in')))
	{	
		if(domainname.match('.info'))
		{
			document.orderInfo.domain_reg_charge.value = 49;
		}
		else if(domainname.match('.in'))
		{ 
			document.orderInfo.domain_reg_charge.value = 399;
		}
		else if(domainname.match('.us') || domainname.match('.name') || domainname.match('.biz'))
		{
			document.orderInfo.domain_reg_charge.value = 299;
		}
		else
		{
			document.orderInfo.domain_reg_charge.value = 199;
		}
	}
	else if(domainname.match('.us') || domainname.match('.name') || domainname.match('.biz'))
	{
		document.orderInfo.domain_reg_charge.value = 299;
	}
	else if(domainname.match('.info'))
	{
		document.orderInfo.domain_reg_charge.value = 49;
	}
	else
	{	
		document.orderInfo.domain_reg_charge.value = 199;
	}
	document.orderInfo.Totalcharges.value=parseInt(document.orderInfo.Webspacecharges.value) + parseInt(document.orderInfo.domain_reg_charge.value);
	document.orderInfo.Grand_Total.value=parseInt(document.orderInfo.Webspacecharges.value) + parseInt(document.orderInfo.domain_reg_charge.value);
}

function domainChecked() {
	if(document.all.id_1_1.disabled==true)    
	{
//	  document.all.id_2_1.disabled=true;	

	  document.all.id_3_1.disabled=false;
	  document.all.id_3_2.disabled=false;
	  document.all.id_3_3.disabled=false;
	  document.all.id_3_4.disabled=false;
	  document.all.id_3_5.disabled=false;
	  document.all.id_3_6.disabled=false;
	  document.all.id_3_7.disabled=false;
	  document.all.id_3_8.disabled=false;
	}

}