function OpenPrivacy() {
        var xOffset = 50;
        var yOffset = 50;
        var w = 500;
        var h = 450;
        window.open('privacy.php', 'subwindow', 'scrollbars=1,width='+w+',height='+h+',left='+xOffset+',top='+yOffset+',hotkeys=yes,titlebar=no,status=no,toolbar=no,resizable=no,dependent=no,location=no,directories=no,menubar=no');
}
function OpenTerms() {
        var xOffset = 50;
        var yOffset = 50;
        var w = 500;
        var h = 450;
        window.open('terms.php', 'subwindow', 'scrollbars=1,width='+w+',height='+h+',left='+xOffset+',top='+yOffset+',hotkeys=yes,titlebar=no,status=no,toolbar=no,resizable=no,dependent=no,location=no,directories=no,menubar=no');
}

function OpenList() {
        var xOffset = 0;
        var yOffset = 0;
        var w = 780;
        var h = 450;
        window.open('http://superlist.bof-safelist.com', 'subwindow', 'scrollbars=1,width='+w+',height='+h+',left='+xOffset+',top='+yOffset+',hotkeys=yes,titlebar=no,status=no,toolbar=no,resizable=yes,dependent=yes,location=no,directories=no,menubar=no');
}
function OpenWebEstimate() {
        var xOffset = 50;
        var yOffset = 50;
        var w = 500;
        var h = 450;
        window.open('estimate.php', 'subwindow', 'scrollbars=1,width='+w+',height='+h+',left='+xOffset+',top='+yOffset+',hotkeys=yes,titlebar=no,status=no,toolbar=no,resizable=no,dependent=no,location=no,directories=no,menubar=no');
}
function OpenWebEstimate2() {
        var xOffset = 50;
        var yOffset = 50;
        var w = 500;
        var h = 450;
        window.open('logo_estimate.php', 'subwindow', 'scrollbars=1,width='+w+',height='+h+',left='+xOffset+',top='+yOffset+',hotkeys=yes,titlebar=no,status=no,toolbar=no,resizable=no,dependent=no,location=no,directories=no,menubar=no');
}
function OpenWebEstimate3() {
        var xOffset = 50;
        var yOffset = 50;
        var w = 500;
        var h = 450;
        window.open('ban_estimate.php', 'subwindow', 'scrollbars=1,width='+w+',height='+h+',left='+xOffset+',top='+yOffset+',hotkeys=yes,titlebar=no,status=no,toolbar=no,resizable=no,dependent=no,location=no,directories=no,menubar=no');
}
function OpenWebEstimate4() {
        var xOffset = 50;
        var yOffset = 50;
        var w = 500;
        var h = 450;
        window.open('htmlad_estimate.php', 'subwindow', 'scrollbars=1,width='+w+',height='+h+',left='+xOffset+',top='+yOffset+',hotkeys=yes,titlebar=no,status=no,toolbar=no,resizable=no,dependent=no,location=no,directories=no,menubar=no');
}
function OpenHelp(topic) {
        var xOffset = 50;
        var yOffset = 50;
        var w = 500;
        var h = 450;
        window.open('help.php' + topic, 'subwindow', 'scrollbars=1,width='+w+',height='+h+',left='+xOffset+',top='+yOffset+',hotkeys=yes,titlebar=no,status=no,toolbar=no,resizable=yes,dependent=no,location=no,directories=no,menubar=no');
}


var enablePopUp=true;
var exp = new Date();
var expDays = 7;
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

function openpopup(){
        var e = event.srcElement;
        if (enablePopUp && !getCookie('NavShown')){
                //window.open('','GratisNav','width=520,height=465,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=yes');
                setCookie ('NavShown', true,exp);
        }
}

function Global_OnClick() {
        var e = event.srcElement;
        if (e.tagName == 'FONT' || e.tagName == 'AREA' || e.tagName == 'IMG' || e.tagName == 'A' || e.tagName == 'INPUT') {
                enablePopUp=false;
        }
}

function setCookie(name, value, expire) {
 document.cookie = name + "=" + escape(value)
 + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()));
}

var chipsAhoy = document.cookie;

function getCookie(name) { // use: getCookie("name");
    var index = chipsAhoy.indexOf(name + "=");
    if (index == -1) return null;
    index = chipsAhoy.indexOf("=", index) + 1; // first character
    var endstr = chipsAhoy.indexOf(";", index);
    if (endstr == -1) endstr = chipsAhoy.length; // last character
    return unescape(chipsAhoy.substring(index, endstr));
  }
