function openWinIndex2(lnk,w,h,wn,m) {
	var vin=window.open(lnk+'&margin_window='+m,wn,'resizable: yes; ');
	vin.resizeTo(w, h);
	vin.resizable='yes';
}
function IMP(im) { 
	var imgp=document.getElementById('imgp');
	imgp.innerHTML='<img src="files/Image/'+im+'" alt="Click to Close" onLoad="shIMP();"/>';
	

}
function shIMP() {
	var imgp=document.getElementById('imgp');
	
	imgp.style.visibility = 'visible'; 
	imgp.style.display='block';
		
	 if (!document.all&&document.getElementById) {
		var ol = self.pageXOffset+(window.innerWidth/2-Number(imgp.offsetWidth)/2);  
		var ot = self.pageYOffset + (window.innerHeight/2-Number(imgp.offsetHeight)/2);	
	  } else {
		var ol = 0 - imgp.offsetWidth/2 + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth )/2 + ( ignoreMe = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft )   ;	
		var ot= 0 - imgp.offsetHeight/2 + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight )/2 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )   ;
	  }
  	if (ol<0) ol=0;
	if (ot<0) ot=0;
	imgp.style.left=ol+"px"
	imgp.style.top=ot+"px"
	
	imgp.style.zIndex=10000001;
}
function IMPClose() {
		var imgp=document.getElementById('imgp');
		imgp.style.visibility = 'visible'; 
		imgp.style.display='none';
}

