
	myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
	//Non-IE
	myWidth = window.innerWidth;
	myHeight = window.innerHeight;
	logposition = myWidth
		if (logposition<1000) 
			{
			logposition = 1000;
			}
	
	} else {
	if( document.documentElement &&
		( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	  //IE 6+ in 'standards compliant mode'
	  myWidth = document.documentElement.clientWidth;
	  myHeight = document.documentElement.clientHeight;
	  	logposition = myWidth
		if (logposition<1000) 
			{
			logposition = 1000;
			}
	  
	} else {
	  if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
		logposition = myWidth
		if (logposition<1000) 
			{
			logposition = 1000;
			}

	  }
	}
	}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function popup(fURL,fWidth,fHeight,fLeftPos,fTopPos,fFeatures){
win = window.open(fURL,'popup','width=' + fWidth + ',height=' + fHeight + ',left=' + fLeftPos + ',top=' + fTopPos + ',' + fFeatures);
}

function get_cookie ( cookie_name )
{
  var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );

  if ( results )
    return ( unescape ( results[2] ) );
  else
    return null;
}


/* 
 * Cross-browser event handling, by Scott Andrew
 */
function addEvent(element, eventType, lamdaFunction, useCapture) {
    if (element.addEventListener) {
        element.addEventListener(eventType, lamdaFunction, useCapture);
        return true;
    } else if (element.attachEvent) {
        var r = element.attachEvent('on' + eventType, lamdaFunction);
        return r;
    } else {
        return false;
    }
}

/* 
 * Kills an event's propagation and default action
 */
function knackerEvent(eventObject) {
    if (eventObject && eventObject.stopPropagation) {
        eventObject.stopPropagation();
    }
    if (window.event && window.event.cancelBubble ) {
        window.event.cancelBubble = true;
    }
    
    if (eventObject && eventObject.preventDefault) {
        eventObject.preventDefault();
    }
    if (window.event) {
        window.event.returnValue = false;
    }
}

/* 
 * Safari doesn't support canceling events in the standard way, so we must
 * hard-code a return of false for it to work.
 */
function cancelEventSafari() {
    return false;        
}

/* 
 * Cross-browser style extraction, from the JavaScript & DHTML Cookbook
 * <http://www.oreillynet.com/pub/a/javascript/excerpt/JSDHTMLCkbk_chap5/index5.html>
 */
function getElementStyle(elementID, CssStyleProperty) {
    var element = document.getElementById(elementID);
    if (element.currentStyle) {
        return element.currentStyle[toCamelCase(CssStyleProperty)];
    } else if (window.getComputedStyle) {
        var compStyle = window.getComputedStyle(element, '');
        return compStyle.getPropertyValue(CssStyleProperty);
    } else {
        return '';
    }
}

/* 
 * CamelCases CSS property names. Useful in conjunction with 'getElementStyle()'
 * From <http://dhtmlkitchen.com/learn/js/setstyle/index4.jsp>
 */
function toCamelCase(CssProperty) {
    var stringArray = CssProperty.toLowerCase().split('-');
    if (stringArray.length == 1) {
        return stringArray[0];
    }
    var ret = (CssProperty.indexOf("-") == 0)
              ? stringArray[0].charAt(0).toUpperCase() + stringArray[0].substring(1)
              : stringArray[0];
    for (var i = 1; i < stringArray.length; i++) {
        var s = stringArray[i];
        ret += s.charAt(0).toUpperCase() + s.substring(1);
    }
    return ret;
}

/*
 * Disables all 'test' links, that point to the href '#', by Ross Shannon
 */
