var sonarValue = 0;
var dlpValue = 0;
var lpcValue = 0;
var wfoValue = 0;
var hostValue = 0;
var factor = 1;
var timer = 1;

var sonarListPrice = 0;
var sonarPrice = 0;
var dlpListPrice = 0;
var dlpPrice = 0;
var lcoListPrice = 0;
var lcoPrice = 0;
var wfoListPrice = 0;
var wfoPrice = 0;

var sonarHostPrice = 0;
var dlpHostPrice = 0;
var lcoHostPrice = 0;
var wfoHostPrice = 0;

var sonarSelfListPrice = 0;
var sonarSelfPrice = 0;
var dlpListSelfPrice = 0;
var dlpSelfPrice = 0;

var lcoListSelfPrice = 0;
var lcoSelfPrice = 0;
var wfoListSelfPrice = 0;
var wfoSelfPrice = 0;

var serverSetupPrice = 0;

var sonarUnit = 0;
var dlpUnit = 0;
var lcoUnit = 0;
var wfoUnit = 0;

// Start quantity discount price
var quantity4DiscountSonar = 0;
var quantity100DiscountSonar = 0;
var quantity4Discountdlp = 0;
var quantity100Discountdlp = 0;

var quantity4Discountlco = 0;
var quantity100Discountlco = 0;
var quantity4Discountwfo = 0;
var quantity100Discountwfo = 0;

var quantitySelf4DiscountSonar = 0;
var quantitySelf100DiscountSonar = 0;
var quantitySelf4Discountdlp = 0;
var quantitySelf100Discountdlp = 0;

var quantitySelf4Discountlco = 0;
var quantitySelf100Discountlco = 0;
var quantitySelf4Discountwfo = 0;
var quantitySelf100Discountwfo = 0;
// End quantity discount price

// Start terms
var term1 = 0;
var term2 = 0;
var term3 = 0;
var term4 = 0;
// End terms


// Start Support Fee
var support = 0;
var supportValue = 0;
// End Support Fee

// Start Discount Flag
var discountApplied = "";
// End Discount Flag

// Start Original Price
var sonarOriginalPrice = 0;
var dlpOriginalPrice = 0;
var lcoOriginalPrice = 0;
var wfoOriginalPrice = 0;
// End Original Price

// Start Quantity range to use discount code
var quantityRangeLow = 0;
var quantityRangeHigh = 0;
// End Quantity range to use discount code

$(InitIgcart);

