  function PaletteAction(cust_no, mat_id, act)
	{
		document.frmPalette.customer_no.value = cust_no;
		document.frmPalette.material_id.value = mat_id;
		document.frmPalette.action.value = act;
		document.frmPalette.submit();
	}
	
	function RequestSwatch() 
	{         	
		document.frmAddCart.itemtype.value = '2'
		document.frmAddCart.submit()
	}
	
	function isNumber(evt)
	{
    IE = document.all;
    if (IE)
		{  
      var keycode = window.event.keyCode;
      //if (keycode < 48 || keycode > 57) return false;
		  if ((keycode >= 48 && keycode <= 57) || (keycode == 46))
		  {
			return true;
		  }
		  else
		  {
			window.event.keyCode = 0;
			return false;
		  }
    } 
		else
		{
          keycode = evt.which;
          var bs = String.fromCharCode(evt.which);
		  //if (keycode < 48 || keycode > 57) return false;
          if ((keycode >= 48 && keycode <= 57) || (keycode == 46))
		  {
			return true;
		  }
		  else
		  {
			evt.which = 0;
			return false;
		  }
    }
	//return false;
	}
	
	function PhoneNbr(evt)
	{
    IE = document.all;
    if (IE)
		{  
      var keycode = window.event.keyCode;
      //if (keycode < 48 || keycode > 57) return false;
		  if (keycode >= 48 && keycode <= 57)
		  {
			return true;
		  }
		  else
		  {
			window.event.keyCode = 0;
			return false;
		  }
    } 
		else
		{
          keycode = evt.which;
          var bs = String.fromCharCode(evt.which);
		  //if (keycode < 48 || keycode > 57) return false;
          if (keycode >= 48 && keycode <= 57)
		  {
			return true;
		  }
		  else
		  {
			evt.which = 0;
			return false;
		  }
    }
	
	}
	
	function autotab(original,destination)
   	{
	if (original.getAttribute&&original.value.length==original.getAttribute("maxlength"))
	destination.focus()
	}
	
	timeLeft = 1800 //30 Minutes
	function TimeOutTimer()
	{
	  timeLeft --
	  if (timeLeft < 0) {
		window.location="https://www.bestcutfabrics.com/ScriptLibrary/sessionend.asp"
		timeLeft = 1800
	  }
	  minsLeft = Math.floor(timeLeft / 60)
	  secsLeft = timeLeft - (minsLeft * 60)
	 if (secsLeft < 10){
		secsLeft = "0" + secsLeft
	  }
	 //window.status = "Time Out In --> " + minsLeft + ":" + secsLeft
	  setTimeout("TimeOutTimer()",1000)
	}
	
	function GoTo(page)
	{
		window.location = page;
	}
	
	function windowOpener(url, name, args)
	{
		if (typeof(popupWin) != "object"){
		  popupWin = window.open(url,name,args);
		} 
		else
		{
			if (!popupWin.closed)
			{ 
			  popupWin.location.href = url;
			} 
			else
			{
			  popupWin = window.open(url, name,args);
			}
		}
		popupWin.focus();
	}
	