
	// SHOP FORM CONTROL
function onEnter() {
    var evt  = (evt) ? evt : ((event) ? event : null);
    var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
    if ((evt.keyCode == 13) && (node.type=="text")) {return false;}
  }
  document.onkeypress = onEnter

function checkCard() {
if(desg ==''){alert('Please select a card design');return false}
	else
	{updtOn()}
}
 
function markCard() {
	window.scrollTo(0,440)
  if (moz){window.scrollTo(0,450)}
  if (ns) {window.scrollTo(0,475)}
  if (opr){window.scrollTo(0,480)}

   if (last!='') {
	document.getElementById(last).style.background = 'white'
	document.getElementById(last).style.border = '2px solid white'
	}
	document.getElementById(ord).style.border = '2px solid #660033'
	document.getElementById(ord).style.background = '#F4ECE0'
	last = ord

   document.getElementById('title').innerHTML = desg
   document.getElementById('ordno').innerHTML = ord 
}

function update(id) {
// ---------------- calculate totals ------------- //
 if (quan <1){alert('Please enter a quantity');return false}

	quan = parseInt(quan)
	tens = parseInt(quan/10)
	ones = quan - (tens*10)
 if (quan <10) { totl=(costQ[0]*ones)
	       post=(postQ[0]*ones) } 
 if (quan ==9) { totl=(costQ[0]*9)
	       post=(postQ[1]) } 
 if (quan > 9) { totl=((costQ[1]*tens)+(costQ[0]*ones))
	       post=((postQ[1]*tens)+(postQ[0]*ones)) } 


// ---------------- display totals ------------- //
       tota = parseFloat(totl)
       totb = parseFloat(post)
       totc = tota + totb
       amnt = (tota/quan).toFixed(2)
       tot1.innerHTML = tota.toFixed(2)
       tot2.innerHTML = totb.toFixed(2)
       tot3.innerHTML = '<a class="shopPrice" style="line-height:15pt" href="#" onClick="return false" onMouseOver="cost=\'' +totc+ '\' ;menuOn(event,\'conv\',\'USD\')" onMouseout="dlayhide()">$' +totc.toFixed(2)+ '</a>'
}

function updtOn() {
   document.getElementById('updt').style.visibility = 'visible'
}
function updtOff() {
   document.getElementById('updt').style.visibility = 'hidden'
}