function disableTestLinks() {
  var pageLinks = document.getElementsByTagName('a');
  for (var i=0; i<pageLinks.length; i++) {
    if (pageLinks[i].href.match(/[^#]#$/)) {
      addEvent(pageLinks[i], 'click', knackerEvent, false);
    }
  }
}

/* 
 * Cookie functions
 */
function createCookie(name, value, days) {
    var expires = '';
    if (days) {
        var date = new Date();
        date.setTime(date.getTime() + (days*24*60*60*1000));
        var expires = '; expires=' + date.toGMTString();
    }
    document.cookie = name + '=' + value + expires + '; path=/';
}

function readCookie(name) {
    var cookieCrumbs = document.cookie.split(';');
    var nameToFind = name + '=';
    for (var i = 0; i < cookieCrumbs.length; i++) {
        var crumb = cookieCrumbs[i];
        while (crumb.charAt(0) == ' ') {
            crumb = crumb.substring(1, crumb.length); /* delete spaces */
        }
        if (crumb.indexOf(nameToFind) == 0) {
            return crumb.substring(nameToFind.length, crumb.length);
        }
    }
    return null;
}


function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}

function eraseCookie(name) {
    createCookie(name, '', -1);
}

function Modalpopup(ID) {
    document.getElementById(ID).style.background = "#a0e9ff"; 
}
function ModalpopupOut(ID, color) {
    document.getElementById(ID).style.background = (color); 
}

function closePopup(pObj, pdis)
{
	document.getElementById(pObj + pdis).style.display = "none";
	document.getElementById("overlay"+ (pdis)).style.visibility = "hidden";
	document.getElementById("overlay"+ (pdis)).style.width = 0 +"px";
	document.getElementById("overlay"+ (pdis)).style.height= 0 +"px";

}

function showPopupFront(pObj, parentObj, pdis)
{

	var ie=document.all && !window.opera
	var domclientWidth=document.documentElement && parseInt(document.documentElement.clientWidth) || 100000 //Preliminary doc width in non IE browsers
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	this.scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
	this.scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
	this.docwidth=(ie)? this.standardbody.clientWidth : (/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth, window.innerWidth-16)
	this.docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
	this.docheightcomplete=(standardbody.offsetHeight>standardbody.scrollHeight)? standardbody.offsetHeight : standardbody.scrollHeight


	lobjParentObj = document.getElementById(parentObj);
	lobjCurrentObj = document.getElementById(pObj);
	//alert(lobjParentObj.offsetTop);
	//alert(lobjCurrentObj.offsetTop);
	document.getElementById("imprintPopup" + (pdis)).style.display = "block";
	document.getElementById("overlay"+ (pdis)).style.visibility = "visible";
	document.getElementById("overlay"+ (pdis)).style.width = docwidth +"px";
	document.getElementById("overlay"+ (pdis)).style.height= this.docheightcomplete+"px";
	document.getElementById("imprintArea").innerText = "Front";
	//document.getElementById("imprintPopup" + (pdis)).style.padding = scroll_top +20 +"px";
	
	var divDis = pdis
}

function resizewin(){

	var ie=document.all && !window.opera
	var domclientWidth=document.documentElement && parseInt(document.documentElement.clientWidth) || 100000 //Preliminary doc width in non IE browsers
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	this.scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
	this.scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
	this.docwidth=(ie)? this.standardbody.clientWidth : (/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth, window.innerWidth-16)
	this.docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
	this.docheightcomplete=(standardbody.offsetHeight>standardbody.scrollHeight)? standardbody.offsetHeight : standardbody.scrollHeight

		var sPath = window.location.pathname;
		//var sPage = sPath.substring(sPath.lastIndexOf('\\') + 1);
		var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
		//alert(sPage);
		var logged = getCookie('logged');
		
		if (sPage == "apparelquote.asp")
			{
			}
		
		if (logged!=null && logged!="")
  			{
			}
		else
			{
		document.getElementById("login").style.left = (docwidth/2) +23 +"px";
		document.getElementById("timeout").style.width = docwidth +"px";
		document.getElementById("timeout").style.height= this.docheightcomplete+"px";
			}
		
}

function resizewin3(){

	var ie=document.all && !window.opera
	var domclientWidth=document.documentElement && parseInt(document.documentElement.clientWidth) || 100000 //Preliminary doc width in non IE browsers
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	this.scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
	this.scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
	this.docwidth=(ie)? this.standardbody.clientWidth : (/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth, window.innerWidth-16)
	this.docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
	this.docheightcomplete=(standardbody.offsetHeight>standardbody.scrollHeight)? standardbody.offsetHeight : standardbody.scrollHeight

			document.getElementById("overlay-emailflash").style.width = docwidth +"px";
			document.getElementById("overlay-emailflash").style.height= this.docheightcomplete+"px";
			document.getElementById("overlaycolor:directory").style.width = docwidth +"px";
			document.getElementById("overlaycolor:directory").style.height= this.docheightcomplete+"px";
			document.getElementById("overlaycolor:attach").style.width = docwidth +"px";
			document.getElementById("overlaycolor:attach").style.height= this.docheightcomplete+"px";
}

function resizewin2(over){

	var ie=document.all && !window.opera
	var domclientWidth=document.documentElement && parseInt(document.documentElement.clientWidth) || 100000 //Preliminary doc width in non IE browsers
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	this.scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
	this.scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
	this.docwidth=(ie)? this.standardbody.clientWidth : (/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth, window.innerWidth-16)
	this.docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
	this.docheightcomplete=(standardbody.offsetHeight>standardbody.scrollHeight)? standardbody.offsetHeight : standardbody.scrollHeight

		document.getElementById(over).style.height= this.docheightcomplete+"px";
		document.getElementById(over).style.width = docwidth +"px";

}

function signinunhide()
{
	var ie=document.all && !window.opera
	var domclientWidth=document.documentElement && parseInt(document.documentElement.clientWidth) || 100000 //Preliminary doc width in non IE browsers
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	this.scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
	this.scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
	this.docwidth=(ie)? this.standardbody.clientWidth : (/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth, window.innerWidth-16)
	this.docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
	this.docheightcomplete=(standardbody.offsetHeight>standardbody.scrollHeight)? standardbody.offsetHeight : standardbody.scrollHeight

	//document.getElementById("login").style.visibility = "visible";
	var oDv = document.getElementById("login");
	
	opac = 0;
	oDv.style.left = (docwidth/2) +23 +"px";
	document.getElementById("currencies").style.color = "#e17716";
	oDv.style.visibility='visible';
	//document.getElementById("passwordtext3").style.visibility = "visible";
}



function signintimehide()
{
	t=setTimeout("signinhide()",3500);
}

function signinhide()
{
	document.getElementById("login").style.visibility = "hidden";
	document.getElementById("currencies").style.color = "#676d77";
	//document.getElementById("passwordtext3").style.visibility = "hidden";
}

function productsunhide()
{
	var ie=document.all && !window.opera
	var domclientWidth=document.documentElement && parseInt(document.documentElement.clientWidth) || 100000 //Preliminary doc width in non IE browsers
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes


	this.docwidth=(ie)? this.standardbody.clientWidth : (/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth, window.innerWidth-16)

	document.getElementById("products").style.visibility = "visible";
	document.getElementById("products").style.left = (logposition/2) -412 +"px";
	//document.getElementById("nav2").style.color = "#e17716";

}

function productshide()
{
	document.getElementById("products").style.visibility = "hidden";
	//document.getElementById("nav2").style.color = "#676d77";
}
function shippingunhide()
{
	document.getElementById("shipping_address2").style.visibility = "visible"; 
	document.getElementById("shipping_address").style.visibility = "visible";
}

function emailsendUH()
{
	var ie=document.all && !window.opera
	var domclientWidth=document.documentElement && parseInt(document.documentElement.clientWidth) || 100000 //Preliminary doc width in non IE browsers
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	this.scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
	this.scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
	this.docwidth=(ie)? this.standardbody.clientWidth : (/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth, window.innerWidth-16)
	this.docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
	this.docheightcomplete=(standardbody.offsetHeight>standardbody.scrollHeight)? standardbody.offsetHeight : standardbody.scrollHeight



	document.getElementById("overlay-emailflash").style.width = docwidth +"px";
	document.getElementById("overlay-emailflash").style.height= this.docheightcomplete+"px";
	document.getElementById("overlay-emailflash").style.visibility = "visible";
	document.getElementById("emailflash").style.left = (docwidth/2) +"px";
	document.getElementById("emailflash").style.display = "block";
	document.getElementById("emailflash").style.marginTop = scroll_top +200 +"px";
	document.getElementsByClass("overlaycolorpopup").style.width = docwidth +"px";
	//document.getElementById("nav2").style.color = "#e17716";

}

function emailsendUH2(session)
{
	var ie=document.all && !window.opera
	var domclientWidth=document.documentElement && parseInt(document.documentElement.clientWidth) || 100000 //Preliminary doc width in non IE browsers
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	this.scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
	this.scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
	this.docwidth=(ie)? this.standardbody.clientWidth : (/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth, window.innerWidth-16)
	this.docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
	this.docheightcomplete=(standardbody.offsetHeight>standardbody.scrollHeight)? standardbody.offsetHeight : standardbody.scrollHeight



	document.getElementById("overlay-emailflash").style.width = docwidth +"px";
	document.getElementById("overlay-emailflash").style.height= this.docheightcomplete+"px";
	document.getElementById("overlay-emailflash").style.visibility = "visible";
	//document.getElementById("emailflash").style.left = (docwidth/2) +"px";
	document.getElementById("emailflash").style.display = "block";
	//document.getElementById("emailflash").style.marginTop = scroll_top +200 +"px";
	document.getElementsByClass("overlaycolorpopup").style.width = docwidth +"px";
	//document.getElementById("nav2").style.color = "#e17716";
}

function emailsendH()
{
	document.getElementById("emailflash").style.display = "none";
	document.getElementById("overlay-emailflash").style.visibility = "hidden";
}



function adminunhide()
{
	var ie=document.all && !window.opera
	var domclientWidth=document.documentElement && parseInt(document.documentElement.clientWidth) || 100000 //Preliminary doc width in non IE browsers
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	this.scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
	this.scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
	this.docwidth=(ie)? this.standardbody.clientWidth : (/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth, window.innerWidth-16)
	this.docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
	this.docheightcomplete=(standardbody.offsetHeight>standardbody.scrollHeight)? standardbody.offsetHeight : standardbody.scrollHeight

	document.getElementById("admin").style.visibility = "visible";
	document.getElementById("admin").style.left = (docwidth/2) -495 +"px";
	document.getElementById("admin_text").style.color = "#e17716";

}

function adminhide()
{
	document.getElementById("admin").style.visibility = "hidden";
	document.getElementById("admin_text").style.color = "#900";
}

function myaccountunhide()
{
	var ie=document.all && !window.opera
	var domclientWidth=document.documentElement && parseInt(document.documentElement.clientWidth) || 100000 //Preliminary doc width in non IE browsers
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	this.scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
	this.scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
	this.docwidth=(ie)? this.standardbody.clientWidth : (/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth, window.innerWidth-16)
	this.docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
	this.docheightcomplete=(standardbody.offsetHeight>standardbody.scrollHeight)? standardbody.offsetHeight : standardbody.scrollHeight

	document.getElementById("myaccount").style.visibility = "visible";
	document.getElementById("myaccount").style.left = (docwidth/2) -200 +"px";
	//document.getElementById("nav2").style.color = "#e17716";

}

function myaccounthide()
{
	document.getElementById("myaccount").style.visibility = "hidden";
	//document.getElementById("nav2").style.color = "#676d77";
}



function timeoutUH(area, puObj)
{
	var ie=document.all && !window.opera
	var domclientWidth=document.documentElement && parseInt(document.documentElement.clientWidth) || 100000 //Preliminary doc width in non IE browsers
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	this.scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
	this.scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
	this.docwidth=(ie)? this.standardbody.clientWidth : (/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth, window.innerWidth-16)
	this.docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
	this.docheightcomplete=(standardbody.offsetHeight>standardbody.scrollHeight)? standardbody.offsetHeight : standardbody.scrollHeight
	
	document.getElementById(area).style.visibility = "visible";
	document.getElementById(area).style.width = docwidth +"px";
	document.getElementById(area).style.height= this.docheightcomplete+"px";
	document.getElementById(puObj).style.display = "block";

}


function colorSelectUH(area)
{
	document.quote.action ="apparelquote.asp?product_id="+ProductID+"&scolor="+sColor+"&cal=1&area="+areaID+Qs+"&loc_seq="+loc_seq;
	document.quote.submit();
}


function colorSelectH(area, puObj)
{
	document.getElementById(area).style.visibility = "hidden";
	document.getElementById(puObj).style.display = "none";

}


function submitPageModal(areaID, ProductID, sColor, Qs, loc_seq)
{
	
	document.quote.action ="apparelquote.asp?product_id="+ProductID+"&scolor="+sColor+"&cal=1&area="+areaID+Qs+"&loc_seq="+loc_seq;
	document.quote.submit();

}

function attachUH(area, puObj)
{
	var ie=document.all && !window.opera
	var domclientWidth=document.documentElement && parseInt(document.documentElement.clientWidth) || 100000 //Preliminary doc width in non IE browsers
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	this.scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
	this.scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
	this.docwidth=(ie)? this.standardbody.clientWidth : (/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth, window.innerWidth-16)
	this.docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
	this.docheightcomplete=(standardbody.offsetHeight>standardbody.scrollHeight)? standardbody.offsetHeight : standardbody.scrollHeight
	
	document.getElementById(area).style.visibility = "visible";
	document.getElementById(area).style.width = docwidth +"px";
	document.getElementById(area).style.height= this.docheightcomplete+"px";
	document.getElementById(puObj).style.display = "block";
	//document.getElementById(puObj).style.margin = scroll_top +20 +"px auto auto auto";

}


function attachH(area, puObj)
{
	document.getElementById(area).style.visibility = "hidden";
	document.getElementById(puObj).style.display = "none";

}


function colorSelectsubmit(area, puObj)
{
	window.parent.document.quote.submit();

}


function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Please check the email address you entered, there seems to be a problem with the format.")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Please check the email address you entered, there seems to be a problem with the format.")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Please check the email address you entered, there seems to be a problem with the format.")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Please check the email address you entered, there seems to be a problem with the format.")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Please check the email address you entered, there seems to be a problem with the format.")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Please check the email address you entered, there seems to be a problem with the format.")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Please check the email address you entered, there seems to be a problem with the format.")
		    return false
		 }

 		 return true					
	}

