<!--
function round(number,X) {
// rounds number to X decimal places, defaults to 2
    X = (!X ? 2 : X);
    return Math.round(number*Math.pow(10,X))/Math.pow(10,X);
}

function popsystem()
{
openWin = window.open("systemreq.html","myWindow1","top=200,left=250, width=400, height=190, buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no");
openWin.focus();
}

function popIt()
{
openWin = window.open("ScreenShootC.htm","myWindow2","top=200,left=150, width=565, height=450, buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no");
openWin.focus();
}
function popIt2()
{
openWin = window.open("ScreenShootR.htm","myWindow2","top=200,left=150, width=565, height=450, buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no");
openWin.focus();
}

function popEmail(pagename)
{
openWin = window.open("emailtoafriend.asp?sendpage="+pagename,"myWindow3","top=200,left=250, width=380, height=140, buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no");
openWin.focus();
}




function go()
{
  var scountry=document.form2.sacntry.options[document.form2.sacntry.selectedIndex].value;
  var shipping_value
  if (scountry=="Israel" || scountry=="United States of America"){
	shipping_value=9;
    }
  else if (scountry=="United Kingdom" || scountry=="France" || scountry=="Spain" || scountry=="Portugal" || scountry=="Belgium" || scountry=="Netherlands" || scountry=="Denmark" || scountry=="Poland" || scountry=="Czech Republic" || scountry=="Austria" || scountry=="Switzerland" || scountry=="Italy" || scountry=="Germany" || scountry=="Greece" || scountry=="Ireland" || scountry=="Luxembourg"){
	shipping_value=25;
    }
  else{
	shipping_value=40;
    }
     

// For Download Method
  var dvalue = null;
  dvalue="1";
  shipping_value=0;

  var qvalue = null;
  for (var b = 0; b < document.form1.quantity.length; b++)
  if (document.form1.quantity[b].checked){ qvalue = document.form1.quantity[b].value; } // qvalue is the quantity , 1,2 and 3

  if (qvalue>"10" & qvalue<="20" ){shipping_value=shipping_value+(shipping_value/2)}
  if (qvalue>"20" & qvalue<="30" ){shipping_value=shipping_value*2}
 
//  alert (shipping_value);

 switch (qvalue)
{
 case "1":
   dPrice="249";
   cPrice="249";
   break;
 case "2":
   dPrice="189";
   cPrice="189";
   break;
 case "3":
   dPrice="149";
   cPrice="149";
}

if (dvalue=='1')   
  switch(qvalue)
  {
  case "1":
   val=round((document.form1.select1.options[document.form1.select1.selectedIndex].text)*dPrice,2);
   val+="";
   //val=val.replace(/(\d+\.\d{2}).+/,"$1");
   document.form2.oquantity.value=document.form1.select1.options[document.form1.select1.selectedIndex].text;
   break;
  case "2":
   val=round((document.form1.select2.options[document.form1.select2.selectedIndex].text)*dPrice,2);
   val+="";
   val=val.replace(/(\d+\.\d{2}).+/,"$1");
   document.form2.oquantity.value=document.form1.select2.options[document.form1.select2.selectedIndex].text;
   break;
  case "3":
   val=round((document.form1.select3.options[document.form1.select3.selectedIndex].text)*dPrice,2);
   val+="";
   val=val.replace(/(\d+\.\d{2}).+/,"$1");
   document.form2.oquantity.value=document.form1.select3.options[document.form1.select3.selectedIndex].text;
  }

   //document.all.shipping.innerHTML=shipping_value;   
   document.all.total.innerHTML=val;
   val=val*1;
   var Totals=(val+shipping_value);
   document.all.TotalAmount.innerHTML=(val+shipping_value);
   document.form2.totalA.value=(val+shipping_value);
 }






