arr=new Array(	
"jewelry_index.html",
"jewelry_page1.html",
"jewelry_page2.html",
"jewelry_page3.html",
"jewelry_page4.html",
"jewelry_page5.html",
"jewelry_page6.html",
"jewelry_page7.html",
"jewelry_page8.html",
"jewelry_page9.html",
"jewelry_page10.html",
"jewelry_page11.html",
"jewelry_page12.html",
"jewelry_page13.html",
"jewelry_page14.html",
"jewelry_page15.html",
"jewelry_page16.html",
"jewelry_page17.html",
"jewelry_page18.html",
"jewelry_page19.html",
"jewelry_page20.html",
"jewelry_chandelier_2004_1.html",
//"jewelry_chandelier_2004_2.html",
//"jewelry_fresh_water_pearls.html",
"foot_jew_901_902_903.html",
"jewelry_foot_2005.html");


function ck(form){
	for (i=0; i<arr.length; i++){
		if(form.jewelry[i].selected)
		break;
		}
	ckvalue=i
if(ckvalue!=0){
	window.location=arr[i-1];
	}
}

function forword(){
	for(i=0; i<arr.length; i++)
		if(window.location.href.indexOf(arr[i])!=-1)
			window.location=arr[i+1]
}

function backword(){
	for(i=0; i<arr.length; i++)
		if(window.location.href.indexOf(arr[i])!=-1)			
			window.location=arr[i-1]
}

function dropdown_menu(){
	var menu="";
	menu+="<form name=form1><select name=jewelry onChange='ck(this.form)'>";
	menu+="<option>Select your Bridal Jewelry&nbsp;"
	menu+="<option>Jewelry Index&nbsp;";
	menu+="<option>Jewelry Page 1";
	menu+="<option>Jewelry Page 2";
	menu+="<option>Jewelry Page 3";
	menu+="<option>Jewelry Page 4";
	menu+="<option>Jewelry Page 5";
	menu+="<option>Jewelry Page 6";
	menu+="<option>Jewelry Page 7";
	menu+="<option>Jewelry Page 8";
	menu+="<option>Jewelry Page 9";
	menu+="<option>Jewelry Page 10";
	menu+="<option>Jewelry Page 11";
	menu+="<option>Jewelry Page 12";
	menu+="<option>Jewelry Page 13";
	menu+="<option>Jewelry Page 14";
	menu+="<option>Jewelry Page 15";
	menu+="<option>Jewelry Page 16";
	menu+="<option>Jewelry Page 17";
	menu+="<option>Jewelry Page 18";
	menu+="<option>Jewelry Page 19";
	menu+="<option>Jewelry Page 20";
	/*menu+="<option>Jewelry Page 21";
	menu+="<option>Jewelry Page 22";
	menu+="<option>Jewelry Page 23";
	menu+="<option>Jewelry Page 24";
	menu+="<option>Jewelry Page 25";
	menu+="<option>Jewelry Page 26";
	menu+="<option>Jewelry Page 27";
	menu+="<option>Jewelry Page 28";
	menu+="<option>Jewelry Page 29";
	menu+="<option>Jewelry Page 30";
	menu+="<option>Jewelry Page 31";
	menu+="<option>Jewelry Page 32";
	menu+="<option>Jewelry Page 33";
	menu+="<option>Jewelry Page 34";*/
	//menu+="<option>Jewelry Page 35";
	menu+="<option>Chandelier Styles";
	//menu+="<option>Chandelier Styles 2";
	//menu+="<option>Fresh Water Pearls Jewelry";
	menu+="<option>Foot Jewelry";
	menu+="<option>Beach Bride Jewelry Sandals";
	menu+="</SELECT></FORM>";

	document.write(menu);
	for(i=1; i<arr.length; i++){
		if(window.location.href.indexOf(arr[i])!=-1){
			document.form1.jewelry.options[i+1].selected=true;
			
		}
	}
}

function item(product,style,color,description,length,crystals,pearls,price){
	this.product=product;
	this.style=style;
	this.color=color;
	this.description=description;
	this.length=length;
	this.crystals=crystals;
	this.pearls=pearls;
	this.price=price;
	this.Iarguments=item.arguments;
	this.Ilength=item.arguments.length;
}

arrJewelryItems=new Array();
arrJewelryItems[0]="Necklace"
arrJewelryItems[1]="Bracelet" 
arrJewelryItems[2]="Earrings"
arrJewelryItems[3]="Comb"
arrJewelryItems[4]="Hair pin"
arrJewelryItems[5]="Pin"
arrJewelryItems[6]="Watch"
arrJewelryItems[7]="Belt"
arrJewelryItems[8]="Box"
arrJewelryItems[9]="Ring"