function ValidateForm(){
	var emailID=document.addemail.emailaddress
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	
	return true
	
 }
 
function changevalue(myvar, myvalue) {
	eval('document.quote.sColor.value="'+myvalue+'";')
	document.quote.submit();
}

function changevalue2(myvar, myvalue, myproduct) {
	eval('document.quote.sColor.value="'+myvalue+'";')
	eval('document.quote.action = "'+myproduct+'";')
	document.quote.submit();
}


function submitquote() {
	document.getElementById("quote").submit();
	//document.quote.submit();
	//this.form.submit();
}

sfFocus = function() {
	var sfEls = document.getElementsByTagName("INPUT");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onfocus=function() {
			this.className+=" sffocus";
		}
		sfEls[i].onblur=function() {
			this.className=this.className.replace(new RegExp(" sffocus\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfFocus);


function editcartitem(host, itemtoedit)
{ 
	
	varitem2 = document.getElementById(itemtoedit).value;
	location.href = 'http://'+ (host) +'/cart/edititemincart.asp?itemtoedit='  + (itemtoedit) + '&val='+ (varitem2);
		
}
function editcartitemgroup(host, itemtoedit, value)
{ 
	
	varitem3 = document.getElementById(value).value;
	location.href = 'http://'+ (host) +'/cart/edititemincartgroup.asp?itemtoedit='  + (itemtoedit) + '&val='+ (varitem3);
		
}



	
function onFocusHandler_p(fld){
	fld.style.display = 'none';
	var fld2 = (document.getElementById) ? document.getElementById('password') : document.all['password'];
	fld2.style.display = 'block';
	fld2.focus();
	return true;
}
function onBlurHandler_p(fld){
	if(fld.value === ''){
		fld.style.display = 'none';
		var fld2 = (document.getElementById) ? document.getElementById('fauxPassword') : document.all['fauxPassword'];
		fld2.style.display = 'block';
	}
	return true;
}
	
	