function InitIgcart(){      
    
    sonarListPrice = parseFloat(document.getElementById("Hidden5").value).toFixed(2);   
    sonarPrice = parseFloat(document.getElementById("Hidden6").value).toFixed(2);   
    dlpListPrice = parseFloat(document.getElementById("Hidden7").value).toFixed(2);   
    dlpPrice = parseFloat(document.getElementById("Hidden8").value).toFixed(2);   
    lcoListPrice = parseFloat(document.getElementById("Hidden9").value).toFixed(2);   
    lcoPrice = parseFloat(document.getElementById("Hidden10").value).toFixed(2);   
    wfoListPrice = parseFloat(document.getElementById("Hidden11").value).toFixed(2);   
    wfoPrice = parseFloat(document.getElementById("Hidden12").value).toFixed(2); 
    
    sonarHostPrice = parseFloat(document.getElementById("Hidden1").value).toFixed(2);   
    dlpHostPrice = parseFloat(document.getElementById("Hidden2").value).toFixed(2);   
    lcoHostPrice = parseFloat(document.getElementById("Hidden3").value).toFixed(2);   
    wfoHostPrice = parseFloat(document.getElementById("Hidden4").value).toFixed(2);   
    
    
    sonarSelfListPrice = parseFloat(document.getElementById("Hidden13").value).toFixed(2); 
    sonarSelfPrice = parseFloat(document.getElementById("Hidden14").value).toFixed(2);   
    dlpListSelfPrice = parseFloat(document.getElementById("Hidden15").value).toFixed(2);   
    dlpSelfPrice = parseFloat(document.getElementById("Hidden16").value).toFixed(2);   
    lcoListSelfPrice = parseFloat(document.getElementById("Hidden17").value).toFixed(2);   
    lcoSelfPrice = parseFloat(document.getElementById("Hidden18").value).toFixed(2);   
    wfoListSelfPrice = parseFloat(document.getElementById("Hidden19").value).toFixed(2);   
    wfoSelfPrice = parseFloat(document.getElementById("Hidden20").value).toFixed(2);      
    
    term1 = (parseFloat(100-document.getElementById("Hidden41").value)/100).toFixed(2);
    term2 = (parseFloat(100-document.getElementById("Hidden42").value)/100).toFixed(2);
    term3 = (parseFloat(100-document.getElementById("Hidden43").value)/100).toFixed(2);
    term4 = (parseFloat(100-document.getElementById("Hidden44").value)/100).toFixed(2);
    support = (parseFloat(document.getElementById("Hidden45").value)/100).toFixed(2);
    
    document.getElementById("term1").innerHTML = "<input type='radio' name='license_term' value='1' class='radio_align' checked onclick='CalculateSubtotal(this.value);'/>&nbsp;1 year";
    document.getElementById("term2").innerHTML = "<input type='radio' name='license_term' value='2' class='radio_align' onclick='CalculateSubtotal(this.value);'/>&nbsp;2 years - " + document.getElementById("Hidden42").value + "% Discount";
    document.getElementById("term3").innerHTML = "<input type='radio' name='license_term' value='3' class='radio_align' onclick='CalculateSubtotal(this.value);'/>&nbsp;3 years - " + document.getElementById("Hidden43").value + "% Discount";
    document.getElementById("term4").innerHTML = "<input type='radio' name='license_term' value='5' class='radio_align' onclick='CalculateSubtotal(this.value);'/>&nbsp;5 years - " + document.getElementById("Hidden44").value + "% Discount";
    document.getElementById("supportfee").innerHTML = document.getElementById("Hidden46").value + ":";
    
    serverSetupPrice = parseFloat(document.getElementById("Hidden21").value).toFixed(2);     
    
    discountApplied = document.getElementById("Hidden22").value;  
    sonarOriginalPrice = parseFloat(document.getElementById("Hidden47").value).toFixed(2);  
    dlpOriginalPrice = parseFloat(document.getElementById("Hidden48").value).toFixed(2);  
    lcoOriginalPrice = parseFloat(document.getElementById("Hidden49").value).toFixed(2);  
    wfoOriginalPrice = parseFloat(document.getElementById("Hidden50").value).toFixed(2);  
    
    quantityRangeLow = document.getElementById("quantityRangeLow").value;  
    quantityRangeHigh = document.getElementById("quantityRangeHigh").value;  
    
    updateListPrice();                  
    getQuantityDiscountPrice();             
    CalculateSonar();
    CalculateDLP();
    CalculateLPC();
    CalculateWFO();                       
}

function getQuantityDiscountPrice(){
     quantity4DiscountSonar = parseFloat(document.getElementById("Hidden37").value).toFixed(2);
     quantity100DiscountSonar = parseFloat(document.getElementById("Hidden38").value).toFixed(2);
     quantity4Discountdlp = parseFloat(document.getElementById("Hidden31").value).toFixed(2);
     quantity100Discountdlp = parseFloat(document.getElementById("Hidden32").value).toFixed(2);

     quantity4Discountlco = parseFloat(document.getElementById("Hidden39").value).toFixed(2);
     quantity100Discountlco = parseFloat(document.getElementById("Hidden40").value).toFixed(2);
     quantity4Discountwfo = parseFloat(document.getElementById("Hidden25").value).toFixed(2);
     quantity100Discountwfo = parseFloat(document.getElementById("Hidden26").value).toFixed(2);

     quantitySelf4DiscountSonar = parseFloat(document.getElementById("Hidden35").value).toFixed(2);
     quantitySelf100DiscountSonar = parseFloat(document.getElementById("Hidden36").value).toFixed(2);
     quantitySelf4Discountdlp = parseFloat(document.getElementById("Hidden33").value).toFixed(2);
     quantitySelf100Discountdlp = parseFloat(document.getElementById("Hidden34").value).toFixed(2);

     quantitySelf4Discountlco = parseFloat(document.getElementById("Hidden29").value).toFixed(2);
     quantitySelf100Discountlco = parseFloat(document.getElementById("Hidden30").value).toFixed(2);
     quantitySelf4Discountwfo = parseFloat(document.getElementById("Hidden27").value).toFixed(2);
     quantitySelf100Discountwfo = parseFloat(document.getElementById("Hidden28").value).toFixed(2);
}

