// start: setup basic env vars
var isHTTPS = (("https:" == document.location.protocol) ? true : false);
// end: setup basic env vars

$(document).ready(function() {
});

function obMail(recip,dmn,ext,sbjct) {
    window.location.href = "mailto:" + recip + "@" + dmn + "." + ext +"?Subject=" + sbjct;
}

function popUpWin(url,windowName, windowOptions) {
    windowName = window.open(url,windowName,windowOptions);
    windowName.focus();
}

// start: basic cookie methods
function _set_cookie(name, value, days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime()+(days*24*60*60*1000));
        var expires = "; expires="+date.toGMTString();
    }
    else var expires = "";
    document.cookie = name + "=" + value + expires + "; path=/";
}

function _get_cookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return '';
}

function _delete_cookie(name) {
    _set_cookie(name, "", -1);
}
// end: basic cookie methods