Pearls1Str="White,Ivory,Peach,Pink,Lilac,Seafoom,Champagne,Rum,Taupe,Grey"
Pearls2Str="White,Ivory,Peach,Champagne"
Pearls3Str="Taupe"
Pearls4Str="creme,grey"
Pearls5Str="White"
Pearls6Str="White,Ivory"

function writeItems(){
var str="";
for(itemI=0; itemI<arrItem.length; itemI++){
	if(window.location.href.indexOf("?")!=-1)
		returnValue=window.location.href.substring(0,window.location.href.indexOf("?"));
	else
		returnValue=window.location.href;
	
	str+="<TR>";
	str+='<FORM method="POST" action="http://www.mikawed.com">';
	
	//new jewelry with picture
	if(arrItem[itemI].Ilength>8){
		if(arrItem[itemI].Iarguments[8].indexOf("image:")!=-1){
		imageSmall=arrItem[itemI].Iarguments[8].split("image:")[1]
		imageBig=imageSmall.split("_s")[0]
		imageBig=imageBig+".jpg"
		str+="<TD><A HREF='"+imageBig+"'><img src='"+imageSmall+"'></A></TD>"
		}
	}
	
	if(arrItem[itemI].Ilength>8)
	str+="<TD valign=top>";
	else
	str+="<TD>";
	str+="<input type=hidden name=price value='" + arrItem[itemI].price +"'>"
	str+="<input type=hidden name=sh value='1.316'>"
	str+="<input type=hidden name=return value='" + returnValue +"'>"
	if(arrItem[itemI].style.charAt(0)=="N")
		JewelryItem=arrJewelryItems[0];
	else if(arrItem[itemI].style.charAt(0)=="B" && arrItem[itemI].style.charAt(1)!="T")
		JewelryItem=arrJewelryItems[1];
	else if(arrItem[itemI].style.charAt(0)=="E")
		JewelryItem=arrJewelryItems[2];
	else if(arrItem[itemI].style.indexOf("HC")!=-1)
		JewelryItem=arrJewelryItems[3];
	else if(arrItem[itemI].style.indexOf("HS")!=-1)
		JewelryItem=arrJewelryItems[4];
	else if(arrItem[itemI].style.charAt(0)=="P")
		JewelryItem=arrJewelryItems[5];
	else if(arrItem[itemI].style.charAt(0)=="W")
		JewelryItem=arrJewelryItems[6];
	else if(arrItem[itemI].style.indexOf("BT")!=-1)
		JewelryItem=arrJewelryItems[7];
	else if(arrItem[itemI].style.indexOf("D")!=-1)
		JewelryItem=arrJewelryItems[8];
	else if(arrItem[itemI].style.indexOf("R")!=-1)
		JewelryItem=arrJewelryItems[9];
	else
		JewelryItem="";

	str+="<input type=hidden name=name value='" + arrItem[itemI].product +" "+ arrItem[itemI].style+" "+JewelryItem+"'>"
	str+="<B>" + arrItem[itemI].style +"</B><BR>"+JewelryItem
	
	//image map
	if(itemI<arrItem.length-1)
		str+="<A NAME=J" +(itemI*1+1)+ "></A>"
	
	str+="</TD><TD>";
	
	str+="<input type=hidden name=custom5 value='"+arrItem[itemI].description+"'>"
	str+=arrItem[itemI].description;
	
	if(arrItem[itemI].description!="" && arrItem[itemI].color!="")
		str+="<BR>";

	if(arrItem[itemI].color!=""){
	var splitArrItemS=arrItem[itemI].color.split("|")
		if(arrItem[itemI].style.indexOf("Set")!=-1)
			str+="Set color: "
		else
			str+="Color: "
		if (splitArrItemS.length>1){
			str+=" <SELECT name=custom2>"
			for(s=0; s<splitArrItemS.length; s++){
				str+="<option value='Color: "+splitArrItemS[s]+"'>"+splitArrItemS[s]
			}
		str+="</select>"
		}
		else{
			str+="<input type=hidden name=custom2 value='Color: " + splitArrItemS[0] +"'>";
			str+=splitArrItemS[0];
		}
	}
	
	if(arrItem[itemI].style.indexOf("Set")==-1){
		if(arrItem[itemI].length!=""){
			if(arrItem[itemI].style.indexOf("E")!=-1){
				itemType="Type";
			}
			else if(arrItem[itemI].style.indexOf("R")!=-1){
				itemType="Size";
			}
			else{
				itemType="Length";
			}
			str+="<BR>"+itemType+": ";
			var splitArrItem=arrItem[itemI].length.split("|")
			if (splitArrItem.length==1){
				str+="<input type=hidden name=custom3 value='"+itemType+": " + splitArrItem[0] +"'>";
				str+=splitArrItem[0];
			}
			else{
				str+="<SELECT name=custom3>"
				for(s=0; s<splitArrItem.length; s++){
					str+="<option value='"+itemType+": "+splitArrItem[s]+"'>"+splitArrItem[s]
				}
			str+="</select>"
			}
		}
	}

	//set item
	if(arrItem[itemI].style.indexOf("Set")!=-1){
		splitArrItemDesc1=arrItem[itemI].length.split(":");
		str+="<BR>"+splitArrItemDesc1[0];
		splitArrItemDescItems=splitArrItemDesc1[1].split("&");
		for(di=0; di<splitArrItemDescItems.length; di++){
			str+="<BR>";
			splitAIDI=splitArrItemDescItems[di].split("|");
			str+=splitAIDI[0];
			if (splitAIDI.length>1){
			customNo=6+di*1;
			str+=" <SELECT name=custom"+customNo+">"
				for(sa=1; sa<splitAIDI.length; sa++){
					str+="<option value='"+splitAIDI[sa]+"'>"+splitAIDI[sa]
				}
			str+="</select>"
			}


		}

	}

	if(arrItem[itemI].crystals!=""){
		str+="<BR>Crystals: ";
		var splitArrItem=arrItem[itemI].crystals.split("|")
		if (splitArrItem.length==1){
			str+="<input type=hidden name=custom4 value='Crystals: " + splitArrItem[0] +"'>";
			str+=splitArrItem[0];
		}
		else{
			str+="<SELECT name=custom4>"
			for(s=0; s<splitArrItem.length; s++){
				str+="<option value='Crystals: "+splitArrItem[s]+"'>"+splitArrItem[s]
			}
		str+="</select>"
		}
		//LINK TO CRYSTALS COLORS:
		if(arrItem[itemI].style=="E833" || arrItem[itemI].style=="E932" || arrItem[itemI].style=="E933"|| arrItem[itemI].style=="N933"|| arrItem[itemI].style=="N573"|| arrItem[itemI].style=="E573"){
		// str+=" (<A HREF='pic/jewelry/jew_colors.jpg' target='_blank'>Colors Table</A>)"
		str+=' <A HREF="javascript:void(0)" onClick=size_chart_win("pic/jewelry/jew_colors.jpg")>colors</A>'}
	 
	}

	
	if(arrItem[itemI].pearls!=""){
		if(arrItem[itemI].pearls*1=="1")
			PearlsStr=Pearls1Str
		if(arrItem[itemI].pearls*1=="2")
			PearlsStr=Pearls2Str
		if(arrItem[itemI].pearls*1=="3")
			PearlsStr=Pearls3Str
		if(arrItem[itemI].pearls*1=="4")
			PearlsStr=Pearls4Str
		if(arrItem[itemI].pearls*1=="5")
			PearlsStr=Pearls5Str
if(arrItem[itemI].pearls*1=="6")
			PearlsStr=Pearls6Str

		
		str+="<BR>Pearls: ";
		var splitArrItem=PearlsStr.split(",")
		if (splitArrItem.length==1){
			str+="<input type=hidden name=custom6 value='Pearls: " + splitArrItem[0] +"'>";
			str+=splitArrItem[0];
		}
		else{
			str+="<SELECT name=custom6>"
			for(s=0; s<splitArrItem.length; s++){
				str+="<option value='Pearls: "+splitArrItem[s]+"'>"+splitArrItem[s]
			}
		str+="</select>"
		}
	}
	str+="<BR><BR><center>Price: $"
	if(arrItem[itemI].price.toString().indexOf(".")!=-1)
		str+=arrItem[itemI].price;
	else
		str+=arrItem[itemI].price+".00";
	str+="<BR><input type=hidden name=add value=1'>"
	//str+="<input type=image name=Order src='cart/cart_add.gif' border=0>"
	//str+="<a href='http://www.mikawed.com'><img src='cart/cart_view.gif' border=0></a>"
	str+="</center></TD>"
	str+="</form></TR>"
} //for

document.write(str);
}

function size_chart_win(pageName){
	window.open(pageName,"size","width=550,height=350,top=0,left=0,scrollbars=yes")
	}
