﻿// JScript File
Timeout = 15 * 60 * 1000; // Milli-Seconds (for 20 minute timeout - warning in 15 minutes)

setTimeout("AlertUser();", Timeout);

function AlertUser()
{
    alert("Timeout in 5 minutes if no activity.");
   
}

function btnPrintQuote()
{
window.open("PrintQuote.aspx","_blank")
}

function btnPrintApp(vID)
{
window.open("../PrintQuote.aspx","_blank")
}

function fncDontSubmit()
{
if (window.event.keyCode == 13) 
{
    event.returnValue=false; 
    event.cancel = true;
}}

var oPopup = window.createPopup();
function openPopup()
{
var oPopBody = oPopup.document.body;
oPopBody.innerHTML = "<DIV id='popup'>This is a popup.</DIV>"
oPopup.show(290,190,240,170, document.body);
}

function Calculate()   
{   
    
    source1 = document.getElementById('ctl00_ContentPlaceHolder1_FormView1_txtAesth');   
    val1 = source1.value;
    if(isNaN(val1))
       val1 =0;
    source2 = document.getElementById('ctl00_ContentPlaceHolder1_FormView1_txtAesthInclMicro');   
    val2 = source2.value;
    if (isNaN(val2))
        val2 = 0;
    source3 = document.getElementById('ctl00_ContentPlaceHolder1_FormView1_txtAesthSingle');   
    val3 = source3.value;
    if (isNaN(val3))
        val3 = 0;
    source4 = document.getElementById('ctl00_ContentPlaceHolder1_FormView1_txtBeautician');   
    val4 = source4.value;
    if (isNaN(val4))
        val4 = 0;
    source5 = document.getElementById('ctl00_ContentPlaceHolder1_FormView1_txtElectrology');   
    val5 = source5.value;
    if (isNaN(val5))
        val5 = 0;
    source6 = document.getElementById('ctl00_ContentPlaceHolder1_FormView1_txtMassage');   
    val6 = source6.value;
    if (isNaN(val6))
        val6 = 0;
    source7 = document.getElementById('ctl00_ContentPlaceHolder1_FormView1_txtOtherService');   
   val7 = source7.value;
    if (isNaN(val7))
        val7 = 0;
   
    
    var vtotal = (val1-0) + (val2-0) + (val3-0) + (val4-0) + (val5-0) + (val6-0) + (val7-0);
    
    sourceTotal = document.getElementById('ctl00_ContentPlaceHolder1_FormView1_lblTotal');   

    sourceTotal.innerHTML = vtotal   
    
}   
        
        
        
        