function openwin(url)
{
	var heightspeed =16;
	var widthspeed = 16;
	var leftdist = (screen.width-640)/2;   
	var topdist = (screen.height-480)/2; 
	


		var winwidth = 640;
		var winheight = 480;	
		//var sizer = window.open("","","left=" + leftdist + ",top=" + topdist + ",width=1,height=1,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,");
		var sizer = window.open("","","left=" + leftdist + ",top=" + topdist + ",width=1,height=1,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,");
		for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed)
		{
			sizer.resizeTo("1", sizeheight);
		}
		for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed) 
		{
			sizer.resizeTo(sizewidth, sizeheight);
		}
		sizer.location = url;


}

function CenterPopup(myUrl, name,h,w) {

	var leftpos = (screen.width - w) / 2;
	var toppos = (screen.height - h) / 2;
	winconfig = 'height='+h+',width='+w+',left='+leftpos+',top='+toppos+',scrollbars=yes,resizable=yes';
	win = window.open(myUrl, name, winconfig);
	if (parseInt(navigator.appVersion) >= 4)
		win.window.focus();
}

function MyCenterPopup(myUrl, name,h,w,scrollbars,resizable) {

	var leftpos = (screen.width - w) / 2;
	var toppos = (screen.height - h) / 2;
	winconfig = 'height='+h+',width='+w+',left='+leftpos+',top='+toppos+',scrollbars='+scrollbars+',resizable='+resizable;
	win = window.open(myUrl, name, winconfig);
	if (parseInt(navigator.appVersion) >= 4)
		win.window.focus();
}

function CenterPopup3(myUrl,h,w) {

name3="aaa"

	var leftpos = (screen.width - w) / 2;
	var toppos = (screen.height - h) / 2;
	winconfig = 'height='+h+',width='+w+',left='+leftpos+',top='+toppos+',scrollbars=yes,resizable=yes';
	win = window.open(myUrl, name3, winconfig);
	if (parseInt(navigator.appVersion) >= 4)
		win.window.focus();
}
