function popupImg() {
	var url=this.href;
	var dim=this.getAttribute('dimensions').split(',');
	
	var popup=window.open(url,'name','height='+(parseInt(dim[1])+20)+',width='+(parseInt(dim[0])+20)+',top=200,left=400,status=no,dependent=yes,scrollbars=no');
	if (window.focus) 
		{ popup.focus(); }
		return false;
}

function zoomy() {
	var a=document.getElementsByTagName('a');
	for(var i=0;i<a.length;i++) {
		if(a[i].type=='popup') {
			a[i].onclick=popupImg;
		}
	}
}

function onlyNum(e) {
   var unicode=e.charCode? e.charCode : e.keyCode
   if (unicode>33 && unicode<40)
      {
      return true;
      }
   if (unicode!=8 && unicode!=9 && unicode!=13)
      { 
      if (unicode<48 || unicode>57)
         {
         return false;
         }
      }
}


function orefresh() {
	 opener.location.reload();
	self.close();
}

function sclose() {
	self.close();
}

