// GENERAL SET UP SCRIPTS FOR IE ONLY:

// CONSTANTS [if not elsewhere declared]
var FRAME_RATE = 50;	// msec to wait between frames of animation
// ID constants
var ABOUTUS = 0;
var SERVICES = 1;
var CLIENTS = 2;
var PRODUCTS = 3;
var NO_MENUS = 4;

var DIR_OPEN = 25;
var DIR_CLOSE = -25;

// GLOBALS [if not elsewhere declared]
var collection = 'all.';
var styleObj = '.style';
var versionNo = new Number();

// height values open.
var layerHeight = new Array(NO_MENUS);
var animIntervals = new Array(NO_MENUS);

// FUNCTIONS [including specific function implementations]

function init() {
// this is the function that is called by every page after it has loaded.

	// get v number of IE
	var appVerArray = navigator.appVersion.toString().split(';');
	var clientArr = appVerArray[1].split(' ');
	versionNo = parseInt(clientArr[2]);
	
	// get heights for the various objects and then set them to 1 high for rolling out.
	var theLayer = new Object();
	
	for (var i=0; i<NO_MENUS; i++) {
		theLayer = eval('document.' + collection + MENU_NAMES[i] + styleObj);
		layerHeight[i] = theLayer.pixelHeight;
		theLayer.pixelHeight = 1;
	}

	pageLoaded = true;	// can commence all other things now.
	return(true);

}

function getObject(obj) {
	var theObj;
	if (typeof(obj) == "string") {
		theObj = eval('document.' + collection + obj + styleObj);
	} else {
		theObj = obj;
	}
	return(theObj);
}

function show(theLayer) {
	if (pageLoaded) {
		var theObj = getObject(theLayer);
		theObj.visibility = 'visible';
	}
}

function hide(theLayer) {
	if (pageLoaded) {
		var theObj = getObject(theLayer);
		theObj.visibility = 'hidden';
	}
}