/*
* If user hover a button, this button is going to change it state
*/
function buttonHOver(){
	var x = document.body.getElementsByTagName('button');
	for (var i=0;i<x.length;i++){
			addEvent(x[i], 'mouseover', buttActiveState);
			addEvent(x[i], 'mouseout', buttInactiveState);
	}
}//end function buttonHOver

function buttActiveState(){
	this.className = "buttActiveState"; 
}
function buttInactiveState(){
	this.className = "buttInactiveState"; 
}
function makeImageTransparent(obj, count, id){
	obj.className += ' selected';
	document.getElementById(count).style.color = '#E92D3B';
	if(id != ''){
		document.getElementById(id).className = 'selected';
	}
}
function removeImageTransparent(obj, count, id){
	obj.className = 'mask';
	document.getElementById(count).style.color = '#999';
	if(id != ''){
		document.getElementById(id).className = '';
	}
}
function setCat(obj, count){
	 makeImageTransparent(document.getElementById(obj), count, '');
}
function removeCat(obj, count){
	removeImageTransparent(document.getElementById(obj), count, '');
}

function scrollHeight(){
	isIE = navigator.userAgent.toLowerCase().indexOf("msie") > -1;
	var fixedHeight =  document.getElementById('fixed').offsetHeight;
	if (!isIE){
		document.getElementById('scroll').style.minHeight = (fixedHeight)+'px';
	}
	else {
		document.getElementById('scroll').style.height = (fixedHeight+18)+'px';
	}
}
