var titleCP = [];
titleCP[1] = "<span class='learnAboutHeader'>Size:</span><br><span class='learnAboutText'><br>CR80 cards are 3 3/8&quot; wide by 2 1/8 high.</span>";
titleCP[2] = "<p><span class='learnAboutHeader'>Artwork Versions:</span><br><span class='learnAboutText'><br>If needed, there can be different artwork (front and/or back) for every 10,000 cards. Changing the artwork during the print process requires additional printing plates at an additional cost.</span>";
titleCP[3] = "<p><span class='learnAboutHeader'>Color:</span><br><span class='learnAboutText'><br>Front of cards is always printed with four colors (CMYK) even if the artwork is one color. The back of the card can be one color (Black) or full color (CMYK). </span>";
titleCP[4] = "<p><span class='learnAboutHeader'>Batching:</span><br><span class='learnAboutText'><br>For ease of handling and tracking the cards will be batched in plastic wrapping. The standard is 500 cards per wrap (batch), but other batch quantities are available too at an additional cost (100, 50, 25, 10 or 5) .</span>";
function learnText(selection){
	document.getElementById("learn").innerHTML= titleCP[selection];
}
var cardtemplate = [];
cardtemplate[1] = "HangingTemplate7_125inch.pdf";
cardtemplate[2] = "HangingTemplate5inch.pdf";
cardtemplate[3] = "HangingTemplate4inch.pdf";
cardtemplate[4] = "HangingTemplate3inch.pdf";
function template(){
	if(document.form1.cardTypeNumber.selectedIndex == 0){
		window.alert("First Select the Card Size");
		document.form1.cardTypeNumber.focus();
	}else{
		window.open("cardTemplates/" + cardtemplate[document.form1.cardTypeNumber.selectedIndex], "blank","toolbar=yes, resizable=yes");
	}	
}
function checkForm(formObj) {
	var formOK = true;
      if (formObj.cardTypeNumber.value == "0") {
       window.alert("Please select a Card Type.");
       formObj.cardTypeNumber.focus();
       formOK = false;
	   return;
     }
      if (formObj.quant.value == "0") {
       window.alert("Please select a quantity.");
       formObj.quant.focus();
       formOK = false;
	   return;
     }
	  if (formOK){formObj.submit();}
}

	function versions1List(list) {
         list.length = 1;
         list.options[0].text = "1 version, no plate change";
         list.options[0].value = "0";
      }
	function versions2List(list) {
         list.length = 2;
         list.options[0].text = "1 version, no plate change";
         list.options[0].value = "0";
         list.options[1].text = "2 versions, 1 plate change";
         list.options[1].value = "1";
      }
	function versions3List(list) {
         list.length = 3;
         list.options[0].text = "1 version, no plate change";
         list.options[0].value = "0";
         list.options[1].text = "2 versions, 1 plate change";
         list.options[1].value = "1";
         list.options[2].text = "3 versions, 2 plate changes";
         list.options[2].value = "2";
      }
	function versions4List(list) {
         list.length = 4;
         list.options[0].text = "1 version, no plate change";
         list.options[0].value = "0";
         list.options[1].text = "2 versions, 1 plate change";
         list.options[1].value = "1";
         list.options[2].text = "3 versions, 2 plate changes";
         list.options[2].value = "2";
         list.options[3].text = "4 versions, 3 plate changes";
         list.options[3].value = "3";

      }
	function versions5List(list) {
         list.length = 5;
         list.options[0].text = "1 version, no plate change";
         list.options[0].value = "0";
         list.options[1].text = "2 versions, 1 plate change";
         list.options[1].value = "1";
         list.options[2].text = "3 versions, 2 plate changes";
         list.options[2].value = "2";
         list.options[3].text = "4 versions, 3 plate changes";
         list.options[3].value = "3";
         list.options[4].text = "5 versions, 4 plate changes";
         list.options[4].value = "4";

      }

      function updateVersions(thisForm) {
         if (thisForm.quant.selectedIndex == 0 || thisForm.quant.selectedIndex == 1) {
            versions1List(thisForm.versions);
         } else if (thisForm.quant.selectedIndex == 2 || thisForm.quant.selectedIndex == 3) {
            versions2List(thisForm.versions);
         } else if (thisForm.quant.selectedIndex == 4 || thisForm.quant.selectedIndex == 5) {
            versions3List(thisForm.versions);
         } if (thisForm.quant.selectedIndex == 6) { 
            versions4List(thisForm.versions);
         } else if (thisForm.quant.selectedIndex >= 7) {
            versions5List(thisForm.versions);
		} 
      }
var imageList = new Array;
imageList[0] = new Image;
imageList[0].src = "images/tearoffs-select.jpg";
imageList[1] = new Image;
imageList[1].src = "images/tearoff-7inch.jpg";
imageList[2] = new Image;
imageList[2].src = "images/tearoff-5inch.jpg";
imageList[3] = new Image;
imageList[3].src = "images/tearoff-4inch.jpg";
imageList[4] = new Image;
imageList[4].src = "images/tearoff-3inch.jpg";

function changeImage(thisform){
	if(thisform.cardTypeNumber.selectedIndex == 0){
		document.hangCardImage.src = imageList[0].src;
		}
	if(thisform.cardTypeNumber.selectedIndex == 1){
		document.hangCardImage.src = imageList[1].src;
		}
	if(thisform.cardTypeNumber.selectedIndex == 2){
		document.hangCardImage.src = imageList[2].src;
		}
	if(thisform.cardTypeNumber.selectedIndex == 3){
		document.hangCardImage.src = imageList[3].src;
		}
	if(thisform.cardTypeNumber.selectedIndex == 4){
		document.hangCardImage.src = imageList[4].src;
		}
}
function doNothing(){
 return false;
 }	