function updateListPrice(){
    if(document.getElementById("atiHostTrue").checked){
        
        sonarUnit = sonarPrice;
        dlpUnit = dlpPrice;
        lcoUnit = lcoPrice;
        wfoUnit = wfoPrice;
    }   
    else{
        sonarUnit = sonarSelfPrice;
        dlpUnit = dlpSelfPrice;
        lcoUnit = lcoSelfPrice;
        wfoUnit = wfoSelfPrice;
    }
    
    document.getElementById("mcBlistPrice").innerHTML = "Enter Qty";
    document.getElementById("mcBPrice").innerHTML = "Enter Qty";
    document.getElementById("dlpBListPrice").innerHTML = "Enter Qty";
    document.getElementById("dlpBPrice").innerHTML = "Enter Qty";
    document.getElementById("lcoListPrice").innerHTML = "Enter Qty";
    document.getElementById("lcoPrice").innerHTML = "Enter Qty";
    document.getElementById("wfoListPrice").innerHTML = "Enter Qty";
    document.getElementById("wfoPrice").innerHTML = "Enter Qty";
    
}

function updateUnitPrice(){
    if(discountApplied == "Applied"){
    
        if(parseFloat(document.getElementById("sonarQty").value) <= parseFloat(quantityRangeHigh)
            && parseFloat(document.getElementById("sonarQty").value) >= parseFloat(quantityRangeLow)){ 
            sonarPrice = parseFloat(document.getElementById("Hidden6").value).toFixed(2); 
            sonarSelfPrice = parseFloat(document.getElementById("Hidden14").value).toFixed(2);  
        }
        else{
            sonarPrice = sonarOriginalPrice; 
            sonarSelfPrice = sonarOriginalPrice;
        }
        
        if(parseFloat(document.getElementById("dlpB").value) <= parseFloat(quantityRangeHigh)
            && parseFloat(document.getElementById("dlpB").value) >= parseFloat(quantityRangeLow)){ 
            dlpPrice = parseFloat(document.getElementById("Hidden8").value).toFixed(2);  
            dlpSelfPrice = parseFloat(document.getElementById("Hidden16").value).toFixed(2); 
        }
        else{
            dlpPrice = dlpOriginalPrice; 
            dlpSelfPrice = dlpOriginalPrice;
        }
        
        if(parseFloat(document.getElementById("lco").value) <= parseFloat(quantityRangeHigh)
            && parseFloat(document.getElementById("lco").value) >= parseFloat(quantityRangeLow)){ 
            lcoPrice = parseFloat(document.getElementById("Hidden10").value).toFixed(2); 
            lcoSelfPrice = parseFloat(document.getElementById("Hidden18").value).toFixed(2);  
        }
        else{
            lcoPrice = lcoOriginalPrice; 
            lcoSelfPrice = lcoOriginalPrice;
        }
        
        if(parseFloat(document.getElementById("wfo").value) <= parseFloat(quantityRangeHigh)
            && parseFloat(document.getElementById("wfo").value) >= parseFloat(quantityRangeLow)){ 
            wfoPrice = parseFloat(document.getElementById("Hidden12").value).toFixed(2); 
            wfoSelfPrice = parseFloat(document.getElementById("Hidden20").value).toFixed(2);  
        }
        else{
            wfoPrice = wfoOriginalPrice; 
            wfoSelfPrice = wfoOriginalPrice;
        }
    }

    if(document.getElementById("atiHostTrue").checked){  
        if(document.getElementById("sonarQty").value <10){
            sonarUnit = sonarPrice;
        }
        else if(document.getElementById("sonarQty").value >= 10 && document.getElementById("sonarQty").value <25){
            sonarUnit = sonarPrice - quantity4DiscountSonar;
        }
        else{
            sonarUnit = sonarPrice - quantity100DiscountSonar;
        }
        
        if(document.getElementById("dlpB").value < 10){
            dlpUnit = dlpPrice;
        }
        else if(document.getElementById("dlpB").value >= 10 && document.getElementById("dlpB").value <25){
            dlpUnit = dlpPrice - quantity4Discountdlp;
        }
        else{
            dlpUnit = dlpPrice - quantity100Discountdlp;
        }
        if(document.getElementById("lco").value < 10){
          
            lcoUnit = lcoPrice;
        }
        else if(document.getElementById("lco").value >= 10 && document.getElementById("lco").value <25){

            lcoUnit = lcoPrice - quantity4Discountlco;
        }
        else{

            lcoUnit = lcoPrice - quantity100Discountlco;
        }
        if(document.getElementById("wfo").value < 10){
            wfoUnit = wfoPrice;
        }
        else if(document.getElementById("wfo").value >= 10 && document.getElementById("wfo").value <25){
            wfoUnit = wfoPrice - quantity4Discountwfo;
        }
        else{
            wfoUnit = wfoPrice - quantity100Discountwfo;
        }
    }   
    else{
        if(document.getElementById("sonarQty").value <10){
            sonarUnit = sonarSelfPrice;
        }
        else if(document.getElementById("sonarQty").value >= 10 && document.getElementById("sonarQty").value <25){
            sonarUnit = sonarSelfPrice - quantitySelf4DiscountSonar;
        }
        else{
            sonarUnit = sonarSelfPrice - quantitySelf100DiscountSonar;
        }
        if(document.getElementById("dlpB").value < 10){
            dlpUnit = dlpSelfPrice;
        }
        else if(document.getElementById("dlpB").value >= 10 && document.getElementById("dlpB").value <25){
            dlpUnit = dlpSelfPrice - quantitySelf4Discountdlp;
        }
        else{
            dlpUnit = dlpSelfPrice - quantitySelf100Discountdlp;
        }
        if(document.getElementById("lco").value < 10){
            lcoUnit = lcoSelfPrice;
        }
        else if(document.getElementById("lco").value >= 10 && document.getElementById("lco").value <25){
            lcoUnit = lcoSelfPrice - quantitySelf4Discountlco;
        }
        else{
            lcoUnit = lcoSelfPrice - quantitySelf100Discountlco;
        }
        if(document.getElementById("wfo").value < 10){
            wfoUnit = wfoSelfPrice;
        }
        else if(document.getElementById("wfo").value >= 10 && document.getElementById("wfo").value <25){
            wfoUnit = wfoSelfPrice - quantitySelf4Discountwfo;
        }
        else{
            wfoUnit = wfoSelfPrice - quantitySelf100Discountwfo;
        }
    }
    sonarUnit = parseFloat(sonarUnit).toFixed(2);
    dlpUnit = parseFloat(dlpUnit).toFixed(2);
    lcoUnit = parseFloat(lcoUnit).toFixed(2);
    wfoUnit = parseFloat(wfoUnit).toFixed(2);
}

