DW=(navigator.appName=="Netscape")?14:20 //20
DH=(navigator.appName=="Netscape")?16:16 //:24
var ntop=0; 
var nleft=0;
var numold=0;
var photoW;
var DWidth=0;
text=new Array();
text[0]="";
DW=(navigator.appName=="Netscape")?14:20 //20
DH=(navigator.appName=="Netscape")?16:16 //:24
var ntop=0; 
var nleft=0;
var numold=0;
var photoW;
var DWidth=0;
var www='';
var t=' ';

function nullpic()
{
 if (numold != 0) {	if (!photoW.closed) photoW.close();	 }
}

function loadpic(num,title,pic,width,height)
{
 if (navigator.appName=="Netscape"){
 	DWidth=screen.width
 	DHeight=screen.height;
 	width=width-14;
 } else {
 	DWidth=screen.width;
 	DHeight=screen.height;
 	width=width-4;
 }

 width=width + DW;
 height=height + DH;
 //alert(DW);
 width=(width>DWidth)?DWidth:width;
 height=(height>DHeight)?DHeight-DH:height; 
 
 t = pic.substring(0, 3);
 if (t == '../'){
   www = pic;
 } else {
   www = 'pic/' + pic;
 }
 
 if (numold != 0) {	if (!photoW.closed) photoW.close();	 }
 photoW=window.open('',num,'width='+width+',height='+height+',top='+ntop+',left='+nleft+',resizable=0,scrollbars=1,dependent=0,copyhistory=yes,directories=no');
 photoW.document.open()
 photoW.document.write("<HTML><HEAD><meta http-equiv='Content-Type' content='text/html'></HEAD>");
 photoW.document.write("<LINK rel='STYLESHEET' href='agp.css' type='Text/css'>");
 photoW.document.write("<TITLE>" + title + "</TITLE></HEAD><BODY BGCOLOR=#6D443D BACKGROUND=pic/bgrnd.gif TEXT=#CCCCCC POSITION=ABSOLUTE LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0><DIV ALIGN=\"CENTER\">");
 photoW.document.write("<A HREF='' onClick=window.close()><IMG SRC=" + www + " ALT=\"" + title + "\" BORDER=0 VSPACE=0 HSPACE=0></A>");
 photoW.document.write("<DIV ALIGN=CENTER CLASS=small>" + title + "</DIV>");
 photoW.document.write("</DIV></BODY></HTML>");  
 photoW.document.close()

 if (navigator.appName=="Netscape"){
 	LeftPosition=(DWidth-photoW.window.innerWidth)/2;
 	TopPosition=(DHeight-photoW.window.innerHeight)/2;
 } else {
	LeftPosition=(DWidth-photoW.document.body.clientWidth)/2;
        TopPosition=(DHeight-photoW.document.body.clientHeight)/2;
 }

 if (LeftPosition<0) LeftPosition=0;
 if (TopPosition<0) TopPosition=0;
 
 photoW.moveTo(LeftPosition,TopPosition);
 
 numold=num;
}
