function bookmarksite(title, url) {
	if (document.all)
		window.external.AddFavorite(url, title);
	else if (window.sidebar)
		window.sidebar.addPanel(title, url, "")
}

function openPopup(file,height,width,toolbars) {
	window.open(file, '', 'height=' +height+', width=' +width+', toolbar=no, directories=no, status=no, menubar=no, scrollbars='+toolbars+', resizable=no');
}

function blurForm(id,text) {
	var box = document.getElementById(id).value;
	if(box == '')
		return document.getElementById(id).value = text;
}

function focusForm(id,text) {
	var box = document.getElementById(id).value;
	if(box == text)
		return document.getElementById(id).value = '';
}

function alerta(msg) {
	$(document).ready(function() {
		var width = $(window).width();
		var	height = $(window).height();
		var left = (width-150)/2;
		var top = (height-32)/2;
		

		$("body").append('<div id="alerta" style="cursor:pointer; top:'+top+'px; left:'+left+'px">'+msg+'  <div style="position:relative; height:65px;"><div style="position:absolute; bottom:20px; right:0px"><span id="fechar" style="color:#FFF; font-weight:bolder; text-transform:uppercase; cursor:pointer">Fechar</span></div></div>   </div>');
		
		
		$("#alerta").click(function() {
			$("#alerta").animate(
				{"opacity":"0"},
				500,
				"linear",
				function(){ 
					$("#alerta").css({"display":"none"});
				} 
			);
		});
	});
}




// Banner rolante
function initStatLyr() {
	// args: id, left, top, w, h, duration of glide to location onscroll, acceleration factor
	// acceleration factor should be -1 to 1. -1 is full deceleration

	if(typeof window.Glider=="function") {
		var statLyr = new Glider("divGlide",null,null,null,null,0,-1);
		statLyr.show();
	}
}

window.onload=initStatLyr;
