// 20/12/2002 - rxj1 refactored code from baseFunction.js

/* ssa retrieval begin */
// cookie for this document, called "dlissa", lives as long as the session,
// available to the entire site
var visitordata = new Cookie(document, "dlissa", null, "/");

if( ssa() )
{
    // if there is an ssa cde on the url, bake it into a cookie
    visitordata.ssaCode = ssa();                                    
}
else
{
    // otherwise try and retrieve an ssa code from an existing cookie
    visitordata.load();
}
visitordata.store();
/* ssa retrieval end */

var DLIWindow;
var x           = new String(document.location);
var SSACode     = " ";

if( x.split ("?")[1] )
{
    var str2 = x.split ("?")[1];
    var start = str2.indexOf("SSACode=");
    if (start!= -1)
    {
        var str3 = str2.substring(start+8);
        var ampArray = str3.split("&");
        var eqArray = str3.split("=");
        if (ampArray.length > 1)
        {
            SSACode = ampArray[0];
            if (SSACode.split("=")[0])
            {
                SSACode = SSACode.split("=")[0];
            }
        }
        else
        {
            if (eqArray.length > 1)
            {
                SSACode = eqArray[0];
            }
            else
            {
                SSACode = str3;
            }
        }
    }
    if (SSACode.length != 10)
    {
        SSACode = "";
    }
}



function getaQuote(){
    product = document.qnboptions.qnboptions[document.qnboptions.qnboptions.selectedIndex].value;
    if ( product != "" ){
        onChange=openNewWindowURL(product);
    }
}

function showCallUs(){
    window.open('/call_us/Call_us.htm','CallUs','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=525,height=500,left=20,top=20');
    return;
}

function showBusinessServices(){
    window.open('/business_services/business_services.htm','BusinessServices','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=600,height=507,left=20,top=20');
    return;
}

function openWin()
{
window.open('http://www.metafaq.com/clients/directline/html/global.htm','Global','width=710,height=580,screenX=15,screenY=50,top=15,left=50,resizable=yes');
return;
}
