
var ns4 = (document.layers);
var ie4 = (document.all && !document.getElementById);
var ie5 = (document.all && document.getElementById);
var ns6 = (!document.all && document.getElementById);
var bPro = true;



function DoCalcTotalWT()
{
 var iCount;

 
 var iProd=document.formRegisterWT.selWTEdition.value; // product type
var bPrem=document.formRegisterWT.cbWTPremSupport.checked; // maintainence chcked
var fSum; // final summary of all params
var iPrice;

iCount=document.formRegisterWT.cbWTHomeCount.value; // number of license

 if(iCount==0)
 {
 	document.formRegisterWT.cbWTPremSupport.disabled= true;
	document.formRegisterWT.cbWTPremSupport.checked= true;
	bPrem=0
 }
 else
 {
 	document.formRegisterWT.cbWTPremSupport.disabled= false;
 }
 


	
	switch(iProd)
	{
	case "ActiveX":
	   iPrice=399;	 
		document.getElementById("mant_div_1").style.display ='block';
		document.getElementById("mant_div_2").style.display ='block';	   
	  break    
	case "NET":
	   iPrice=399;
			document.getElementById("mant_div_1").style.display ='block';
			document.getElementById("mant_div_2").style.display ='block';
	  break    
	case "Installer":
	  iPrice=99;
	  //document.formRegisterWT.cbWTPremSupport.disabled= true;
	 //document.formRegisterWT.cbWTPremSupport.checked= false;
	  document.getElementById("mant_div_1").style.display ='none';
	  document.getElementById("mant_div_2").style.display ='none';
	  break
	case "Bundle":
	  iPrice=599;
	    document.getElementById("mant_div_1").style.display ='block';
		document.getElementById("mant_div_2").style.display ='block';
	break
	}
  animation()
  
 if(iCount==1) fSum=iPrice*1; // 1 
 else if(iCount==4) fSum=iPrice*2; // 2 
 else if(iCount==8) fSum=iPrice*3; // 3 
 else if(iCount==0) fSum=iPrice*5; // 5 
 

 fSum = fSum*100; fSum=Math.round(fSum)/100;
 document.formRegisterWT.lWTCount.value = fSum;  // count of lisences 
 
 if (bPrem)
 document.formRegisterWT.lWTPrem.value = Math.round(fSum*0.15);
 else document.formRegisterWT.lWTPrem.value = "0";

 //if (bCD) fSum += 9.95;
 if (bPrem) fSum += Math.round(fSum*0.15);
 //if (bDev) fSum += 299.95;

 fSum = fSum*100; fSum=Math.round(fSum)/100;
 document.formRegisterWT.lWTTotal.value = fSum;

 return fSum;
}

function animation()
{
	document.getElementById("ActiveX").className = 'passive';
	document.getElementById("NET").className = 'passive';
	document.getElementById("Bundle").className = 'passive';
	document.getElementById("Installer").className = 'passive';
	//this.className='inactiveTopMenuItem'
	//className
	var iProd=document.formRegisterWT.selWTEdition.value; // product type
	checked_t=document.getElementById(iProd);
	//var checked_t=document.getElementsByName['AX'];
	checked_t.className = 'active';
	
}

