				
/*desplegables*/
var iTimerCount = 1;
var mTimer = setTimeout("MenuTimeOut()", 500);

function MenuMouseMove() {
	iTimerCount = 1;
}

function OcultaMenu(){
	document.getElementById("csmenu2").style.display = "none";
}

function MenuClick() {
	iTimerCount = 1;
	document.getElementById("csmenu2").style.display = "inline";
	MenuTimeOut();
}

function MenuTimeOut() {
	if (!document) iTimerCount = 1;
	else if (!document.getElementById("csmenu2")) iTimerCount = 1;
	else if (!document.getElementById("csmenu2").style) iTimerCount = 1;
	else if (!document.getElementById("csmenu2").style.display) iTimerCount = 1;

	if (iTimerCount > 10) {
		document.getElementById("csmenu2").style.display = "none";
	} else {
		iTimerCount++;
		mTimer = setTimeout("MenuTimeOut()", 500);
	}
}


function CambiaClassName(pObj, pClassName) {
	var eEle = document.getElementById(pObj);
	if (!eEle) return false;
	if (!eEle.className) return false;
	eEle.className = pClassName;
	return true;
}

function AddFavoritos() {
	if (window.external) {
		window.external.AddFavorite(document.location, document.title);
	} else {
		alert("Presione CTRL + D para aņadirnos a favoritos");
	}
}

function EstablecerStyleById(pIdElement, pStyleName, pStyleValue) {
	if (!CogerObjById(pIdElement)) return false;
	if (!document.getElementById(pIdElement).style) return false;
	eval("document.getElementById(\"" + pIdElement + "\").style." + pStyleName + "=\"" + pStyleValue + "\"");
}

function CogerObjById(pIdElement) {
	if (!document.getElementById) return null;
	return document.getElementById(pIdElement);
}



function AmpliarAjax(pTitulo, pImg) {
  Dialog.alert("<img src=\"" + pImg  + "\" />", 
	 	{title: pTitulo, height:450, width:650, className: "alphacube", okLabel: "Cerrar", 
		buttonClass: "btn01", id: "dlgfckeditor", 
		ok:function(win) {return true;} });
	
}
