var printprices=[];

printprices[0]="";
printprices[1]="A0^115^205^350";
printprices[2]="A1^115^205^350";
printprices[3]="A2^115^205^350";
printprices[4]="A3^55^70^200";
printprices[5]="A4^65^80^220";
printprices[6]="A5^115^205^350";
printprices[7]="A6^115^205^350";
printprices[8]="A7^285^395^700";
printprices[9]="A8^80^115^295";
printprices[10]="A9^285^395^700";
printprices[11]="B0^115^205^350";
printprices[12]="B1^95^130^320";
printprices[13]="B2^115^205^350";
printprices[14]="B3^285^395^700";
printprices[15]="B4^285^395^700";
printprices[16]="B5^285^395^700";
printprices[17]="B6^180^270^400";
printprices[18]="B7^220^295^425";
printprices[19]="B8^285^395^700";
printprices[20]="B9^285^395^700";
printprices[21]="C0^285^395^700";
printprices[22]="C1^350^460^805";
printprices[23]="C2^285^395^700";
printprices[24]="C3^320^395^575";
printprices[25]="C4^285^395^700";
printprices[26]="C5^350^460^805";
printprices[27]="C6^350^460^805";
printprices[28]="C7^285^395^700";

function findPrice(Stg,arrayStg,printfmt) {
var i;
var price;
var splitStg;
for (i=0; i<arrayStg.length; i++) {
  if (arrayStg[i].indexOf(Stg) != -1) {
    splitStg=arrayStg[i].split("^")
  }
 }
 price=splitStg[1];
 if (printfmt=="M") {
 price=splitStg[2];
 }
 if (printfmt=="F") {
 price=splitStg[3];
 }
 return price; 
}

function getSelectedRadio(buttonGroup) {
   // returns the array number of the selected radio button or -1 if no button is selected
   if (buttonGroup[0]) { // if the button group is an array (one button is not an array)
      for (var i=0; i<buttonGroup.length; i++) {
         if (buttonGroup[i].checked) {
            return i
         }
      }
   } else {
      if (buttonGroup.checked) { return 0; } // if the one button is checked, return zero
   }
   // if we get to this point, no radio button is selected
   return -1;
} // Ends the "getSelectedRadio" function

function getSelectedRadioValue(buttonGroup) {
   // returns the value of the selected radio button or "" if no button is selected
   var i = getSelectedRadio(buttonGroup);
   if (i == -1) {
      return "";
   } else {
      if (buttonGroup[i]) { // Make sure the button group is an array (not just one button)
         return buttonGroup[i].value;
      } else { // The button group is just the one button, and it is checked
         return buttonGroup.value;
      }
   }
} // Ends the "getSelectedRadioValue" function

///////////////////////////////////////////////////////////
//img rollOver
//////////////////////////////////////////////////////////

// mouse is over img

img1on = new Image();
img1on.src = "images/on_viva1.jpg"
img2on = new Image();
img2on.src = "images/on_viva2.jpg"
img3on = new Image();
img3on.src = "images/on_viva3.jpg"
img4on = new Image();
img4on.src = "images/on_viva4.jpg"
img5on = new Image();
img5on.src = "images/on_viva5.jpg"
//img6on = new Image();
//img6on.src = "images/artifactson.jpg"
//img6on = new Image();
//img6on.src = "images/homeon.jpg"
//img7on = new Image();
//img7on.src = "images/viewcarton.jpg"
//img8on = new Image();
//img8on.src = "images/onhome.jpg"
//img9on = new Image();
//img9on.src = "images/onaboutus.jpg"
//img10on = new Image();
//img10on.src = "images/onviewcart.jpg"
//img11on =  new Image();
//img11on.src = "images/ongo.jpg"

// mouse not over img

img1off = new Image();
img1off.src = "images/off_viva1.jpg"
img2off = new Image();
img2off.src = "images/off_viva2.jpg"
img3off = new Image();
img3off.src = "images/off_viva3.jpg"
img4off = new Image();
img4off.src = "images/off_viva4.jpg"
img5off = new Image();
img5off.src = "images/off_viva5.jpg"
//img6off = new Image();
//img6off.src = "images/homeoff.jpg"
//img7off = new Image();
//img7off.src = "images/viewcartoff.jpg"
//img8off = new Image();
//img8off.src = "images/offhome.jpg"
//img9off = new Image();
//img9off.src = "images/offaboutus.jpg"
//img10off = new Image();
//img10off.src = "images/offviewcart.jpg"
img11off =  new Image();
img11off.src = "images/offgo.jpg"

function imgOn(imgName) {
  if(document.images) {
    document[imgName].src = eval(imgName + "on.src")
  }  
}

function imgOff(imgName) {
  if(document.images) {
    document[imgName].src = eval(imgName + "off.src")
  }  
}

//////////////////////////////////////////////////////////
// text descriptions
//////////////////////////////////////////////////////////

var text = new Array(6);
text[0] = ""
text[1] = ""
text[2] = ""
text[3] = ""
text[4] = ""
text[5] = ""
text[6] = ""
text[7] = ""

if(document.layers) {  // if ns4
  itemwrite = "document.des.document.write('<p class=b>' + text[num] + '</p>')";
  
  itemclose = "document.des.document.close()";
}

if(document.all) {  // if ie4
  itemwrite = "des.innerText = text[num]";
  itemclose = "";
}

function change(num) {
  eval(itemwrite);
  eval(itemclose);
}
function calpopup(lnk) { 
window.open(lnk, "calendar","height=200,width=150,scrollbars=no,alwaysRaised=yes") 
} 

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=yes,scrollbars=yes,location=yes,statusbar=yes,menubar=yes,resizable=yes,width=800,height=600,left =100,top=100');");
}

function loopSelected()
{
  //var txtSelectedValuesObj = document.getElementById('print_size_code');
  //var selObj = document.getElementById('print_size');
  var txtSelectedValuesObj = document.form1.print_size_code;
  var selObj = document.form1.print_size;
  var tmpStg="";
  var i;
  var count = 0;
  for (i=0; i<selObj.options.length; i++) {
    if (selObj.options[i].selected) {
      tmpStg=tmpStg+selObj.options[i].value
      }
    count++;
  }
  txtSelectedValuesObj.value = tmpStg;  
}



