var img = "";
var pacity = 0;

function mouseover(id){
	img = id;
	changebgopacity(id,10); 
 
}
function mouseout(id){
 	img = "";
	changebgopacityout(id,pacity);
 
}
function changebgopacityout(id,value){
	if(img != id){
		opacity(value,id);
	 	if(value != 0){
	 		setTimeout("changebgopacityout('"+id+"',"+(value-10)+")",30); 
	 	}
	}
 
}

function changebgopacity(id,value){
	if(img == id){
		opacity(value,id);
	 	if(value <= 90){
	 	 	pacity = value+10;
	 		setTimeout("changebgopacity('"+id+"',"+(value+10)+")",40);
			
	 	}
	}
 
}
function opacity(opacity, id){
	var object = document.getElementById(id).style;
    if( /MSIE/.test(navigator.userAgent)){
		object.filter = "alpha(opacity=" + opacity + ")";
	}
	else{
	 	object.opacity = (opacity / 100); 
	}
}

