// JavaScript Document
var imageName;
var contentSource;
var captionText;

if (document.images) {
	bg = new Image();    
	bg.src = "/static/images/bg.jpg";
	
	blank = new Image();    
	blank.src = "/static/images/blank.gif";
}

function imageSwap(newName) 
{
	imageName = newName;
	
	document['holder'].src = eval(imageName + ".src");
	writeCaption();
}

function writeCaption() {
	
	switch (imageName) {
		case "b_multi": 
			captionText = "Multi Oval Bangle";
			break;
		case "b_cuff1": 
		case "b_cuff2": 
			captionText = "Double Sided Cuffs";
			break;
		case "b_donut1": 
			captionText = "Double Sided Donut Bracelet";
			break;
		case "b_donut2": 
			captionText = "Double Sided Donut Bracelet";
			break;
		case "b_heart": 
			captionText = "Single Sided Abstract Heart Brooches";
			break;
			
		case "e_large": 
		case "e_large2": 
			captionText = "Large Hoops";
			break;
		case "e_abstractRings": 
			captionText = "Abstract Rings";
			break;
		case "e_donutDrops": 
			captionText = "Donut Drops";
			break;
		case "e_donutRings1": 
			captionText = "Donut Rings";
			break;
		case "e_donutRings2": 
			captionText = "Donut Rings";
			break;
		case "e_doubleCircleDrops": 
			captionText = "Double Sided Circle Drops";
			break;
		case "e_hoopDrops": 
			captionText = "Double Sided Hoop Drops";
			break;
		case "e_singlsCircleDrops": 
			captionText = "Single Sided Circle Drops";
			break;
		
		case "p_cluster": 
			captionText = "Oval Cluster Pendant";
			break;
		case "p_starburst": 
			captionText = "Star Burst Pendant";
			break;
		case "p_long": 
			captionText = "Long Donut Jump Ring Donut Necklace";
			break;
		case "p_doubleDonut1": 
			captionText = "Double Sided Donut Pendants on Neckwires";
			break;
		case "p_doubleDonut2": 
			captionText = "Double Sided Donut Pendants on Neckwires";
			break;
		case "p_doubleDonut3": 
			captionText = "Double Sided Donut Pendants on Neckwires";
			break;
		case "p_doubleDonut4": 
			captionText = "Double Sided Donut Pendants on Neckwires";
			break;
		case "p_ginkoLeaf": 
			captionText = "Gingko Leaf Pendant";
			break;
		case "p_lgDoubleCircleWire1": 
			captionText = "Large Double Sided Circle Pendants on Neckwires";
			break;
		case "p_lgDoubleCircleWire2": 
			captionText = "Large Double Sided Circle Pendants on Neckwires";
			break;
		case "p_mdDoubleCircleWire1": 
			captionText = "Medium Double Sided Circle Pendants on Neckwires";
			break;
		case "p_mdDoubleCircleWire2": 
			captionText = "Medium Double Sided Circle Pendants on Neckwires";
			break;
		case "p_oblongLeaf": 
			captionText = "Large Oblong Leaf Pendant";
			break;
		case "p_smDoubleCircleWire1": 
			captionText = "Small Double Sided Circle Pendants on Neckwires";
			break;
		case "p_smDoubleCircleWire2": 
			captionText = "Small Double Sided Circle Pendants on Neckwires";
			break;
	}
	
	if (document.getElementById) {
		document.getElementById('caption').innerHTML= captionText;
	}else{
		document.layers['caption'].document.open();
		document.layers['caption'].document.write(captionText);
		document.layers['caption'].document.close();
	}
}