function MenuOn (Objeto) {
	Objeto.style.background ='#ffffff';
}

function MenuOff (Objeto) {
	Objeto.style.background = '#cc6600';
}

function MenuRevista (Objeto) {
	Objeto.style.background = '#ffff33';
}

function setStyleByClass(t,c,p,v){
	var elements;
	if(t == '*') {
		// '*' not supported by IE/Win 5.5 and below
		elements = (ie) ? document.all : document.getElementsByTagName('*');
	} else {
		elements = document.getElementsByTagName(t);
	}
	for(var i = 0; i < elements.length; i++){
		var node = elements.item(i);
		for(var j = 0; j < node.attributes.length; j++) {
			if(node.attributes.item(j).nodeName == 'class') {
				if(node.attributes.item(j).nodeValue == c) {
					eval('node.style.' + p + " = '" + v + "'");
				}
			}
		}
	}
}

function setStyleByTag(e, p, v, g) {
	if(g) {
		var elements = document.getElementsByTagName(e);
		for(var i = 0; i < elements.length; i++) {
			elements.item(i).style[p] = v;
		}
	} else {
		var sheets = document.styleSheets;
		if(sheets.length > 0) {
			for(var i = 0; i < sheets.length; i++) {
				var rules = sheets[i].cssRules;
				if(rules.length > 0) {
					for(var j = 0; j < rules.length; j++) {
						var s = rules[j].style;
						// selectorText broken in NS 6/Mozilla: see
						// http://bugzilla.mozilla.org/show_bug.cgi?id=51944
						ugly_selectorText_workaround();
						if(allStyleRules) {
							if(allStyleRules[j] == e) {
								s[p] = v;
							}
						} else {
							// use the native selectorText and style stuff
							if(((s[p] != "") && (s[p] != null)) &&
							   (rules[j].selectorText == e)) {
								s[p] = v;
							}
						}
					}
				}
			}
		}
	}
}

function Ventana () {
  var myWidth = 0, myHeight = 0;
  if (typeof( window.innerWidth ) == 'number') {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  setStyleByTag ("div", "height", parseInt (myHeight - 200) + "px", 1);
  setStyleByTag ("div", "width", "100%", 1);
  setStyleByClass ("td", "texto", "height", parseInt (myHeight - 200) + "px");
  setStyleByClass ("td", "texto", "width", "100%");
  setStyleByClass ("p", "firma", "padding", parseInt (myHeight - 520) + "px 10px 10px 10px");
}

window.onresize = Ventana;

