/**
 * $Header$
 * 
 * Copyright &copy; 1999, 2000 End of the Night Creations. All Rights Reserved.
 * 
 * encPopup.js
 * 
 */

function createResizableWindow (url, name, x, y, w, h) {
	
	if (!x) { x = 100; }

	if (!y) { y = 100; }
	
	if (!w) { w = 650; }

	if (!h) { h = 500; }

	var properties = "toolbar=no,directories=no,resize=yes,resizable=yes,menubar=no,location=no,scrollbars=yes,status=yes,";
	properties += "screenX=" + x + ",screenY=" + y + ",";
	properties += "left=" + x + ",top=" + y + ",";
	properties += "width=" + w + ",height=" + h;

	if (document.all) {
		// append '/' only if not an absolute URL.
		if (url.indexOf ("http://") == -1) {
			url = "/" + url;
		}
	}

	var myPopup = window.open(url, name, properties);
	if (!myPopup.opener) {
         myPopup.opener = self; 
    }
	if (window.focus) { myPopup.focus (); }
}

function createNewWindow (url, name, x, y, w, h) {
	
	if (!x) { x = 100; }

	if (!y) { y = 100; }
	
	if (!w) { w = 650; }

	if (!h) { h = 500; }

	var properties = "toolbar=no,directories=no,resize=no,menubar=no,location=no,scrollbars=yes,status=yes,";
	properties += "screenX=" + x + ",screenY=" + y + ",";
	properties += "left=" + x + ",top=" + y + ",";
	properties += "width=" + w + ",height=" + h +",maximize=null";

	if (document.all) {
		// append '/' only if not an absolute URL.
		if (url.indexOf ("http://") == -1) {
			url = "/" + url;
		}
	}

	var myPopup = window.open(url,name, properties);
	if (!myPopup.opener) {
         myPopup.opener = self; 
    }
	if (window.focus) { myPopup.focus (); }
}

