\n');
}
function getCounterCookieVal(cookieName)
{
var allCookies = document.cookie;
if(allCookies == "")
{
return -1;
}
var start = allCookies.lastIndexOf(cookieName + "=");
if(start == -1)
{
return -1;
}
start += (cookieName.length + 1);
var end = allCookies.indexOf(';', start);
if(end == -1)
{
end = allCookies.length;
}
if(isNaN(parseInt(allCookies.substring(start,end))))
{
return -1;
}
return allCookies.substring(start,end);
}
function writeCookie(szCookieName, nImageNum, nExpireDays)
{
var expiration = new Date((new Date()).getTime() + nExpireDays*86400000);
var szCookie = szCookieName + "=" + nImageNum + "; path=" + "/" + "; expires=" + expiration.toGMTString() + ";";
document.cookie = szCookie;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i 16))
{
cookieSVal = 1;
}
snumber = cookieSVal;
send_to_flash_DoFSCommand("send",snumber);
snumber = snumber - 0 + 1; // -0 to force addition over concatenation
if(snumber>16) snumber = 1;
writeCookie("SCOUNTER", snumber, 14);
}
function runImageLookup()
{
playsound();
var pictureNum = 0 - 0;
var framenumber = 0 - 0;
var cookieVal = getCounterCookieVal("ICOUNTER");
var cookieFVal = getCounterCookieVal("FRAMECOUNTER");
if((cookieVal < 0) || (cookieVal > 40))
{
cookieVal = 1;
}
if((cookieFVal < 0) || (cookieFVal > 5))
{
cookieFVal = 1;
}
pictureNum = cookieVal; // to make pictureNum an integer
framenumber = cookieFVal;
document.writeln("
");
pictureNum = pictureNum - 0 + 1; // -0 to force addition over concatenation
framenumber = framenumber - 0 + 1; // -0 to force addition over concatenation
if(pictureNum > 40) pictureNum = 1;
if(framenumber>5) framenumber = 1;
writeCookie("ICOUNTER", pictureNum, 14);
writeCookie("FRAMECOUNTER", framenumber, 14);
}
// DATE FUNCTIONS
// Cut-N-Paste JavaScript for date is from ISN Toolbox, Copyright 1996, Infohiway, Inc.
// Build an array initializer
function isnArray() {
argnr=isnArray.arguments.length
for (var i=0;i