// JavaScript Document
var min=8;
var max=25;
function increaseFontSize() {
	//var p = new Array();
//	alert("Bienvenido");
   var p = document.getElementsByTagName('p');
   //var p = document.getElementsByClassName('textos');
     //p = document.getElementsByClassName('textos');

	for( i=0 ; i < p.length; i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
	//  alert(s);
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
}
function decreaseFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }   
}


function changeStyles() { 
	var ie = false; 
	var ss = document.styleSheets; 
	if ( ss[0].rules )  {  
		ie = true;
		ss[0].cssRules = ss[0].rules;  
	} 
	for (i=0;i<ss[0].cssRules.length;i++) { 
		if (  ss[0].cssRules[i].selectorText.indexOf(".textos") > -1 ) { 
		   if ( ie ) { 
			 ss[0].removeRule(i); // this is a little iffy -- it assumes 
								  // that the "rules" collection that I 
								  // copied into "cssRules" was stored, 
								  // and is being returned, in the same 
								  // order.  Seems to work, but... :-) 
			 ss[0].addRule(".textos","color: red;", i); 
		   } else { 
			 ss[0].deleteRule(i); 
			 ss[0].insertRule(".textos { color: red; }", i); 
			} 
		} 
	} 
} 
  
