/*var prefsLoaded = false;
var defaultFontSize = 100;
var currentFontSize = defaultFontSize;

function revertStyles(){

	currentFontSize = defaultFontSize;
	changeFontSize(0);

}

function toggleColors(){
	if(currentStyle == "White"){
		setColor("Black");
	}else{
		setColor("White");
	}
}

function changeFontSize(sizeDifference){
	currentFontSize = parseInt(currentFontSize) + parseInt(sizeDifference * 5);

	if(currentFontSize > 115){
		currentFontSize = 115;
	}else if(currentFontSize < 60){
		currentFontSize = 60;
	}

	setFontSize(currentFontSize);
};

function setFontSize(fontSize){
	var stObj = (document.getElementById) ? document.getElementById('virtual') : document.all('virtual');
	document.body.style.fontSize = fontSize + '%';
	
	//alert (document.body.style.fontSize);
};


/*function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name+"="+value+expires+"; path=/";
};

function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
};

window.onload = setUserOptions;

function setUserOptions(){
	if(!prefsLoaded){

		cookie = readCookie("fontSize");
		currentFontSize = cookie ? cookie : defaultFontSize;
		setFontSize(currentFontSize);
		
		prefsLoaded = true;
	}

}

window.onunload = saveSettings;

function saveSettings()
{
  createCookie("fontSize", currentFontSize, 365);
}
*/	
		function submitenter(myfield,e)
		{
		var keycode;
		if (window.event) keycode = window.event.keyCode;
		else if (e) keycode = e.which;
		else return true;
		
		if (keycode == 13)
		   {
		   myfield.form.submit();
		   return false;
		   }
		else
		   return true;
		}
		function changecss(theClass,element,value) {
			//documentation for this script at http://www.shawnolson.net/a/503/
		 	var cssRules;
		 	if (document.all) {
		  		cssRules = 'rules';
		 	}
		 	else if (document.getElementById) {
		  	cssRules = 'cssRules';
		 	}
		 	for (var S = 0; S < document.styleSheets.length; S++){
		  		for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
		   			if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
						document.styleSheets[S][cssRules][R].style[element] = value;
						
		   			}
		  		}
		 	}
		}
		function trocaFonte(opt) {
			var x;
			x = parseInt(opt);
			switch (x) {
				case 1: 
					changecss('#texto_editorial','fontSize','11px');
					changecss('#editorial_index','fontSize','11px');
					/*changecss('#centroSite .menu','fontSize','10px');
					changecss('#topoSite .tamanhoFonte .btFonte1','background','url(img/fonte1_on.gif)');
					changecss('#topoSite .tamanhoFonte .btFonte2','background','url(img/fonte2.gif)');
					changecss('#topoSite .tamanhoFonte .btFonte3','background','url(img/fonte3.gif)');*/
					break;
				case 2:		
					changecss('#texto_editorial','fontSize','14px'); 
					changecss('#editorial_index','fontSize','14px');
					/*changecss('#centroSite .menu','fontSize','13px'); 
					changecss('#topoSite .tamanhoFonte .btFonte2','background','url(img/fonte2_on.gif)');
					changecss('#topoSite .tamanhoFonte .btFonte1','background','url(img/fonte1.gif)');
					changecss('#topoSite .tamanhoFonte .btFonte3','background','url(img/fonte3.gif)');*/
					break;
				case 3:
					changecss('#texto_editorial','fontSize','18px');
					changecss('#editorial_index','fontSize','18px');
					/*changecss('#centroSite .menu','fontSize','17px'); 
					changecss('#topoSite .tamanhoFonte .btFonte3','background','url(img/fonte3_on.gif)');
					changecss('#topoSite .tamanhoFonte .btFonte1','background','url(img/fonte1.gif)');
					changecss('#topoSite .tamanhoFonte .btFonte2','background','url(img/fonte2.gif)');*/
					break;				
			}
		}