function goUpgrade()
{
  var scountry=document.form2.sacntry.options[document.form2.sacntry.selectedIndex].value;    

// For Download Method
  var dvalue = null;
  dvalue="1";

  var qvalue = null;
  for (var b = 0; b < document.form1.quantity.length; b++)
  if (document.form1.quantity[b].checked){ qvalue = document.form1.quantity[b].value; } // qvalue is the quantity , 1,2 and 3

 switch (qvalue)
{
 case "1":
   dPrice="50";
   cPrice="50";
   break;
 case "2":
   dPrice="40";
   cPrice="40";
   break;
 case "3":
   dPrice="30";
   cPrice="30";
}

if (dvalue=='1')   
  switch(qvalue)
  {
  case "1":
   val=round((document.form1.select1.options[document.form1.select1.selectedIndex].text)*dPrice,2);
   val+="";
   //val=val.replace(/(\d+\.\d{2}).+/,"$1");
   document.form2.oquantity.value=document.form1.select1.options[document.form1.select1.selectedIndex].text;
   break;
  case "2":
   val=round((document.form1.select2.options[document.form1.select2.selectedIndex].text)*dPrice,2);
   val+="";
   val=val.replace(/(\d+\.\d{2}).+/,"$1");
   document.form2.oquantity.value=document.form1.select2.options[document.form1.select2.selectedIndex].text;
   break;
  case "3":
   val=round((document.form1.select3.options[document.form1.select3.selectedIndex].text)*dPrice,2);
   val+="";
   val=val.replace(/(\d+\.\d{2}).+/,"$1");
   document.form2.oquantity.value=document.form1.select3.options[document.form1.select3.selectedIndex].text;
  }

   //document.all.shipping.innerHTML=shipping_value;   
   document.all.total.innerHTML=val;
   val=val*1;
   var Totals=(val);
   document.all.TotalAmount.innerHTML=(val);
   document.form2.totalA.value=(val);
 }








function validate(theForm){
	if (theForm.safname.value == "" || theForm.safname.value.length < 2){
		alert("First Name required");
		theForm.safname.focus();
		return false;
	}
	if (theForm.salname.value == "" || theForm.salname.value.length < 2){
		alert("Last Name required");
		theForm.salname.focus();
		return false;
	}
	if (theForm.scompany.value == "" || theForm.scompany.value.length < 2){
		alert("Company name required");
		theForm.scompany.focus();
		return false;
	}
	if (theForm.saaddr1.value == "" || theForm.saaddr1.value.length < 3){
		alert("Address required");
		theForm.saaddr1.focus();
		return false;
	}
	if (theForm.sacity.value == "" || theForm.sacity.value.length < 2){
		alert("City required");
		theForm.sacity.focus();
		return false;
	}
	if (theForm.sazipc.value == "" || theForm.sazipc.value.length < 2){
		alert("Zip Code required");
		theForm.sazipc.focus();
		return false;
	}
	if (theForm.saphone.value == "" || theForm.saphone.value.length < 6){
		alert("Phone required");
		theForm.saphone.focus();
		return false;
	}
	if (theForm.saemail.value == "" || theForm.saemail.value.indexOf('@',1)== -1 || theForm.saemail.value.indexOf('.',2)==-1){
		alert("Email required");
		theForm.saemail.focus();
		return false;
	}
	if (theForm.Howlearn.value == "0"){
		alert("Please fill in How did you learn about iClaim");
		theForm.Howlearn.focus();
		return false;
	}
	if (theForm.Howlearn.value == "other" && theForm.other.value == ""){
		alert("Please fill in the other way !");
		//theForm.other.focus();
		return false;
	}
	if (theForm.Howlearn.value == "From iClaim Dealer" && theForm.dealer.value == ""){
		alert("Please fill in the Dealer Name !");
		//theForm.dealer.focus();
		return false;
	}
	
return true;
}


function validateEmail(theForm){
	if (theForm.myemail.value == "" || theForm.myemail.value.length < 2){
		alert("Please fill your email address");
		theForm.myemail.focus();
		return false;
	}
	if (theForm.friendsemail.value == "" || theForm.friendsemail.value.length < 2){
		alert("Please fill your friend's email address");
		theForm.friendsemail.focus();
		return false;
	}
return true;
}
// -->