var once=1;
function enlarge(name,pwidth,pheight,description){
   var pic = 'view.html?' + name + '?' + pwidth + '?' + pheight;
   var aLine = '<a href="javascript:photo(\'' + pic + '\')">';
   var picthumb = '<img src=images/'+ name + '_thumb.jpg alt="'+description+'" oncontextmenu="return false;"border="0">';
   document.write(aLine);
   document.write(picthumb);
   document.write('</a>');
}

function photo(url){
  var adjust = 25;
  var temp = url.split('?');
  var pwidth = parseInt(temp[2]) + adjust;
  var pheight = parseInt(temp[3]) + adjust + 25;

  url = url + '?' + dir;
  var properties = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" + pwidth+",height="+pheight;
  newWin = window.open(url,'nav_win',properties);
  newWin.focus();
}

function writePIC() {
	var picName = location.search;
	var picTemp = picName.split('?');
	    
	picTemp[2] = parseInt(picTemp[2])+25; // width
	picTemp[3] = parseInt(picTemp[3])+60 // height
	var divline = '<div id="Layer1" style="position:absolute; width:'+picTemp[2]+'px; height:'+picTemp[3]+'px; z-index:1; left:0; top:0; visibility:visible">';
	picTemp[3] = picTemp[3]-40; // height
	var tableline = '<table border="0" cellspacing="0" cellpadding="0" width="100%" height="'+picTemp[3]+'"><tr><td width="100%" height="'+picTemp[3]+'">&nbsp;</td></tr><tr><td><center><font size="4" face="Monotype Corsiva" color="#0000FF"><a href="javascript:window.close(this);"><i><b>Click to Close</b></i></a></font></center></td></tr></table>';	
	
	if(picTemp[1] == null){
	   var returnPIC = '<font size="3" color="ffffff" face="arial"><i>This image is not available.</font>';
	}else{
	   var returnPIC = '<img src="images/' + picTemp[1] + '.jpg" border="0">';
	}
	document.writeln(divline);
	document.writeln(tableline);
	document.writeln('</div>');
	document.writeln(returnPIC);
}