

function menucolor(id,col){
	x = document.getElementById(id);
	x.style.background = col;
}

function textclear(id, text){
x = document.getElementById(id);
	if (x.value == text){
	x.value = "";
	} else {
	}
}



var over= new Array();

function updateOpacity(id,direction){

	x = document.getElementById(id);



//IE CODE
	if (document.all){
//	alert(x.filters[0].opacity);

		if (direction == 0){
		over[id]=1;
		OpacityUp(id);

		} else {
		over[id]=0;
		OpacityDown(id);
		}

// OTHER BROWSERS CODE
	} else {

		if (direction == 0){
		over[id]=1;
		MozOpacityUp(id);

		} else {
		over[id]=0;
		MozOpacityDown(id);
		}


	}

}

function MozOpacityUp(id){

	x = document.getElementById(id);
	value= parseFloat(x.style.opacity);
	value+=0.04;
	x.style.opacity = String(value);
	x.style.MozOpacity = String(value) + "%;";


		if (over[id]==1){
		if (value < 1.00){
		var t = setTimeout("MozOpacityUp('" + id + "')",10);
		}
		}

}


function MozOpacityDown(id){

	x = document.getElementById(id);
	value= parseFloat(x.style.opacity);
	value-=0.01;
	x.style.opacity = String(value);
	x.style.MozOpacity = String(value) + "%;";

		if (over[id]==0){
		if (value > 0.00){
		var t = setTimeout("MozOpacityDown('" + id + "')",10);
		}
		}

}



function OpacityUp(id){

	x = document.getElementById(id);
	
	invalue = x.style.filter;
	
	invaluet = invalue.split("=");
	
	strlen = (invaluet[1].length)-1;
	value = parseInt(invaluet[1].substr(0,strlen),10);
	
	value+=4;
	

	x.style.filter = "alpha(opacity="+String(value)+")";


		if (over[id]==1){
		if (value < 100){
		var t = setTimeout("OpacityUp('" + id + "')",10);
		}
		}

}


function OpacityDown(id){

	x = document.getElementById(id);
	
	invalue = x.style.filter;
	
	invaluet = invalue.split("=");
	
	strlen = (invaluet[1].length)-1;
	value = parseInt(invaluet[1].substr(0,strlen),10);
	
	value-=4;
	
	
	x.style.filter = "alpha(opacity="+String(value)+")";

		if (over[id]==0){
		if (value > 0){
		var t = setTimeout("OpacityDown('" + id + "')",10);
		}
		}

}


function printpage() {
window.print();  
}

function emailpage(thelocation){
lovechild = window.open("send_to_a_friend.php?uri=" + thelocation,"babywindow","height=480,width=640,toobar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0");
}
