function refreshIt() {
window.location = 'index.htm'
}

//set up layer call
var isIE, isNS, isNS6, isDOM, lR, sR, vis, invis, myTimeOut, goName;
	if (document.all) {isIE= true;lR="document.all.";sR=".style";vis="visible";invis="hidden";}
	if (document.layers){isNS = true;lR="document.layers.";sR="";vis="show";invis="hide";}
	if (document.getElementById &&!isIE) {isDOM=true;lR = "document.getElementById('";sR = "').style";invis ="hidden";vis = "visible"}
	if (isDOM == true && navigator.appName =="Netscape") isNS6 = true;
	

//netscape resize bug fix
function NSresize() {
  if (document.FIX.NSfix.initWindowWidth != window.innerWidth || document.FIX.NSfix.initWindowHeight != window.innerHeight) {
    document.location = document.location;
  }
}

function NSCheck() {
  if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
    if (typeof document.FIX == 'undefined'){
      document.FIX = new Object;
    }
    if (typeof document.FIX.FIX_scaleFont == 'undefined') {
      document.FIX.NSfix = new Object;
      document.FIX.NSfix.initWindowWidth = window.innerWidth;
      document.FIX.NSfix.initWindowHeight = window.innerHeight;
    }
    window.onresize = NSresize;
  }
}

NSCheck()

//load promo layers/rollovers after the rest of the page

function postLoad()
{	
	widthKnow()
	textAnimate()
}


var goTimer = 0;
var goNum = 1;
var animLayerCount = 2;
var pauseCount = 100;

function setUp()
	{
		for (i=1; i < animLayerCount; i++){
		layer = eval(lR + "z" + i + sR);
		if (isIE) layer.pixelLeft = -320;
		else layer.left = -320;
		layer.visibility = vis;
		}
	}
	
var timer;


function moveIt(whichLayer, toWhere, speed)
{
layer = eval(lR + whichLayer + sR);

if (isIE) theleft = parseInt(layer.pixelLeft)
else theleft = parseInt(layer.left)

// calculate the distance remaining
rDistance = toWhere - theleft;
// set the speed to a fraction of the remaining distance
speed = rDistance * .15;
// create a pocket buffer just a short distance before destination
toWhereBuffer = toWhere - 4;
// if object has not reached the buffer zone
if ( theleft < (y-10)) 
{
	if(isIE) layer.pixelLeft = parseInt(layer.pixelLeft) + speed
	else layer.left = parseInt(layer.left) + speed
}
else
{
	// if object has reached buffer zone, set object to destination
	return;
}
harold = "\"moveIt('" + whichLayer + "', x, 2)\"";
eval ("timer= setTimeout(" + harold + ", 1)")

}

function textAnimate (){
	if (goNum >= animLayerCount){
	clearTimeout (myTimeOut);
	return;
	}
	else {
	goName = "z" + goNum;
	moveIt(goName, y, 2);
	pauseCount=pauseCount+300;}
}


var width
var x;
var y;
function widthKnow()
{
if (isNS || isNS6) width= window.innerWidth
if (isIE) width= document.body.clientWidth

y = width;
x = (y/2)-156;
}
	
	

