//	script for opening product real size image in new auto sized window	

	// Set the horizontal and vertical position for the popup
	PositionX = 100;
	PositionY = 100;
	
	// Set these value approximately 20 pixels greater than the
	// size of the largest image to be used (needed for Netscape)
	
	defaultWidth  = 500;
	defaultHeight = 500;
	
	// Set autoclose true to have the window close automatically
	// Set autoclose false to allow multiple popup windows
	
	var AutoClose = true;
	
	if (parseInt(navigator.appVersion.charAt(0)) >= 4)
	{
		var isNN=(navigator.appName=="Netscape")?1:0;
		var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;
	}
	var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
	var optIE='scrollbars=no,width=200,height=200,left='+PositionX+',top='+PositionY;
	optIE='scrollbars=no,width='+(defaultWidth)+',height='+(defaultHeight)+',left='+PositionX+',top='+PositionY;
	
	function popImage(imageURL,imageTitle)
	{
		if (isNN){imgWin=window.open('about:blank','',optNN);}
		if (isIE){imgWin=window.open('about:blank','',optIE);}
		with (imgWin.document)
		{
			writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
			writeln('<html>\n<head>\n<title>Loading...<\/title>\n<style type="text/css">\n\t body { margin:0px; } \n<\/style>');
			writeln('<script type="text/javascript">');
			writeln('var isNN,isIE;');
			writeln('if (parseInt(navigator.appVersion.charAt(0)) >= 4)\n{');
			writeln('\t isNN = ( navigator.appName == "Netscape" ) ? 1 : 0;');
			writeln('\t isIE = ( navigator.appName.indexOf( "Microsoft" )!= -1 ) ? 1 : 0;\n}');
			writeln('function reSizeToImage(){');
			writeln('if (isIE)\n{');
			writeln('\t window.resizeTo(100,100);');
			writeln('\t width = document.images[0].width;');
			writeln('\t height = document.images[0].height + 32;');
			writeln('\t window.resizeTo(width,height);}');
			writeln('if (isNN)\n{');       
			writeln('\t window.innerWidth=document.images["preview"].width;');
			writeln('\t window.innerHeight=document.images["preview"].height;}\n}\/\/end if');
			writeln('function doTitle(){document.title="'+imageTitle+'";}');
			writeln('<\/script>');
			if (!AutoClose) writeln('<\/head>\n<body bgcolor=000000 style="scroll: no" onload="reSizeToImage();doTitle();self.focus()">')
			else writeln('<\/head>\n<body bgcolor="#000000" style="scroll: no" onload="reSizeToImage(); doTitle(); self.focus()" onblur="self.close()">');
			writeln('\t<img name="preview" src='+imageURL+' style="display: block;" alt="" \/>\n<\/body>\n<\/html>');
			close();		
		}//end with
	}
	
	function nscreen(url) { 
		window.open(url, '', 'width=300, height=150, menubar=no, toolbar=no, scrollbars=no, resizable=no, left=200, top=200'); 
	}
