// JavaScript Document

/*

function chooseColorGraphic( color, graphic ) {
	// assumes color dropdown menu has id "color"
	// assumes graphic dropdown menu has id "graphic"
   	document.getElementById("option[409]").value = color;
	document.getElementById("option[410]").value = graphic;	
	tb_remove();
}
*/

function chooseColorGraphic( color, graphic ) {
	// assumes color dropdown menu has id "color"
	// assumes graphic dropdown menu has id "graphic"
   	document.getElementsByName("option[409]")[0].value = color;
	document.getElementsByName("option[410]")[0].value = graphic;	
	tb_remove();
}

function chooseColorBorderGraphic( color, border, graphic ) {
	// assumes color dropdown menu has id "color"
	// assumes border dropdown menu has id "border"
	// assumes graphic dropdown menu has id "graphic"
	document.getElementByName("option[409]").value = color;
	document.getElementByName("option[425]").value = border;
	document.getElementByName("option[410]").value = graphic;
	tb_remove();
}

//Paul - code
function changeInnerHTML ( theID, theContent ) {
	if(theID=='bgColorPrint')
	{
			if(theContent==1314)
		document.getElementById( theID ).innerHTML = "Baby Blue";
	else if(theContent==1315)
		document.getElementById( theID ).innerHTML = "Sky Blue";
	else if(theContent==1316)
		document.getElementById( theID ).innerHTML = "Peacock";
	else if(theContent==1336)
		document.getElementById( theID ).innerHTML = "Baby Pink";
	else if(theContent==1337)
		document.getElementById( theID ).innerHTML = "Candy";
	else if(theContent==1338)
		document.getElementById( theID ).innerHTML = "Hot Pink";
	else if(theContent==1339)
		document.getElementById( theID ).innerHTML = "Pale Green";
	else if(theContent==1341)
		document.getElementById( theID ).innerHTML = "Garden Green";
	else if(theContent==1342)
		document.getElementById( theID ).innerHTML = "Lavender";
	else if(theContent==1343)
		document.getElementById( theID ).innerHTML = "Violet";
	else if(theContent==1344)
		document.getElementById( theID ).innerHTML = "Plum";
	else if(theContent==1345)
		document.getElementById( theID ).innerHTML = "Aqua";
	else if(theContent==1346)
		document.getElementById( theID ).innerHTML = "Turquoise";
	else if(theContent==1347)
		document.getElementById( theID ).innerHTML = "Marine";
	else if(theContent==1348)
		document.getElementById( theID ).innerHTML = "Lemon";
	else if(theContent==1349)
		document.getElementById( theID ).innerHTML = "Tangerine";
	else if(theContent==1350)
		document.getElementById( theID ).innerHTML = "Apricot";
	else if(theContent==1351)
		document.getElementById( theID ).innerHTML = "Latte";
	else if(theContent==1352)
		document.getElementById( theID ).innerHTML = "Cafe";
	else if(theContent==1353)
		document.getElementById( theID ).innerHTML = "Mocha";
	else if(theContent==1354)
		document.getElementById( theID ).innerHTML = "Bubble Gum";
	else if(theContent==1355)
		document.getElementById( theID ).innerHTML = "Lipstick";
	else if(theContent==1356)
		document.getElementById( theID ).innerHTML = "Brick";
	else if(theContent==1357)
		document.getElementById( theID ).innerHTML = "Dusk";
	else if(theContent==1358)
		document.getElementById( theID ).innerHTML = "Moonlight";
	else if(theContent==1359)
		document.getElementById( theID ).innerHTML = "Midnight";
	else if(theContent==1360)
		document.getElementById( theID ).innerHTML = "Cream";
	else if(theContent==1361)
		document.getElementById( theID ).innerHTML = "Desert Tan";
	else if(theContent==1362)
		document.getElementById( theID ).innerHTML = "Golden Jewel";
	else if(theContent==1363)
		document.getElementById( theID ).innerHTML = "Soft Pastel";
	else if(theContent==1364)
		document.getElementById( theID ).innerHTML = "Classic";
	else document.getElementById( theID ).innerHTML = theContent;
	}else
	document.getElementById( theID ).innerHTML = theContent;
}
/* Old Code
function changeInnerHTML ( theID, theContent ) {
{
	document.getElementById( theID ).innerHTML = theContent;
}*/
function GetWidth() {
	var x = 0;
	if (self.innerWidth) {
		x = self.innerWidth;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		x = document.documentElement.clientWidth;
	} else if (document.body) {
		x = document.body.clientWidth;
	}
	return x;
} //function GetWidth() {

function GetHeight() {
	var y = 0;
	if (self.innerHeight) {
		y = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		y = document.documentElement.clientHeight;
	} else if (document.body) {
		 y = document.body.clientHeight;
	}
	return y;
} //function GetHeight() {

function hideBlacks() {
	// if black background is chosen, this hides all 
	// graphics that are mostly black. These
	// will be invisible on a black background anyway
	//alert("hiding dark graphics");
	var totalGraphics = 52;
	for ( var i = 0; i < 52; i++ ) {
		if ( document.getElementById("hideBlack" + i) ) {
			document.getElementById("hideBlack" + i).style.display = "none";
		}
	}
}

function showBlacks() {
	// shows all graphics that are mostly black
	//alert("unhiding dark graphics");
	var totalGraphics = 52;
	for ( var i = 0; i < 52; i++ ) {
		if ( document.getElementById("hideBlack" + i) ) {
			document.getElementById("hideBlack" + i).style.display = "";
		}
	}
}

function hideLights() {
	// if light background is chosen, this hides all 
	// graphics that are mostly light. These
	// will be invisible on a light background anyway
	//alert("hiding dark graphics");
	var totalGraphics = 52;
	for ( var i = 0; i < 52; i++ ) {
		if ( document.getElementById("hideLight" + i) ) {
			document.getElementById("hideLight" + i).style.display = "none";
		}
	}
}

function showLights() {
	// shows all graphics that are mostly light
	//alert("unhiding dark graphics");
	var totalGraphics = 52;
	for ( var i = 0; i < 52; i++ ) {
		if ( document.getElementById("hideLight" + i) ) {
			document.getElementById("hideLight" + i).style.display = "";
		}
	}
}
