	function changeImg (image, change_image){
		document.getElementById(image).src = "images/"+change_image;
	}
	var asyncRequest; // variable to hold XMLHttpRequest object
	// set up and send the asynchronous request.
	function createXMLHttpRequest() {
        var types = ['Microsoft.XMLHTTP', 'MSXML2.XMLHTTP.5.0','MSXML2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP'];

        for (var i = 0; i < types.length; i++)
		{
			try {
					return new ActiveXObject(types[i]);
			} catch(e) {}
        }

        try
		{
			return new XMLHttpRequest();
        } catch(e) {}

        return false; // XMLHttpRequest not supported
	}

	function getContent( url )
	{
		 // attempt to create the XMLHttpRequest and make the request
			asyncRequest=createXMLHttpRequest();
			if (asyncRequest==null)
			{
				alert( 'Request failed.1' );
				return ;
			}

			// register event handler
			asyncRequest.onreadystatechange = stateChange; 
			asyncRequest.open( 'GET', url, true ); // prepare the request
			asyncRequest.send( null ); // send the request
	} // end function getContent
      
	// displays the response data on the page
	function stateChange()
	{
		 if ( asyncRequest.readyState == 4 && asyncRequest.status == 200 )
		 {
				document.getElementById( 'loaded_content' ).innerHTML =
					 asyncRequest.responseText; // places text in contentArea
		 } // end if
	} // end function stateChange

	// clear the content of the box
	function clearContent()
	{
		 document.getElementById( 'loaded_content' ).innerHTML = '';
	} // end function clearContent

function popImage(imageURL,imageTitle, co_width, co_height){
	PositionX = 0;
	PositionY = 0;

	defaultWidth  = 800;
	defaultHeight = 600;

	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=150,height=100,left='+PositionX+',top='+PositionY;

	if (isNN){imgWin=window.open('about:blank','',optNN);}
	if (isIE){imgWin=window.open('about:blank','',optIE);}
	with (imgWin.document){
		writeln('<html><head><title>Loading...</title><style>body{margin:0px; padding:0px;}</style>');writeln('<sc'+'ript>');
		writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
		writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
		writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
		if (co_width != 0){
			writeln('width=co_width+document.body.clientWidth;');
		}
		else{
			writeln('width=document.images[0].width-document.body.clientWidth;');	
		}

		if (co_height != 0){
			writeln('height=co_height+document.body.clientHeight;');
		}
		else{
			writeln('height=document.images[0].height-document.body.clientHeight;');	
		}
		//writeln('alert(height);');
		writeln('window.resizeBy(width,height);}');writeln('if (isNN){');       
		writeln('window.innerWidth=document.images["img"].width;');writeln('window.innerHeight=document.images["img"].height;}}');
		//writeln('alert("Width: "+document.body.clientWidth+"iw: "+document.images[0].width)');
		//writeln('alert("Height: "+document.body.clientHeight+"ih: "+document.images[0].height)}');
		writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
		if (!AutoClose) writeln('</head><body bgcolor=f8e1bc scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
		else writeln('</head><body bgcolor=f8e1bc scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
		writeln('<img name="img" border="1" src='+imageURL+' style="display:block">')
		writeln('</body></html>');
		close();        
	}
}
