<!-- hiding
window.onerror = null;

// Match StartUp Position from Below HERE
var leftMargin = 5;
var topMargin = 26;
var slideTime = 1200;
var ns6 = (!document.all && document.getElementById);
var ie4 = (document.all);
var ns4 = (document.layers);

function layerObject(id,top) {
if (ns6) {
this.obj = document.getElementById(id).style;
this.obj.top = top;
return this.obj;
}
else if(ie4) {
this.obj = document.all[id].style;
this.obj.top = top;
return this.obj;
}
else if(ns4) {
this.obj = document.layers[id];
this.obj.top = top;
return this.obj;
   }
}

function layerSetup() {
// Change Initial StartUp Position HERE
floatLyr = new layerObject('floatLayer', (5,26));
window.setInterval("main()", 10)
}

function floatObject() {
if (ns4 || ns6) {
findWt = window.innerWidth;
} else if(ie4) {
findWt = document.body.clientWidth;
   }
} 

function main() {
if (ns4) {
this.currentX = document.layers["floatLayer"].left;
this.scrollLeft = window.pageXOffset;
mainTrigger();
}
else if(ns6) {
this.currentX = parseInt(document.getElementById('floatLayer').style.left);
this.scrollLeft = scrollX;
mainTrigger();
} else if(ie4) {
this.currentX = floatLayer.style.pixelLeft;
this.scrollLeft = document.body.scrollLeft;
mainTrigger();
   }
}

function mainTrigger() {
var newTargetX = this.scrollLeft + this.leftMargin;
if ( this.currentX != newTargetX ) {
if ( newTargetX != this.targetX ) {
this.targetX = newTargetX;
floatStart();
}
animator();
   }
}

function floatStart() {
var now = new Date();
this.A = this.targetX - this.currentX;
this.B = Math.PI / ( 2 * this.slideTime );
this.C = now.getTime();
if (Math.abs(this.A) > this.findWt) {
this.D = this.A > 0 ? this.targetX - this.findWt : this.targetX + this.findWt;
this.A = this.A > 0 ? this.findWt : -this.findWt;
}
else {
this.D = this.currentX;
   }
}

function animator() {
var now = new Date();
var newX = this.A * Math.sin( this.B * ( now.getTime() - this.C ) ) + this.D;
newX = Math.round(newX);
if (( this.A > 0 && newX > this.currentX ) || ( this.A < 0 && newX < this.currentX )) {
if ( ie4 )document.all.floatLayer.style.pixelLeft = newX;
if ( ns4 )document.layers["floatLayer"].left = newX;
if ( ns6 )document.getElementById('floatLayer').style.left = newX + "px";
   }
}

function start() {
if(ns6||ns4) {
pageWidth = innerWidth;
pageHeight = innerHeight;
layerSetup();
floatObject();
}
else if(ie4) {
pageWidth = document.body.clientWidth;
pageHeight = document.body.clientHeight;
layerSetup();
floatObject();
   }
}
//  End -->
