
// Define all variables and set the default delay to 5ms
var layername, xgoal, ygoal, xhop, yhop, delay=5;

// Check to see if the browser is DHTML-compatible
function checkDHTML() {
	if ((parseInt(navigator.appVersion)>=4) &&
	   ((navigator.appName!="Netscape" &&
	     navigator.appVersion.indexOf("X11") == -1) ||
		(navigator.appName!="Microsoft Internet Explorer" &&
		 navigator.appVersion.indexOf("Macintosh") == -1)))
	  { return 1 }
	else
	  { return 0 }
}

// Construct a valid reference to a layer
// in either Netscape JavaScript or Microsoft JScript
function makeName(layerID) {
//	if (navigator.appName=="Netscape")
//	  { refname = eval("document." + layerID) }
//	else
//	  { refname = eval("document.all." + layerID + ".style") }
	  
	refname = eval("document.all." + layerID + ".style");
	return refname
}

// Slide over xhop,yhop pixels every delay milliseconds
// until the layer reaches xgoal and ygoal
function slide() {
	if ((parseInt(layername.left) != xgoal) ||
	    (parseInt(layername.top) != ygoal))
	  {  layername.left = parseInt(layername.left) + xhop;
	     layername.top = parseInt(layername.top) + yhop;
		 window.setTimeout("slide()", delay)  }
}

function slideIn() {
	if (document.all.intro && checkDHTML()) {
	  var myWidth = 0, myHeight = 0;
	  if( typeof( window.innerWidth ) == 'number' ) {
	    //Non-IE
	    myWidth = window.innerWidth;
	    myHeight = window.innerHeight;
	  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	    //IE 6+ in 'standards compliant mode'
	    myWidth = document.documentElement.clientWidth;
	    myHeight = document.documentElement.clientHeight;
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	    //IE 4 compatible
	    myWidth = document.body.clientWidth;
	    myHeight = document.body.clientHeight;
	  }

	  layername=makeName('intro');
	  yhop=0;
	  ygoal=200;
	  xhop=10;
	  xgoal = parseInt(((myWidth-divwidth)/2)/10)*10;	// find the middle of the window, closest multiple of 10 pixels
	  slide();
	}
}

function slideOut() {
	layername=makeName('intro');
	yhop=0;
	ygoal=200;
	xhop=-20;
	xgoal=0-divwidth-20;
	slide();
}

