// JavaScript Document

  function PopupPic(sPicURL) { 
	window.open("popup.htm?"+sPicURL, "", "resizable=0,HEIGHT=10,WIDTH=10");
}


  var temp=self.location.href.split("?");
  var picUrl = (temp.length>1)?temp[1]:"";
  var NS = (navigator.appName=="Netscape")?true:false;
  
  function fitPic() {
  	iWidth = (NS)?window.innerWidth:document.body.clientWidth;
  	iHeight = (NS)?window.innerHeight:document.body.clientHeight;
  	iWidth = document.images[0].width - iWidth;
  	iHeight = document.images[0].height - iHeight;
  	window.resizeBy(iWidth, iHeight-1);
  	self.focus();
  	};
	
function apriparent(pag) {
window.opener.location=pag;
self.close();
}

function openpop(pag,w,h,nome) {
  var l = Math.floor((screen.availWidth-w)/2); 
  var a = Math.floor((screen.availHeight-h)/2);
  fin = window.open(pag,nome,"width="+w+",height="+h+",menubar=no,toolbar=no,resizable=no,scrollbars=yes,left=" + l + ",top=" + a);
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);