<!--
function OpenWindow(FileName, WindowName)
{
	var locWidth, locHeight;
	locWidth = (screen.width - 800) / 2;
	locHeight = (screen.height - 550) / 2;
	WindowFeature="Resizable=No,ScrollBars=Yes,MenuBar=No,Directories=No,ToolBar=No,Location=No,Status=No,Width=797,ScreenX=0,ScreenY=0,Top=" + locHeight + ",Left=" + locWidth + ",height=550"
	newWindow=open(FileName,WindowName,WindowFeature);
	if (newWindow.opener == null) { newWindow.opener = self; }
	if (newWindow.focus) { newWindow.focus(); }
}

function CartWindow(FileName, WindowName)
{
	var locWidth, locHeight;
	locWidth = (screen.width - 440) / 2;
	locHeight = (screen.height - 400) / 2;
	WindowFeature="Resizable=No,ScrollBars=Yes,MenuBar=No,Directories=No,ToolBar=No,Location=No,Status=No,Width=440,ScreenX=0,ScreenY=0,Top=" + locHeight + ",Left=" + locWidth + ",height=400"
	newWindow=open(FileName,WindowName,WindowFeature);
	if (newWindow.opener == null) { newWindow.opener = self; }
	if (newWindow.focus) { newWindow.focus(); }
}

function ValidateCurrency(ctrl)
{
 if ((event.keyCode < 48 || event.keyCode > 57) && (event.keyCode != 46 || ctrl.value.indexOf(".") != -1 ))
 	event.returnValue = false;
}

function ValidateNum(ctrl)
{
 if (event.keyCode < 48 || event.keyCode > 57) event.returnValue = false;
}

function ValidateQtty(qtty)
{
	if (qtty.value < 1 )
	{
		alert("Quantity cannot be less than 1. \nClick Remove to remove from cart.");
		qtty.focus();
		return false;
	}
}

function ValidateCur()
{
 if (event.keyCode < 48 || event.keyCode > 57) event.returnValue = false;
 
}

function ValidateChar()
{
 if ((event.keyCode < 65 || event.keyCode > 90 ) && (event.keyCode < 97 || event.keyCode > 122 ) ) event.returnValue = false;
}

function SearchFocus(objTxf)
{
	objTxf.className = 'fld03';
	objTxf.select();
}

function SearchBlur(objTxf)
{
	objTxf.className = 'fld01';
}

function TextFieldKeyEnter(ctrl)
{
	if (event.keyCode == 13) { ctrl.click();event.returnValue = false;}
}

function ValidateEmail(ctrlName)
{
	var txtEmail = MM_findObj(ctrlName);
	if (txtEmail.value != "")
	{
		Validator(ctrlName,'%5E%5B%5Cw%5C.=-%5D%2B@%5B%5Cw%5C.-%5D%2B%5C.%5Ba-zA-Z%5D%7B2,3%7D$','NoMsg','','1');
		if (!document.MM_returnValue)
		{
			alert("The Email Address you entered was incorrect.");
			txtEmail.focus();
			txtEmail.select();
			return (false);
		}
	}
}

function Validator(f,re,eMsg,ru,r)
{
	var myErr="";
	var fv=MM_findObj(f).value;
	var rex=new RegExp(unescape(re));
	var t=eval(ru+rex.test(fv));
	if(r)
	{
		if(fv.length<=0||!t)
			myErr+="eMsg";
	}
	else 
		if(fv.length>0&&!t)
			myErr+="eMsg";
	document.MM_returnValue=(myErr=="");
}

function MM_findObj(n, d)
{
	var p,i,x;  
	if(!d) 
		d=document;
	if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all)
		x=d.all[n]; 
	for (i=0;!x&&i<d.forms.length;i++)
		x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++)
		x=MM_findObj(n,d.layers[i].document);
	if(!x && document.getElementById)
		x=document.getElementById(n);
	return x;
}
//-->