
function OpenReceiptPrintViewPage (pageUrl, pageTitle)
{
    window.open(pageUrl,pageTitle, 'menubar=0,toolbar=0,location=1,resizable=1,scrollbars=1,width=800,height=600');     
}

function OpenHelpPage (pageUrl, pageTitle)
{
    mywindow = window.open(pageUrl,pageTitle, 'menubar=1,toolbar=1,location=1,resizable=1,scrollbars=1,width=630,height=700');     
}

function OpenStandardPopupPage (pageUrl, pageTitle)
{
    window.open(pageUrl,pageTitle, 'menubar=1,toolbar=1,location=1,resizable=1,scrollbars=1,width=1000,height=800');     
}

function textboxMultilineMaxNumber(txt,maxLen)
{   
    try{   
        if(txt.value.length > (maxLen-1))
            return false;   
        }catch(e){   
    }   
}   

function QReqSetVal() {
    var cmb1val = document.getElementById("Select1");
    var cmb2val = document.getElementById("Select2");
    cmb2val.options.length = 0;

    if (cmb1val.value == 1) {
        var optn = document.createElement("OPTION");
        optn.text = "Real Estate Agent";
        optn.value = "5";
        cmb2val.options.add(optn);            
    }
    else if (cmb1val.value == 2) {
        var optn3 = document.createElement("OPTION");
        optn3.text = "- Select -";
        optn3.value = "0";
        cmb2val.options.add(optn3);            
        var optn = document.createElement("OPTION");
        optn.text = "Real Estate Agent";
        optn.value = "5";
        cmb2val.options.add(optn);
        var optn2 = document.createElement("OPTION");
        optn2.text = "Investor";
        optn2.value = "7";
        cmb2val.options.add(optn2);
    }
    else if (cmb1val.value == 3) {
        var optn = document.createElement("OPTION");
        optn.text = "Loan Officer";
        optn.value = "6";
        cmb2val.options.add(optn);            
    }
    else if (cmb1val.value == 4) {
        var optn = document.createElement("OPTION");
        optn.text = "Real Estate Agent";
        optn.value = "5";
        cmb2val.options.add(optn);    
    }
}
    
function QReqGo(){
    var cmb1val = document.getElementById("Select1");
    var cmb2val = document.getElementById("Select2");
    
    if (cmb1val.value == 1) {
        location.href='http://www.myrealestatehomesolutions.com/myrehs/b_BuyHomeQuick.aspx';            
    }    
    else if (cmb1val.value == 2) {
        if (cmb2val.value == 5)
        {
            location.href='http://www.myrealestatehomesolutions.com/myrehs/s_SellHomeQuick.aspx';            
        }
        else if (cmb2val.value == 7)
        {
            location.href='http://www.myrealestatehomesolutions.com/myrehs/s_SellHomeQuick.aspx?inv=y';            
        }
        else
        {
            alert('Please select a value');
        }
    }    
    else if (cmb1val.value == 3) {
        location.href='http://www.myrealestatehomesolutions.com/myrehs/f_RFinancingQuick.aspx';            
    }    
    else if (cmb1val.value == 4) {
        location.href='http://www.myrealestatehomesolutions.com/myrehs/r_RentToOwnQuick.aspx';            
    }    
    else
    {
        alert('Please select a value');
    }
}

function IntroMenuGo(b1,b2,b3,b4,b5,b6,t1)
{   
    if (isNaN(parseInt(t1)) || (t1.length != 5)) 
    {
        alert('Please input a valid zipcode.');
    }
    else
    {
        if (b1 == true) {
            OpenStandardPopupPage('http://www.myrealestatehomesolutions.com/myrehs/home-owners-insurance.aspx' + "?zipcode=" + t1,'null');
        }        
        else if (b2 == true) {
            OpenStandardPopupPage('http://www.myrealestatehomesolutions.com/myrehs/renters-insurance.aspx' + "?zipcode=" + t1,'null');            
        }        
        else if (b3 == true)  {
            OpenStandardPopupPage('http://www.myrealestatehomesolutions.com/myrehs/auto-insurance.aspx' + "?zipcode=" + t1,'null');            
        }        
        else if (b4 == true) {
            OpenStandardPopupPage('http://www.myrealestatehomesolutions.com/myrehs/motorcycle-insurance.aspx' + "?zipcode=" + t1,'null');            
        }        
        else if (b5 == true) {
            OpenStandardPopupPage('http://www.myrealestatehomesolutions.com/myrehs/health-insurance.aspx' + "?zipcode=" + t1,'null');            
        }        
        else if (b6 == true) {
            OpenStandardPopupPage('http://www.myrealestatehomesolutions.com/myrehs/life-insurance.aspx' + "?zipcode=" + t1,'null');            
        }        
        else {
            alert('Please select a type of insurance.');
        }
    }
}

function InsGo(t1)
{   
    if (isNaN(parseInt(t1)) || (t1.length != 5)) 
    {
        alert('Please input a valid zipcode.');
    }
    else
    {
        location.href='http://www.myrealestatehomesolutions.com/myrehs/home-owners-insurance.aspx?zipcode=' + t1;
    }
}


