
      var clickedDown =0;
	  var idT;
	  //this script edits the quantity in the qty box when they click the add or substract buttons
	  function addToQty (theID) { 
	     if ( parseInt(document.getElementById("text_qty_" + theID).value) < 9000 ) {
			  document.getElementById("text_qty_" + theID).value = parseInt(document.getElementById("text_qty_" + theID).value) +1;
			  clickedDown =1;
			  idT = setInterval('autoAddQty('+theID+')',450);  //clearInterval(id);, clearTimeout(id);
		  }
	  }
	  function subFromQty (theID) { 
	 	 if ( parseInt(document.getElementById("text_qty_" + theID).value) > 0 ) {
		 document.getElementById("text_qty_" + theID).value = parseInt(document.getElementById("text_qty_" + theID).value) -1;
		 clickedDown =1;
	     idT = setInterval('autoSubQty('+theID+')',450);
		 }
	  }
	  
	  //used to automaticaly increase the qty when holding the left mouse button down.
	  function autoAddQty(theID)  {
		  if (clickedDown >0 && parseInt(document.getElementById("text_qty_" + theID).value) < 9000) {
		  	document.getElementById("text_qty_" + theID).value = parseInt(document.getElementById("text_qty_" + theID).value) +1;
		    clickedDown++;
		  } 
		  //speed it up
		  if (clickedDown==2) {
		  	clearInterval(idT); 
			idT = setInterval('autoAddQty('+theID+')',250);
		  } else if (clickedDown==5) {
		  	clearInterval(idT); 
			idT = setInterval('autoAddQty('+theID+')',150);
		  }else if (clickedDown==13) {
		  	clearInterval(idT); 
			idT = setInterval('autoAddQty('+theID+')',75);
		  } else if (clickedDown==100) {
		  	clearInterval(idT); 
			idT = setInterval('autoAddQty('+theID+')',35);
		  }
	  }
	   //used to automaticaly decrease the qty when holding the left mouse button down
	   function autoSubQty(theID)  {
		  if (clickedDown >0 && parseInt(document.getElementById("text_qty_" + theID).value) > 0 ) {
		  	document.getElementById("text_qty_" + theID).value = parseInt(document.getElementById("text_qty_" + theID).value) -1;
		    clickedDown++;
		  } 
		  //speed it up
		  if (clickedDown==2) {
		  	clearInterval(idT); 
			idT = setInterval('autoSubQty('+theID+')',250);
		  } else if (clickedDown==5) {
		  	clearInterval(idT); 
			idT = setInterval('autoSubQty('+theID+')',150);
		  }else if (clickedDown==13) {
		  	clearInterval(idT); 
			idT = setInterval('autoSubQty('+theID+')',75);
		  } else if (clickedDown==100) {
		  	clearInterval(idT); 
			idT = setInterval('autoSubQty('+theID+')',35);
		  }
	  }
      //when mouse is let go
	  function clickUp () {
	 	 clickedDown =0;
		  clearInterval(idT); 
	  }


