// cross platform (mac and pc) popup window

function cpPopup(href, name, width, height, options)
{
	// see if users operating system is a mac and they are using ie
	var agt=navigator.userAgent.toLowerCase(); 
	var is_ie = (agt.indexOf("msie") != -1); 
	var is_mac = (agt.indexOf("mac")!=-1);
	
	
	// make width and height parameters smaller for a ie on a mac
	if (is_mac && is_ie)
	{
		width=width-16
		height=height-16
	}
	
	// spawn window with correctly adjusted width and height properties
	window.open(href, name, "width=" + width + ",height=" + height + "," + options)
	
		
}


function cpPopup_center(href, name, width, height, options)
{
	// see if users operating system is a mac and they are using ie
	var agt=navigator.userAgent.toLowerCase(); 
	var is_ie = (agt.indexOf("msie") != -1); 
	var is_mac = (agt.indexOf("mac")!=-1);
	
	// calculate where the center of the screen is
	var winLeft = (screen.width - width) / 2;
	var winTop = (screen.height - height) / 2;
	
	// make width and height parameters smaller for a ie on a mac
	if (is_mac && is_ie)
	{
		width=width-16
		height=height-16
	}
	
	// spawn window with correctly adjusted width and height properties and insert center values
	window.open(href, name, "width=" + width + ",height=" + height + ",left=" + winLeft + ",top=" + winTop + "," + options)
	
		
}