function updatesupportValue(){
    supportValue = ((sonarValue + dlpValue + lpcValue + wfoValue) * timer * factor * support);
}

function CalculateSonar(){
    if(document.getElementById("sonarQty").value <= 0 || isNaN(document.getElementById("sonarQty").value)){
        document.getElementById("sonarQty").value = "0";
        document.getElementById("mcBPrice").innerHTML = "Enter Qty";
    }
    else{
        updateUnitPrice();
   //     alert(sonarUnit);
        document.getElementById("mcBPrice").innerHTML = "$"+ sonarUnit;
    }
    sonarValue = document.getElementById("sonarQty").value * sonarUnit;
    UpdateHost();
 //   AJAXRequest('mcB');
    if(!document.getElementById("atiHostTrue").checked){
        hostValue = parseFloat(serverSetupPrice);
    }  
    document.getElementById("calcSonar").innerHTML = "$" + (sonarValue).toFixed(2);
    document.getElementById("totalValue").innerHTML = "$" + ((sonarValue + dlpValue + lpcValue + wfoValue) * timer * factor).toFixed(2);
    document.getElementById("selectedDiv").innerHTML = "$" + (hostValue).toFixed(2);
    updatesupportValue();
    document.getElementById("supportValue").innerHTML = "$" + (supportValue).toFixed(2);
    document.getElementById("wholeTotal").innerHTML = "$" + (((sonarValue + dlpValue + lpcValue + wfoValue) * timer * factor + hostValue + supportValue)).toFixed(2);
}

function CalculateDLP(){

    if(document.getElementById("dlpB").value <= 0 || isNaN(document.getElementById("dlpB").value) ){
        document.getElementById("dlpB").value = "0";
        document.getElementById("dlpBPrice").innerHTML = "Enter Qty";
    }
    else{
        updateUnitPrice();
        document.getElementById("dlpBPrice").innerHTML = "$"+ dlpUnit;
    }
    dlpValue = document.getElementById("dlpB").value * dlpUnit;
    
    UpdateHost();
 //   AJAXRequest('dlpB');
    if(!document.getElementById("atiHostTrue").checked){
        hostValue = parseFloat(serverSetupPrice);
    }  
    document.getElementById("calcDLP").innerHTML = "$" + (dlpValue).toFixed(2);
    document.getElementById("totalValue").innerHTML = "$" + ((sonarValue + dlpValue + lpcValue + wfoValue) * timer * factor).toFixed(2);
    document.getElementById("selectedDiv").innerHTML = "$" + (hostValue).toFixed(2);
    updatesupportValue();
    document.getElementById("supportValue").innerHTML = "$" + (supportValue).toFixed(2);
    document.getElementById("wholeTotal").innerHTML = "$" + (((sonarValue + dlpValue + lpcValue + wfoValue) * timer * factor + hostValue + supportValue)).toFixed(2);
}

