//MT - Check for frequency
//To use this for another overlay - the cookie name must be changed(tipImgEnlarge is current name). 
//Pop-under only once per browser session? (0=no, 1=yes)
//Specifying 0 will cause tipImgEnlarge 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 loadornottipImgEnlarge(){
if (get_cookie('tipImgEnlarge')==''){
setTimeout("loadtipImgEnlarge()",10000);
document.cookie="tipImgEnlarge=yes"
}
}


function tipImgEnlargeinit(){
if (once_per_session==0)
loadtipImgEnlarge()
else
if (get_cookie('crateinvite')!=''){
loadornottipImgEnlarge()
}
}


function loadtipImgEnlarge()
{
    if (document.getElementById){
    var subobj=document.getElementById('subcontent10001tip')
    subobj.style.display="block"
    setTimeout("tipImgEnlargeclose('subcontent10001tip')",15000);
    return false
    }
    else
    return true
    }

function tipImgEnlargeclose(subobj){
document.getElementById(subobj).style.display="none"
}


///Crate Tip/////


function loadtipcrate()
{
    if (document.getElementById){
    var subobj=document.getElementById('subcontent10000tip')
    subobj.style.display="block"
    setTimeout("tipcrateclose('subcontent10000tip')",11000);
    return false
    }
    else
    return true
    }

function tipcrateclose(subobj){
document.getElementById(subobj).style.display="none"
}


///Price Point/////


function loadornottipPricePoint(){
if (get_cookie('tipPricePoint')==''){
setTimeout("loadtipPricePoint()",2000);
document.cookie="tipPricePoint=yes"
}
}


function tipPricePointinit(){
if (once_per_session==0)
loadtipPricePoint()
else
if (get_cookie('tipImgEnlarge')!=''){
loadornottipPricePoint()
}
}


function loadtipPricePoint()
{
    if (document.getElementById){
    var subobj=document.getElementById('subcontent10002tip')
    subobj.style.display="block"
    setTimeout("tipPricePointclose('subcontent10002tip')",10000);
    return false
    }
    else
    return true
    }

function tipPricePointclose(subobj){
document.getElementById(subobj).style.display="none"
}


///Alternate Versions/////


function loadornottipAltVer(){
if (get_cookie('tipAltVer')==''){
setTimeout("loadtipAltVer()",2000);
document.cookie="tipAltVer=yes"
}
}


function tipAltVerinit(){
if (once_per_session==0)
loadtipAltVer()
else
if (get_cookie('tipPricePoint')!=''){
loadornottipAltVer()
}
}


function loadtipAltVer()
{
    if (document.getElementById){
    var subobj=document.getElementById('subcontent10003tip')
    subobj.style.display="block"
    setTimeout("tipAltVerclose('subcontent10003tip')",13000);
    return false
    }
    else
    return true
    }

function tipAltVerclose(subobj){
document.getElementById(subobj).style.display="none"
}


///Comparison Chart/////


function loadornottipCompChart(){
if (get_cookie('tipCompChart')==''){
setTimeout("loadtipCompChart()",2000);
document.cookie="tipCompChart=yes"
}
}


function tipCompChartinit(){
if (once_per_session==0)
loadtipCompChart()
else
if (get_cookie('tipAltVer')!=''){
loadornottipCompChart()
}
}


function loadtipCompChart()
{
    if (document.getElementById){
    var subobj=document.getElementById('subcontent10003atip')
    subobj.style.display="block"
    setTimeout("tipCompChartclose('subcontent10003atip')",13000);
    return false
    }
    else
    return true
    }

function tipCompChartclose(subobj){
document.getElementById(subobj).style.display="none"
}

///View Crates That Include Product/////


function loadornottipInCrates(){
if (get_cookie('tipInCrates')==''){
setTimeout("loadtipInCrates()",2000);
document.cookie="tipInCrates=yes"
}
}


function tipInCratesinit(){
if (once_per_session==0)
loadtipInCrates()
else
if (get_cookie('tipPricePoint')!=''){
loadornottipInCrates()
}
}


function loadtipInCrates()
{
    if (document.getElementById){
    var subobj=document.getElementById('subcontent10004tip')
    subobj.style.display="block"
    setTimeout("tipInCratesclose('subcontent10004tip')",10000);
    return false
    }
    else
    return true
    }

function tipInCratesclose(subobj){
document.getElementById(subobj).style.display="none"
}

///Send To/////


function loadornottipSendTo(){
if (get_cookie('tipSendTo')==''){
setTimeout("loadtipSendTo()",2000);
document.cookie="tipSendTo=yes"
}
}


function tipSendToinit(){
if (once_per_session==0)
loadtipSendTo()
else
loadornottipSendTo()
}


function loadtipSendTo()
{
    if (document.getElementById){
    var subobj=document.getElementById('subcontent20000tip')
    subobj.style.display="block"
    setTimeout("tipSendToclose('subcontent20000tip')",15000);
    return false
    }
    else
    return true
    }

function tipSendToclose(subobj){
document.getElementById(subobj).style.display="none"
}

///Review To/////


function loadornottipreview(){
if (get_cookie('tipreview')==''){
setTimeout("loadtipreview()",2000);
document.cookie="tipreview=yes"
}
}


function tipreviewinit(){
if (once_per_session==0)
loadtipreview()
else
loadornottipreview()
}


function loadtipreview()
{
    if (document.getElementById){
    var subobj=document.getElementById('subcontent30000tip')
    subobj.style.display="block"
    setTimeout("tipreviewclose('subcontent30000tip')",15000);
    return false
    }
    else
    return true
    }

function tipreviewclose(subobj){
document.getElementById(subobj).style.display="none"
}