function errNoImage(objImage) {objImage.src = "http://eimages.ecost.com/spacer.gif";}
function MM_reloadPage(init) {
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function ValidateEMailBLN(objForm) {if (EMailAddressValidBLN(objForm.email, "Please enter a valid email address.")) {return true} else {return false}}
	
function IsNumeric(strString)
{
var strValidChars = "0123456789.-";
var strChar;
var blnResult=true;
for (i = 0; i < strString.length && blnResult == true; i++) {
strChar = strString.charAt(i);
if (strValidChars.indexOf(strChar) == -1){blnResult = false;}
}
return blnResult;
}

function EMailAddressValidBLN(objField, strMessage) {   
var isvalidaddress=true;
if (objField.value == "") {
alert(strMessage);    
objField.focus();      
return false; 
}
if (objField.value.indexOf ('@', 0) == -1)
{ isvalidaddress=false }
if (objField.value.indexOf ('.', 0) == -1)
{ isvalidaddress=false }
if (objField.value.length<6)
{ isvalidaddress=false }
if (isvalidaddress==false)
{
alert(strMessage);    
objField.select();      
objField.focus();      
return false;      
}
	
else {
return true;      
}   
}

var cleared = 0;
				
function clearField(field) {
				
if (cleared != 1) {
field.value = "";
cleared=1;}
else {cleared = 0;}
} 
				
function goHere(newLoc)	{newPage = newLoc.options[newLoc.selectedIndex].value;if (newPage != "") {window.location.href=newPage;}}
				
function goHereFW(newLoc) {
newPage = newLoc.options[newLoc.selectedIndex].value;
if (newPage != "") {window.top.location.href = newPage;}
}
function setCookie(name, value, expires, path, domain, secure) 
{ 
	var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); 
	document.cookie = curCookie; 
}

function getCookie(name) 
{ 
	var prefix = name + "="; 
	var nullstring = ""; 
	var cookieStartIndex = document.cookie.indexOf(prefix); 
	if (cookieStartIndex == -1) 
		return nullstring; 
	
	var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length); 
	
	if (cookieEndIndex == -1) 
		cookieEndIndex = document.cookie.length; 
	
	return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex)); 
}

function init()
{
}
			
function openAvailabilityLegend(){window.open("/ecost/shop/tools/availability_legend.asp","thisName","menubar=no,status=no,location=no,width=610,height=450,toolbar=no,scrollbars=yes");}
function goHere(newLoc) 
{
	newPage = newLoc.options[newLoc.selectedIndex].value;
	if (newPage != "")
	{
		window.location.href = newPage;
	}
}
	
function openPopup(url,width,height,scroll,name)
{
	window.open(url,name,"menubar=no,resizable=yes,status=no,location=no,width=" + width + ",height=" + height + ",toolbar=yes,scrollbars=" + scroll);
}

function openSony()
{
	window.open("/ecost/shop/showcase/sony/flash.asp","thisName","menubar=no,status=no,location=no,width=660,height=420,toolbar=no,scrollbars=yes");
}
			
function openFreeShipping()
{
	window.open("/ecost/information/help/about_ecost.asp#a2","thisName","menubar=no,status=no,location=no,width=610,height=450,toolbar=no,scrollbars=yes");
}

function openShippingLegend()
{
	window.open("/ecost/shop/tools/availability_legend.asp","thisName","menubar=no,status=no,location=no,width=610,height=450,toolbar=no,scrollbars=yes");
}

function openEnableCookies()
{
	window.open("http://www.ecost.com/Content/EnableCookies.asp?store=ecsplash&catalog_id=63&set_id=4&section=welcome","thisName","menubar=no,status=no,location=no,width=610,height=450,toolbar=no,scrollbars=yes");
}

function openOrderPolicy()
{
	window.open("http://www.ecost.com/Content/OrderPolicyPopup.asp?store=ecsplash&catalog_id=63&set_id=4&section=welcome","thisName","menubar=no,status=no,location=no,width=610,height=450,toolbar=no,scrollbars=yes");
}

function openBBBOnline()
{
	window.open("http://www.bbbonline.org/r.cfm?ID=1176000217","thisName","menubar=no,status=no,location=no,width=370,height=400,toolbar=no,scrollbars=no");
}

function openDetails(strLink)
{
	window.open(strLink,'printspecs','menubar=yes,status=no,location=no,width=610,height=450,toolbar=yes,scrollbars=yes')
}

function openBizRate2()
{
	window.open("http://images.bizrate.com/details/card18045.gif","thisName","menubar=no,status=no,location=no,width=270,height=330,toolbar=no,scrollbars=no");
}

function openBizRate()
{
	window.open("http://cnet.bizrate.com/cobrand/report.xpml?mid=18045","thisName","menubar=no,status=no,location=no,width=820,height=580,toolbar=no,scrollbars=yes");
}

function CloseThisWindow()
{
	window.close();
}

function OmniConfig()
{
   var windowHandle = window.open("http://206.62.140.31/omni/ecostconfig/default.asp?returnurl=http://www.ecost.com/ecost/ecsplash/shop/cart/cart_item.asp?action=add","InkjetConfigurator","height=250,width=650,menubar=no,scrollbars=yes,status=no");
}

function configurator()
{
	remote = window.open ("","remotewin",
	"status=yes,toolbar=no,menubar=no,location=no,resizable=yes,width=500,height=500,top=50,left=200");
	remote.location.href = "http://208.178.183.8/companies/eCOST/index.shtml";
	if (remote.opener == null)
	{
		remote.opener = window;
	}
	remote.opener.name = "opener";
}

function MM_openBMLPromoCombo(theURL, winName, features) 
{ 
  window.open("https://www.securecheckout.billmelater.com/paycapture-content/fetch?hash=2WD25PDB&content=/bmlweb/np6m0307iw.html","help", "width=505,height=600, top=50,left=200,menubar=yes,scrollbars=yes,status=no,toolbar=yes");
}	