function CalculateLPC(){
    if(document.getElementById("lco").value <= 0 || isNaN(document.getElementById("lco").value) ){
        document.getElementById("lco").value = "0";
        document.getElementById("lcoPrice").innerHTML = "Enter Qty";
    }
    else{
        updateUnitPrice();
        document.getElementById("lcoPrice").innerHTML = "$"+ lcoUnit;
    }
    lpcValue = document.getElementById("lco").value * lcoUnit;
 
    UpdateHost();
 //   AJAXRequest('lco');
    if(!document.getElementById("atiHostTrue").checked){
        hostValue = parseFloat(serverSetupPrice);
    }  
    document.getElementById("calcLPC").innerHTML = "$" + (lpcValue).toFixed(2);
    document.getElementById("totalValue").innerHTML = "$" + ((sonarValue + dlpValue + lpcValue + wfoValue) * timer * factor).toFixed(2);
    document.getElementById("selectedDiv").innerHTML = "$" + (hostValue).toFixed(2);
    updatesupportValue();
    document.getElementById("supportValue").innerHTML = "$" + (supportValue).toFixed(2);
    document.getElementById("wholeTotal").innerHTML = "$" + (((sonarValue + dlpValue + lpcValue + wfoValue) * timer * factor + hostValue + supportValue)).toFixed(2);
}

function CalculateWFO(){
    if(document.getElementById("wfo").value <= 0 || isNaN(document.getElementById("wfo").value) ){
        document.getElementById("wfo").value = "0";
        document.getElementById("wfoPrice").innerHTML = "Enter Qty";
    }
    else{
        updateUnitPrice();
        document.getElementById("wfoPrice").innerHTML = "$"+ wfoUnit;
    }
    wfoValue = document.getElementById("wfo").value * wfoUnit;
    
    UpdateHost();
 //   AJAXRequest('wfo');
    if(!document.getElementById("atiHostTrue").checked){
        hostValue = parseFloat(serverSetupPrice);
    }  
    document.getElementById("calcWFO").innerHTML = "$" + (wfoValue).toFixed(2);
    document.getElementById("totalValue").innerHTML = "$" + ((sonarValue + dlpValue + lpcValue + wfoValue) * timer * factor).toFixed(2);
    document.getElementById("selectedDiv").innerHTML = "$" + (hostValue).toFixed(2);
    updatesupportValue();    
    document.getElementById("supportValue").innerHTML = "$" + (supportValue).toFixed(2);
    document.getElementById("wholeTotal").innerHTML = "$" + (((sonarValue + dlpValue + lpcValue + wfoValue) * timer * factor + hostValue + supportValue)).toFixed(2);
}

function CalculateSubtotal(total){
    timer = total;
    switch(timer){
        case "1":
            factor = term1;
            break;
        case "2":
            factor = term2;
            break;
        case "3":
            factor = term3;
            break;
        case "5":
            factor = term4;
            break;
    };
    
    UpdateHost();
    if(!document.getElementById("atiHostTrue").checked){
        hostValue = parseFloat(serverSetupPrice);
     }  
    document.getElementById("totalValue").innerHTML = "$" + ((sonarValue + dlpValue + lpcValue + wfoValue) * timer * factor).toFixed(2);
    document.getElementById("selectedDiv").innerHTML = "$" + (hostValue).toFixed(2);
    updatesupportValue();
    document.getElementById("supportValue").innerHTML = "$" + (supportValue).toFixed(2);
    document.getElementById("wholeTotal").innerHTML = "$" + (((sonarValue + dlpValue + lpcValue + wfoValue) * timer * factor + hostValue + supportValue)).toFixed(2);
}


