



		var MSIE  = false;
		var DOM2  = false;

		/* ------------------------------------------------------------------------------------------
		 */
		if (navigator.appName.substr(0,9) == 'Microsoft')
			MSIE = true;
		else if (navigator.appName.substr(0,8) == 'Netscape')
			DOM2 = true;

		/* ------------------------------------------------------------------------------------------
		 */
		function getObj(id) {
			if (id == null) {
				if (document != null)
					return document;
				if (window.document != null)
					return window.document;
				if (this.document != null)
					return this.document;
				if (this.window.document != null)
					return this.window.document;

				return null;
			}

			if (document != null)
				return document.getElementById(id);
			if (window.document != null)
				return window.document.getElementById(id);
			if (this.document != null)
				return this.document.getElementById(id);
			if (this.window.document != null)
				return this.window.document.getElementById(id);

			return null;
		}

		function getFrm(id) {
			if (id == null) {
				if (window != null)
					return window;
				if (this.window != null)
					return this.window;

				return null;
			}

			if (window.frames != null)
				return window.frames[id];
			if (this.window.frames != null)
				return this.window.frames[id];

			return null;
		}

		/* ------------------------------------------------------------------------------------------
		 */
		function checkWHStyle(img) {
			if ((img.style.left   != null) && (img.style.left  != '') &&
				(img.style.right  != null) && (img.style.right != '') &&
				(img.style.width  != null) && (img.style.width != '') &&
				(img.style.width.indexOf('%') != -1))
				if (MSIE == false)
					img.style.width = null;

			if ((img.style.top    != null) && (img.style.top    != '') &&
				(img.style.bottom != null) && (img.style.bottom != '') &&
				(img.style.height != null) && (img.style.height != '') &&
				(img.style.height.indexOf('%') != -1))
				if (MSIE == false)
					img.style.height = null;
		}

		function setAlpha(id, path) {
			var img = getObj(id);

			if (img != null)
				if (MSIE == true) {
					img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + path + "');";
					img.src = "pics/trans.gif";
				}
				else {
					checkWHStyle(img);
					img.src = path;
				}

			return img;
		}

		function setAlphaScale(id, path) {
			var img = getObj(id);

			if (img != null)
				if (MSIE == true) {
					img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + path + "', sizingMethod='scale');";
					img.src = "pics/trans.gif";
				}
				else {
					checkWHStyle(img);
					img.src = path;
				}

			return img;
		}

		/* ------------------------------------------------------------------------------------------
		 */
		function visibleFrameWidth(frmid) {
			var fobj = getFrm(frmid);
			var frmw;

			if (fobj != null) {
				if (MSIE == true) {
					if (fobj.document != null)
						if (fobj.document.body != null)
							frmw = fobj.document.body.offsetWidth - 22;
				}
				else {
					/* measure the offset and add the height */
					frmw = fobj.innerWidth - 0;
				}
			}

			return frmw;
		}

		function visibleFrameHeight(frmid) {
			var fobj = getFrm(frmid);
			var frmh;

			if (fobj != null) {
				if (MSIE == true) {
					if (fobj.document != null)
						if (fobj.document.body != null)
							frmh = fobj.document.body.offsetHeight - 4;
				}
				else {
					/* measure the offset and add the height */
					frmh = fobj.innerHeight - 0;
				}
			}

			return frmh;
		}

		/* ------------------------------------------------------------------------------------------
		 */
		function measureFrameWidth(frmid) {
			var fobj = getFrm(frmid);
			var frmw;

			if (fobj != null) {
				if (MSIE == true) {
					if (fobj.document != null)
						if (fobj.document.body != null)
							frmw = fobj.document.body.scrollWidth;
				}
				else {
					/* first scroll completly down */
					fobj.scrollBy( 10000000, 0);

					/* measure the offset and add the height */
					frmw  = fobj.innerWidth - 0;
					frmw += fobj.pageXOffset;

					/* last scroll completly up */
					fobj.scrollBy(-10000000, 0);
				}
			}

			return frmw;
		}

		function measureFrameHeight(frmid) {
			var fobj = getFrm(frmid);
			var frmh;

			if (fobj != null) {
				if (MSIE == true) {
					if (fobj.document != null)
						if (fobj.document.body != null)
							frmh = fobj.document.body.scrollHeight;
				}
				else {
					/* first scroll completly down */
					fobj.scrollBy(0,  10000000);

					/* measure the offset and add the height */
					frmh  = fobj.innerHeight - 0;
					frmh += fobj.pageYOffset;

					/* last scroll completly up */
					fobj.scrollBy(0, -10000000);
				}
			}

			return frmh;
		}

		function offsetXFrame(frmid) {
			var fobj = getFrm(frmid);
			var frmo;

			if (fobj != null) {
				if (MSIE == true) {
					if (fobj.document != null)
						if (fobj.document.body != null)
							frmo = fobj.document.body.scrollLeft;
				}
				else
					frmo = fobj.pageXOffset;
			}

			return frmo;
		}

		function offsetYFrame(frmid) {
			var fobj = getFrm(frmid);
			var frmo;

			if (fobj != null) {
				if (MSIE == true) {
					if (fobj.document != null)
						if (fobj.document.body != null)
							frmo = fobj.document.body.scrollTop;
				}
				else
					frmo = fobj.pageYOffset;
			}

			return frmo;
		}

		/* ------------------------------------------------------------------------------------------
		 */
		function rethinkSize(frmid) {
			var cobj = getObj('content');
			var nobj = getObj('nav_left');
			var iWidth, iHeight;

			if ((cobj == null) ||
				(nobj == null))
				return;

			if (MSIE == true) {
				iWidth  = document.body.clientWidth ;
				iHeight = document.body.clientHeight; }
			else {
				iWidth  = window.innerWidth  - 2;
				iHeight = window.innerHeight - 2; }

			/*if (frmh <= iHeight) fobj.style.height = '100%';*/
			cobj.style.height = '0px';
			nobj.style.height = '0px';

			var crmh = measureFrameHeight('content');
			var nrmh = measureFrameHeight('nav_left');
			var frmh = Math.max(crmh, nrmh);

			/*if (frmh <= iHeight) fobj.style.height = '100%';*/
			if (!isNaN(frmh)) {
				cobj.style.height = frmh + 'px';
				nobj.style.height = frmh + 'px';
			}
		}

