
function popup( url, pagename, w, h)  {
	var pupwindow = null;
	var LeftPosition = 0;
	var TopPosititon = 0;
	if (w > 1) {
		LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	}	
	if (h > 1) {
		TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	}
	toptions = "menubar=yes,toolbar=no,directories=no,status=no,copyhistory=no,top=" + TopPosition + ",left=" + LeftPosition + ",width=" + w + ",height=" + h + ",resizable=yes,scrollbars=-1";
	pupwindow = window.open( "", pagename, toptions);
	if (pupwindow != null) {
		if (pupwindow.opener == null) {
			pupwindow.opener = self;
		}
		pupwindow.location.href = url;
	}
}
function popupnomenu( url, pagename, w, h)  {
	var pupwindow = null;
	var LeftPosition = 0;
	var TopPosititon = 0;
	if (w > 1) {
		LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	}	
	if (h > 1) {
		TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	}
	toptions = "menubar=no,toolbar=no,directories=no,status=no,copyhistory=no,top=" + TopPosition + ",left=" + LeftPosition + ",width=" + w + ",height=" + h + ",resizable=yes,scrollbars=-1";
	pupwindow = window.open( "", pagename, toptions);
	if (pupwindow != null) {
		if (pupwindow.opener == null) {
			pupwindow.opener = self;
		}
		pupwindow.location.href = url;
	}
}

function popupmodel( url, pagename, w, h)  {
	var pupwindow = null;
	var LeftPosition = 0;
	var TopPosititon = 0;
	if (w > 1) {
		LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	}	
	if (h > 1) {
		TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	}
	toptions = "menubar=no,toolbar=no,directories=no,status=no,copyhistory=no,top=" + TopPosition + ",left=" + LeftPosition + ",width=" + w + ",height=" + h + ",resizable=no,scrollbars=no";
	pupwindow = window.open( "", pagename, toptions);
	if (pupwindow != null) {
		if (pupwindow.opener == null) {
			pupwindow.opener = self;
		}
		pupwindow.location.href = url;
	}
}
