function getWatches() {
image0 = new Image();
image0.src = 'images/custom/bridal/CustBridal-R1-top-lrg.jpg';		
image1 = new Image();
image1.src = 'images/custom/bridal/CustBridal-R1-center-lrg.jpg';		
image2 = new Image();
image2.src = 'images/custom/bridal/CustBridal-R1-bottom-lrg.jpg';		
image3 = new Image();
image3.src = 'images/custom/bridal/CustBridal-R2-top-lrg.jpg';		
image4 = new Image();
image4.src = 'images/custom/bridal/CustBridal-R2-center-lrg.jpg';		
image5 = new Image();
image5.src = 'images/custom/bridal/CustBridal-R2-bottom-lrg.jpg';		
image6 = new Image();
image6.src = 'images/custom/jewelry/CustJewel-R1-top-lrg.jpg';		
image7 = new Image();
image7.src = 'images/custom/jewelry/CustJewel-R1-center-lrg.jpg';		
image8 = new Image();
image8.src = 'images/custom/jewelry/CustJewel-R1-bottom-lrg.jpg';		
image9 = new Image();
image9.src = 'images/custom/jewelry/CustJewel-R2-top-lrg.jpg';		
image10 = new Image();
image10.src = 'images/custom/jewelry/CustJewel-R2-center-lrg.jpg';		
image11 = new Image();
image11.src = 'images/custom/jewelry/CustJewel-R2-bottom-lrg.jpg';		
image12 = new Image();
image12.src = 'images/custom/jewelry/CustJewel-R3-top-lrg.jpg';		
image13 = new Image();
image13.src = 'images/custom/jewelry/CustJewel-R3-center-lrg.jpg';		
image14 = new Image();
image14.src = 'images/custom/jewelry/CustJewel-R3-bottom-lrg.jpg';		
image15 = new Image();
image15.src = 'images/custom/jewelry/CustJewel-R4-top-lrg.jpg';		
image16 = new Image();
image16.src = 'images/custom/jewelry/CustJewel-R4-center-lrg.jpg';		
image17 = new Image();
image17.src = 'images/custom/jewelry/CustJewel-R4-bottom-lrg.jpg';
image18 = new Image();
image18.src = 'images/custom/bridal/cb_r3_top-lrg.jpg';
image19 = new Image();
image19.src = 'images/custom/bridal/cb_r3_center-lrg.jpg';
image20 = new Image();
image20.src = 'images/custom/bridal/cb_r3_bottom-lrg.jpg';
image21 = new Image();
image21.src = 'images/custom/bridal/cb_r4_top-lrg.jpg';
image22 = new Image();
image22.src = 'images/custom/bridal/cb_r4_center-lrg.jpg';
image23 = new Image();
image23.src = 'images/custom/bridal/cb_r4_bottom-lrg.jpg';
image24 = new Image();
image24.src = 'images/custom/bridal/cb_r5_top-lrg.jpg';
image25 = new Image();
image25.src = 'images/custom/bridal/cb_r5_center-lrg.jpg';
image26 = new Image();
image26.src = 'images/custom/bridal/cb_r5_bottom-lrg.jpg';
}

