function changeBox(box)
{
	var boxes = ['Ultimas', 'MaisVisitadas'];
	var bimgs = ['ultimas', 'maisvisitadas'];
	var dsp, i;
	for(i = 0; i < boxes.length; i++)
	{
		document.getElementById('guide' + boxes[i]).className = '';
		document.getElementById('content' + boxes[i]).style.display = 'none';
	}
	document.getElementById('guide' + box).className = 'selected';
	document.getElementById('content' + box).style.display = 'block';
	void(0);
}

function markMe(obj)
{
	var label = obj.parentNode;
	var bool = obj.checked;
	label.className = bool ? 'lblMark' : 'lblUnmark';
	
	void(0);
}

var textSize = 1.0;

function fontSize()
{
	var mode = arguments[0];
	var node = document.getElementById('article');
	textSize = (mode > 0) ? parseFloat(textSize + 0.2) : (mode < 0 ? (textSize > 0.5 ? parseFloat(textSize - 0.2) : textSize) : 1.0);
	node.style.fontSize = textSize + 'em';
	void(0);
}

function swapStatus(id)
{
	id = document.getElementById('arquivo-' + id);
	id.style.display = id.style.display != 'block' ? 'block' : 'none';
	void(0);
}

function loadSwf(fileName, lenX, lenY)
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+lenX+'" height="'+lenY+'">');
	document.write('<param name="allowScriptAccess" value="sameDomain" /><param name="wmode" value="transparent" />');
	document.write('<param name="movie" value="'+fileName+'" /><param name="quality" value="best" /><param name="bgcolor" value="#FFFFFF" /><embed src="'+fileName+'" wmode="transparent" quality="best" width="'+lenX+'" height="'+lenY+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

function popup(a, b, c, d, e)
{
	var page = a;
	var name = b;
	var lenX = c;
	var lenY = d;
	var posX = (screen.width / 2) - (lenX / 2);
	var posY = (screen.height / 2) - (lenY / 2);
	var scrl = e;
	var attr = 'width=' + lenX + ',height=' + lenY + ',top=' + posY + ',left=' + posX + ',scrollbars=' + scrl;
	window.open(page, name, attr);
	void(0);
}

function jumpMenu(targ,selObj,restore){
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}

function textCounter(field, countfield, maxlimit)
{
	countfield = document.getElementById(countfield);
	if (field.value.length > maxlimit) {
		field.value = field.value.substring(0, maxlimit);
	}
	countfield.innerHTML = maxlimit - field.value.length;
}
