//
//
// Standard Proc
//
//  SaveVariablebtn01 (One Item Only)
//  - 8x10 Parade, ,  
//  - 5x7 Principal, Parade, ,     
//  - 4x6 Parade, ,           
//  - 4x5 Parade, , Mini Album,   
//  - 5x5 Oxford, Parade, , Mini Album,           
//  - Pages Single, Double, Triple, Hampton, Vertical, Fanfare, Overlay,    
//  - ClearancePage Parade,      
//
//  SaveVariablebtn01a (One Item Only )
//  - ClearancePage 4x5 Parade
//  - ClearancePage 5x5 Parade
//
//  SaveVariablebtn01b (One Item Only Folders)
//  Handles Imprinting by different from standard
//  - 4X5 Folder 
//  - 4X6 Folder 
//  - 5x5 Folder 
//  - 5x7 Folder
//  - 8x10 Folder  
//
//  SaveVariablebtn03a (Allows for any combination to be ordered)
//  - 4X5 Gemini, Vintage, Hampton, Embossed Rose, 
//  - 4X6 Gemini, Vintage, Embossed Rose, 
//  - 5x5 Gemini, Vintage, Hampton, Embossed Rose, 
//  - 5x7 Gemini, Vintage, Vertical Fanfare,
//  - 8x10 Vertical Fanfare,      
//
//  SaveVariablebtn03b
//  - ClearancePage 4x6 TP Gemini
//
//
//  SaveVariablebtn03c 5x5 Single, 
//  - 4x5 Single, Vertical Double, 
//  - 4x6 Single, Vertical Double
//
//  SaveVariablebtn04c 
//  - 4x5 Oxford   
//  - ClearancePage 4x5 Oxford, 5x5 Oxford 
//
//  SaveVariablebtn05a - Large Seville (Allows for any combination to be ordered) 
//
//  SaveVariablebtn17 - Seville(Medium Seville) (Allows for any combination to be ordered)
//
//
//  SaveVariablebtn81 - Album Imprinting, (Located on impProc)  
//
//  SaveVariablebtn82 - Titles Imprinting, (Located on impProc)  
//
//  SaveVariablebtn83 - Folder Imprinting, (Located on impProc) 
//
//   DatStrBld -  Large Seville Build Data String (Desc plus color)
//   DatStrBld2 - Medium Seville Build Data String (Desc plus color)
//   hidemenu - Mouse over menu for Lg, Md, Sm 
//
// Item All of Them 1
//
function SaveVariablebtn01 (flag,name,qty) {
      ImpFlag = flag
//alert(ImpFlag);
   	ReadVariable1 = name
	QtyVariable1 = qty
 	if (((QtyVariable1 == "0") && (ReadVariable1.length > 3)) || ((QtyVariable1 != "0") && (ReadVariable1.length < 3)))  {
		if (QtyVariable1 == "0") {
 			alert ("You must select a QUANTITY before you can add to cart")
			}  
			else {
 			alert ("You must select an ITEM before you can add to cart")
			}  
 	}
	else {
clrpage()	
	if ( ((QtyVariable1 != 0) && (ReadVariable1.length > 3))) {
	   FindNextCID();
	   ReadVariable = (QtyVariable1 + ReadVariable1)
	   intVariableName = intNextCIDVal
         SetVariable (intVariableName, ReadVariable)
//alert("Which Way do we go");      
         if (ImpFlag != 1) {
	     location.href = "./NA5.shtml"
	   }
         else {
         location.href = "./Imprinting.shtml"
         }
      }
      else {
      alert("You Have Not Selected anything to Add to the Shopping Cart.  To View the Shopping Cart, Select the 'View Cart' button.");
      }
	}
}
//
// Item All of Them 1
//
function SaveVariablebtn01a (flag,name,qty) {
      ImpFlag = flag
//alert(ImpFlag);
   	ReadVariable1 = name
	QtyVariable1 = qty
 	if (((QtyVariable1 <= "0") && (ReadVariable1.length > 3)) || ((QtyVariable1 > "0") && (ReadVariable1.length < 3)))  {
		if (QtyVariable1 <= "0") {
 			alert ("You must select a QUANTITY before you can add to cart")
			}  
			else {
 			alert ("You must select an ITEM before you can add to cart")
			}  
 	}
	else { 
	clrpage()
	if ( ((QtyVariable1 >= 1) && (ReadVariable1.length > 3))) {
	   FindNextCID();
	   ReadVariable = (QtyVariable1 + ReadVariable1)
	   intVariableName = intNextCIDVal
         SetVariable (intVariableName, ReadVariable)
//alert("Which Way do we go");      
         if (ImpFlag != 1) {
	     location.href = "./NA5.shtml"
	   }
         else {
         location.href = "./Imprinting.shtml"
         }
      }
      else {
      alert("You Have Not Selected anything to Add to the Shopping Cart.  To View the Shopping Cart, Select the 'View Cart' button.");
      }
	}
}
//
// Item All of Them 1 FOLDERS
//
function SaveVariablebtn01b (flag,name,qty) {
      ImpFlag = flag
//alert(ImpFlag);
   	ReadVariable1 = name
	QtyVariable1 = qty
 	if (((QtyVariable1 <= "0") && (ReadVariable1.length > 3)) || ((QtyVariable1 > "0") && (ReadVariable1.length < 3)))  {
		if (QtyVariable1 <= "0") {
 			alert ("You must select a QUANTITY before you can add to cart")
			}  
			else {
 			alert ("You must select an ITEM before you can add to cart")
			}  
 	}
	else { 
	clrpage()
//      if (ImpFlag != 1) {	
         if ( ((QtyVariable1 >= 1) && (ReadVariable1.length > 3))) {

            if (ImpFlag != 1) {
	         FindNextCID();
	         ReadVariable = (QtyVariable1 + ReadVariable1)
	         intVariableName = intNextCIDVal
               SetVariable (intVariableName, ReadVariable)      
//         if (ImpFlag != 1) {
	         location.href = "./NA5.shtml"
	      }
         else {       
           location.href="./ImprintingFolder.shtml" + '?' + escape(qty) + '&' + escape(name) 
         }
      }
      else {
      alert("You Have Not Selected anything to Add to the Shopping Cart.  To View the Shopping Cart, Select the 'View Cart' button.");
      }
   }
}
//
//  2 Items Modified Clearance Page
//  Requires Item1 & Qty or Item2 & Qty or Item3 & Qty or a combination
//  Modified SaveVariablebtn03 Item script
// 4X5 Doubles, Triples,     Hampton, Embossed Rose, Single(06), Vertical Double(06)
// 4X6 Doubles, Triples,     Vintage, Embossed Rose, Single(06), Vertical Double(06)
// 5x5 Doubles, Vintage,     Hampton, Embossed Rose, Single(06) 
// 5x7 Doubles, Vintage,    Vertical Fanfare
// 8x10 Vertical Fanfare
// 
//
function SaveVariablebtn02a (flag,name,qty,name2,qty2) {
//,name3,qty3) {
ImpFlag = flag
//alert(qty);
//alert(ImpFlag);
	ReadVariable1 = name
	ReadVariable2 = name2
//	ReadVariable3 = name3
	QtyVariable1 = qty
	QtyVariable2 = qty2
//	QtyVariable3 = qty3
 	if (((QtyVariable1 == "0") && (ReadVariable1.length > 3)) || ((QtyVariable1 != "0") && (ReadVariable1.length < 3))) {
		if (QtyVariable1 == "0") {
 			alert ("You must select a QUANTITY before you can add to cart")
			}  
		else {
 			alert ("You must select an ITEM before you can add to cart")
			}  
 	}
      else {
 	if (((QtyVariable2 == "0") && (ReadVariable2.length > 3)) || ((QtyVariable2 != "0") && (ReadVariable2.length < 3))) {
		if (QtyVariable2 == "0") {
 			alert ("You must select a QUANTITY before you can add to cart")
			}  
		else {
 			alert ("You must select an ITEM before you can add to cart")
			}  
 	}
      else {
	if ( ((QtyVariable1 != 0) && (ReadVariable1.length > 3)) || ((QtyVariable2 != 0) && (ReadVariable2.length > 3)) ){
	//|| ((QtyVariable3 != 0) && (ReadVariable3.length > 3)) ) {
	if (QtyVariable1 != 0) {
	FindNextCID();
	ReadVariable = (QtyVariable1 + ReadVariable1)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	if ((QtyVariable2 != 0) && (ReadVariable2.length > 3)) {
	FindNextCID();
	ReadVariable = (QtyVariable2 + ReadVariable2)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
//	if ((QtyVariable3 != 0) && (ReadVariable3.length > 3)) {
//	FindNextCID();
//	ReadVariable = (QtyVariable3 + ReadVariable3)
//	intVariableName = intNextCIDVal
//	SetVariable (intVariableName, ReadVariable)
//	}
//
clrpage()
//alert("Which Way do we go");      
      if (ImpFlag != 1) {  
	location.href = "./NA5.shtml"
	}
      else {  
      location.href = "./Imprinting.shtml"
      }
	}
      else {
      alert("You Have Not Selected anything to Add to the Shopping Cart.  To View the Shopping Cart, Select the 'View Cart' button.");
      }
  }
  }
}
//
//
//
function SaveVariablebtn02c (flag,name,qty,name2,qty2) {
//,name3,qty3) {
ImpFlag = flag
//alert(qty);
//alert(ImpFlag);
	ReadVariable1 = name
	ReadVariable2 = name2
//	ReadVariable3 = name3
	QtyVariable1 = qty
	QtyVariable2 = qty2
//	QtyVariable3 = qty3
 	if (((QtyVariable1 == "0") && (ReadVariable1.length > 3)) || ((QtyVariable1 != "0") && (ReadVariable1.length < 3))) {
		if (QtyVariable1 == "0") {
 			alert ("You must select a QUANTITY before you can add to cart")
			}  
		else {
 			alert ("You must select an ITEM before you can add to cart")
			}  
 	}
      else {
 	if (((QtyVariable2 == "0") && (ReadVariable2.length > 3)) || ((QtyVariable2 != "0") && (ReadVariable2.length < 3))) {
		if (QtyVariable2 == "0") {
 			alert ("You must select a QUANTITY before you can add to cart")
			}  
		else {
 			alert ("You must select an ITEM before you can add to cart")
			}  
 	}
      else {
	if ( ((QtyVariable1 != 0) && (ReadVariable1.length > 3)) || ((QtyVariable2 != 0) && (ReadVariable2.length > 3)) ){
	//|| ((QtyVariable3 != 0) && (ReadVariable3.length > 3)) ) {
	if (QtyVariable1 != 0) {
	FindNextCID();
	ReadVariable = (QtyVariable1 + ReadVariable1)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	if ((QtyVariable2 != 0) && (ReadVariable2.length > 3)) {
	FindNextCID();
	ReadVariable = (QtyVariable2 + ReadVariable2)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
//	if ((QtyVariable3 != 0) && (ReadVariable3.length > 3)) {
//	FindNextCID();
//	ReadVariable = (QtyVariable3 + ReadVariable3)
//	intVariableName = intNextCIDVal
//	SetVariable (intVariableName, ReadVariable)
//	}
clrpage()
//alert("Which Way do we go");      
      if (ImpFlag != 1) {
	location.href = "./NA5.shtml"
	}
      else {
      location.href = "./Imprinting.shtml"
      }
	}
      else {
      alert("You Have Not Selected anything to Add to the Shopping Cart.  To View the Shopping Cart, Select the 'View Cart' button.");
      }
  }
  }
}
//
//
function SaveVariablebtn02b (flag,name,qty,name2,qty2) {
//,name3,qty3) {
ImpFlag = flag
//alert(qty);
//alert(ImpFlag);
	ReadVariable1 = name
	ReadVariable2 = name2
//	ReadVariable3 = name3
	QtyVariable1 = qty
	QtyVariable2 = qty2
//	QtyVariable3 = qty3
 	if (((QtyVariable1 == "0") && (ReadVariable1.length > 3)) || ((QtyVariable1 != "0") && (ReadVariable1.length < 3))) {
		if (QtyVariable1 == "0") {
 			alert ("You must select a QUANTITY before you can add to cart")
			}  
		else {
 			alert ("You must select an ITEM before you can add to cart")
			}  
 	}
//      else {
//	if (((QtyVariable2 == "0") && (ReadVariable2.length > 3)) || ((QtyVariable2 != "0") && (ReadVariable2.length < 3))) {
//		if (QtyVariable2 == "0") {
// 			alert ("You must select a XXX QUANTITY before you can add to cart")
//			}  
//		else {
// 			alert ("You must select an ITEM before you can add to cart")
//			}  
// 	}
      else {
	if ( ((QtyVariable1 != 0) && (ReadVariable1.length > 3)) || ((QtyVariable2 != 0) && (ReadVariable2.length > 3)) ){
	//|| ((QtyVariable3 != 0) && (ReadVariable3.length > 3)) ) {
	if (QtyVariable1 != 0) {
	FindNextCID();
	ReadVariable = (QtyVariable1 + ReadVariable1)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	if ((QtyVariable2 != 0) && (ReadVariable2.length > 3)) {
	FindNextCID();
	ReadVariable = (QtyVariable2 + ReadVariable2)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
//	if ((QtyVariable3 != 0) && (ReadVariable3.length > 3)) {
//	FindNextCID();
//	ReadVariable = (QtyVariable3 + ReadVariable3)
//	intVariableName = intNextCIDVal
//	SetVariable (intVariableName, ReadVariable)
//	}
clrpage()
//alert("Which Way do we go");      
      if (ImpFlag != 1) {
	location.href = "./NA5.shtml"
	}
      else {
      location.href = "./Imprinting.shtml"
      }
	}
      else {
      alert("You Have Not Selected anything to Add to the Shopping Cart.  To View the Shopping Cart, Select the 'View Cart' button.");
      }
  }
//  }
}
//
//
//
//
//  3 Items Modified
//  Requires Item1 & Qty or Item2 & Qty or Item3 & Qty or a combination
//  Modified SaveVariablebtn03 Item script
// 4X5 Gemini, Vintage, Hampton, Embossed Rose, Single(06), Vertical Double(06)
// 4X6 Gemini, Vintage, Embossed Rose, Single(06), Vertical Double(06)
// 5x5 Gemini, Vintage, Hampton, Embossed Rose, Single(06) 
// 5x7 Gemini, Vintage, Vertical Fanfare
// 8x10 Vertical Fanfare
// 
//
function SaveVariablebtn03a (flag,name,qty,name2,qty2,name3,qty3) {
ImpFlag = flag
//alert(ImpFlag);
	ReadVariable1 = name
	ReadVariable2 = name2
	ReadVariable3 = name3
	QtyVariable1 = qty
	QtyVariable2 = qty2
	QtyVariable3 = qty3
 	if (((QtyVariable1 == "0") && (ReadVariable1.length > 3)) || ((QtyVariable1 != "0") && (ReadVariable1.length < 3))) {
		if (QtyVariable1 == "0") {
 			alert ("You must select a QUANTITY before you can add to cart")
			}  
		else {
 			alert ("You must select an ITEM before you can add to cart")
			}  
 	}
      else {
 	if (((QtyVariable2 == "0") && (ReadVariable2.length > 3)) || ((QtyVariable2 != "0") && (ReadVariable2.length < 3))) {
		if (QtyVariable2 == "0") {
 			alert ("You must select a QUANTITY before you can add to cart")
			}  
		else {
 			alert ("You must select an ITEM before you can add to cart")
			}  
 	}
      else {
	if ( ((QtyVariable1 != 0) && (ReadVariable1.length > 3)) || ((QtyVariable2 != 0) && (ReadVariable2.length > 3)) || ((QtyVariable3 != 0) && (ReadVariable3.length > 3)) ) {
	if (QtyVariable1 != 0) {
	FindNextCID();
	ReadVariable = (QtyVariable1 + ReadVariable1)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	if ((QtyVariable2 != 0) && (ReadVariable2.length > 3)) {
	FindNextCID();
	ReadVariable = (QtyVariable2 + ReadVariable2)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	if ((QtyVariable3 != 0) && (ReadVariable3.length > 3)) {
	FindNextCID();
	ReadVariable = (QtyVariable3 + ReadVariable3)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	clrpage()
//alert("Which Way do we go");      
      if (ImpFlag != 1) {
	location.href = "./NA5.shtml"
	}
      else {
      location.href = "./Imprinting.shtml"
      }
	}
      else {
      alert("You Have Not Selected anything to Add to the Shopping Cart.  To View the Shopping Cart, Select the 'View Cart' button.");
      }
  }
  }
}
//
//
//  3 Items Modified
//  Requires Item1 & Qty or Item2 & Qty or Item3 & Qty or a combination
//  Modified SaveVariablebtn03a Item script cause of list box on Item 3.
//  Clearance Page - Gemini
// 
//
function SaveVariablebtn03b (flag,name,qty,name2,qty2,name3,qty3) {
      ImpFlag = flag
//alert(ImpFlag);
	ReadVariable1 = name
	ReadVariable2 = name2
	ReadVariable3 = name3
	QtyVariable1 = qty
	QtyVariable2 = qty2
	QtyVariable3 = qty3
 	if (((QtyVariable1 == "0") && (ReadVariable1.length > 3)) || ((QtyVariable1 != "0") && (ReadVariable1.length < 3))) {
		if (QtyVariable1 == "0") {
 			alert ("You must select a QUANTITY before you can add to cart")
			}  
		else {
 			alert ("You must select an ITEM before you can add to cart")
			}  
 	}
      else {
 	if (((QtyVariable2 == "0") && (ReadVariable2.length > 3)) || ((QtyVariable2 != "0") && (ReadVariable2.length < 3))) {
		if (QtyVariable2 == "0") {
 			alert ("You must select a QUANTITY before you can add to cart")
			}  
		else {
 			alert ("You must select an ITEM before you can add to cart")
			}  
 	}
      else {
 	if (((QtyVariable3 == "0") && (ReadVariable3.length > 3)) || ((QtyVariable3 != "0") && (ReadVariable3.length < 3))) {
		if (QtyVariable3 == "0") {
 			alert ("You must select a QUANTITY before you can add to cart")
			}  
		else {
 			alert ("You must select an ITEM before you can add to cart")
			}  
 	}
	else { 
	if ( ((QtyVariable1 != 0) && (ReadVariable1.length > 3)) || ((QtyVariable2 != 0) && (ReadVariable2.length > 3)) || ((QtyVariable3 != 0) && (ReadVariable3.length > 3)) ) {
	if (QtyVariable1 != 0) {
	FindNextCID();
	ReadVariable = (QtyVariable1 + ReadVariable1)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	if ((QtyVariable2 != 0) && (ReadVariable2.length > 3)) {
	FindNextCID();
	ReadVariable = (QtyVariable2 + ReadVariable2)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	if ((QtyVariable3 != 0) && (ReadVariable3.length > 3)) {
	FindNextCID();
	ReadVariable = (QtyVariable3 + ReadVariable3)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	clrpage()
//alert("Which Way do we go");      
    if (ImpFlag != 1) {
	location.href = "./NA5.shtml"
	}
      else {
      location.href = "./Imprinting.shtml"
      }
	}
      else {
      alert("You Have Not Selected anything to Add to the Shopping Cart.  To View the Shopping Cart, Select the 'View Cart' button.");
      }
  }
  }
  }
}
//
//
//
function SaveVariablebtn03c (flag,name,qty,name2,qty2,name3,qty3) {
ImpFlag = flag
//alert(ImpFlag);
	ReadVariable1 = name
	ReadVariable2 = name2
	ReadVariable3 = name3
	QtyVariable1 = qty
	QtyVariable2 = qty2
	QtyVariable3 = qty3
 	if (((QtyVariable1 == "0") && (ReadVariable1.length > 3)) || ((QtyVariable1 != "0") && (ReadVariable1.length < 3))) {
		if (QtyVariable1 == "0") {
 			alert ("You must select a QUANTITY before you can add to cart")
			}  
		else {
 			alert ("You must select an ITEM before you can add to cart")
			}  
 	}
      else {
	if ( ((QtyVariable1 != 0) && (ReadVariable1.length > 3)) || ((QtyVariable2 != 0)) || ((QtyVariable3 != 0) && (ReadVariable3.length > 3)) ) {
	if (QtyVariable1 != 0) {
	FindNextCID();
	ReadVariable = (QtyVariable1 + ReadVariable1)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	if ((QtyVariable2 != 0) && (ReadVariable2.length > 3)) {
	FindNextCID();
	ReadVariable = (QtyVariable2 + ReadVariable2)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	if ((QtyVariable3 != 0) && (ReadVariable3.length > 3)) {
	FindNextCID();
	ReadVariable = (QtyVariable3 + ReadVariable3)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	clrpage()
//alert("Which Way do we go");      
      if (ImpFlag != 1) {
	location.href = "./NA5.shtml"
	}
      else {
      location.href = "./Imprinting.shtml"
      }
	}
      else {
      alert("You Have Not Selected anything to Add to the Shopping Cart.  To View the Shopping Cart, Select the 'View Cart' button.");
      }
  }
}
//
//
// Item All of Them (4)
// Oxfords 
//
function SaveVariablebtn04 (flag,name,qty,name2,qty2,name3,qty3,name4,qty4) {
      ImpFlag = flag
//alert(ImpFlag);
	ReadVariable1 = name
	ReadVariable2 = name2
	ReadVariable3 = name3
	ReadVariable4 = name4
	QtyVariable1 = qty
	QtyVariable2 = qty2
	QtyVariable3 = qty3
	QtyVariable4 = qty4
      QV1 = parseInt(QtyVariable1);
      QV2 = parseInt(QtyVariable2);
      QV3 = parseInt(QtyVariable3);
      QV4 = parseInt(QtyVariable4);
 pgcnt = ReadVariable1.substring(12,14)
 cntpgs = parseInt(pgcnt);
 totpgs = (cntpgs/2) * QV1;
// alert (totpgs)  
 	if (((QtyVariable1 == "0") && (ReadVariable1.length > 3)) || ((QtyVariable1 != "0") && (ReadVariable1.length < 3)))  {
		if (QtyVariable1 == "0") {
 			alert ("You must select a QUANTITY before you can add to cart")
			}  
			else {
 			alert ("You must select an ITEM before you can add to cart")
			}  
 	}
	else { 
 	if ( ((QtyVariable1 != "0") && (QtyVariable2 == "0") && (QtyVariable3 == "0")  && (QtyVariable4 == "0")) || (QV2 + QV3 + QV4 >= 12) )                                       
 		{
 		alert("You must select page styles for this album(s) equal to " + totpgs + " pages based on album select")
		}
 	else {
	if (((QtyVariable1 != "0") && (ReadVariable1.length > 3)) && (QV2 + QV3 + QV4 >= 12)){
	   if (QtyVariable1 != 0) {
	    FindNextCID();
	    ReadVariable = (QtyVariable1 + ReadVariable1)
	    intVariableName = intNextCIDVal
	    SetVariable (intVariableName, ReadVariable)
	   }
	  if (QtyVariable2 != 0) {
	   FindNextCID();
	   ReadVariable = (QtyVariable2 + ReadVariable2)
	   intVariableName = intNextCIDVal
	   SetVariable (intVariableName, ReadVariable)
	  }
	 if (QtyVariable3 != 0) {
	  FindNextCID();
	  ReadVariable = (QtyVariable3 + ReadVariable3)
	  intVariableName = intNextCIDVal
	  SetVariable (intVariableName, ReadVariable)
	 }
	 if (QtyVariable4 != 0) {
	  FindNextCID();
	  ReadVariable = (QtyVariable4 + ReadVariable4)
	  intVariableName = intNextCIDVal
	  SetVariable (intVariableName, ReadVariable)
	 }
	 clrpage()
//alert("Which Way do we go");      
      if (ImpFlag != 1) {
	location.href = "./NA5.shtml"
	}
      else {
      location.href = "./Imprinting.shtml"
      }
 	}
      else {
      alert("You Have Not Selected anything to Add to the Shopping Cart.  To View the Shopping Cart, Select the 'View Cart' button.");
      }
    } 
}
}
//
//
//
//
function pageAdd4() {
cstpg = 219;
document.myForm.Qty4111.value = ((parseInt(document.myForm.Qty4112.value)) +(parseInt(document.myForm.Qty4113.value)) + (parseInt(document.myForm.Qty4114.value)) + (parseInt(document.myForm.Qty4115.value)));
document.myForm.Qty4116.value = ((parseInt((document.myForm.Qty4111.value)) * ((cstpg)) )/100);
//alert(document.myForm.Qty4111.value);
//alert(document.myForm.Qty4116.value);
}
//
//
// Item All of Them (4)
// Oxfords 
//
function SaveVariablebtn04c (flag,name,qty,name2,qty2,name3,qty3,name4,qty4,name5,qty5,oColor) {
//
// :1.08:OA4X5/24 WHT:12-page capacity White/Gold Oxford Cover:24.60:F:0:;
//
// original name = :0.04:OA-45VH/INS:Style3- 4x5 Vertical/Horizontal Page:1.94:0:0:;
//
//  new name = :0.04:OA-45VH/INS:Style3- 4x5 Vertical/Horizontal Page:1.94:0:0:;
//
  endstr = ":2.19:1:0:;";
//  new color = :-WG:- White with Gold Pages:
//  new color = :-BG:- Black with Gold Pages:
//  new color = :-BB:- Black with Black Pages:
//
//   name = 1 -4
   oSwt = ":0.04:"
   oPn1 = "OA-45H/INS";
   oPn2 = "OA-45V/INS";
   oPn3 = "OA-45VH/INS";
   oPn4 = "OA-55S/INS";
//
   oDesc1 = ":Style1- 4x5 Horizontal "; 
   oDesc2 = ":Style2- 4x5 Vertical ";
   oDesc3 = ":Style3- 4x5 Vertical/Horizontal ";
   oDesc4 = ":Style4- 5x5 Square ";
//  
//   color = 1 -2
//   oCPn(1) = "-WG"
//   oCPn(2) = "-BB"
//
oCPn = "";
oCDesc = "";
//
if (oColor == "1") {
    oCPn = "-W";
    oCDesc = "- White with Gold Pages";
   }
   else {
if (oColor == "2") {
    oCPn = "-BB";
    oCDesc = "- Black with Black Pages";
   }
   else {
   oColor = "0";
  }
}
//   oCDesc(1) = "- White with Gold Pages"
//   oCDesc(2) = "- Black with Black Pages"
//   oCDesc(3) = "- Black with Black Pages"
//
	ReadVariable1 = name;
	ReadVariable2 = (oSwt + oPn1 + oCPn + oDesc1 + oCDesc + endstr);
	ReadVariable3 = (oSwt + oPn2 + oCPn + oDesc2 + oCDesc + endstr);
	ReadVariable4 = (oSwt + oPn3 + oCPn + oDesc3 + oCDesc + endstr);
	ReadVariable5 = (oSwt + oPn4 + oCPn + oDesc4 + oCDesc + endstr);
//alert("Album = " + ReadVariable1);
//alert(ReadVariable2);
//alert(ReadVariable3);
//alert(ReadVariable4);
//alert(ReadVariable5);
//
      ImpFlag = flag
//alert(ImpFlag);
//	ReadVariable1 = name
//	ReadVariable2 = name2
//	ReadVariable3 = name3
//	ReadVariable4 = name4
//	ReadVariable5 = name5
	QtyVariable1 = qty
	QtyVariable2 = qty2
	QtyVariable3 = qty3
	QtyVariable4 = qty4
	QtyVariable5 = qty5
      QV1 = parseInt(QtyVariable1);
      QV2 = parseInt(QtyVariable2);
      QV3 = parseInt(QtyVariable3);
      QV4 = parseInt(QtyVariable4);
      QV5 = parseInt(QtyVariable5);
 question = "true";
 pgcnt = ReadVariable1.substring(12,14);
 cntpgs = parseInt(pgcnt);
 totpgs = (cntpgs/2) * QV1;
 //alert (totpgs); 
 ordpgs = (QV2 + QV3 + QV4 + QV5); 
	if (((QtyVariable1 == "0") && (ReadVariable1.length > 3)) || ((QtyVariable1 != "0") && (ReadVariable1.length < 3)))  {
		if (QtyVariable1 == "0") {
 			alert ("You must select a QUANTITY before you can add to cart")
			}  
			else {
 			alert ("You must select an ITEM before you can add to cart")
			}  
 	 }
       else { 
           if ( (oColor == "0") && ((QtyVariable1 != "0") || (QtyVariable2 != "0") || (QtyVariable3 != "0")  || (QtyVariable4 != "0") || (QtyVariable5 != "0")) ) {
           alert ("You must select a Page Color");
           }
      else {
 	     if ( ((QtyVariable1 != "0") && (QtyVariable2 == "0") && (QtyVariable3 == "0")  && (QtyVariable4 == "0") && (QtyVariable5 == "0")) ) {
 		     alert("You must select page styles for this album");
		  }
      else {
 	     if ( ((oColor != "0") && (QtyVariable2 == "0") && (QtyVariable3 == "0")  && (QtyVariable4 == "0") && (QtyVariable5 == "0")) ) {
 		     alert("You must select page styles");
		  }
      else {
           if (ordpgs > totpgs) {
             question = "";
             question = confirm("The number of pages selected is more than the " + QV1 + " " + cntpgs/2 + "-page capacity album(s) hold. \n\n" + "--- Click OK to continue to processing current order \n\n--- Click  CANCEL to change page quantities");
//             alert("Over " + question);
	       }
       }
// alert("Q = " + question);
      if (question == false) {
//        alert("Testing = " + question);
        }
      else {
      if ( (((QtyVariable1 != "0") && (ReadVariable1.length > 3)) && (oColor !=0) && (QV2 + QV3 + QV4 + QV5  > 0)) || (((QtyVariable1 == "0") && (ReadVariable1.length < 3)) && (oColor !=0) && (QV2 + QV3 + QV4 + QV5  > 0)) ){
	if (QtyVariable1 != 0) {
	FindNextCID();
	ReadVariable = (QtyVariable1 + ReadVariable1)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	if (QtyVariable2 != 0) {
	FindNextCID();
	ReadVariable = (QtyVariable2 + ReadVariable2)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	if (QtyVariable3 != 0) {
	FindNextCID();
	ReadVariable = (QtyVariable3 + ReadVariable3)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	if (QtyVariable4 != 0) {
	FindNextCID();
	ReadVariable = (QtyVariable4 + ReadVariable4)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	if (QtyVariable5 != 0) {
	FindNextCID();
	ReadVariable = (QtyVariable5 + ReadVariable5)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	clrpage()
//alert("Which Way do we go");      
     if (ImpFlag != 1) {
	location.href = "./NA5.shtml"
	}
      else {
      location.href = "./Imprinting.shtml"
      }
      }
      else {
      alert("You Have Not Selected anything to Add to the Shopping Cart.  To View the Shopping  Cart, Select the 'View Cart' button.");
      }
    } 
  }
 }
 }
}
//
//
//
function pageAdd4cc() {
cstpg = 194;
document.myForm.Qty4111.value = ((parseInt(document.myForm.Qty4112.value)) +(parseInt(document.myForm.Qty4113.value)) + (parseInt(document.myForm.Qty4114.value)) + (parseInt(document.myForm.Qty4115.value)));
document.myForm.Qty4116.value = ((parseInt((document.myForm.Qty4111.value)) * ((cstpg)) )/100);
//alert(document.myForm.Qty4111.value);
//alert(document.myForm.Qty4116.value);
}
//
//
// Item All of Them (4)
// Oxfords 
//
function SaveVariablebtn04cc (flag,name,qty,name2,qty2,name3,qty3,name4,qty4,name5,qty5,oColor) {
//
// :1.08:OA4X5/24 WHT:12-page capacity White/Gold Oxford Cover:24.60:F:0:;
//
// original name = :0.04:OA-45VH/INS:Style3- 4x5 Vertical/Horizontal Page:1.94:0:0:;
//
//  new name = :0.04:OA-45VH/INS:Style3- 4x5 Vertical/Horizontal Page:1.94:0:0:;
//
  endstr = ":1.94:1:0:;";
//  new color = :-WG:- White with Gold Pages:
//  new color = :-BG:- Black with Gold Pages:
//  new color = :-BB:- Black with Black Pages:
//
//   name = 1 -4
   oSwt = ":0.04:"
   oPn1 = "OA-45H/INS";
   oPn2 = "OA-45V/INS";
   oPn3 = "OA-45VH/INS";
   oPn4 = "OA-55S/INS";
//
   oDesc1 = ":Style1- 4x5 Horizontal "; 
   oDesc2 = ":Style2- 4x5 Vertical ";
   oDesc3 = ":Style3- 4x5 Vertical/Horizontal ";
   oDesc4 = ":Style4- 5x5 Square ";
//  
//   color = 1 -3
//   oCPn(1) = "-WG"
//   oCPn(2) = "-BG"
//   oCPn(3) = "-BB"
//
oCPn = "";
oCDesc = "";
//
if (oColor == "1") {
    oCPn = "-BG";
    oCDesc = "- Black with Gold Pages";
   }
   else {
   oColor = "0";
  }
//   oCDesc(1) = "- Black with Gold Pages"
//
	ReadVariable1 = name;
	ReadVariable2 = (oSwt + oPn1 + oCPn + oDesc1 + oCDesc + endstr);
	ReadVariable3 = (oSwt + oPn2 + oCPn + oDesc2 + oCDesc + endstr);
	ReadVariable4 = (oSwt + oPn3 + oCPn + oDesc3 + oCDesc + endstr);
	ReadVariable5 = (oSwt + oPn4 + oCPn + oDesc4 + oCDesc + endstr);
//alert("Album = " + ReadVariable1);
//alert(ReadVariable2);
//alert(ReadVariable3);
//alert(ReadVariable4);
//alert(ReadVariable5);
//
      ImpFlag = flag
//alert(ImpFlag);
//	ReadVariable1 = name
//	ReadVariable2 = name2
//	ReadVariable3 = name3
//	ReadVariable4 = name4
//	ReadVariable5 = name5
	QtyVariable1 = qty
	QtyVariable2 = qty2
	QtyVariable3 = qty3
	QtyVariable4 = qty4
	QtyVariable5 = qty5
      QV1 = parseInt(QtyVariable1);
      QV2 = parseInt(QtyVariable2);
      QV3 = parseInt(QtyVariable3);
      QV4 = parseInt(QtyVariable4);
      QV5 = parseInt(QtyVariable5);
 question = "true";
 pgcnt = ReadVariable1.substring(12,14);
 cntpgs = parseInt(pgcnt);
 totpgs = (cntpgs/2) * QV1;
 //alert (totpgs); 
 ordpgs = (QV2 + QV3 + QV4 + QV5); 
	if (((QtyVariable1 == "0") && (ReadVariable1.length > 3)) || ((QtyVariable1 != "0") && (ReadVariable1.length < 3)))  {
		if (QtyVariable1 == "0") {
 			alert ("You must select a QUANTITY before you can add to cart")
			}  
			else {
 			alert ("You must select an ITEM before you can add to cart")
			}  
 	 }
       else { 
           if ( (oColor == "0") && ((QtyVariable1 != "0") || (QtyVariable2 != "0") || (QtyVariable3 != "0")  || (QtyVariable4 != "0") || (QtyVariable5 != "0")) ) {
           alert ("You must select a Page Color");
           }
      else {
 	     if ( ((QtyVariable1 != "0") && (QtyVariable2 == "0") && (QtyVariable3 == "0")  && (QtyVariable4 == "0") && (QtyVariable5 == "0")) ) {
 		     alert("You must select page styles for this album");
		  }
      else {
 	     if ( ((oColor != "0") && (QtyVariable2 == "0") && (QtyVariable3 == "0")  && (QtyVariable4 == "0") && (QtyVariable5 == "0")) ) {
 		     alert("You must select page styles");
		  }
      else {
           if (ordpgs > totpgs) {
             question = "";
             question = confirm("The number of pages selected is more than the " + QV1 + " " + cntpgs/2 + "-page capacity album(s) hold. \n\n" + "--- Click OK to continue to processing current order \n\n--- Click  CANCEL to change page quantities");
//             alert("Over " + question);
	       }
       }
// alert("Q = " + question);
      if (question == false) {
//        alert("Testing = " + question);
        }
      else {
      if ( (((QtyVariable1 != "0") && (ReadVariable1.length > 3)) && (oColor !=0) && (QV2 + QV3 + QV4 + QV5  > 0)) || (((QtyVariable1 == "0") && (ReadVariable1.length < 3)) && (oColor !=0) && (QV2 + QV3 + QV4 + QV5  > 0)) ){
	if (QtyVariable1 != 0) {
	FindNextCID();
	ReadVariable = (QtyVariable1 + ReadVariable1)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	if (QtyVariable2 != 0) {
	FindNextCID();
	ReadVariable = (QtyVariable2 + ReadVariable2)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	if (QtyVariable3 != 0) {
	FindNextCID();
	ReadVariable = (QtyVariable3 + ReadVariable3)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	if (QtyVariable4 != 0) {
	FindNextCID();
	ReadVariable = (QtyVariable4 + ReadVariable4)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	if (QtyVariable5 != 0) {
	FindNextCID();
	ReadVariable = (QtyVariable5 + ReadVariable5)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	clrpage()
//alert("Which Way do we go");      
     if (ImpFlag != 1) {
	location.href = "./NA5.shtml"
	}
      else {
      location.href = "./Imprinting.shtml"
      }
      }
      else {
      alert("You Have Not Selected anything to Add to the Shopping Cart.  To View the Shopping  Cart, Select the 'View Cart' button.");
      }
    } 
  }
 }
 }
}
//
//
// Item All of Them (5)

//
function pageAdd() {
cstpg = 400;
  document.myForm.Qty5111.value = ((parseInt(document.myForm.Qty5113.value)) + (parseInt(document.myForm.Qty5114.value)) + (parseInt(document.myForm.Qty5115.value)));
document.myForm.Qty5112.value = ((parseInt((document.myForm.Qty5111.value)) * ((cstpg)) )/100);
//alert(document.myForm.Qty5111.value);
//alert(document.myForm.Qty5112.value);
}
//
// Item All of Them (5 - Large Seville Albums)
function SaveVariablebtn05a  (flag,name1,name1a,qty1,name2,name2a,qty2,name3,name3a,qty3,name4,name4a,qty4,name5,name5a,qty5) {
      ImpFlag = flag
ReadVar = "";
	ReadVariable1a = name1
      ReadVariable2a = name2
	ReadVariable3a = name3
	ReadVariable4a = name4
	ReadVariable5a = name5
	ReadVariable1b = name1a
      ReadVariable2b = name2a
	ReadVariable3b = name3a
	ReadVariable4b = name4a
	ReadVariable5b = name5a
	QtyVariable1 = qty1
	QtyVariable2 = qty2
	QtyVariable3 = qty3
	QtyVariable4 = qty4
	QtyVariable5 = qty5
      QV1 = parseInt(QtyVariable1);
      QV2 = parseInt(QtyVariable2);
      QV3 = parseInt(QtyVariable3);
      QV4 = parseInt(QtyVariable4);
      QV5 = parseInt(QtyVariable5);
 //     APG = 10;
 //     MinPG = (APG * QV1);
 //     MinPG1 = (MinPG - 1);
 //     MaxPG = (MinPG * 2);
 //     MaxPG1 = ((MinPG * 2)+1);
 //    SPG = (QV3 + QV4 + QV5);
 //     OPG = (MinPG + QV2);
question = "true";
 pgcnt = "20";
 cntpgs = parseInt(pgcnt);
 totpgs = (cntpgs) * QV1;
 //alert (totpgs); 
 ordpgs = (QV3 + QV4 + QV5);
 	if (((QtyVariable1 == "0") && (ReadVariable1a.length > 3)) || ((QtyVariable1 != "0") && (ReadVariable1a.length < 3))) {
		if (QtyVariable1 == "0") {
 			alert ("You must select a QUANTITY for the Cover before you can add to cart")
			}  
		else {
 			alert ("You must select an Album Cover before you can add to cart")
			}  
 	}
      else {
// Pages Selected
 	if (((QtyVariable2 == "0") && (ReadVariable2b.length > 3)) || ((QtyVariable2 != "0") && (ReadVariable2b.length < 3))) {
		if (QtyVariable2 == "0") {
 			alert ("You must select a QUANTITY for Pages before you can add to cart")
			}  
		else {
                 alert ("You must select a Page Color before you can add to cart") 
			}  
 	}
      else {
 	    if ((QtyVariable1 != 0) && (QtyVariable2 == "0")) {
 		alert("You have selected an album but have not selected any pages.  Please select the desired page syles.");
		}
 	    else {
//
           if ((ordpgs > totpgs) && (QtyVariable1 != 0)) {
             question = "";
             question = confirm("The number of pages selected is more than the " + QV1 + " " + cntpgs + "-page capacity album(s) hold. \n\n" + "--- Click OK to continue to processing current order \n\n--- Click  CANCEL to change page quantities");
//             alert("Over " + question);
	       }
//       }
//   else {
// alert("Q = " + question);
      if (question == false) {
//        alert("Testing = " + question);
        }
      else {
//
	if ( (((QtyVariable1 != 0) && (ReadVariable1a.length > 3)) || ((QtyVariable2 != 0) && (ReadVariable2b.length > 3))) ) {
//
CstEnd = ":5.00:2:0:;";
CstEnd2 = ":4.00:2:0:;";
SvlWt = ":0.08"
//   
  if (QtyVariable1 != 0) {
	FindNextCID();
	ReadVariable = (QtyVariable1 + ReadVariable1a)
//alert(ReadVariable);
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
//  if (QtyVariable2 != 0) {
//     DatStrBld(ReadVariable2a,ReadVariable2b); 
//	FindNextCID();
//	ReadVariable = (QtyVariable2 + ReadVar)
//alert(ReadVariable);
//	intVariableName = intNextCIDVal
//	SetVariable (intVariableName, ReadVariable)
//	}
   if (QtyVariable3 != 0) {
      DatStrBld2(ReadVariable3a,ReadVariable3b); 
	FindNextCID();
	ReadVariable = (QtyVariable3 + ReadVar)
//alert("RV = " + ReadVar);
//alert("Read = " + ReadVariable);
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
   if (QtyVariable4 != 0) {
      DatStrBld2(ReadVariable4a,ReadVariable4b); 
	FindNextCID();
	ReadVariable = (QtyVariable4 + ReadVar)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
	if (QtyVariable5 != 0) {
      DatStrBld2(ReadVariable5a,ReadVariable5b); 
	FindNextCID();
	ReadVariable = (QtyVariable5 + ReadVar)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}
//
clrpage()
//alert("Which Way do we go");      
      if (ImpFlag != 1) {
	location.href = "./NA5.shtml"
	}
      else {
      location.href = "./Imprinting.shtml"
      }
 	}
      else {
      alert("You Have Not Selected anything to Add to the Shopping Cart.  To View the Shopping Cart, Select the 'View Cart' button.");
      }
}
}     
}
}
}
//
// 
//
function pageAdd2() {
cstpg = 276;
  document.myForm.Qty4111.value = ((parseInt(document.myForm.Qty4112.value)) + (parseInt(document.myForm.Qty4113.value)) + (parseInt(document.myForm.Qty4114.value)) + (parseInt(document.myForm.Qty4115.value)) + (parseInt(document.myForm.Qty4116.value)) + (parseInt(document.myForm.Qty4117.value)) + (parseInt(document.myForm.Qty4118.value)) + (parseInt(document.myForm.Qty4119.value)) + (parseInt(document.myForm.Qty4120.value)) + (parseInt(document.myForm.Qty4121.value)) + (parseInt(document.myForm.Qty4122.value)) + (parseInt(document.myForm.Qty4123.value)) + (parseInt(document.myForm.Qty4124.value)) + (parseInt(document.myForm.Qty4125.value)) + (parseInt(document.myForm.Qty4126.value)) );
document.myForm.Qty4110.value = ((parseInt((document.myForm.Qty4111.value)) * ((cstpg)) )/100);
//alert(document.myForm.Qty4111.value);
//alert(document.myForm.Qty4110.value);
}
//
//
// Item All of Them (17 - Medium Seville Albums)

function SaveVariablebtn17 (flag,name1,name1a,qty1,name2,name2a,qty2,name3,name3a,qty3,name4,name4a,qty4,name5,name5a,qty5,name6,name6a,qty6,name7,name7a,qty7,name8,name8a,qty8,name9,name9a,qty9,name10,name10a,qty10,name11,name11a,qty11,name12,name12a,qty12,name13,name13a,qty13,name14,name14a,qty14,name15,name15a,qty15,name16,name16a,qty16,name17,name17a,qty17) {

      ImpFlag = flag

//alert("Let the Fun Begin");

ReadVar = "";

	ReadVariable1a = name1
        ReadVariable2a = name2
	ReadVariable3a = name3
	ReadVariable4a = name4
	ReadVariable5a = name5
	ReadVariable6a = name6
	ReadVariable7a = name7
	ReadVariable8a = name8
	ReadVariable9a = name9
	ReadVariable10a = name10
	ReadVariable11a = name11
	ReadVariable12a = name12
	ReadVariable13a = name13
	ReadVariable14a = name14
	ReadVariable15a = name15
	ReadVariable16a = name16
	ReadVariable17a = name17


	ReadVariable1b = name1a
        ReadVariable2b = name2a
	ReadVariable3b = name3a
	ReadVariable4b = name4a
	ReadVariable5b = name5a
	ReadVariable6b = name6a
	ReadVariable7b = name7a
	ReadVariable8b = name8a
	ReadVariable9b = name9a
	ReadVariable10b = name10a
	ReadVariable11b = name11a
	ReadVariable12b = name12a
	ReadVariable13b = name13a
	ReadVariable14b = name14a
	ReadVariable15b = name15a
	ReadVariable16b = name16a
	ReadVariable17b = name17a

	QtyVariable1 = qty1
	QtyVariable2 = qty2
	QtyVariable3 = qty3
	QtyVariable4 = qty4
	QtyVariable5 = qty5
	QtyVariable6 = qty6

	QtyVariable7 = qty7
	QtyVariable8 = qty8
	QtyVariable9 = qty9
	QtyVariable10 = qty10
	QtyVariable11 = qty11
	QtyVariable12 = qty12
	QtyVariable13 = qty13
	QtyVariable14 = qty14
	QtyVariable15 = qty15
	QtyVariable16 = qty16
	QtyVariable17 = qty17

      QV1 = parseInt(QtyVariable1);
      QV2 = parseInt(QtyVariable2);
      QV3 = parseInt(QtyVariable3);
      QV4 = parseInt(QtyVariable4);
      QV5 = parseInt(QtyVariable5);

      QV6 = parseInt(QtyVariable6);
      QV7 = parseInt(QtyVariable7);
      QV8 = parseInt(QtyVariable8);
      QV9 = parseInt(QtyVariable9);
      QV10 = parseInt(QtyVariable10);

      QV11 = parseInt(QtyVariable11);
      QV12 = parseInt(QtyVariable12);
      QV13 = parseInt(QtyVariable13);
      QV14 = parseInt(QtyVariable14);
      QV15 = parseInt(QtyVariable15);

      QV16 = parseInt(QtyVariable16);
      QV17 = parseInt(QtyVariable17);

question = "true";
 pgcnt = "17";
 cntpgs = parseInt(pgcnt);
 totpgs = (cntpgs) * QV1;
 //alert (totpgs); 
 ordpgs = (QV3 + QV4 + QV5 + QV6 + QV7 + QV8 + QV9 + QV10 + QV11 + QV12 + QV13 + QV14 + QV15 + QV16 + QV17);

//
 	if (((QtyVariable1 == "0") && (ReadVariable1a.length > 3)) || ((QtyVariable1 != "0") && (ReadVariable1a.length < 3))) {
		if (QtyVariable1 == "0") {
 			alert ("You must select a QUANTITY for the Cover before you can add to cart")
			}  
		else {
 			alert ("You must select an Album Cover before you can add to cart")
			}  
 	}
      else {
// Pages Selected
 	if (((QtyVariable2 == "0") && (ReadVariable2b.length > 3)) || ((QtyVariable2 != "0") && (ReadVariable2b.length < 3))) {
		if (QtyVariable2 == "0") {
 			alert ("You must select a QUANTITY for Pages before you can add to cart")
			}  
		else {
                 alert ("You must select a Page Color before you can add to cart") 
			}  
 	}
      else {
 	    if ((QtyVariable1 != 0) && (QtyVariable2 == "0")) {
 		alert("You have selected an album but have not selected any pages.  Please select the desired page syles.");

		}
 	    else {
//
           if ((ordpgs > totpgs) && (QtyVariable1 != 0)) {
             question = "";
             question = confirm("The number of pages selected is more than the " + QV1 + " " + cntpgs + "-page capacity album(s) hold. \n\n" + "--- Click OK to continue to processing current order \n\n--- Click  CANCEL to change page quantities");
//             alert("Over " + question);
	       }
//       }
//   else {
// alert("Q = " + question);
      if (question == false) {
//        alert("Testing = " + question);
        }
      else {
//
	if ( (((QtyVariable1 != 0) && (ReadVariable1a.length > 3)) || ((QtyVariable2 != 0) && (ReadVariable2b.length > 3))) ) {

//

CstEnd = ":2.76:2:0:;";
CstEnd2 = ":2.76:2:0:;";
SvlWt = ":0.08"

//   
  if (QtyVariable1 != 0) {
	FindNextCID();
	ReadVariable = (QtyVariable1 + ReadVariable1a)
//alert(ReadVariable);
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}

//  if (QtyVariable2 != 0) {
//     DatStrBld(ReadVariable2a,ReadVariable2b); 
//	FindNextCID();
//	ReadVariable = (QtyVariable2 + ReadVar)
//alert(ReadVariable);
//	intVariableName = intNextCIDVal
//	SetVariable (intVariableName, ReadVariable)
//	}

   if (QtyVariable3 != 0) {
      DatStrBld2(ReadVariable3a,ReadVariable3b); 
	FindNextCID();
	ReadVariable = (QtyVariable3 + ReadVar)
//alert("RV = " + ReadVar);
//alert("Read = " + ReadVariable);
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}

   if (QtyVariable4 != 0) {
      DatStrBld2(ReadVariable4a,ReadVariable4b); 
	FindNextCID();
	ReadVariable = (QtyVariable4 + ReadVar)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}

	if (QtyVariable5 != 0) {
      DatStrBld2(ReadVariable5a,ReadVariable5b); 
	FindNextCID();
	ReadVariable = (QtyVariable5 + ReadVar)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}

	if (QtyVariable6 != 0) {
      DatStrBld2(ReadVariable6a,ReadVariable6b); 
	FindNextCID();
	ReadVariable = (QtyVariable6 + ReadVar)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}

	if (QtyVariable7 != 0) {
      DatStrBld2(ReadVariable7a,ReadVariable7b); 
	FindNextCID();
	ReadVariable = (QtyVariable7 + ReadVar)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}

	if (QtyVariable8 != 0) {
      DatStrBld2(ReadVariable8a,ReadVariable8b); 
	FindNextCID();
	ReadVariable = (QtyVariable8 + ReadVar)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}

	if (QtyVariable9 != 0) {
      DatStrBld2(ReadVariable9a,ReadVariable9b); 
	FindNextCID();
	ReadVariable = (QtyVariable9 + ReadVar)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}

	if (QtyVariable10 != 0) {
      DatStrBld2(ReadVariable10a,ReadVariable10b); 
	FindNextCID();
	ReadVariable = (QtyVariable10 + ReadVar)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}

	if (QtyVariable11 != 0) {
      DatStrBld2(ReadVariable11a,ReadVariable11b); 
	FindNextCID();
	ReadVariable = (QtyVariable11 + ReadVar)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}

	if (QtyVariable12 != 0) {
      DatStrBld2(ReadVariable12a,ReadVariable12b); 
	FindNextCID();
	ReadVariable = (QtyVariable12 + ReadVar)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}

	if (QtyVariable13 != 0) {
      DatStrBld2(ReadVariable13a,ReadVariable13b); 
	FindNextCID();
	ReadVariable = (QtyVariable13 + ReadVar)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}

	if (QtyVariable14 != 0) {
      DatStrBld2(ReadVariable14a,ReadVariable14b); 
	FindNextCID();
	ReadVariable = (QtyVariable14 + ReadVar)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}

	if (QtyVariable15 != 0) {
      DatStrBld2(ReadVariable15a,ReadVariable15b); 
	FindNextCID();
	ReadVariable = (QtyVariable15 + ReadVar)
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}

	if (QtyVariable16 != 0) {
      DatStrBld2(ReadVariable16a,ReadVariable16b); 
	FindNextCID();
	ReadVariable = (QtyVariable16 + ReadVar)
//alert("16 RV = " + ReadVar);
//alert("Read = " + ReadVariable);
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}

	if (QtyVariable17 != 0) {
      DatStrBld2(ReadVariable17a,ReadVariable17b); 
	FindNextCID();
	ReadVariable = (QtyVariable17 + ReadVar)
//alert("17 RV = " + ReadVar);
//alert("Read = " + ReadVariable);
	intVariableName = intNextCIDVal
	SetVariable (intVariableName, ReadVariable)
	}

//
clrpage()
//alert("Which Way do we go");      
      if (ImpFlag != 1) {
	location.href = "./NA5.shtml"
	}
      else {
      location.href = "./Imprinting.shtml"
      }
//
 	}
      else {
      alert("You Have Not Selected anything to Add to the Shopping Cart.  To View the Shopping Cart, Select the 'View Cart' button.");
      }
}     
}
}
}
}
//
//
function DatStrBld (dname1,dname2){

RVariable1a = dname1;
RVariable1b = dname2;

         colonPos = 0;
         sPos = RVariable1b.indexOf(":",colonPos);
         colonPos = sPos + 1
         nPos = RVariable1b.indexOf(":",colonPos);
         CPn = RVariable1b.substring(sPos + 1,nPos);
         sPos = nPos;
         colonPos = nPos + 1;
         nPos = RVariable1b.indexOf(":",colonPos);
         CDes = RVariable1b.substring(sPos + 1,nPos);
         colonPos = 0;
         sPos = RVariable1a.indexOf(":",colonPos);
         colonPos = sPos + 1;
         nPos = RVariable1a.indexOf(":",colonPos);
         PPn = RVariable1a.substring(sPos,nPos);
         sPos = nPos;
         colonPos = nPos + 1;
         nPos = RVariable1a.indexOf(":",colonPos);
         PDes = RVariable1a.substring(sPos,nPos);
         ReadVar = (SvlWt + PPn + CPn + PDes + CDes + CstEnd);
//         alert(QtyVariable1 + ReadVar);
}
//
function DatStrBld2 (dname1,dname2){

RVariable1a = dname1;
RVariable1b = dname2;

         colonPos = 0;
         sPos = RVariable1b.indexOf(":",colonPos);
         colonPos = sPos + 1
         nPos = RVariable1b.indexOf(":",colonPos);
         CPn = RVariable1b.substring(sPos + 1,nPos);
         sPos = nPos;
         colonPos = nPos + 1;
         nPos = RVariable1b.indexOf(":",colonPos);
         CDes = RVariable1b.substring(sPos + 1,nPos);
         colonPos = 0;
         sPos = RVariable1a.indexOf(":",colonPos);
         colonPos = sPos + 1;
         nPos = RVariable1a.indexOf(":",colonPos);
         PPn = RVariable1a.substring(sPos,nPos);
         sPos = nPos;
         colonPos = nPos + 1;
         nPos = RVariable1a.indexOf(":",colonPos);
         PDes = RVariable1a.substring(sPos,nPos);
         ReadVar = (SvlWt + PPn + CPn + PDes + CDes + CstEnd2);
//         alert(QtyVariable1 + ReadVar);
}
//
// Write tbe Cookie Data
//
   function SetVariable(intVariableName, ReadVariable) {
//       alert ("STD ReadVariable Write Data  = " + ReadVariable);
  var last = ReadVariable.length;
         colonPos = 0;
         sPos = ReadVariable.indexOf(":",colonPos);
         CQt = ReadVariable.substring(colonPos,sPos);
//   alert("Quantity = " + CQt);
         colonPos = sPos + 1
         nPos = ReadVariable.indexOf(":",colonPos);
         CWt = ReadVariable.substring(sPos + 1,nPos);
//   alert("Weight = " + CWt);
         sPos = nPos;
         colonPos = nPos + 1;
         nPos = ReadVariable.indexOf(":",colonPos);
         CPn = ReadVariable.substring(sPos + 1,nPos);
//   alert("Item Number = " + CPn);
         sPos = nPos;
         colonPos = nPos + 1;
         nPos = ReadVariable.indexOf(":",colonPos);
         lCon = ReadVariable.lastIndexOf(":")
         hCon = ReadVariable.lastIndexOf(":",lCon - 1)
         fCon = ReadVariable.lastIndexOf(":",hCon - 1)
         uCon = ReadVariable.lastIndexOf(":",fCon - 1)
         CDes = ReadVariable.substring(sPos + 1,uCon);
// alert("L = " + lCon + "\nH = " + hCon + "\nF = " + fCon + "\nU = " + uCon + "\nN = " + nPos)
//         CDes = ReadVariable.substring(sPos + 1,nPos);
//   alert("Description = " + CDes);
//alert(CDes);
  var dest = "";
  var len = CDes.length;
  var index = 0;
  var code = null;
//alert("Ready to Substitute");
  for (var i = 0; i < len; i++) {
    var ch = CDes.charAt(i);
//alert("CH = " + ch);
    if (ch == ",") code = "%2C";
    else if (ch == ":") code = "%3A";
    else if (ch == ";") code = "%3B";
    else if (ch == "%") code = "%25";
//    else if (ch == "&") code = "%26";		
    if (code != null) {
      dest += CDes.substring(index,i) + code;
      index = i + 1;
      code = null;
    }
  }
  if (index < len)
    dest += CDes.substring(index, len);
         nPos = uCon;
         sPos = nPos;
         CEnd = ReadVariable.substring(sPos + 1,last);
//   alert("Description = " + CEnd);
         tVar = CQt + ":" + CWt + ":" + CPn + ":" + dest + ":" + CEnd
//   alert (tVar + "\n" + ReadVariable)
  ReadVariable = tVar;
//alert(ReadVariable);
//alert("STD Before Write Encoded ReadVariable = " + ReadVariable);
//
       document.cookie = intVariableName + "=" + ReadVariable 
//     alert ("STD Here is the Write Data 1 = " + document.cookie);
   }
//
// Read Get Last Cookie ID Used
   function FindNextCIDORG() {
	intCookLen = document.cookie.length
	if (intCookLen < 1) {
	//First Cookie ID
		intNextCIDVal = 1000;
 //           alert("First Time " + intNextCIDVal);
		}
	else {
		intLastCIDLoc = document.cookie.lastIndexOf (';', intCookLen -1)
//		alert("End of Cookie = " + intLastCIDLoc)
		intEndCIDLoc = document.cookie.indexOf ('=', intLastCIDLoc)
		intCurCIDVal = document.cookie.substring(intLastCIDLoc, intEndCIDLoc)
//           alert("Last Cookie ID = " + intCurCIDVal);
		intNextCIDVal = eval(intCurCIDVal) + 1;
//		    alert("Next Cookie ID = " + intNextCIDVal);
	}
}
//' ***********************************************
// Read Get Last Cookie ID Used
//' ***********************************************
   function FindNextCID() {
	intCookLen = document.cookie.length
	if (intCookLen < 1) {
	//First Cookie ID
		intNextCIDVal = 1000;
//      alert("First Time " + intNextCIDVal);
		}
	else {
//	alert (document.cookie)
		intLastCIDLoc = document.cookie.lastIndexOf (';', intCookLen -1)
//		alert("End of Cookie = " + intLastCIDLoc)
		intEndCIDLoc = document.cookie.indexOf ('=', intLastCIDLoc)
//		alert(intEndCIDLoc)		
     	intLastCIDLoc1 = 0;
		intEndCIDLoc1 = document.cookie.indexOf ('=', intLastCIDLoc1)
//		alert(intEndCIDLoc1)		
		intCurCIDVal1 = document.cookie.substring(intLastCIDLoc +2, intEndCIDLoc )
		intCurCIDVal1 = parseInt(intCurCIDVal1)
//		alert("Loc1  " + intCurCIDVal1)
		intCurCIDVal2 = document.cookie.substring(intLastCIDLoc1, intEndCIDLoc1)
		intCurCIDVal2 = parseInt(intCurCIDVal2)
//		alert("Loc2  " + intCurCIDVal2)
       if (intCurCIDVal1 > intCurCIDVal2) {
		   intCurCIDVal = intCurCIDVal1
//		   alert("1")
		} else {
		   intCurCIDVal = intCurCIDVal2
//		   alert("1")
		}		
//      alert("Last Cookie ID 1 = " + intCurCIDVal);
		intNextCIDVal = eval(intCurCIDVal) + 1;
		intNextCIDVal = intNextCIDVal + '';
//		alert("Next Cookie ID = " + intNextCIDVal);	
	}
}	
// 
// Get Imprint Information
//
function GetImprint1 ( ) {
	winStats='toolbar=no,location=no,directories=no,menubar=no,'
   	winStats+='scrollbars=yes,resizable=yes'
	if (navigator.appName.indexOf("Microsoft")>=0) {
      		winStats+=',left=5,top=10,width=735,height=522'
    	}else{
      		winStats+=',screenX=5,screenY=10,width=732,height=530'
    	}
   	adWindow=window.open("Imprint.shtml","",winStats)     
   	adWindow.focus()
}
//Determine valid string for seville pages
//
function ValDat (sDat) {
 ReadV = sDat;
 okay = 'yes';
  tp = "";
//  alert(ReadV); 
  tp = ReadV.substring(1,2);
//  alert (tp);
  if (tp != '-') {
    okay = 'no';
  }
//  alert(tp + "  =  "  + okay); 
}
//  Validate Field as number
function validate(field) {
var valid = '0123456789'
var ok = 'yes';
var temp;
for (var i=0; i<field.value.length; i++) {
temp = '' + field.value.substring(i, i+1);
if (valid.indexOf(temp) == '-1') ok = 'no';
}
if (ok == 'no') {
alert('Invalid entry!  Only numbers are accepted!');
field.focus();
field.select();
   }
if (field.value =="") {
alert('Invalid entry!  Only numbers are accepted! Please enter a number between 0 through 9');
field.focus();
field.select();
}
}
//
// View Shopping Cart
//
    function ViewCartbtn () {
	location.href = "./NA5.shtml"
}
//
// View Shopping Cart
//
    function ViewCartbtn1 () {
	opener.location.href = "./NA5.shtml"
}
//
//
//
/***********************************************
* Pop-it menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var defaultMenuWidth="150px" //set default menu width.

var linkset=new Array()
//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT

linkset[0]='<a href="./Mixphotoalbums.shtml#Large">OVERVIEW</a>'
linkset[0]+='<hr>' //Optional Separator
linkset[0]+='<a href="./Mixphotoalbums.shtml#HingeLg">Hinge Albums/Mats</a>'
linkset[0]+='<a href="./Mixphotoalbums.shtml#CombLg">Comb Albums/Mats</a>'
linkset[0]+='<a href="./Mixphotoalbums.shtml#8x10">8x10 Albums/Mats</a>'

linkset[1]='- Fits 5x7, 4x6, 4x5 & 5x5'
linkset[1]+='<hr>' //Optional Separator
linkset[1]+='<a href="./Mixphotoalbums.shtml#Medium">OVERVIEW</a>'

linkset[2]='- Fits 4x5 & 5x5'
linkset[2]+='<hr>' //Optional Separator
linkset[2]+='<a href="./Mixphotoalbums.shtml#Small">OVERVIEW</a>'

////No need to edit beyond here

var ie5=document.all && !window.opera
var ns6=document.getElementById

if (ie5||ns6)
document.write('<div id="popitmenu" onMouseover="clearhidemenu();" onMouseout="dynamichide(event)"></div>')

function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function showmenu(e, which, optWidth){
if (!document.all&&!document.getElementById)
return
clearhidemenu()
menuobj=ie5? document.all.popitmenu : document.getElementById("popitmenu")
menuobj.innerHTML=which
menuobj.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
menuobj.contentwidth=menuobj.offsetWidth
menuobj.contentheight=menuobj.offsetHeight
eventX=ie5? event.clientX : e.clientX
eventY=ie5? event.clientY : e.clientY
//Find out how close the mouse is to the corner of the window
var rightedge=ie5? iecompattest().clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie5? iecompattest().clientHeight-eventY : window.innerHeight-eventY
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<menuobj.contentwidth)
//move the horizontal position of the menu to the left by it's width
menuobj.style.left=ie5? iecompattest().scrollLeft+eventX-menuobj.contentwidth+"px" : window.pageXOffset+eventX-menuobj.contentwidth+"px"
else 
//position the horizontal position of the menu where the mouse was clicked
menuobj.style.left=ie5? iecompattest().scrollLeft+"150px" : window.pageXOffset+"150px"
//menuobj.style.left=ie5? iecompattest().scrollLeft+eventX+"px" : window.pageXOffset+eventX+"px"
//same concept with the vertical position
if (bottomedge<menuobj.contentheight)
menuobj.style.top=ie5? iecompattest().scrollTop+eventY-menuobj.contentheight+"px" : window.pageYOffset+eventY-menuobj.contentheight+"px"
else
menuobj.style.top=ie5? iecompattest().scrollTop+event.clientY+"px" : window.pageYOffset+eventY+"px"
menuobj.style.visibility="visible"
return false
}

function contains_ns6(a, b) {
//Determines if 1 element in contained in another- by Brainjar.com
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function hidemenu(){
if (window.menuobj)
menuobj.style.visibility="hidden"
}

function dynamichide(e){
if (ie5&&!menuobj.contains(e.toElement))
hidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidemenu()
}

function delayhidemenu(){
delayhide=setTimeout("hidemenu()",500)
}

function clearhidemenu(){
if (window.delayhide)
clearTimeout(delayhide)
}

if (ie5||ns6) 
document.onclick=hidemenu


//

