
var homeArray = new Array("Color1","Color2","Color3","Color4","Color5","default");
var homeHrefArray = new Array("../inspiration/trends.jsp?color=Color1&lang="+lang,"../inspiration/trends.jsp?color=Color2&lang="+lang,"../inspiration/trends.jsp?color=Color3&lang="+lang,"../inspiration/trends.jsp?color=Color4&lang="+lang,"../inspiration/trends.jsp?color=Color5&lang="+lang,"#");
var homeHexArray = new Array("#9DAA70","#003455","#D9C16E","#985644","#9F272A");
var homeNameArray = new Array("Growing Respect","Ebb &amp; Flow","Art Form","Hidden Beauty","Explorer");
var homeSwatchArray = new Array("90YR 25/323","10BB 07/150","40YY 49/408","50YR 18/223","14YR 10/434");

//rotates the home images and links
function rotateHome() {
	var hiddenRotator = parseInt(getValue("hiddenRotator"));
	changeClass("homeRotatingText",rotateHomeArray[hiddenRotator]);
	changeClass("homeRotatingLink",rotateHomeArray[hiddenRotator]);
	hrefMe("homeRotatingLink",rotateHomeLinkArray[hiddenRotator]);
	if (hiddenRotator=="0") {
		valueMe("hiddenRotator",1);
	} else {
		valueMe("hiddenRotator",0);
	}
}

// changes the header background color
function home_imgHeader(c) {
	if (checkID("imgHeaderBlock")) {
		document.getElementById("imgHeaderBlock").style.background = matchArray(c,homeArray,homeHexArray);
		showMe("imgHeaderBlock");
	}
}

function home_homeText(c) {
	if (checkID("homeText")) {
		document.getElementById("homeText").className = "homeText "+c+"Text";
	}
}

// changes the title of the text area
function home_homeTitle(c) {
	if (c != "default") {
		if (checkID("homeTitle")) {
			document.getElementById("homeTitle").innerHTML = iconsDir(c+"Title");
		}
	} else {
		document.getElementById("homeTitle").innerHTML = "";
	}
}

// changes the data of the text area
function home_homeData(c) {
	for (x = 0; x < homeArray.length-1; x++) {
		if (homeArray[x]==c) {
			showMe(homeArray[x]+"Data");
		} else {
			hideMe(homeArray[x]+"Data");
		}
	}
}		


// puts the swatch text in the swatch
function home_swatchText(c) {
	if (checkID("swatchText")) {
		document.getElementById("swatchText").innerHTML = matchArray(c,homeArray,homeSwatchArray);
	}
}

// changes the swatch color and position
function home_swatch(c) {
	if (checkID("swatch")) {
		document.getElementById("swatch").className = "swatch "+c+"Swatch";
		document.getElementById("swatch").style.background=matchArray(c,homeArray,homeHexArray);
		if (c=="default") {
			document.getElementById("swatch").style.display="none";
		} else {
			document.getElementById("swatch").style.display="inline";
		}
	}
}

// changes the main image
function home_mainImage(c) {
	for (h = 0; h < homeArray.length; h++) {
		hideMe(homeArray[h]+"Main");
	}
	showMe(c+"Main");
}

// changes the mini images 
function homeMinis(c) {
	if (c != "default") {
		if (checkID("home1")) {
			document.getElementById("home1").innerHTML = imageDir(c+"Home1");
			document.getElementById("home1").style.display = "block";
		}
		if (checkID("home2")) {
			document.getElementById("home2").innerHTML = imageDir(c+"Home2");
			document.getElementById("home2").style.display = "block";
		}
	} else {
		document.getElementById("home1").style.display = "none";
		document.getElementById("home2").style.display = "none";
	}
}

function homeShade(c,start) {
	var isDefault = false;
	if (isHome) {
		home_imgHeader(c); // changes the header background color
	}
	home_homeText(c); // changes the background color for the home text
	home_mainImage(c); // changes the main image

	if (!start) {
		home_homeTitle(c); // changes the title of the text area
		home_homeData(c); // changes the data of the text area
		home_swatchText(c); // puts the swatch text in the swatch
		home_swatch(c); // changes the swatch color and position
		homeMinis(c); // puts the mini images 
	}
}

function goHere(u) {
	window.location.href=u;
}

function homeShadeNav() {
	var html = "";
	html += "<ul>";
	for (c = 0; c < homeArray.length-1; c++) {
		html += "<li style=\"background-color:"+homeHexArray[c]+";\" onClick=\"goHere('"+homeHrefArray[c]+"')\" onMouseOver=\"homeShade('"+homeArray[c]+"',false)\" onMouseOut=\"homeShade('default',false);\">";
			html += "<p>";
//				html += "<a href=\""+homeHrefArray[c]+"\">";
					html += "<img src=\"../graphics/"+lang+"/icons/"+homeArray[c]+"Shade.gif\" alt=\""+homeNameArray[c]+"\" border=\"0\">";
//				html += "</a>";
			html += "</p>";
		html += "</li>";
	}
	html += "</ul>";
	document.write(html);
}



