
var Country
var State
var SubmitButton
var VATNumber
var ButtonInvoice
var ButtonCC
var ExistingLicenseKey
var TextBoxLicenseKey
var NumOfLicensesSPE


function ValidateCountry (source, arguments)
{
    if (arguments.Value == "0")	
        arguments.IsValid = false;	
    else
        arguments.IsValid = true;
}

function ValidateState(source,arguments)
{
    if (Country.value == 'UNITED STATES' || Country.value == 'United States' || Country.value == 'USA' || Country.value == 'Canada' || Country.value == 'CANADA')
    {
        if(arguments.Value == '0') 
	        arguments.IsValid = false;
        else 
	        arguments.IsValid = true;
    }
}
function CalculatePriceOrder()
{
var tempPricePerUnit; 
var temTotal;
//         if(radioButtonDollar.checked)
//         {
//            tempPricePerUnit = 39.00;
//            
//         }
//         else if(radioButtonEuro.checked)
//	     {
//	        tempPricePerUnit = 33.00;
//	     }
//	     else if(radioButtonPound.checked)
//	     {
//	        tempPricePerUnit = 29.00;
//	     
//	     }
	     
        tempPricePerUnit = 3900.00;
        tempTotal = NumOfLicenses.value * parseFloat(tempPricePerUnit);
		tempPricePerUnit = parseFloat(tempPricePerUnit).toFixed(2);
		tempTotal = parseFloat(tempTotal).toFixed(2);
        
//        if(radioButtonDollar.checked)
//	    {
//	        LabelPricePerUnit.innerHTML = '$'+tempPricePerUnit;
//	        LabelTotal.innerHTML = '$'+tempTotal;
//	    }
//    	
//	    else if(radioButtonEuro.checked)
//	    {
//	        LabelPricePerUnit.innerHTML = '&euro;'+tempPricePerUnit; 
//	        LabelTotal.innerHTML = '&euro;'+tempTotal; 
//	    }
//	    else if(radioButtonPound.checked)
//	    {
//	        LabelPricePerUnit.innerHTML = '&pound;'+tempPricePerUnit; 
//		    LabelTotal.innerHTML = '&pound;'+tempTotal; 
//	    }
	    
	    LabelPricePerUnit.innerHTML = '&yen;'+tempPricePerUnit; 
		LabelTotal.innerHTML = '&yen;'+tempTotal;    
	    LabelQTY.innerHTML = NumOfLicenses.value;
	    
}

function CalculatePriceOrderPackage()
{
var tempPricePerUnit; 
var temTotal;
var currencySymbol;
//         if(radioButtonDollar.checked)
//         {
//            currencySymbol = "$";
//            tempTotal = NumOfLicenses.value * 99.00;
//            
//         }
//         else if(radioButtonEuro.checked)
//	     {
//	         currencySymbol = "&euro;";
//	         tempTotal = NumOfLicenses.value * 79.00;
//	     }
//	     else if(radioButtonPound.checked)
//	     {
//	         currencySymbol = "&pound;";
//	         tempTotal = NumOfLicenses.value * 69.00;
//	     
//	     }
	     
	     currencySymbol ="&yen;"
	    tempPricePerUnit = 9900.00;
	    tempTotal = NumOfLicenses.value * tempPricePerUnit;
		tempTotal = parseFloat(tempTotal).toFixed(2);
        
//        if(radioButtonDollar.checked)
//	    {
//	        LabelTotalDesktop.innerHTML =  '$ '+tempTotal;
//	        LabelTotal.innerHTML =  '$ '+tempTotal;
//	        LabelCurrencySymbolDesktop.innerHTML = currencySymbol+' 99.00';
//	        LabelCurrencySymbolWeb.innerHTML = currencySymbol+' 0.00';
//	        	        
//	    }
//    	
//	    else if(radioButtonEuro.checked)
//	    {
//	        LabelTotalDesktop.innerHTML =  '&euro; '+tempTotal;
//	        LabelTotal.innerHTML =  '&euro; '+tempTotal;
//	        LabelCurrencySymbolDesktop.innerHTML = currencySymbol+ ' 79.00';
//	        LabelCurrencySymbolWeb.innerHTML = currencySymbol+' 0.00';
//	    }
//	    else if(radioButtonPound.checked)
//	    {
//	        LabelTotalDesktop.innerHTML =  '&pound; '+tempTotal;
//	        LabelTotal.innerHTML =  '&pound; '+tempTotal;
//	        LabelCurrencySymbolDesktop.innerHTML = currencySymbol+' 69.00';
//	        LabelCurrencySymbolWeb.innerHTML = currencySymbol+' 0.00';
//	    }
	    
        LabelTotalDesktop.innerHTML =  '&yen; '+tempTotal;
        LabelTotal.innerHTML =  '&yen; '+tempTotal;
        LabelCurrencySymbolDesktop.innerHTML = currencySymbol+' 9900.00';
        LabelCurrencySymbolWeb.innerHTML = currencySymbol+' 0.00';
	    
	    NumOfLicensesDesktop.innerHTML = NumOfLicenses.value;
	    NumOfLicensesWeb.innerHTML = NumOfLicenses.value;
	    
}



function CheckNumOfLicenses()
{
    var decimalNum=(NumOfLicenses.value).indexOf('.');
    var decimalNumP=(NumOfLicenses.value).indexOf(',');
    var number = parseFloat(NumOfLicenses.value) * 2.00;
    
    if(parseInt(NumOfLicenses.value) > 10)
    {
        NumOfLicenses.value = 10;
    }
    
    if(parseInt(NumOfLicenses.value) < 1 )
    {
        NumOfLicenses.value = 1;
    }
    
    if(decimalNum != -1 || decimalNumP != -1)
    {
        NumOfLicenses.value = 1;
    }
   
    if(isNaN(NumOfLicenses.value * 2.00))
    {
        NumOfLicenses.value = 1;
    }
    
     
     LabelQTY.innerHTML =  NumOfLicenses.value 
}

