// JavaScript Document
function changedisplay(whatdiv) { // cambia por display block / none
	var thediv=document.getElementById(whatdiv);
	thedisplay=thediv.style.display;
	if (thedisplay=="none") {
		thedisplay="block";
	} else {
		thedisplay="none";
	}
	thediv.style.display=thedisplay;
}

function changedisplayasasked (whatdiv, usestyle, how) { // cambia a pedido
	//  manda parametros (nombre del id, que tipo de estilo aplicar, que valor aplicarle)
	var thediv=document.getElementById(whatdiv);
	str = 'thedisplay=thediv.style.'+usestyle;
	eval (str);
	// alert(thedisplay);
	if(thedisplay && thedisplay != how) thediv.style.usestyle=how;
	str = 'thediv.style.'+usestyle+'=\''+how+'\'';
	eval (str);
	
}


function hidediv(whatdiv,comdiv,bgimg1,bgimg2) { // primero visible, luego oculto
	var thediv=document.getElementById(whatdiv);
	var thecomdiv=document.getElementById(comdiv);
	thedisplay=thediv.style.display;
	if (thedisplay=="none") {
		thedisplay="inline";
		theimage="#FFFFFF url("+bgimg1+") no-repeat scroll left top";
	} else {
		thedisplay="none";
		theimage="#FFFFFF url("+bgimg2+") no-repeat scroll left top";
	}
	thediv.style.display=thedisplay;
	thecomdiv.style.background=theimage;
}

function hidediv2(whatdiv,comdiv,bgimg1,bgimg2) { // al reves
	var thediv=document.getElementById(whatdiv);
	var thecomdiv=document.getElementById(comdiv);
	thedisplay=thediv.style.display;
	if (thedisplay=="inline") {
		thedisplay="none";
		theimage="#FFFFFF url("+bgimg1+") no-repeat scroll left top";
	} else {
		thedisplay="inherit";
		theimage="#FFFFFF url("+bgimg2+") no-repeat scroll left top";
	}
	thediv.style.display=thedisplay;
	thecomdiv.style.background=theimage;
}