function changeWatch(val) {
	document.getElementById("page_content").style.display = 'none';
	document.getElementById("item_image").style.display = 'block';
	document.getElementById("item_content_container").style.display = 'block';	
	document.getElementById("item_image").style.border = '1px solid #122337';
	document.getElementById("item_content").style.color = '#052F68';	
	document.getElementById("item_content").style.display = 'block';	
	document.getElementById("prev").style.display = 'block';
	document.getElementById("next").style.display = 'block';		
	if (document.getElementById("gallery_text")) {
		document.getElementById("gallery_text").style.backgroundImage = 'none';
	}
	
	var prevImg = document.getElementById('prev');
	var nextImg = document.getElementById('next');

	if (document.getElementById("gal-custom-bridal")) {
		if (val > 1) {
			prevImg.onclick = new Function('changeWatch('+(val-1)+');');
		} else if (val == 1 ) {
			prevImg.onclick = new Function('changeWatch(15);');
		}
		
		if (val < 15) {
			nextImg.onclick = new Function('changeWatch('+(val+1)+');');
		} else if (val == 15) {
			nextImg.onclick = new Function('changeWatch(1);');
		}
	} else if (document.getElementById("gal-custom-jewelry")) {
		if (val > 16) {
			prevImg.onclick = new Function('changeWatch('+(val-1)+');');
		} else if (val == 16 ) {
			prevImg.onclick = new Function('changeWatch(27);');
		}
		
		if (val < 27) {
			nextImg.onclick = new Function('changeWatch('+(val+1)+');');
		} else if (val == 27) {
			nextImg.onclick = new Function('changeWatch(16);');
		}
	} else {
		if (val > 1) {
			prevImg.onclick = new Function('changeWatch('+(val-1)+');');
		} else if (val == 1 ) {
			prevImg.onclick = new Function('changeWatch(27);');
		}
		if (val < 27) {
			nextImg.onclick = new Function('changeWatch('+(val+1)+');');
		} else if (val == 27) {
			nextImg.onclick = new Function('changeWatch(1);');
		}
	}


	if (val == 1) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/bridal/CustBridal-R1-top-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '5.2ct Cushion Cut Diamond in Platinum Pave Diamond Mounting';
	}
	if (val == 2) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/bridal/CustBridal-R1-center-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '7ct Radiant Diamond';	
	}
	if (val == 3) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/bridal/CustBridal-R1-bottom-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '6.06ct Cushion Cut Diamond in 18k White Gold Mounting';	
	}
	if (val == 4) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/bridal/CustBridal-R2-top-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '4.15ct Fancy Radiant Yellow Diamond in 18k White Gold Pavé Diamond Mounting';
	}
	if (val == 5) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/bridal/CustBridal-R2-center-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '3.15ct Fancy Intense Yellow Diamond with Platinum Pav&eacute; Diamond Mounting';	
	}
	if (val == 6) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/bridal/CustBridal-R2-bottom-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '3.84ct Fancy Yellow Oval Diamond With 2 Oval Side Diamonds';	
	}
	if (val == 7) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/bridal/cb_r3_top-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '2.12ct Emerald Cut Diamond';
	}
	if (val == 8) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/bridal/cb_r3_center-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = 'Asher and Emerald Eternity Bands';	
	}
	if (val == 9) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/bridal/cb_r3_bottom-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '2.15ct Radiant Diamond';	
	}
	if (val == 10) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/bridal/cb_r4_top-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '5.63ct Round Diamond';
	}
	if (val == 11) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/bridal/cb_r4_center-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = 'U-Mount and Memory Fit Eternity Bands';	
	}
	if (val == 12) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/bridal/cb_r4_bottom-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '7.05ct Oval Diamond';	
	}
	if (val == 13) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/bridal/cb_r5_top-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = 'Pave’ Semi Mount and Matching Eternity Band';
	}
	if (val == 14) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/bridal/cb_r5_center-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '1.05ct Round Diamond';	
	}
	if (val == 15) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/bridal/cb_r5_bottom-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '2.39ct Oval Diamond and <br />2.19ct Round Diamond';	
	}
	if (val == 16) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/jewelry/CustJewel-R1-top-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '3.06ct Pink Tourmaline with Diamond Enhanced 18K White Gold Necklace';
	}
	if (val == 17) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/jewelry/CustJewel-R1-center-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '5.22ct Paraiba with Diamond Enhanced 18K White Gold Necklace';	
	}
	if (val == 18) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/jewelry/CustJewel-R1-bottom-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '4.31ct Rubelite with Diamond Enhanced 18K White Gold Necklace';	
	}
	if (val == 19) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/jewelry/CustJewel-R2-top-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '13.18ct Pink Tourmaline and Diamond Necklace';
	}
	if (val == 20) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/jewelry/CustJewel-R2-center-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '58ct Rutilated Quartz set in 18k Gold';	
	}
	if (val == 21) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/jewelry/CustJewel-R2-bottom-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '4.04ct Pink Sapphire and Diamond Ring';	
	}
	if (val == 22) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/jewelry/CustJewel-R3-top-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '5.67ct Blue Sapphire and Diamond Cuff Links set in platinum';
	}
	if (val == 23) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/jewelry/CustJewel-R3-center-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '4.29ct Men&rsquo;s Blue Sapphire Ring set in White 18k Gold';	
	}
	if (val == 24) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/jewelry/CustJewel-R3-bottom-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = 'Diamond and 18k White Gold Cuff Links';	
	}
	if (val == 25) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/jewelry/CustJewel-R4-top-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '<span style="text-decoration:underline;">Rubelite Necklace</span><br />7.5ct Rubelite Pendant with 18K White Gold Necklace<br /><br /><span style="text-decoration:underline;">Watermelon Tourmaline Necklace</span><br />14.43ct Watermelon Tourmaline Pendant with Diamond enhanced 18K White Gold Necklace.';
	}
	if (val == 26) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/jewelry/CustJewel-R4-center-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '6.64ct Imperial Topaz and Diamond Pendant<br /><br />21.9ct Madeira Citrine and Diamond Pendant with 18K Gold Necklace';	
	}
	if (val == 27) {
		document.getElementById("item_image").style.backgroundImage = 'url("images/custom/jewelry/CustJewel-R4-bottom-lrg.jpg")';		
		document.getElementById("item_content").innerHTML = '<span style="text-decoration:underline;">Aqua Marine Necklace</span><br />27.73ct Aqua Marine and Diamond Pendant with Diamond enhanced Necklace<br /><br /><span style="text-decoration:underline;">Pink Tourmaline Necklace</span><br />8.79ct Pink Tourmaline and Diamond Pendant with Diamond enhanced Necklace';	
	}
}
var c=0;
var t;

