// JavaScript Document
var lim=0;
var color;
var raid = "blanco";
var objFont;

function getNaveg() {
	//detectando Mozilla, Netscape, Safari u Opera
	if (window.clientInformation == undefined) {
		data_naveg = window.navigator.appName;
	}else{ //sino es internet explorer
		data_naveg = window.clientInformation.appName;
	}
	return data_naveg;
}




 var tgs = new Array( 'div','td','tr','img','table','a','h4');
 var szs = new Array( 'xx-small','x-small','small','medium','large','x-large','xx-large' );
 var startSz = 2;
 function tamanosize( trgt,inc ) {
	 if (!document.getElementById) return
	 var d = document,cEl = null,sz = startSz,i,j,cTags;
	 sz += inc;
	 if ( sz < 0 ) sz = 0;
	 if ( sz > 6 ) sz = 6;
	 startSz = sz;
	 if (!( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];
	 cEl.style.fontSize = szs[ sz ];
	 for ( i = 0 ; i < tgs.length ; i++ ) {
	 	cTags = cEl.getElementsByTagName( tgs[ i ] );
	 	for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
	 }
 }
 

function addSize() {
	naveg = getNaveg();
	if (naveg == "Microsoft Internet Explorer") {
		objFont = document.styleSheets[0].rules[53].style.fontSize;
	}else{
		objFont = document.styleSheets[0].cssRules[53].style.fontSize;
	}
	tam_fuente = parseInt(objFont);
	if (lim<1) {
		nTam_fuente = tam_fuente + 2;
		nObjFont = nTam_fuente.toString();
		uObjFont = nObjFont+"px";
		if (naveg == "Microsoft Internet Explorer") {
			document.styleSheets[0].rules[52].style.fontSize = uObjFont;
			document.styleSheets[0].rules[53].style.fontSize = uObjFont;
			document.styleSheets[0].rules[38].style.fontSize = uObjFont;
			document.styleSheets[0].rules[54].style.fontSize = uObjFont;
			document.styleSheets[0].rules[63].style.fontSize = uObjFont;
			document.styleSheets[0].rules[65].style.fontSize = uObjFont;
			document.styleSheets[0].rules[67].style.fontSize = uObjFont;
		}else{
			document.styleSheets[0].cssRules[52].style.fontSize = uObjFont;
			document.styleSheets[0].cssRules[53].style.fontSize = uObjFont;
			document.styleSheets[0].cssRules[38].style.fontSize = uObjFont;
			document.styleSheets[0].cssRules[54].style.fontSize = uObjFont;
			document.styleSheets[0].cssRules[63].style.fontSize = uObjFont;
			document.styleSheets[0].cssRules[65].style.fontSize = uObjFont;
			document.styleSheets[0].cssRules[67].style.fontSize = uObjFont;
		}
		lim++;
	}else{
		if (naveg == "Microsoft Internet Explorer") {
			document.styleSheets[0].rules[52].style.fontSize = "15px";
			document.styleSheets[0].rules[53].style.fontSize = "15px"
			document.styleSheets[0].rules[38].style.fontSize = "15px";
			document.styleSheets[0].rules[54].style.fontSize = "15px";
			document.styleSheets[0].rules[63].style.fontSize = "15px";
			document.styleSheets[0].rules[65].style.fontSize = "15px";
			document.styleSheets[0].rules[67].style.fontSize = "15px";
		}else{
			document.styleSheets[0].cssRules[52].style.fontSize = "15px";
			document.styleSheets[0].cssRules[53].style.fontSize = "15px";
			document.styleSheets[0].cssRules[38].style.fontSize = "15px";
			document.styleSheets[0].cssRules[54].style.fontSize = "15px";
			document.styleSheets[0].cssRules[63].style.fontSize = "15px";
			document.styleSheets[0].cssRules[65].style.fontSize = "15px";
			document.styleSheets[0].cssRules[67].style.fontSize = "15px";
		}
		lim = 2;
	}
}

function restSize() {
	naveg = getNaveg();
	if (naveg == "Microsoft Internet Explorer") {
		objFont = document.styleSheets[0].rules[53].style.fontSize;
	}else{
		objFont = document.styleSheets[0].cssRules[53].style.fontSize;
	}
	tam_fuente = parseInt(objFont);
	if (lim>-2) {
		nTam_fuente = tam_fuente - 2;
		nObjFont = nTam_fuente.toString();
		uObjFont = nObjFont+"px";
		if (naveg == "Microsoft Internet Explorer") {
			document.styleSheets[0].rules[52].style.fontSize = uObjFont;
			document.styleSheets[0].rules[53].style.fontSize = uObjFont;
			document.styleSheets[0].rules[38].style.fontSize = uObjFont;
			document.styleSheets[0].rules[54].style.fontSize = uObjFont;
			document.styleSheets[0].rules[63].style.fontSize = uObjFont;
			document.styleSheets[0].rules[65].style.fontSize = uObjFont;
			document.styleSheets[0].rules[67].style.fontSize = uObjFont;
		}else{
			document.styleSheets[0].cssRules[52].style.fontSize = uObjFont;
			document.styleSheets[0].cssRules[53].style.fontSize = uObjFont;
			document.styleSheets[0].cssRules[38].style.fontSize = uObjFont;
			document.styleSheets[0].cssRules[54].style.fontSize = uObjFont;
			document.styleSheets[0].cssRules[63].style.fontSize = uObjFont;
			document.styleSheets[0].cssRules[65].style.fontSize = uObjFont;
			document.styleSheets[0].cssRules[67].style.fontSize = uObjFont;
		}
		lim--;
	}else{
		if (naveg == "Microsoft Internet Explorer") {
			document.styleSheets[0].rules[52].style.fontSize = "7px";
			document.styleSheets[0].rules[53].style.fontSize = "7px";
			document.styleSheets[0].rules[38].style.fontSize = "7px";
			document.styleSheets[0].rules[54].style.fontSize = "7px";
			document.styleSheets[0].rules[63].style.fontSize = "7px";
			document.styleSheets[0].rules[65].style.fontSize = "7px";
			document.styleSheets[0].rules[67].style.fontSize = "7px";
		}else{
			document.styleSheets[0].cssRules[52].style.fontSize = "7px";
			document.styleSheets[0].cssRules[53].style.fontSize = "7px";
			document.styleSheets[0].cssRules[38].style.fontSize = "7px";
			document.styleSheets[0].cssRules[54].style.fontSize = "7px";
			document.styleSheets[0].cssRules[63].style.fontSize = "7px";
			document.styleSheets[0].cssRules[65].style.fontSize = "7px";
			document.styleSheets[0].cssRules[67].style.fontSize = "7px";
		}
		lim = -2;
	}
}

function normal() {
	if (naveg == "Microsoft Internet Explorer") {
		document.styleSheets[0].rules[52].style.fontSize = "11px";
		document.styleSheets[0].rules[53].style.fontSize = "11px";
		document.styleSheets[0].rules[53].style.backgroundColor = "#E4E4E4";
		document.styleSheets[0].rules[54].style.fontSize = "11px";
		document.styleSheets[0].rules[54].style.backgroundColor = "#E4E4E4";
		document.styleSheets[0].rules[63].style.fontSize = "11px";
		document.styleSheets[0].rules[31].style.backgroundColor = "#E4E4E4";
		document.styleSheets[0].rules[38].style.fontSize = "11px";
		document.styleSheets[0].rules[65].style.fontSize = "11px";
		document.styleSheets[0].rules[43].style.backgroundColor = "#E4E4E4";
		document.styleSheets[0].rules[66].style.backgroundColor = "#E4E4E4";
		document.styleSheets[0].rules[67].style.fontSize = "11px";
	}else{
		document.styleSheets[0].cssRules[52].style.fontSize = "11px";
		document.styleSheets[0].cssRules[53].style.fontSize = "11px";
		document.styleSheets[0].cssRules[53].style.backgroundColor = "#E4E4E4";
		document.styleSheets[0].cssRules[54].style.fontSize = "11px";
		document.styleSheets[0].cssRules[54].style.backgroundColor = "#E4E4E4";
		document.styleSheets[0].cssRules[63].style.fontSize = "11px";
		document.styleSheets[0].cssRules[31].style.backgroundColor = "#E4E4E4";
		document.styleSheets[0].cssRules[38].style.fontSize = "11px";
		document.styleSheets[0].cssRules[65].style.fontSize = "11px";
		document.styleSheets[0].cssRules[43].style.backgroundColor = "#E4E4E4";
		document.styleSheets[0].cssRules[66].style.backgroundColor = "#E4E4E4";
		document.styleSheets[0].cssRules[67].style.fontSize = "11px";
	}
	lim = 0;
	color = "nulo";
}

function navStyle (val) {
	if (naveg == "Microsoft Internet Explorer") {
		document.styleSheets[0].rules[53].style.backgroundColor = val;
		document.styleSheets[0].rules[54].style.backgroundColor = val;
		document.styleSheets[0].rules[31].style.backgroundColor = val;
		document.styleSheets[0].rules[43].style.backgroundColor = val;
		document.styleSheets[0].rules[66].style.backgroundColor = val;
	}else{
		document.styleSheets[0].cssRules[53].style.backgroundColor = val;
		document.styleSheets[0].cssRules[54].style.backgroundColor = val;
		document.styleSheets[0].cssRules[31].style.backgroundColor = val;
		document.styleSheets[0].cssRules[43].style.backgroundColor = val;
		document.styleSheets[0].cssRules[66].style.backgroundColor = val;
	}
}

function doColor(envio) {
	naveg = getNaveg();
	if (envio != color) {
		if (envio == "amarillo") {
			color = envio;
			navStyle("#F5F2A1");
		}else if (envio == "gris") {
			color = envio;
			navStyle("#B9B9B9");
		}
	}else{
		navStyle("#E4E4E4");
		color = "nulo";
	}
}
