//MT - Check for frequency
//To use this for another overlay - the cookie name must be changed(customstart is current name). 
//Pop-under only once per browser session? (0=no, 1=yes)
//Specifying 0 will cause crateinvite to load every time page is loaded
var once_per_session=1

///No editing beyond here required/////

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function loadornotcustomstart(){
if (get_cookie('customstart')==''){
loadcustomstart()
document.cookie="customstart=yes"
}
}



function customstartinit(){
if (once_per_session==0)
loadcustomstart()
else
if (get_cookie('tipPricePoint')!=''){
loadornotcustomstart()
}
}

function loadcustomstart()
{
    if (document.getElementById){
    var subobj=document.getElementById('subcontent2002customstart')
    subobj.style.display="block"
    setTimeout("customstartclose('subcontent2002customstart')",5000);
    return false
    }
    else
    return true
    }

function customstartclose(subobj){
document.getElementById(subobj).style.display="none"
}

