var zoomwindow;

function deplace(window,width,height) {
	var scr_x = screen.width;
	var scr_y = screen.height;
	if (is.v >= 4) {
		if (!is.ie) {
			window.moveTo((scr_x/2)-(width/2), (scr_y/2)-(height/2));
		} else {
			window.moveTo(parent.window.screenLeft+300, parent.window.screenTop+150);
		}
	}
}
	
var movePopup = true;
var scrollPopup = 1;

function popup(url,width,height) {
	movePopup = true;
	scrollPopup = 1;
	if (popup.arguments.length >= 4) {
		if (popup.arguments[3]) {
			movePopup = true;
		} else {
			movePopup = false;
		}
		if (popup.arguments[4] == 0 || popup.arguments[4] == 1) {
			scrollPopup = popup.arguments[4];
		}
	}
	if (url != "") {
		var features;
		features = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=" + scrollPopup + ",resizable=0,width=" + width + ",height=" + height + "'";
		if (zoomwindow != null) {
			if (!zoomwindow.closed)
				zoomwindow.close();
		}
		zoomwindow = window.open(url,"ZOOMWINDOW",features);
		if (is.v == 3 || is.v == 4) {
			zoomwindow.focus();
		}
		if (movePopup) deplace(zoomwindow,width,height);
	}
}