//<!--
//Generic function to open a new window and style it as required.
//03 March 2002
var popWin;	//initialize as global so can control new window externally.
function goPop(path,width,height,left,top,menubar,location,scrollbars,resizable,status,zoomImage,title,bgColour,dynWrite){
	if(bgColour == ''){
		bgColour = '#FFFFFF';
	}
	if(dynWrite){
		
		var winHeight = parseInt(height);
		if (!popWin || popWin.closed) {
			popWin = window.open(path,'pop','innerHeight='+winHeight+',innerWidth='+width+',width='+width+',height='+winHeight+',screenX='+left+',left='+left+',\
						screenY='+top+',top='+top+',menubar='+menubar+',location='+location+',\
						scrollbars='+scrollbars+',resizable='+resizable+',status='+status+'');
		}
		popWin.focus();		
		writeToIt(zoomImage,title,bgColour);
	// force small delay for IE to catch up (doesn't work NN4)
	//following string concatenation 'should' work according to ref. but doesn't. 
	//To pass params to a function in the setTimeout function must pass string.
	//setTimeout("writeToIt('"+zoomImage+"','"+title+"','"+bgColour+"')",50);
	}else{
		if (!popWin || popWin.closed) {
			popWin = window.open(path,'pop','innerHeight='+height+',innerWidth='+width+',width='+width+',height='+height+',screenX='+left+',left='+left+',\
						screenY='+top+',top='+top+',menubar='+menubar+',location='+location+',\
						scrollbars='+scrollbars+',resizable='+resizable+',status='+status+'');
		}
		popWin.focus();	
	}
}
function writeToIt(zoomImage, title, bgColour){
		//check it opened
		if(popWin != null){
			//accumulate data to be written.
			var toWrite = '<html><head><title>'+title+'</title><style type="text/css">.links a {display:block;font-family: Arial, Verdana, Sans-serif;text-decoration :none; margin-top:1px; padding: 5px; text-align:right; font-size;9pt; background:#999999; color:#CCCCCC;}.links a:hover {background-color:#cccccc;color:#999999;}</style></head><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgColor="'+bgColour+'" onblur="self.close()" style="margin : 0">';
			toWrite += '<table cellpadding="0" cellspacing="0"><tr><td><a href="javascript:self.close()"><img src="'+zoomImage+'" border="0" ></a></td></tr>';
			toWrite += '</table>'
			toWrite += '</body></html>';
			//write in one statement for efficiency.
			popWin.document.open();
			popWin.document.write(toWrite);
			popWin.document.close();
		}
}
//-->