function popup(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function popupExtra(theURL,winName,features, width, height) { //v2.0
	var popupWidth = width;
	var popupHeight = height;
	var popupFeatures = features;
	
	   var intH = 0, intW = 0;

	    if(self.innerHeight) {
	       intH = window.innerHeight;
	       intW = window.innerWidth;
	    } 
	    else {
		if(document.documentElement && document.documentElement.clientHeight) {
		    intH = document.documentElement.clientHeight;
		    intW = document.documentElement.clientWidth;
		}
		else {
		    if(document.body) {
			intH = document.body.clientHeight;
			intW = document.body.clientWidth;
			
		    }
		}
	    }
	      

	var xCenter = (intW/2)-(popupWidth/2);
	xCenter = parseInt(xCenter);
	var yCenter = (intH/2)-(popupHeight/2);
	yCenter = parseInt(yCenter);		
	
	popupFeatures = popupFeatures + ",width="+popupWidth+",height="+popupHeight+", left="+xCenter+", top="+yCenter;

	window.open(theURL,winName,popupFeatures);
}