var fonster = null;
var x = 0; var y = 0;
if(parseInt(navigator.appVersion) > 3) {
x = (screen.availWidth - 500) / 2; y = (screen.availHeight - 460) / 2;
}



function oppna(url, width, height) {
x = screen.width;
y = screen.height;
if(parseInt(navigator.appVersion) > 3 || navigator.appName == 'Netscape') {
if(!fonster || fonster.closed) {


fonster = window.open('',"subwin","top=" + parseInt(y/2-height/2-16) + ",left=" + parseInt(x/2-width/2-5) + ",width=" + width + ",scrollbars,height=" + height);

fonster.location.href = url;
fonster.focus();
} else {
fonster.location.href = url;
fonster.focus();
}
}else{
location.href = url;
 }
}


function oppna_custom(url, width, height) {
x = screen.width;
y = screen.height;
if(parseInt(navigator.appVersion) > 3 || navigator.appName == 'Netscape') {
if(!fonster || fonster.closed) {


fonster = window.open('',"subwin","top=" + parseInt(y/2-height/2-16) + ",left=" + parseInt(x/2-width/2-5) + ",width=" + width + ",scrollbars=no,height=" + height);

fonster.location.href = url;
fonster.focus();
} else {
fonster.location.href = url;
fonster.focus();
}
}else{
location.href = url;
 }
}


function formPopup(target,properties){

	winy=180;
	winx=300;
	h=winy;
	w=winx;

	var x = 0; var y = 0;
	x = (screen.availWidth - winx) / 2; y = (screen.availHeight - winy) / 2;

        var myWin=window.open("", 'foo', 'scrollbars=no,height= ' + h + ',width=' + w + ',top=' + y + ',left=' + x);
	myWin.focus();
	return true;
}
