var win= null;
function popup(mypage,myname,w,h,scroll,res) {
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	var settings  ='height='+h+',';
		settings +='width='+w+',';
	    settings +='top='+wint+',';
	    settings +='left='+winl+',';
	    settings +='scrollbars='+scroll+',';
	    settings +='resizable='+res+',';
	win=window.open(mypage,myname,settings);
	if (parseInt(navigator.appVersion) >= 4) {
		win.window.focus();
	}
}

var toopen = null;
function startchat(mypage) {
	var winl = (screen.width-472)/2;
	var wint = (screen.height-320)/2;
	var settings = 'height=320,width=472,top='+wint+',left='+winl+',scrollbars=no,resizable=no';
	toopen=window.open(mypage,'phplivehelper',settings);
	if (parseInt(navigator.appVersion) >= 4) {
		toopen.window.focus();
	}
}

var PushPage = null;
function push(mypage,myname) {
	var winl = (screen.width-500)/2;
	var wint = (screen.height-500)/2;
	PushPage=window.open(mypage,myname,'toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=500,height=500,top='+wint+',left='+winl);
	if (parseInt(navigator.appVersion) >= 4) {
		PushPage.window.focus();
	}
}
