// Fonction d'acces rapide

function goToSd(_serverId) {
	if (_serverId != "" && _serverId != undefined) {
		if (_serverId == "-1") window.location.href="/liste/serveurs/?page=command";
		else	window.location.href="/serveurs/statut/?sd="+_serverId;
	}
}

// Fonction de changement de couleur

function fadeColor(_element, _toColor) {
	var thisElement = document.getElementById(_element);
	var _from = thisElement.style.backgroundColor;
	var attributes = {backgroundColor: { from: _from, to:  _toColor }};

	var anim = new YAHOO.util.ColorAnim(_element, attributes, 0.3);
	anim.animate();
}

function fadeBorder(_element, _toColor) {
	var thisElement = document.getElementById(_element);
	var _from = thisElement.style.borderColor;
	var attributes = {borderColor: { from: '3a8041', to:  _toColor }};
   
	var anim = new YAHOO.util.ColorAnim(_element, attributes, 0.3);
	anim.animate();
}

function Changediv(id,flagit) {
        if (flagit=="1"){
                if (document.layers) document.layers[''+id+''].visibility = "show"
                else if (document.all) document.all[''+id+''].style.visibility = "visible"
                else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"
}
else
        if (flagit=="0"){
                if (document.layers) document.layers[''+id+''].visibility = "hide"
                else if (document.all) document.all[''+id+''].style.visibility = "hidden"
                else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden"
        }
}


function show_fieldset(fieldset){
  document.getElementById("fieldset1").style.display = "none";
  document.getElementById("fieldset2").style.display = "none";
  document.getElementById("fieldset3").style.display = "none";
  document.getElementById("fieldset4").style.display = "none";
  document.getElementById(fieldset).style.display = "block";
}