function CalculateHost(value){

    updateListPrice();
    CalculateSonar();
    CalculateDLP();
    CalculateLPC();
    CalculateWFO();
    
    UpdateHost();
    if(!document.getElementById("atiHostTrue").checked){
        hostValue = parseFloat(serverSetupPrice);
    }  
    
    document.getElementById("selectedDiv").innerHTML = "$" + (hostValue).toFixed(2);
    updatesupportValue();
    document.getElementById("supportValue").innerHTML = "$" + (supportValue).toFixed(2);
    document.getElementById("wholeTotal").innerHTML = "$" + (((sonarValue + dlpValue + lpcValue + wfoValue) * timer * factor + hostValue + supportValue)).toFixed(2);
}

function UpdateHost(){
    
    var subtotal = ((sonarValue + dlpValue + lpcValue + wfoValue) * timer * factor).toFixed(2);
   // updateHostingValue();
    var tmpHost = ((parseFloat(document.getElementById("Hidden1").value)*document.getElementById("sonarQty").value
                 + parseFloat(document.getElementById("Hidden2").value)*document.getElementById("dlpB").value
                    + parseFloat(document.getElementById("Hidden3").value)*document.getElementById("lco").value
                        + parseFloat(document.getElementById("Hidden4").value)*document.getElementById("wfo").value)* timer).toFixed(2);
    if( subtotal >= 5000 )
    {
        document.getElementById("radioButtonTrue").disabled = false;
        document.getElementById("selfhostingText").style.color = "Black";
        document.getElementById("comparePriceATI").innerHTML = "$" + tmpHost;
        document.getElementById("comparePriceSelf").innerHTML = "$" + parseFloat(serverSetupPrice).toFixed(2);
    }
    else
    {
        document.getElementById("radioButtonTrue").disabled = true;
        document.getElementById("atiHostTrue").checked = true;
        document.getElementById("selfhostingText").style.color = "Gray";
        document.getElementById("atihostingText").style.color = "Black";
        document.getElementById("comparePriceATI").innerHTML = "";
        document.getElementById("comparePriceSelf").innerHTML = "";
    }
    

    updateHostingValue();
}

function updateHostingValue(){
    
     hostValue = (parseFloat(document.getElementById("Hidden1").value)*document.getElementById("sonarQty").value
                 + parseFloat(document.getElementById("Hidden2").value)*document.getElementById("dlpB").value
                    + parseFloat(document.getElementById("Hidden3").value)*document.getElementById("lco").value
                        + parseFloat(document.getElementById("Hidden4").value)*document.getElementById("wfo").value)* timer;
     
     if(!document.getElementById("atiHostTrue").checked){
        hostValue = parseFloat(serverSetupPrice);
     }     
     document.getElementById("selectedDiv").innerHTML = "$"+(hostValue).toFixed(2);
}

function setAction()
{
    var percentageDiscount = ((100-parseFloat(document.getElementById("Hidden24").value))/100.0).toFixed(2);
    var pricediscount = parseFloat(document.getElementById("Hidden23").value).toFixed(2);

    if(document.getElementById("atiHostTrue").checked){                                                                                                                                     
        document.getElementById("form1").action = "/ProductCart/pc/sessionbuilder.asp?sonarID=204&datalockID=205&laptopID=149&wfoID=212&serverFee=0&sonarPrice=$" + (sonarValue* timer * factor).toFixed(2) + "&dlpPrice=$" + (dlpValue* timer * factor).toFixed(2) + "&lpcPrice=$" + (lpcValue* timer * factor).toFixed(2) + "&wfoPrice=$" + (wfoValue* timer * factor).toFixed(2) + "&supportfee=" + (supportValue).toFixed(2) + "&totalPrice=" + (((sonarValue + dlpValue + lpcValue + wfoValue) * timer * factor + hostValue)).toFixed(2);
    }
    else {
        document.getElementById("form1").action = "/ProductCart/pc/sessionbuilder.asp?sonarID=84&datalockID=206&laptopID=144&wfoID=211&serverFee=180&sonarPrice=$" + (sonarValue* timer * factor).toFixed(2) + "&dlpPrice=$" + (dlpValue* timer * factor).toFixed(2) + "&lpcPrice=$" + (lpcValue* timer * factor).toFixed(2) + "&wfoPrice=$" + (wfoValue* timer * factor).toFixed(2) + "&supportfee=" + (supportValue).toFixed(2) + "&totalPrice=" + (((sonarValue + dlpValue + lpcValue + wfoValue) * timer * factor + hostValue)).toFixed(2);
    }
}
