// JavaScript Document

function init()
{

	var userAgent = navigator.userAgent.toLowerCase();
	var isFirefox = ( userAgent != null && userAgent.indexOf( "firefox/" ) != -1 );

	var eiT = getEI("thumbs");
	eiT.style.backgroundColor = backColor;

	if(isFirefox)
	{
		document.getElementById("colorPickerDiv").style.marginLeft = "77%";
	}

	var eiC = getEI("comment");
	eiC.style.display = "none";

}

function showNote()
{

	var eiT = getEI("comment");
	if(eiT.style.display == "none")
	{
		eiT.style.display = "block";
	} else {
		eiT.style.display = "none";
	}
}

function getEI(eleId)
{
	this.id = eleId;
	this.ele = null;
	 
	if (document.getElementById) {
		this.ele = document.getElementById(eleId); 
	} else if (is.ie4up) {
		this.ele = document.all[eleId];
	} else if (is.nav4up) {
		this.ele = document.layers[eleId]; 
	} else {
		return false;
	}
	
	if (!this.ele) {
		return false;
	} else {
		return this.ele;
	}
		
}

function previous(bgColor){
	var eiT = getEI("top_1_i");
	var eiB = getEI("bot_1_i");
	var eiP = getEI("prev");
	
	eiT.style.backgroundColor = bgColor;
	eiB.style.backgroundColor = bgColor;
	eiP.style.backgroundColor = bgColor;
   document.prev.src="img/previous_active.gif";
}

function prev_reset(){
	var eiT = getEI("top_1_i");
	var eiB = getEI("bot_1_i");
	var eiP = getEI("prev");
	
	eiT.style.backgroundColor = '#FFFFFF';
	eiB.style.backgroundColor = '#FFFFFF';
	eiP.style.backgroundColor = '#FFFFFF';
	document.prev.src="img/previous_inactive.gif";
}

function inext(bgColor){
	var eiT = getEI("top_2_i");
	var eiB = getEI("bot_2_i");
	var eiN = getEI("next");

	eiT.style.backgroundColor = bgColor;
	eiB.style.backgroundColor = bgColor;
	eiN.style.backgroundColor = bgColor;
	document.next.src="img/next_active.gif";
}

function inext_reset(){
	var eiT = getEI("top_2_i");
	var eiB = getEI("bot_2_i");
	var eiN = getEI("next");
	
	eiT.style.backgroundColor = '#FFFFFF';
	eiB.style.backgroundColor = '#FFFFFF';
	eiN.style.backgroundColor = '#FFFFFF';
	document.next.src="img/next_inactive.gif";
}

