/* Use this syntax in the HTML:
   <a href="openWin('[url]',[width],[height]);">xxx</a> */
	 
function openWin(theURL,width,height) {
	var w = 480, h = 340;
	
	if (document.all || document.layers) {
		w = screen.availWidth;
		h = screen.availHeight;
	}

	var popW = width, popH = height;
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	
	window.open(theURL,'popup','width='+width+',height='+height+',toolbar=no,menubar=no,status=no,scrollbars=no,resize=no,top='+topPos+',left='+leftPos);
}

function openScrollingWin(theURL,width,height) {
	var w = 480, h = 340;
	
	if (document.all || document.layers) {
		w = screen.availWidth;
		h = screen.availHeight;
	}

	var popW = width, popH = height;
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	
	window.open(theURL,'popup','width='+width+',height='+height+',toolbar=no,menubar=no,status=no,scrollbars=yes,resize=yes,top='+topPos+',left='+leftPos);
}


function openWinS(url, width, height) {
	var w = 480, h = 340;
	
	if (screen != null && screen.availWidth != null) {
		w = screen.availWidth;
		h = screen.availHeight;
	}
	
	var popW = width, popH = height;
	var leftPos = (w - popW) / 2, topPos = (h - popH) / 2;
	
	window.open(url,'popup','width='+width+',height='+height+',toolbar=no,menubar=no,status=no,scrollbars=yes,resize=yes,top='+topPos+',left='+leftPos);
}