function CreateBookmarkLink() { 
    thePageTitle =document.title;
    thePageUrl = window.location.href; 

    if( ( navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ) ) {
        if( window.external ) { // IE Favorite
            window.external.AddFavorite( thePageUrl, thePageTitle);
        }
    }

    if(navigator.userAgent.indexOf("Firefox")!=-1) {
        var versionindex=navigator.userAgent.indexOf("Firefox")+8;

        if( parseInt( navigator.userAgent.charAt( versionindex ) ) >= 1 ) {
            if (window.sidebar) { // Mozilla Firefox Bookmark
                window.sidebar.addPanel(thePageTitle, thePageUrl,"");
            }
        }
    } 
}

function BookmarkPopup(url) {
    newwindow=window.open(url,'name','height=620,width=600,status=1, scrollbars=1, toolbar=1, menubar=1, location=1');

    newwindow.moveTo(100,15);
    if( window.focus ) {
        newwindow.focus()
    }

    return false;
}

function LinkToPopup(url) {
    newwindow=window.open(url,'name','height=710,width=600,status=1, scrollbars=1');

    newwindow.moveTo(0,0);
    if( window.focus ) {
        newwindow.focus()
    }

    return false;
}

function setLinkToUrl() {
    var a = document.getElementById( "link_linkTo" );
    var host = window.location.hostname.toUpperCase();

    if( host.indexOf( "AUTO.ERIEINSURANCE.COM" ) > -1 || host.indexOf( "STAGEAUTO.ERIEINSURANCE.COM" ) > -1 || host.indexOf( "DEVAUTO.ERIEINSURANCE.COM" ) > -1 ) {
        a.href = window.location.protocol + "//" + window.location.hostname + "/LinkTo.aspx";
    }
}