	var client = new IdentifyClient();
	

	// Check client browser & platform specifics
	function IdentifyClient() {
		this.agent = navigator.userAgent.toLowerCase();
		this.name = navigator.appName.toLowerCase();
		this.version = parseFloat(navigator.appVersion.slice(0, navigator.appVersion.indexOf(' ')));
		
		this.ie = (this.name.indexOf('microsoft internet explorer') >= 0);
		this.ns = (this.name.indexOf('netscape') >= 0);
		this.mac = (this.agent.indexOf('mac') >= 0);
		this.dom = (document.getElementById) ? true : false;
		
		if (this.agent.indexOf('msie') >= 0) { this.version = parseFloat(this.agent.slice(this.agent.indexOf('msie') + 5, this.agent.indexOf(';', this.agent.indexOf('msie') + 5))); }
		
		return this;
	}



	// Launch pop-up window
	// Requires:	IdentifyClient
	function LaunchWindow( psWindowURL, psWindowName, piWidth, piHeight, pbResizable, pbScrollbars, pbMenubar, pbToolbar, pbLocation, pbStatus ) {
		if (client.mac) {
			if (client.ie && client.version >= 4 && client.version < 5) piHeight = parseInt(piHeight + 17);
		}
		var windowAttribs = 'width=' + piWidth + ',height=' + piHeight + ',resizable=' + Number(pbResizable) + ',scrollbars=' + Number(pbScrollbars) + ',menubar=' + Number(pbMenubar) + ',toolbar=' + Number(pbToolbar) + ',location=' + Number(pbLocation) + ',status=' + Number(pbStatus);
		var win = window.open(psWindowURL, psWindowName, windowAttribs);
		if (win != null) {
			if (win.opener == null) win.opener = self;
		}
		win.focus();
		
		return win;
	}


	function CreateObject(imgName, imgSrc) {
		if (client.dom) {
			var tempImg = document.createElement("img");
			tempImg.src = imgSrc;
			tempImg.id = imgName;
			tempImg.style.visibility = 'hidden';
			tempImg.style.position = 'absolute';
			tempImg.style.top = 0;
			document.body.appendChild(tempImg);
		} else {
			eval(imgName+' = new Image()');
			eval(imgName+'.src = "'+imgSrc+'"');
		}
	}


	// Changes the image source
	// Requires:	IdentifyClient
	function ChangeImage( psImageRef, psImageVariable ) {
		var loImg = (client.dom) ? document.getElementById(psImageRef) : document.images[psImageRef];
		if (client.dom) {
			var loImageElement = document.getElementById(psImageVariable);
			if (loImg && loImageElement) loImg.setAttribute("src", loImageElement.getAttribute("src"));
		} else { loImg.src = eval(psImageVariable + ".src"); }
	}

	var goInfoWindow = new InfoWindow();

	

	function InfoWindow() {

		this.page = document.getElementById("pageDisabledZone");

		this.box = document.getElementById("pageInfoBox");

		this.canvas = new CanvasInfo();

		

		this.Show = function( psURL ) {

				this.canvas.ToggleEmbeddedObjects( false );

				

				if (this.box && this.page) {

					this.box.src = psURL;

					

					this.page.style.width = this.canvas.width() + "px";

					this.page.style.height = this.canvas.height() + "px";

					this.page.style.top = this.canvas.scrollY() + "px";

					this.page.style.display = "block";

				

					var liBoxOffsetX = Number(this.box.style.width.replace(/px/, ""));

					var liBoxOffsetY = Number(this.box.style.height.replace(/px/, ""));

					

					this.box.style.top = this.canvas.FindCenterY(liBoxOffsetY) + "px";

					this.box.style.left = this.canvas.FindCenterX(liBoxOffsetX) + "px";

					this.box.style.display = "block";

					alert(this.page.style.width);
					alert(this.page.style.height);
					

					return false;

				} else {

					return true;

				}

				

				return false;

			}

		

		this.Hide = function() {

				if (this.box && this.page) {

					this.box.style.display = "none";

					this.page.style.display = "none";

					

					this.box.src = "";

				}

				

				this.canvas.ToggleEmbeddedObjects( true );

				

				return false;

			}

		

		return this;

	}





	function CanvasInfo() {

		this.width = function() {

				var liWidth = 0;

				

				if( typeof( window.innerWidth ) == 'number' ) {

					liWidth = window.innerWidth;

				} else if( document.documentElement && (document.documentElement.clientWidth ) ) {

					liWidth = document.documentElement.clientWidth;

				} else if( document.body && ( document.body.clientWidth ) ) {

					liWidth = document.body.clientWidth;

				}

				

				return liWidth;

			}

		

		this.height = function() {

				var liHeight = 0;

				

				if( typeof( window.innerWidth ) == 'number' ) {

					liHeight = window.innerHeight;

				} else if( document.documentElement && (document.documentElement.clientHeight ) ) {

					liHeight = document.documentElement.clientHeight;

				} else if( document.body && ( document.body.clientHeight ) ) {

					liHeight = document.body.clientHeight;

				}

				

				return liHeight;

			}

		

		this.scrollY = function() {

				var liScrollY = 0;

				

				if( typeof( window.pageYOffset ) == 'number' ) {

					//Netscape compliant

					liScrollY = window.pageYOffset;

				} else if( document.documentElement && ( document.documentElement.scrollTop ) ) {

					//IE6 standards compliant mode

					liScrollY = document.documentElement.scrollTop;

				} else if( document.body && ( document.body.scrollTop ) ) {

					//DOM compliant

					liScrollY = document.body.scrollTop;

				}

				

				return liScrollY;

			}

		

		this.FindCenterX = function( piOffsetX ) {

				var liX = (this.width() - piOffsetX) / 2;

				

				return (liX < 0) ? 0 : liX;

			}

		

		this.FindCenterY = function( piOffsetY ) {

				var liY = ((this.height() - piOffsetY) / 2) + this.scrollY();

				

				return (liY < this.scrollY()) ? 0 : liY;

			}

		

		this.ToggleEmbeddedObjects = function( pDisplay ) {

				var objs = document.getElementsByTagName("OBJECT");

				if (objs) {

					for (i = 0; i < objs.length; i++) {

						objs[i].style.visibility = (pDisplay) ? "visible" : "hidden";

					}

				}

			}

		

		return this;

	}
