
	//******* Set some Globals **************
	// var anthing;
	
	//************************************************************************
	/********************************* Functions ****************************/
	//************************************************************************
	function test(str){alert(str);}
	
	
	function popup(thePage,wi,ht,scr) {
		var scrollTxt = "YES"
		//var popdial = ""
		
		if (scr == 0) { scrollTxt = "no" } else {scrollTxt = "yes"}
		//alert(thePage);
		eval('desktop = window.open(thePage,"subWindow","width=' + wi + ',height=' + ht + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=' + scrollTxt + ',resizable=yes");')
	}


	//***********************************
	 
	function topNavLinkChange(obj, txtClr, bgClr){
		obj.style.color = txtClr
		obj.style.backgroundColor = bgClr;
	}
	
	function topNavLink1(obj){
		obj.style.color = '#FFFFFF';
		//obj.style.backgroundColor = "#5677E8";
		obj.style.backgroundColor = "#7F99CC";
	}
	
	function topNavHover1(obj){
		obj.style.color = '#000000';
		//obj.style.backgroundColor = "#0033CC";
		obj.style.backgroundColor = "#003399";
	}
	
	function topNavLink2(obj){
		obj.style.color = '#FFFFFF';
		//obj.style.backgroundColor = "#5677E8";
		obj.style.backgroundColor = "#7F99CC";
	}
	
	function topNavHover2(obj){
		obj.style.color = '#000000';
		//obj.style.backgroundColor = "#0033CC";
		obj.style.backgroundColor = "#003399";
	}
	
	function topNavLink3(obj){
		obj.style.color = '#FFFFFF';
		//obj.style.backgroundColor = "#5677E8";
		obj.style.backgroundColor = "#7F99CC";
	}
	
	function topNavHover3(obj){
		obj.style.color = '#000000';
		//obj.style.backgroundColor = "#0033CC";
		obj.style.backgroundColor = "#003399";
	}
	
	function topNavLink4(obj){
		obj.style.color = '#FFFFFF';
		//obj.style.backgroundColor = "#5677E8";
		obj.style.backgroundColor = "#7F99CC";
	}
	
	function topNavHover4(obj){
		obj.style.color = '#000000';
		//obj.style.backgroundColor = "#0033CC";
		obj.style.backgroundColor = "#003399";
	}
	
	function topNavLink5(obj){
		obj.style.color = '#FFFFFF';
		//obj.style.backgroundColor = "#5677E8";
		obj.style.backgroundColor = "#7F99CC";
	}
	
	function topNavHover5(obj){
		obj.style.color = '#000000';
		//obj.style.backgroundColor = "#0033CC";
		obj.style.backgroundColor = "#003399";
	}
	
	function topNavLink6(obj){
		obj.style.color = '#FFFFFF';
		//obj.style.backgroundColor = "#5677E8";
		obj.style.backgroundColor = "#7F99CC";
	}
	
	function topNavHover6(obj){
		obj.style.color = '#000000';
		//obj.style.backgroundColor = "#0033CC";
		obj.style.backgroundColor = "#003399";
	}
	
	function topNavLink7(obj){
		obj.style.color = '#FFFFFF';
		//obj.style.backgroundColor = "#5677E8";
		obj.style.backgroundColor = "#7F99CC";
	}
	
	function topNavHover7(obj){
		obj.style.color = '#000000';
		//obj.style.backgroundColor = "#0033CC";
		obj.style.backgroundColor = "#003399";
	}
	
	function topNavLink8(obj){
		obj.style.color = '#FFFFFF';
		//obj.style.backgroundColor = "#5677E8";
		obj.style.backgroundColor = "#7F99CC";
	}
	
	function topNavHover8(obj){
		obj.style.color = '#000000';
		//obj.style.backgroundColor = "#0033CC";
		obj.style.backgroundColor = "#003399";
	}
	//***********************************
	
	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_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_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 bootImages(){
		//MM_preloadImages('/images/topNav/button_topnav_active_on.gif','/images/topNav/button_topnav_swim_on.gif','/images/topNav/button_topnav_casual_on.gif','/images/topNav/button_topnav_outerwear_on.gif','/images/topNav/button_topnav_lounge_on.gif','/images/topNav/button_topnav_top10_on.gif','/images/topNav/button_topnav_newstyles_on.gif','/images/topNav/button_topnav_clearance_on.gif')
		MM_preloadImages('/images/topNav/button_topnav_active_on.gif','/images/topNav/button_topnav_casual_on.gif','/images/topNav/button_topnav_swim_on.gif','/images/topNav/button_topnav_outerwear_on.gif','/images/topNav/button_topnav_lounge_on.gif','/images/topNav/button_topnav_top10_on.gif','/images/topNav/button_topnav_newstyles_on.gif','/images/topNav/button_topnav_clearance_on.gif')
		
	}
	//***********************************
	// Clear the text box value
	function clearField(field){
		field.value = "";
	}
	//************************************

	
	function hide(id)
	{if (document.getElementById){document.getElementById(id).style.display = 'none';}}
	
	function show(id)
	{if (document.getElementById){document.getElementById(id).style.display = 'block';}
	}
	
	function swop(id,imgId,imgSrc1,imgSrc2)
	{
		if (document.getElementById)
		{
			var on = (document.getElementById(id).style.display == 'none') ? 1 : 0;
			document.getElementById(id).style.display = (on) ? 'block' : 'none';
			//document.images[imgId].src = imgSrc;
			document.images[imgId].src = (on) ? imgSrc1 : imgSrc2;
		}
	}
	
	function showhide(id)
	{
		if (document.getElementById)
		{
			var on = (document.getElementById(id).style.display == 'none') ? 1 : 0;
			document.getElementById(id).style.display = (on) ? 'block' : 'none';
			document.getElementById(id).style.backgroundColor = (on) ? '#EBEBEB' : '#FFFFFF';
		}
	}

	function isPOBox(){
		var pocheck = new RegExp("(p[.\\s]?o[.\\s]?\\s)|(post office)", "i");
		var address = document.mainForm.shipadd1.value;
		if(pocheck.test(address)){
			return true;}
		else{
			return false;
		}//end if
	}//end isPOBox function
	
	
	function luhn(ccNum){
		var check = IsNumeric(ccNum) 
		if(check){
			var sum = 0;
			var n = 0;
			var i = 0;
			for(i = ccNum.length - 1; i >= 0; i-- ){
				if(i % 2 == ccNum.length % 2){
					n = Number(ccNum.substr(i,1)) * 2;
					sum += (n % 10);
					if(n>9){
						sum+=1;}
				}else{
					sum += Number(ccNum.substr(i,1));	
				}
			}
			return (sum % 10 == 0);
		}else{
			return false;
		}
	}
		
	// This fucntion checks strings that can be converted to a whole number
	function IsNumeric(sText){
	   var ValidChars = "0123456789";
	   var IsNumber = true;
	   var Char;
	   for (i = 0; i < sText.length && IsNumber == true; i++) 
		  { 
		  Char = sText.charAt(i); 
		  if (ValidChars.indexOf(Char) == -1) 
			 {
			 IsNumber = false;
			 }
		  }
	   return IsNumber;
	}
		
	function isFloat(s){
		var n = trim(s);
		return n.length > 0 && !(/[^0-9.]/).test(n) && (/\.\d/).test(n);
	} 
		
	// Removes leading whitespaces
	function LTrim( value ) {
		var re = /\s*((\S+\s*)*)/;
		return value.replace(re, "$1");
	}
	
	// Removes ending whitespaces
	function RTrim( value ) {
		var re = /((\s*\S+)*)\s*/;
		return value.replace(re, "$1");
	}
	
	// Removes leading and ending whitespaces
	function trim( value ) {
		return LTrim(RTrim(value));
	}
	
	function Left(str, n){
		if(n <= 0){
			return "";
		}else if(n > String(str).length){
		return str;
		}else{
			return String(str).substring(0,n);
		}
	}
	
	function Right(str, n){
		if(n <= 0){
			return "";
		}else if(n > String(str).length){
			return str;
		}else{
			var iLen = String(str).length;
			return String(str).substring(iLen, iLen - n);
		}
	}

//-->