var maxSize = 6;
var pArray = new Array(maxSize);
var pAsize=0;
var pAinit=0;

function mkProductPage2(s){
	var i, dvTx, dv, ia=pArray;
	for (i=s; i<pAsize; i++){
		dvTx = '<table width=184 height=200 cellpadding=0 border=2 BORDERCOLOR=#d4c79e><tr>';
		dvTx += '<td bgcolor=#d4c79e width=184><font id="caption-font"><b><center>'+ia[i][3]+'</center></b></font></td></tr>';
		dvTx += '<tr><td width=184 valign=center align=center bgcolor=white><a href='+ia[i][4]+' target=parent>';
		dvTx += '<img src='+ia[i][0]+' width='+ia[i][1]+' height='+ia[i][2]+' title='+ia[i][3]+' border=0 ';
		dvTx += 'onMouseOver="openMsgBox1(this,'+i+')" onMouseOut="closeMsgBox(this)"></a>';
    dvTx += '</td></tr></table>';
    dv = document.getElementById(pAr[i]);
    dv.innerHTML=dvTx;
  } 
  return 2;
}
function mkProductPage(){
	var i, dvTx, dv, ia=pArray;
	for (i=0; i<pAsize; i++){
		dvTx = '<table width=184 height=200 cellpadding=0 border=2 BORDERCOLOR=#d4c79e><tr>';
		dvTx += '<td bgcolor=#d4c79e width=184><font id="caption-font"><b><center>'+ia[i][3]+'</center></b></font></td></tr>';
		dvTx += '<tr><td width=184 valign=center align=center bgcolor=white><a href='+ia[i][4]+'>';
		dvTx += '<img src='+ia[i][0]+' width='+ia[i][1]+' height='+ia[i][2]+' title='+ia[i][3]+' border=0 ';
		dvTx += 'onMouseOver="openMsgBox1(this,'+i+')" onMouseOut="closeMsgBox(this)"></a>';
    dvTx += '</td></tr></table>';
    dv = document.getElementById(pAr[i]);
    dv.innerHTML=dvTx;
  } 
  return 0;
}
// The product array has the following format for the second level:
//			0: image file name
//			1: image width
//			2: image height
//			3: caption title
//			4: href
//			5: alt / text displayed in the message box
function initProdArray(){	
	var tx, pA = new Array(6);
	for(i=0;i<6;i++) pA[i] = new Array(6);
	pA[0][0]="images/ceramic-mug.jpg";
	pA[0][1]=168;
	pA[0][2]=148;
	pA[0][3]="Vitrified Bistro Mug";
	pA[0][4]="http://www.promoxml.com/exchange_product_page.asp?SiteID=adimage&pf_id=33008";
	pA[0][5]='<b>Vitrified Bistro Mug</b>.<br>• Due to the high firing temperature, vitrified ware is available in brighter colors.<br>• Highly durable. Recommended for restaurant purposes.<br>• Ceramic ware is considered "vitrified" if it will absorb less than 0.2% of its own weight when boiled in water for 5 hours and soaked for an additional 19 hours.';
	
	pA[1][0]="images/music-travel.jpg";
	pA[1][1]=168;
	pA[1][2]=119;
	pA[1][3]="Music Traveler";
	pA[1][4]="http://www.tele-compsolutions.com/06/index.php?option=com_content&task=view&id=105&Itemid=136";
	pA[1][5]="<b>Music Traveler</b><br>Share your music without headphones while protecting your valuable MP3 player, iPod, CD Player, etc.<br>Speaker is powered by 2 AA batteries for maximum volume<br>• Durable outer shell protects inner contents if dropped<br>Features a belt attachment and shoulder strap";
	
	pA[2][0]="images/pocket-puzzles.jpg";
	pA[2][1]=168;
	pA[2][2]=148;
	pA[2][3]="Pocket Puzzles";
	pA[2][4]="http://www.parlorpuzzles.com/?p=puzzles&n=6";	
	pA[2][5]="<b>Pocket Puzzles</b>.<br> The new retro-look metal container provides a collectible pocket-sized puzzler for your favorite person. All 6 styles are included with each order.";
	
	pA[3][0]="images/pill-blanket.jpg";
	pA[3][1]=168;
	pA[3][2]=150;
	pA[3][3]="Pillow Blankets";
	pA[3][4]="http://eastlandtextiles.com/Eastland/pillow_blanket.htm";	
	pA[3][5]="<b>Pillow Blankets</b><br>100% Polyester Fleece Pillow Blanket finished with rounded corners and whip-stitch edge.";
		
	pA[4][0]="images/cell-holder.jpg";
	pA[4][1]=137;
	pA[4][2]=165;
	pA[4][3]="Cell Phone Holder";
	pA[4][4]="http://www.hirschgift.com/4405.htm";
	pA[4][5]="<b>Cell Phone Holder</b><br>Available in green or black";
	
	pA[5][0]="images/cardigan.jpg";
	pA[5][1]=121;
	pA[5][2]=165;
	pA[5][3]="Micro Chenille Mock Cardigan";
	pA[5][4]="http://www.coloradoclothing.com/Default.aspx?tabid=58&mid=388&ctl=Detail&xmid=22&xmfid=2";
	pA[5][5]="<b>Micro Chenille Mock Cardigan</b>.<br>A Great new look for the cardigan! 2x2 rib with roll backed cuffs, 2-way zipper provides great styling and fit. Looks great embroidered!";
		
	pAsize=6;
	pAinit=1;
	pArray=pA;
	return mkProductPage();
}
function initProdArray2(s, f){	
	var tx, d=f-s, pA = new Array(6);
	for(i=s;i<f;i++) pA[i] = new Array(6);	
	pA[s][0]="images/greenUSB.jpg";
	pA[s][1]=170;
	pA[s][2]=139;
	pA[s][3]="Green USB Drive";
	pA[s][4]="http://www.corporatekey.com/execstr/prodView.asp?idproduct=415&idCategory=1";	
	pA[s][5]="<b>Patti's Choice: Green USB Drive</b>.<br> I noticed that environmentally friendly promotional products is the fastest growing category. This eco-friendly USB drive is available individually or in a kit which also contains four solar-powered key chains.";
	
	pA[s+1][0]="images/lenscloth.jpg";
	pA[s+1][1]=170;
	pA[s+1][2]=149;
	pA[s+1][3]="Custom Microfiber Lens Cloth";
	pA[s+1][4]="http://36730.asisupplier.com/ProductDetail/ProductDetail.aspx?Ntt=wpclc97&Ntx=mode+matchallpartial&BWS=0%7c1&N=0&DPSV_Id=326334&No=0&Ntk=WordSearch&Nr=LMSiteEligibility:1&id=6142784&pSRVC_Id=65";	
	pA[s+1][5]="<b>Liz's Choice: Custom Microfiber Lens Cloth</b><br>I love this microfiber cloth. It is good for sunglasses, computer screens, phones, CDs and DVDs. It is easy to carry and offers a big area for your four-color process imprint.";
		
	pA[s+2][0]="images/wine-traveller.jpg";
	pA[s+2][1]=152;
	pA[s+2][2]=168;
	pA[s+2][3]="Wine Caddie";
	pA[s+2][4]="http://www.coralbaytrading.com/cbt_wine_caddie.pdf";
	pA[s+2][5]="<b>Donna's Choice: Wine Caddie</b><br>This wine caddie is just out and I think it is a real winner. The fact that it comes with two acrylic wine glasses and a handsome upscale wine opener makes it a perfect 'complete' gift for the wine lovers in your life.";
	
	pA[s+3][0]="images/sipspritz2.jpg";
	pA[s+3][1]=136;
	pA[s+3][2]=167;
	pA[s+3][3]="Mist Spritzer Water Bottle";
	pA[s+3][4]="images/Spritzer_Flyer_2008-1.jpg";
	pA[s+3][5]="<b>Dana's Choice: Mist Spritzer Water Bottle</b>.<br>This water bottle is so new it is not even in the catalog. I think it is a very clever way to drink water AND be able to 'spritz' too!";
			
	pAsize=6;
	pAinit=1;
	pArray=pA;
	return mkProductPage2(s);
}

