// JavaScript Document
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=restore;
}

function addEvent(o, evType, func, useCapture)
{
   if(o.addEventListener)
        o.addEventListener(evType, func, useCapture);
	else if(o.attachEvent)
        o.attachEvent("on" + evType, func);
	else
	    alert("Handler could not be attached");
}

function getPosicaoElemento(elemID){
    var offsetTrail = document.getElementById(elemID);
    var offsetLeft = 0;
    var offsetTop = 0;
    while (offsetTrail) {
        offsetLeft += offsetTrail.offsetLeft;
        offsetTop += offsetTrail.offsetTop;
        offsetTrail = offsetTrail.offsetParent;
    }
    if (navigator.userAgent.indexOf("Mac") != -1 && typeof document.body.leftMargin != "undefined") {
        offsetLeft += document.body.leftMargin;
        offsetTop += document.body.topMargin;
    }
    return {left:offsetLeft, top:offsetTop};
}


function resolution(){
	if(screen.width < 1024){
		document.getElementById("principal").style.display="table";
	}
}


function pureswf(url,width,height,wm){

document.write("<object type='application/x-shockwave-flash' data='"+url+"' width='"+width+"' height='"+height+"'>");
document.write("<param name='movie' value='"+url+"'>");
document.write("<param name='quality' value='high'>");
document.write("<param name='wmode' value='"+wm+"'>");
document.write("<param name='SCALE' value='exactfit'>");
document.write("<param name='menu' value='false'>");
document.write("</object>");

}



function abrejanela(url, width, height, scroll){

	return window.open(url,'public','width='+width+', height='+height+', scrollbars='+scroll+', top=0, left=0');

}


function opengallery(url){

	return window.open(url,'big','scrollbars=yes,fullscreen=yes');

}

function faleconosco(height,width){

	window.open('','janela','toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,height='+height+',width='+width+'');

}

function confirmation(txt,url) {
	var answer = confirm(txt)
	if (answer){
		window.location = url;
	}
	else{
		return false;
	}
}

function Contar(Campo){
	if((250-Campo.value.length) <= 0){
	   Campo.value = Campo.value.substr(0,250);
	}
	document.getElementById("Qtd").innerHTML = 250-Campo.value.length;
}


function acerta_full_banner()
{
	if (document.getElementById("full_ban_superior")) {
	  var FullBanner = document.getElementById("full_ban_superior").getElementsByTagName('div')[0]
	
		if (document.getElementById("full_ban_superior").className == '468x150') {
			FullBanner.onmouseover = function() {
				this.style.clip = 'rect(auto auto auto auto)'
				this.parentNode.style.height = 170
			}
			FullBanner.onmouseout = function() {
				this.style.clip = 'rect(auto auto 60 auto)'
				this.parentNode.style.height = '60px'
			}
		}
	}
}


window.onload = function(){acerta_full_banner()}