//Writes correct style sheet into page
//NOTE: style_legacy.css is for ie4 and ns4 on a mac....all other browsers use style.css
var stylesheet="b_style.css";

if (navigator.platform.indexOf("Mac")!=-1)
{
    if (navigator.appName=="Netscape" && navigator.appVersion.charAt(0)=="4")
    {
        stylesheet="b_style_legacy.css";
    }
    else if (navigator.appName=="Microsoft Internet Explorer" && navigator.appVersion.indexOf("MSIE 4")!=-1)
    {
        stylesheet="b_style_legacy.css";
    }
}

document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"../static/css/"+stylesheet+"\">");
//add the helper link.
//live link, uncomment for live link.
var helpServer = "http://businesshelp.verizon.net/srvs/cgi-bin/webcgi.exe?new,kb=vzobiz,t=context.tem,case=";
		
function contextHelp(theLink)
{
    popupWin=window.open(helpServer + theLink, "Context", "width=559,height=375,toolbar=0,scrollbars=1,resizable=0");
    setTimeout("popupWin.focus()",150);
    // when this function is called, wait 150 milliseconds before putting focus on the window.
}

//Image Rollover Function
function rollOver(img_name, img_src)
{
    if (document.images)
    {
        document [img_name].src = img_src;
    }
}

//General Purpose popUp Script
//usage: (#, #, 'name', 'url', 1/0, 1/0) where the last 2 parameters must be a 1 or 0.
function popUpWindow (window_width, window_height, window_name, window_url, _resizeable, _scrollbars )
{
    var options="resizable="+_resizeable+",scrollbars="+_scrollbars+",width="+window_width+",height="+window_height+"";
    popupWin=window.open(window_url, window_name, options);
    
    return false;
}

//directs the browser that opened the popup to the specified link
//usage: openerLink('URL STRING');
function openerLink(link_location)
{
    opener.location.href=link_location;
}

//Pops Up Glossary page for supplied term
//usage:  showGlossary('ANCHOR STRING');
function showGlossary(term)
{
    var page_2_load="/resources/glossary/";
    var first_char;

    first_char=term.charAt(0)
    first_char=first_char.toLowerCase();
    
    if(isNaN(first_char)==false)
    {
        page_2_load=page_2_load + "popup.asp";
    }
    else
    {
        page_2_load=page_2_load + "popup.asp?letter=" + first_char + "#" + term;
    }
    
    popUpWindow(400, 300, 'glossary', page_2_load, 1, 1);
    
}




//Functions for the searchbox in the header
function submitHeaderSearch()
{
    if(document.header_search_form.qkw.value=="" || document.header_search_form.qkw.value=="Enter Search Terms")
    {
        //the form is blank or showing default text
        alert("Please enter the text you would like to search for.");
        return false;
    }
    else
    {
        return true;
    }
}


function clearSearchBox()
{
    if(document.header_search_form.qkw.value=="Enter Search Terms")
    {
        document.header_search_form.qkw.value="";
    }
}

