function popup(width,height,location) {

	var popupLocation = location;
	var popupWidth = width + 30;
	var popupHeight =height + 70;
	
//	alert(popupWidth+ ':' + popupHeight);
		
	var heightspeed = 15; 	// vertical speed
	var widthspeed 	= 15;  	// horizontal speed
	var leftdist 	= (screen.width - popupWidth) / 2;    	// distance to left edge of window
	var topdist 	= (screen.height - popupHeight) / 2;   	// distance to top edge of window

	if (document.all) {
		var popup = window.open("","","left=" + leftdist + ",top=" + topdist + ",width=4,height=4,scrollbars=no,resizable=no,status=no");
		for (sizeheight = 1; sizeheight < popupHeight; sizeheight += heightspeed) {
			popup.resizeTo("1", sizeheight);
		}
		for (sizewidth = 1; sizewidth < popupWidth; sizewidth += widthspeed) {
			popup.resizeTo(sizewidth, sizeheight);
		}	
		popup.resizeTo(popupWidth, popupHeight);
		popup.location = popupLocation;
	} else {
		var popup = window.open(popupLocation,"","left=" + leftdist + ",top=" + topdist + ",width=" + popupWidth + ",height=" + popupHeight + ",scrollbars=yes,resizable=yes");
	}
	
}
