

function simpleShowHide(objeto){

	var obj = document.getElementById(objeto);

	if(obj.style.display == 'none' || !obj.style.display) {

		obj.style.display = 'inline';

	} else {

		obj.style.display = 'none';

	}

}



var getStyle = function(o, p){

	return o.currentStyle ? o.currentStyle[p.replace(/-\w/g, function(a){

		return a.charAt(1).toUpperCase();

	})] : window.getComputedStyle ? document.defaultView.getComputedStyle(o, null).getPropertyValue(p) : null;

};



function showBox(img, id, on, off){

	marca_show(id);
	var o = ge(id), f = 10, old = o.timer ? o.timer.current : 0, s = o.style,

	show = (new RegExp(on + '$')).test(img.src), t = new TimeLine();

	if(o.timer){

		show = !show;

		o.timer.stop();

	}

	o.timer = t;

	t.h = o.scrollHeight;

	t.OEF = function(c){

		c = Math.abs(+show - c / f);

		s.height = (this.h * c >> 0) + "px";

		s.opacity = c;

		s.filter = "alpha(opacity=" + (c * 100) + ")";

	};

	t.onStart = function(){

		s.overflow = "hidden";

	};

	t.onStop = function(){

		o.timer = null;

		img.src = [on, off][+show];

	};

	t.start(120, f, old ? f - old : 0);

}

function showBox2(img, id, on, off){

	var o = ge(id), s = o.style,

	show = (new RegExp(on + '$')).test(img.src), t = new TimeLine();

	img.src = [on, off][+show];

	s.display = ["", "none"][+show];		

}

/*---------------------------------*/
var xmlhttp;
function marca_show(divshow)
{
	var body = ""; 	
	if (window.XMLHttpRequest) { 
    	xmlhttp = new XMLHttpRequest(); 
   	} else if (window.ActiveXObject) { 
     	xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
   	} else { 
       	alert("Seu navegador n&atilde;o suporta XMLHttpRequest."); 
    	return; 
   	}
   	pag = 'marca_show.php?divshow='+divshow;
    xmlhttp.open("GET", pag, true); 
    xmlhttp.onreadystatechange = processmarca_show; 
    xmlhttp.send(null); 
}

function processmarca_show() 
{ 
     if (xmlhttp.readyState == 1) 
	 {        
		
	 }
	if (xmlhttp.readyState == 4) 
	{ 
	   if (xmlhttp.status == 200) 
	   {            
		//	alert(xmlhttp.responseText);  
      } else { 
          //alert("Problemas ao carregar o arquivo.");
		  
      } 
    } 
}

function showBoxclose(img, id, on, off){

	var o = ge(id), f = 10, old = o.timer ? o.timer.current : 0, s = o.style,

	show = (new RegExp(on + '$')).test(img.src), t = new TimeLine();

	if(o.timer){

		show = !show;

		o.timer.stop();

	}

	o.timer = t;

	t.h = o.scrollHeight;

	t.OEF = function(c){

		c = Math.abs(+show - c / f);

		s.height = (this.h * c >> 0) + "px";

		s.opacity = c;

		s.filter = "alpha(opacity=" + (c * 100) + ")";

	};

	t.onStart = function(){

		s.overflow = "hidden";

	};

	t.onStop = function(){

		o.timer = null;

		img.src = [on, off][+show];

	};

	t.start(120, f, old ? f - old : 0);

}

/*---------------------------------*/



try{

	document.execCommand("BackgroundImageCache",false,true);

}

catch(e){};



var getOffset = function(o){

	for(var r = {x: o.offsetLeft, y: o.offsetTop, h: o.offsetHeight, w: o.offsetWidth}; o = o.offsetParent;	r.x += o.offsetLeft, r.y += o.offsetTop);

	return r;

};

var getMouse = function(e){

	var w = window, b = document.body;

	return {

		x: e.clientX + (w.scrollX || b.scrollLeft || b.parentNode.scrollLeft || 0),

		y: e.clientY + (w.scrollY || b.scrollTop || b.parentNode.scrollTop || 0)

	};

};

function ge(n){

	return document.getElementById(n);

}

function ce(n){

	return document.createElement(n);

}



function popUp(url,x,y,hasScroll) {

	window.open(url,'popUp','status=yes,resizable=no,width='+x+',height='+y+',scrollbars='+hasScroll);

}



function MM_openBrWindow(theURL,winName,features) {

	window.open(theURL,winName,features);

}





function showHideFileBox(container,objeto) {

	var obj = document.getElementById(objeto);

	var up = document.getElementById("arrowup");

	var down = document.getElementById("arrowdown");



	if(obj.style.display=='none' || !obj.style.display) {

	obj.style.display='block';

	up.style.display='block';

	down.style.display='none';

	changeClass(container,'opened');

	} else {

	obj.style.display='none';

	up.style.display='none';

	down.style.display='block';

	changeClass(container,'closed');

	}

}



function changeClass(objeto,classe) {

	document.getElementById(objeto).className=classe;

}



function getPosFile(a,b) {

	var obj = document.getElementById(a);

	var alt = obj.offsetHeight + 10;

	var file=document.getElementById(b);

	file.style.top = alt + 'px';

}



function showHideMenu(a,b){

	var obj = document.getElementById(a);

	obj= obj.getElementsByTagName('div');

	i=0;

	while(i < obj.length){

	obj[i].style.display = "none";

	i++ ;

	}

	if(b) {

	document.getElementById(b).style.display='block';

	}

}





function buildFlash(swfLocation,x,y,swfMode, variaveis){

	var swfLocation, x, y, swfMode, variaveis;

	if(variaveis == undefined || variaveis.length < 1) variaveis = '';

	document.write(' <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+x+'" height="'+y+'">');

	document.write(' <param name="movie" value="'+swfLocation+'.swf'+variaveis+'" />');

	document.write(' <param name="quality" value="best" />');

	document.write(' <param name="wmode" value="'+swfMode+'" />');

	document.write(' <embed src="'+swfLocation+'.swf'+variaveis+'" wmode="'+swfMode+'" quality="best" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+x+'" height="'+y+'"></embed>');

	document.write(' </object>');

}



function changeBGPosition(objeto,opt) {

	var obj = document.getElementById(objeto);

	if(opt) {

	obj.style.backgroundPosition="0 -13px";

	} else {

	obj.style.backgroundPosition="0 0";

	}

}



function resizeContent(objeto) {

	var p = document.getElementById('publicidade-box');

	var c = document.getElementById(objeto);

	if(p.offsetHeight > c.offsetHeight) {

	c.style.height = (p.offsetHeight - 10) + 'px';

	}

}



function showHide(objeto,opcao) {

	var obj = document.getElementById(objeto);

	obj.style.display = opcao;

}



