/*******************************************************************************

GenericScripts



*******************************************************************************/

with (navigator) {
	oClient = {ns: (appName == "Netscape"), ie: (appName == "Microsoft Internet Explorer"), win: (appVersion.indexOf ("Win") != -1), dom: (document.getElementById)? true: false};
} // with
	
/*******************************************************************************


Functions


*******************************************************************************/



documentOnLoad = function () {

		var ws = winGetSize ();
		var x = parseInt (((ws[0] - 760)/2)/13)*13 - 1;
		if (x < 0) x = 0;
		lyrMoveTo (lyrGetById ("DMain"), x, 0);
	
	lyrShow (lyrGetById ("DMain"));	
} // function documentOnLoad

window.onresize = function () {
	documentOnLoad ();
} // function window.onresize




/*******************************************************************************

win & lyr functions

*******************************************************************************/

winGetSize = function () {
	var r = [];
	if (oClient.ie) {
		r[0] = document.body.clientWidth;
		r[1] = (this.ie4)? document.body.clientHeight: document.body.offsetHeight - 4;
	}
	else {
		r[0] = window.innerWidth;
		r[1] = window.innerHeight;
	}
	return r;
} // function winGetSize

lyrGetById = function (sLyrId, sParentPath) {
	if (oClient.dom) {
		return document.getElementById (sLyrId);
	} else if (oClient.ie) {
		return document.all[sLyrId];
	} else if (oClient.ns) {
		var oParent = (sParentPath)? eval (sParentPath): document;
		return oParent.layers[sLyrId];
	}
} // function lyrGetById

lyrShow = function (oLyr) {
	if (oClient.dom || oClient.ie) {
		oLyr.style.visibility = "visible";
	} else if (oClient.ns) {
		oLyr.visibility = "show";
	}
} // function lyrShow

lyrHide = function (oLyr) {
	if (oClient.dom || oClient.ie) {
		oLyr.style.visibility = "hidden";
	} else if (oClient.ns) {
		oLyr.visibility = "hide";
	}
} // function lyrHide

lyrMoveTo = function (oLyr, x, y) {
	if (oClient.dom || oClient.ie) {
		oLyr.style.left = x +"px";
		oLyr.style.top = y +"px";
	} else if (oClient.ns) {
		oLyr.left = x;
		oLyr.top = y;
	}
} // function lyrMoveTo

lyrSetZ = function (oLyr, z) {
	if (oClient.dom || oClient.ie) {
		oLyr.style.zIndex = z;
	} else if (oClient.ns) {
		oLyr.zIndex = z;
	}
} // function lyrSetIndex