function initProdArray3(s, f){	
	var tx, d=f-s, pA = new Array(6);
	for(i=s;i<f;i++) pA[i] = new Array(6);	
	pA[s][0]="../img/img_0010-1.jpg";
	pA[s][1]=144;
	pA[s][2]=178;
	pA[s][3]="Zack, Kathy and John";
	pA[s][4]="";	
	pA[s][5]="<b>John and Kathy are a joy to me and I thank CARE for allowing me to adopt them.";

	pA[s+1][0]="images/pet-care-kit.jpg";
	pA[s+1][1]=184;
	pA[s+1][2]=135;
	pA[s+1][3]="Emergency Pet Care Kit";
	pA[s+1][4]="http://www.evans-mfg.com/evansHome/productList.php?productId=441&hires=list";	
	pA[s+1][5]='Be prepared for any pet emergency. Kit includes 3 antiseptic towelettes, 4 swabplus ear cleanser swabs, 2 2"x 3" non-adherent pads, 2 2"x3" adhesive pads. 1 set of gloves, 1 tweezers, 1 roll of tape, 1 scissors and 1 pet care guide.';
		
	pA[s+2][0]="images/dog-leash.png";
	pA[s+2][1]=164;
	pA[s+2][2]=164;
	pA[s+2][3]="10-ft Dog Leash";
	pA[s+2][4]="http://www.hitpromo.net/products.php?proID=718";
	pA[s+2][5]="<b>For Dogs Up To 22 lbs. 10' Retractable Cord.";
	
	pA[s+3][0]="images/doggie-treats.jpg";
	pA[s+3][1]=143;
	pA[s+3][2]=184;
	pA[s+3][3]="Doggy Treats Container";
	pA[s+3][4]="http://www.cookiekeepers.com/happy-home/doggy-treats.html";
	pA[s+3][5]="<b>Keeps pet treats fresh and handy around the home.</b>";

  pA[s+4][0]="images/lightup-dogcollar.gif";
	pA[s+4][1]=164;
	pA[s+4][2]=164;
	pA[s+4][3]="Flashing Dog Collar";
	pA[s+4][4]="http://www.alightpromos.com/alightpromoscom-p-1759.html?osCsid=rpqvu4sulvbv8576in7a02cvm6";
	pA[s+4][5]="Flashing Dog Collars are the perfect nighttime pet safety item.</b>";	

  pA[s+5][0]="../img/img_0011-1.jpg";
	pA[s+5][1]=184;
	pA[s+5][2]=144;
	pA[s+5][3]="Zack and His Pets";
	pA[s+5][4]="";	
	pA[s+5][5]="<b>Zack's two favorite play toys: Kathy and John</b>";	
				
	pAsize=6;
	pAinit=1;
	pArray=pA;
	return mkProductPage2(s);
}

