shadowbox_script

//this fixes an issue with the old method, ambiguous values
//with this test document.cookie.indexOf( name + “=” );
function Get_Cookie(check_name){
//first we’ll split this cookie up into name/value pairs
//note: document.cookie only returns name=value, not the other components
var a_all_cookies=document.cookie.split(‘;’);
var a_temp_cookie=”;
var cookie_name=”;
var cookie_value=”;
var b_cookie_found=false; // set boolean t/f default f
for(i=0;i1)
cookie_value=unescape(a_temp_cookie[1].replace(/^\s+|\s+$/g,”));
//note that in cases where cookie is initialized but no value, null is returned
return cookie_value;
break;
}
a_temp_cookie=null;
cookie_name=”;
}
if(!b_cookie_found)
return null;
}
addOnLoadHandler(function(){
[[?x1x::x[[S334:shadowbox_force]]x:://::]]if(Get_Cookie(‘shadowboxtest’)){
//User already has cookie set, don’t show the shadowbox
[[?x1x::x[[S334:shadowbox_force]]x:://::]]}
[[?x1x::x[[S334:shadowbox_force]]x:://::]]else{
Shadowbox.open({
content:’http://www.tpl.org/shadowbox.html’,
player:’iframe’,
title:”,
height:[[?[[S50:User-Agent]]::MSIE::440::440]],
width:[[?[[S50:User-Agent]]::MSIE::620::620]] });
[[?x1x::x[[S334:shadowbox_force]]x:://::]]}
Set_Cookie(‘shadowboxtest’,’set’,”,’/’,”,”);
});