function startFade() {
		document.getElementById('txt').value=c;
		c=c+1;
		setTimeout("appear('custom1')", 0);
		setTimeout("getWatches()", 1000);
		setTimeout("fade('custom1')",4000);
		document.getElementById("custom2").style.display = 'none';
    document.getElementById("custom2").style.opacity = (1 / 100);
    document.getElementById("custom2").style.MozOpacity = (1 / 100);
    document.getElementById("custom2").style.KhtmlOpacity = (1 / 100);
    document.getElementById("custom2").style.filter = "alpha(opacity=1)";

		document.getElementById("custom3").style.display = 'none';
    document.getElementById("custom3").style.opacity = (1 / 100);
    document.getElementById("custom3").style.MozOpacity = (1 / 100);
    document.getElementById("custom3").style.KhtmlOpacity = (1 / 100);
    document.getElementById("custom3").style.filter = "alpha(opacity=1)";
		
		document.getElementById("custom4").style.display = 'none';
    document.getElementById("custom4").style.opacity = (1 / 100);
    document.getElementById("custom4").style.MozOpacity = (1 / 100);
    document.getElementById("custom4").style.KhtmlOpacity = (1 / 100);
    document.getElementById("custom4").style.filter = "alpha(opacity=1)";
		
		document.getElementById("custom5").style.display = 'none';
    document.getElementById("custom5").style.opacity = (1 / 100);
    document.getElementById("custom5").style.MozOpacity = (1 / 100);
    document.getElementById("custom5").style.KhtmlOpacity = (1 / 100);
    document.getElementById("custom5").style.filter = "alpha(opacity=1)";
		
		document.getElementById("custom6").style.display = 'none';
    document.getElementById("custom6").style.opacity = (1 / 100);
    document.getElementById("custom6").style.MozOpacity = (1 / 100);
    document.getElementById("custom6").style.KhtmlOpacity = (1 / 100);
    document.getElementById("custom6").style.filter = "alpha(opacity=1)";

		document.getElementById("custom7").style.display = 'none';
    document.getElementById("custom7").style.opacity = (1 / 100);
    document.getElementById("custom7").style.MozOpacity = (1 / 100);
    document.getElementById("custom7").style.KhtmlOpacity = (1 / 100);
    document.getElementById("custom7").style.filter = "alpha(opacity=1)";

		document.getElementById("custom8").style.display = 'none';
    document.getElementById("custom8").style.opacity = (1 / 100);
    document.getElementById("custom8").style.MozOpacity = (1 / 100);
    document.getElementById("custom8").style.KhtmlOpacity = (1 / 100);
    document.getElementById("custom8").style.filter = "alpha(opacity=1)";

		document.getElementById("custom9").style.display = 'none';
    document.getElementById("custom9").style.opacity = (1 / 100);
    document.getElementById("custom9").style.MozOpacity = (1 / 100);
    document.getElementById("custom9").style.KhtmlOpacity = (1 / 100);
    document.getElementById("custom9").style.filter = "alpha(opacity=1)";

		setTimeout("appear('custom2')", 5300);
		setTimeout("fade('custom2')",9300);
		setTimeout("appear('custom3')", 10600);		
		setTimeout("fade('custom3')",14600);
		setTimeout("appear('custom4')", 15900);		
		setTimeout("fade('custom4')",19900);
		setTimeout("appear('custom5')",21200);		
		setTimeout("fade('custom5')",25200);
		setTimeout("appear('custom6')",26500);		
		setTimeout("fade('custom6')",30500);
		setTimeout("appear('custom7')",31800);		
		setTimeout("fade('custom7')",35800);
		setTimeout("appear('custom8')",37100);		
		setTimeout("fade('custom8')",41100);
		setTimeout("appear('custom9')",42300);		
		setTimeout("fade('custom9')",46300);		
t=setTimeout("startFade()",47600);
}

function closeAll() {
	document.getElementById("page_content").style.display = 'block';
	document.getElementById("item_image").style.display = 'none';
	document.getElementById("item_content_container").style.display = 'none';
	document.getElementById("item_content").style.display = 'none';	
	document.getElementById("prev").style.display = 'none';
	document.getElementById("next").style.display = 'none';		
	if ((document.getElementById("gallery_text")) && (document.getElementById("gal-custom-bridal"))) {
		document.getElementById("gallery_text").style.backgroundImage = 'url("images/text/custom-bridal.gif")';	
	}		
	if ((document.getElementById("gallery_text")) && (document.getElementById("gal-custom-jewelry"))) {
		document.getElementById("gallery_text").style.backgroundImage = 'url("images/text/custom-jewelry.gif")';	
	}	
}

if (document.getElementById("gallery_text")) {
	getWatches();
	alert("start it up");
} else {
	setTimeout("getWatches()", 1500);
}