/*
	Generic function to open a popup
*/

function popup(url,w1,h1,id,scrollbars)
{
	if(typeof url !="undefined")
	{
		myID="popup";
		if(typeof id !="undefined") myID=id;
	
		w=400;
		h=500;
		
		scrolls='yes';
		if(typeof scrollbars != "undefined")
		{
			scrolls="no";
		}
		
		
		if(typeof w1 !="undefined") w=w1;
		if(typeof h1 !="undefined") h=h1;
		
			
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
		
		winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+'resizable=0,scrollbars=' + scrolls;
		
		window.open(url,myID, winprops);	
	}
}