var newWin = null;  
function PopupPic(strURL, strType, strWidth,strHeight) {  
	var left   = (screen.width  - strWidth)/2;
 	var top    = (screen.height - strHeight)/2;
 	var strOptions="height="+strHeight+",status,top="+top+",left="+left;  
  	if (newWin != null && !newWin.closed)  
   		newWin.close();  
 		if (screen.width<strWidth) {
 			strOptions +=",width="+screen.width+",scrollbars,resizable";
 			} else {
 			strOptions +=",width="+strWidth;
 			}
	
 	newWin = window.open(strURL+'?'+Math.random(), 'newWin', strOptions);  
 	newWin.focus(); 
 	return false; 
}


