//menubar=yes
var version4 = (navigator.appVersion.charAt(0) == "4"); 
var popupHandle;
function closePopup()
{
	if(popupHandle != null && !popupHandle.closed) popupHandle.close();
}
function displayPopup_merchantwin(url,name,evnt) 
{
//  CENTER: makes screen fall in center
	 
	  var myWidth = 0, myHeight = 0;
	 if( typeof( window.innerWidth ) == 'number' ) 
	  {  
		//Non-IE
		myWidth = window.outerWidth;
		myHeight = window.outerHeight
	  } 
	  else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
	  {  
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	  } 
	  else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
	  {  
		//IE 4 compatible
		myWidth = window.screen.availWidth;
		myHeight = document.body.offsetHeight;
	  } 
	 
	var properties = "toolbar=1, location=1, resizable=yes, scrollbars=yes, menubar=yes, width=" + myWidth +", height =" + myHeight ;
	 
	if(evnt != null) 
	{
		properties = properties + ", left = 0";
		properties = properties + ", top = 0";
	}
	
	closePopup();
	popupHandle = open(url,name,properties); 
	popupHandle.focus();
}  

function displayPopupID(url,name,height,width,evnt,size,loc) 
{
//  CENTER: makes screen fall in center
	var properties = "toolbar =" + loc + ", location = " + loc + ",resizable= " + size + ", scrollbars=" + size + ", height = " + height;
	properties = properties + ", width=" + width;
	var leftprop, topprop, screenX, screenY, cursorX, cursorY, padAmt;
	
	if(navigator.appName == "Microsoft Internet Explorer")
	{
		screenY = document.body.offsetHeight;
		screenX = window.screen.availWidth;
	}
	else 
	{
		screenY = window.outerHeight
		screenX = window.outerWidth
	}
	 
 
	leftvar = (screenX - width) / 2;
	rightvar = (screenY - height) / 2;
	if(navigator.appName == "Microsoft Internet Explorer") 
	{
		leftprop = leftvar;
		topprop = rightvar;
	}
	else 
	{
		leftprop = (leftvar - pageXOffset);
		topprop = (rightvar - pageYOffset);
	}
	 
	if(evnt != null) 
	{
		properties = properties + ", left = " + leftprop;
		properties = properties + ", top = " + topprop;
	}
	closePopup();
	popupHandle = open(url,name,properties);
	popupHandle.focus();
}  
 