
function go2url(url) {
	document.forms[0].target="_self";
	document.forms[0].action=url;
	document.forms[0].submit();

}


// -- Window center
function NewWindow(label, show, w, h, scroll ) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(label, show, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function popup(filename,width,height) {

	//window.open(''+filename,'jobs','scrollbars=yes,menubar=no,toolbar=no,status=yes,directories=no,location=no,resizable=yes');
	var winl = (screen.width - width) / 2;
	var wint = (screen.height - height) / 2;
	if (typeof fenster=="undefined" || fenster.closed) {
	fenster=window.open(''+filename,'jobs','scrollbars=yes,menubar=no,toolbar=no,status=yes,directories=no,location=no,width='+width+',height='+height+',top='+wint+',left='+winl+',resizable=yes');
	} else {
	fenster.document.location.href=''+filename;
	}
	if (parseInt(navigator.appVersion) >= 4) { fenster.window.focus(); }
}


function loginPopup(filename, width, height) {

	//window.open(''+filename,'jobs','scrollbars=yes,menubar=no,toolbar=no,status=yes,directories=no,location=no,resizable=yes');
	var winl = (screen.width - width) / 2;
	var wint = (screen.height - height) / 2;
	if (typeof fenster=="undefined" || fenster.closed) {
	fenster=window.open(''+filename+'?email='+document.forms[0].email.value+'&ftarget='+document.forms[0].ftarget.value,'login','scrollbars=no,menubar=no,toolbar=no,status=yes,directories=no,location=no,width='+width+',height='+height+',top='+wint+',left='+winl+',resizable=yes');
	//fenster=window.open(filename,'login','scrollbars=yes,menubar=no,toolbar=no,status=yes,directories=no,location=no,width='+width+',height='+height+',top='+wint+',left='+winl+',resizable=yes');
	} else {
	fenster.document.location.href=''+filename;
	}
	if (parseInt(navigator.appVersion) >= 4) { fenster.window.focus(); }
}

function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=700,height=600,left = 162,top = 184');");
	}

function newwindow(url)
{
	var params;
	var agent = navigator.userAgent;
	var windowName = "SodapixWindow";
	
	params = "";
	params += "height=556,"
	params += "width=603,"
	params += "left=50,"
	params += "top=50,"
	params += "alwaysRaised=0,"
	params += "directories=0,"
	params += "fullscreen=0,"
	params += "location=0,"
	params += "menubar=b,"
	params += "resizable=1,"
	params += "scrollbars=1,"
	params += "status=0,"
	params += "toolbar=0"
	
	var win = window.open(url,windowName,params);	
	 
	if (agent.indexOf("Mozilla/2") != -1 && agent.indexOf("Win") == -1) 
	{
		win = window.open(url, windowName , params);
	}
	
	if (!win.opener) 
	{
		win.opener = window;
	}
}

