// Scrolling Ad Javascript
// copyright 3rd September 2004, by Stephen Chapman
// permission to use this Javascript on your web page is granted
// provided that all of the code in this script (including these
// comments) is used without any alteration

var aDOM = 0, ieDOM = 0, nsDOM = 0; var stdDOM = document.getElementById;
if (stdDOM) aDOM = 1; else {ieDOM = document.all; if (ieDOM) aDOM = 1; else {
var nsDOM = ((navigator.appName.indexOf('Netscape') != -1)
&& (parseInt(navigator.appVersion) ==4)); if (nsDOM) aDOM = 1;}}
function findDOM(objectId, wS) {
if (stdDOM) return wS ? document.getElementById(objectId).style:
document.getElementById(objectId);
if (ieDOM) return wS ? document.all[objectId].style: document.all[objectId];
if (nsDOM) return document.layers[objectId];
}

function findLivePageWidth() {return window.innerWidth != null? window.innerWidth: document.body.clientWidth != null? document.body.clientWidth:null;}
function findAdWidth(objectID) {var obj = findDOM(objectID,0); if(obj.offsetWidth) return obj.offsetWidth; if (obj.clip) return obj.clip.width; return 450;}
var right = 1;
var countdown = 10;
var slideDelay = 0;
var objStyle = null;

function startAd(objectID) {
if (aDOM) {
 objStyle = findDOM(objectID,1);
 var rightBoundary = findLivePageWidth() - findAdWidth(objectID);
 rightBoundary -= rightBoundary % 2;
slideAd(-490,rightBoundary/2);
}
}

function slideAd(currentPos, finalPos,rightBoundary) {
if (currentPos != finalPos) {
	/// change the speed of the slide = currentPos ////
if (currentPos > finalPos) currentPos -= 0; else currentPos += 10;
objStyle.left = currentPos;
}
else {
 countdown--;
 if (right) {finalPos = 0; currentPos = rightBoundary; right = 0;}
 else       {finalPos = rightBoundary; currentPos = 0; right = 1;}
}
if (countdown > 0)
 setTimeout('slideAd('+currentPos+','+finalPos+','+rightBoundary+')',slideDelay);
if (countdown == 0)
 objStyle.visibility = 'hidden';
return;
}
function hideAd(objectID) {
 objStyle = findDOM(objectID,1);
 objStyle.visibility = 'hidden';
}
function displayAd(adText,cd) {
document.write('<div id="mainAd" style="position:absolute; left:-490px; top:148px; z-index:999;" >\n'+adText+'\n<\/div>');
countdown = cd;

}
                  