function openWindow(url,name,params) {
	window.open(url,name,params);
}
function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=960,height=540,left = 180,top = 242');");
}


function newWin(name, url, width, height, args) {
	var newWin = new Object();

	newWin.args = args;
	newWin.url = url;
	newWin.name = name;
	newWin.width = width;
	newWin.height = height;

	if (document.layers) {// browser is NN
		newWin.left = window.screenX + ((window.outerWidth - newWin.width) / 2);
		newWin.top = window.screenY + ((window.outerHeight - newWin.height) / 2);
		var attr = 'screenX=' + newWin.left + ',screenY=' + newWin.top + ',resizable=yes,width=' + newWin.width + ',height=' + newWin.height + ',' + newWin.args;
	}
	else {// browser is MSIE
		newWin.left = (screen.width - newWin.width) / 2;
		newWin.top = (screen.height - newWin.height) / 2;
		var attr = 'left=' + newWin.left + ',top=' + newWin.top + ',width=' + newWin.width + ',height=' + newWin.height + ',' + newWin.args;
	}

	newWin.win=window.open(newWin.url, newWin.name, attr);
	newWin.win.opener=self;
	newWin.win.focus();
}

function newWinLC(name, url, width, height, args) {

	var newWin = new Object();

	newWin.args = args;
	newWin.url = escape(url);
	newWin.name = name;
	newWin.width = width;
	newWin.height = height;
	var tempURL = "";

	if (document.layers) {// browser is NN
		newWin.left = window.screenX + ((window.outerWidth - newWin.width) / 2);
		newWin.top = window.screenY + ((window.outerHeight - newWin.height) / 2);
		var attr = 'screenX=' + newWin.left + ',screenY=' + newWin.top + ',resizable=yes,width=' + newWin.width + ',height=' + newWin.height + ',' + newWin.args;
	}
	else {// browser is MSIE
		newWin.left = (screen.width - newWin.width) / 2;
		newWin.top = (screen.height - newWin.height) / 2;
		var attr = 'left=' + newWin.left + ',top=' + newWin.top + ',width=' + newWin.width + ',height=' + newWin.height + ',' + newWin.args;
	}
	tempURL = "/is-bin/INTERSHOP.enfinity/eCS/Store/en/-/USD/LC_ViewPage-Start?basetemplate=/lc/base/lc_newwin_with_hitbox.isml&finalURL="+newWin.url;
	
	newWin.win=window.open(tempURL, newWin.name, attr);
	newWin.win.opener=self;
	newWin.win.focus();
}

function CheckEmail(email)
{
	if (email.value == "")
	{
		alert("Please enter a value for the \"email\" field.");
		email.focus();
		return false;
	}

	if (!isEmailAddr(email.value))
	{
		alert("Please enter a complete email address in the form: yourname@yourdomain.com");
		email.focus();
		return false;
	}

	if (email.value.length < 3)
	{
		alert("Please enter at least 3 characters in the \"email\" field.");
		email.focus();
		return false;
	} 

	return true;
}

function ClearEmail(email)
{
	email.value = "";
}

function FormValidator(theForm) {

	if (theForm.email.value == "") {
		alert("Please enter a value for the \"email\" field.");
		theForm.email.focus();
		return false;
	}

	if (!isEmailAddr(theForm.email.value)) {
		alert("Please enter a complete email address in the form: yourname@yourdomain.com");
		theForm.email.focus();
		return false;
	}

	if (theForm.email.value.length < 3) {
		alert("Please enter at least 3 characters in the \"email\" field.");
		theForm.email.focus();
		return false;
	}
	return true;
}

function printPage() {
	if (window.print) {
		setTimeout('window.print();', 200);
	} else {
		alert("Please choose the \"print\" option from the file menu in your browser");
	}
}