function CheckNumOfLicensesOneYear()
{
 
     var decimalNum=(NumOfLicenses.value).indexOf('.');
     var decimalNumP=(NumOfLicenses.value).indexOf(',');
     var number = parseFloat(NumOfLicenses.value) * 2.00;
    
     if(parseInt(NumOfLicenses.value) < 10)
     {
        InfoText.style.visibility = 'hidden';
     
     }
    if(parseInt(NumOfLicenses.value) > 10)
    {
        NumOfLicenses.value = 10;
        InfoText.style.visibility = 'visible';
    }
    
    if(parseInt(NumOfLicenses.value) < 1 )
    {
        NumOfLicenses.value = 1;
        InfoText.style.visibility = 'hidden';
        
    }
    
    if(decimalNum != -1 || decimalNumP != -1)
    {
        NumOfLicenses.value = 1;
        InfoText.style.visibility = 'hidden';
    
    }
    
    if(isNaN(NumOfLicenses.value * 2.00))
    {
        NumOfLicenses.value = 1;
        InfoText.style.visibility = 'hidden';
    }
    
    LabelQTY.innerHTML = NumOfLicenses.value;
    
    
     
    
     
}

function CheckNumOfLicensesPackage()
{
     var decimalNum=(NumOfLicenses.value).indexOf('.');
     var decimalNumP=(NumOfLicenses.value).indexOf(',');
     var number = parseFloat(NumOfLicenses.value) * 2.00;
    
     if(parseInt(NumOfLicenses.value) < 10)
     {
        InfoText.style.visibility = 'hidden';
     
     }
    if(parseInt(NumOfLicenses.value) > 10)
    {
        NumOfLicenses.value = 10;
        InfoText.style.visibility = 'visible';
    }
    
    if(parseInt(NumOfLicenses.value) < 1 )
    {
        NumOfLicenses.value = 1;
        InfoText.style.visibility = 'hidden';
        
    }
    
    if(decimalNum != -1 || decimalNumP != -1)
    {
        NumOfLicenses.value = 1;
        InfoText.style.visibility = 'hidden';
    
    }
    
    if(isNaN(NumOfLicenses.value * 2.00))
    {
        NumOfLicenses.value = 1;
        InfoText.style.visibility = 'hidden';
    }
    
     
     NumOfLicensesDesktop.innerHTML =  NumOfLicenses.value;
     NumOfLicensesWeb.innerHTML =  NumOfLicenses.value;
}


function CheckConditionAcademic(obj)
{
    ButtonSubmit= document.getElementById('ctl00_Contentplaceholder1_btnSubmit');
  
    
    if (obj.checked)
    {
     ButtonSubmit.disabled = false;
     ButtonSubmit.style.cursor = "pointer";
     ButtonSubmit.setAttribute("class", "submit-btn"); //For Most Browsers
     ButtonSubmit.setAttribute("className", "submit-btn");//For IE only
    
 }
 else
 {
     ButtonSubmit.disabled = true;
     ButtonSubmit.style.cursor = "default";
     ButtonSubmit.setAttribute("class", "submit-off"); //For Most Browsers
     ButtonSubmit.setAttribute("className", "submit-off");//For IE only
    
 }
}

function CheckConditionAcademic(obj)
{
    ButtonSubmit= document.getElementById('ctl00_Contentplaceholder1_btnSubmit');
  
    
    if (obj.checked)
    {
     ButtonSubmit.disabled = false;
     ButtonSubmit.style.cursor = "pointer";
     ButtonSubmit.setAttribute("class", "submit-btn"); //For Most Browsers
     ButtonSubmit.setAttribute("className", "submit-btn");//For IE only
    
 }
 else
 {
     ButtonSubmit.disabled = true;
     ButtonSubmit.style.cursor = "default";
     ButtonSubmit.setAttribute("class", "submit-off"); //For Most Browsers
     ButtonSubmit.setAttribute("className", "submit-off");//For IE only
    
 }
}


function CheckConditionOneYearOrder(obj)
{
    ButtonInvoice= document.getElementById('ctl00_Contentplaceholder1_btnOrderInvoice');
    ButtonCC= document.getElementById('ctl00_Contentplaceholder1_btnOrderCC');
  
    
    if (obj.checked)
    {
     ButtonInvoice.disabled = false;
     ButtonInvoice.style.cursor = "pointer";
     ButtonInvoice.setAttribute("class", "orderinvoice-btn"); //For Most Browsers
     ButtonInvoice.setAttribute("className", "orderinvoice-btn");//For IE only
     ButtonCC.disabled = false;
     ButtonCC.style.cursor = "pointer";
     ButtonCC.setAttribute("class", "orderviacc-btn"); //For Most Browsers
     ButtonCC.setAttribute("className", "orderviacc-btn");//For IE only
    
 }
 else
 {
     ButtonInvoice.disabled = true;
     ButtonInvoice.style.cursor = "default";
     ButtonInvoice.setAttribute("class", "orderinvoice-off"); //For Most Browsers
     ButtonInvoice.setAttribute("className", "orderinvoice-off");//For IE only
     ButtonCC.disabled = true;
     ButtonCC.style.cursor = "default";
     ButtonCC.setAttribute("class", "orderviacc-off"); //For Most Browsers
     ButtonCC.setAttribute("className", "orderviacc-off");//For IE only
    
 }
}










