				/* must include this because ns4
   				was not loading when this page is popped up.
	 			*/
	 			function Is()
	 			{
		 			var agent = navigator.userAgent.toLowerCase();
					this.major = parseInt(navigator.appVersion);
					this.minor = parseFloat(navigator.appVersion);
					this.ns  = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
					this.ie   = (agent.indexOf("msie") != -1);
					this.win   = (agent.indexOf("win")!=-1);
					this.mac   = (agent.indexOf("mac")!=-1);
					this.ns4 = (!this.ie && agent.indexOf("mozilla/4")!=-1);
					this.mozilla5 = (agent.indexOf("mozilla/5")!=-1);
					this.safari = (agent.indexOf("safari/")!=-1);
					this.opera = (agent.indexOf("opera")!=-1);
			 }
			 
			 var is = new Is();
			 // var myImg     = getQueryVariable("img");
			 // var popImageWidth  = parseInt(getQueryVariable("w"));
			 // var popImageHeight = parseInt(getQueryVariable("h"));
			 // var popImage  = new Image();
			 //if(window.parent.opener)
			 //	window.parent.opener.focus();

			 function reDo() {
				if (innerWidth != origWidth || innerHeight != origHeight)
					location.reload();
			 }
	 
			 function init(paddingX, paddingY) {
				// novator code
				popImageWidth = document.popup_image.width;
				popImageHeight = document.popup_image.height;
				// end of novator code
				
				// set width
				popImageWidth += paddingX;
				if(is.opera) { popImageWidth += 1;
				} else if(is.ns4) {
					popImageWidth -= 10;
				}
				if(is.mac) { popImageWidth -= 10; }

				// set height
				popImageHeight += paddingY;
				if(is.win) {
					if(is.ns4) { popImageHeight -= 28; }
				} else if(is.mac) {
					if(!is.safari) {
						popImageHeight -= 25;
					}
				}


				// NS4 reload, can't draw js image 
				// workaround
				if(is.ns4) {
					origWidth = innerWidth;
					origHeight = innerHeight;
				}
				if(is.ns4) onresize = reDo ;

				// Resize movie window
				if(is.ns4) { window.setResizable(true); }
				window.resizeTo(popImageWidth, popImageHeight);
				if(is.ns4) { window.setResizable(false); }

				if(is.ns4) {
					if(window.innerWidth <= 100) {
						init();
					}
				}

				// move to center of screen
				/*
				var screenWidth		=	(screen.width - popImageWidth) / 2;
				var screenHeight	=	(screen.height - popImageHeight) / 2;
				window.moveTo(screenWidth, screenHeight);
				*/

				// bring to front
				// pause for NS4 redraw
				if(!is.ns4) {
					this.window.focus();
				}
				else {
					setTimeout("this.window.focus()", 1000);
				}
			}


			function getQueryVariable(variable) {
				var query = window.location.search.substring(1);
				var vars = query.split("&");
				for (var i=0;i<vars.length;i++) {
					var pair = vars[i].split("=");
					if (pair[0] == variable) {
						return pair[1];
					}
				}
			}


