function toggle( targetId ){
  if (document.getElementById){
  		target = document.getElementById( targetId );
  		mnoti = document.getElementById( 'noti' );
  		mservi = document.getElementById( 'servi' );
  		mclasi = document.getElementById( 'clasi' );
 		mhumor = document.getElementById( 'humor' );
		mnant = document.getElementById( 'nant' );

  			if (targetId == "noti"){
  				mnoti.style.display = "inline";
				mservi.style.display = "none";
  				mclasi.style.display = "none";
				mhumor.style.display = "none";
				mnant.style.display = "none";
  			}
			else if (targetId == "clasi"){
  				mnoti.style.display = "none";
				mservi.style.display = "none";
  				mclasi.style.display = "inline";
				mhumor.style.display = "none";
				mnant.style.display = "none";			
  			}
			else if (targetId == "servi"){
  				mnoti.style.display = "none";
				mservi.style.display = "inline";
				mclasi.style.display = "none";
				mhumor.style.display = "none";
				mnant.style.display = "none";
  			}
			else if (targetId == "humor"){
  				mnoti.style.display = "none";
				mservi.style.display = "none";
  				mclasi.style.display = "none";
				mhumor.style.display = "inline";
				mnant.style.display = "none";
  			}
			else if (targetId == "nant"){
  				mnoti.style.display = "none";
				mservi.style.display = "none";
  				mclasi.style.display = "none";
				mhumor.style.display = "none";
				mnant.style.display = "inline";
  			}
  	}
}

// FONT SIZE MANAGEMENT 
function FindObj(n, d) { //v4.01
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=FindObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function ChangeProp(objName,x,theProp,theValue) { //v6.0
var obj = FindObj(objName);
if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
if (theValue == true || theValue == false)
eval("obj."+theProp+"="+theValue);
else eval("obj."+theProp+"='"+theValue+"'");
}
}

function LoadActualFontSize() {
tempArray = document.cookie.split(";");
for (tA = 0; tA < tempArray.length; tA++){
if (tempArray[tA].indexOf('fontSize') > -1){
fontSizeValue = tempArray[tA].split("=")
ACTUAL_FONTSIZE = parseInt(fontSizeValue[1]);
}
}
}

function SaveActualFontSize() {
var expire = new Date ();
expire.setTime (expire.getTime() + (6000 * 24 * 3600000));
expire = expire.toGMTString();
document.cookie="fontSize="+ACTUAL_FONTSIZE+"; path=/; expires="+expire;
}

function Bigger() {
ACTUAL_FONTSIZE = ACTUAL_FONTSIZE+1;
if (ACTUAL_FONTSIZE > LARGEST_FONTSIZE) { ACTUAL_FONTSIZE = LARGEST_FONTSIZE }
ChangeProp('texto','','style.fontSize',ACTUAL_FONTSIZE,'SPAN');
SaveActualFontSize();
}

function Smaller() {
ACTUAL_FONTSIZE = ACTUAL_FONTSIZE-1
if (ACTUAL_FONTSIZE < SMALLEST_FONTSIZE) { ACTUAL_FONTSIZE = SMALLEST_FONTSIZE }
ChangeProp('texto','','style.fontSize',ACTUAL_FONTSIZE,'SPAN');
SaveActualFontSize();
}

ACTUAL_FONTSIZE = 13;
SMALLEST_FONTSIZE = 11;
LARGEST_FONTSIZE = 20;

// POPUP
function Popup(url,name,width,height,resize,scroll) {
var dialogWin = new Object();
dialogWin.width = width;
dialogWin.height = height;
now = new Date();
var millis=now.getTime();
var mstr=""+millis;
if (navigator.appName == "Netscape") {
dialogWin.left = window.screenX + ((window.outerWidth - dialogWin.width) / 2);
dialogWin.top = window.screenY + ((window.outerHeight - dialogWin.height) / 2);
var attr = 'screenX=' + dialogWin.left + ',screenY=' + dialogWin.top + ',resizable=' + resize + ',width=' + dialogWin.width + ',height=' + dialogWin.height + ',scrollbars=' + scroll + ',menubar=no,location=no,toolbar=no,status=no,directories=no';
} else if (document.all) {
dialogWin.left = (screen.width - dialogWin.width) / 2;
dialogWin.top = (screen.height - dialogWin.height) / 2;
var attr = 'left=' + dialogWin.left + ',top=' + dialogWin.top + ',resizable=' + resize + ',width=' + dialogWin.width + ',height=' + dialogWin.height + ',scrollbars=' + scroll + ',menubar=no,location=no,toolbar=no,status=no,directories=no';
}
window.open(url,name,attr);
}
