try{xmlhttp=new XMLHttpRequest}catch(ee){try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){xmlhttp=false}}}
function fxmlhttp(_,q){_.onreadystatechange=function(){if(_.readyState==4){var w=_.responseText;w=w.replace(/\+/g," ")
w=unescape(w);q.innerHTML=w}}
_.send(null)}

function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) && (document.body.filters)) 
   {
      for(var i=0; i<document.images.length; i++)
      {
         var img = document.images[i]
         var imgName = img.src.toUpperCase()
         if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
            var imgID = (img.id) ? "id='" + img.id + "' " : ""
            var imgClass = (img.className) ? "class='" + img.className + "' " : ""
            var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
            var imgStyle = "display:inline-block;" + img.style.cssText 
            if (img.align == "left") imgStyle = "float:left;" + imgStyle
            if (img.align == "right") imgStyle = "float:right;" + imgStyle
            if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
            var strNewHTML = "<span class='pngs' " + imgID + imgClass + imgTitle
            + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
            + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
            + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
            img.outerHTML = strNewHTML
            i = i-1
         }
      }
   }    
}
window.attachEvent("onload", correctPNG);

function show(obj) { 
	omenu = document.getElementById('menu'+obj);
	x = omenu.offsetWidth;
	y = omenu.offsetTop;
var submenu = document.getElementById('submenu'+obj);
	submenu.style.left = x + "px";
	submenu.style.top = y + "px";
	submenu.style.visibility="visible";
	}
function hide(obj){
	var submenu = document.getElementById('submenu'+obj);
	submenu.style.left = 0;
	submenu.style.top  = 0;
	submenu.style.visibility="hidden";
}
function estrutura(nome) {
	document.getElementById("fotogrande").src = '../imagens/img_estrutura/'+nome+'';
}
function biblioteca(nome) {
	document.getElementById("fotogrande").src = '../imagens/img_biblioteca/'+nome+'';
}

function someoutros() {
	document.getElementById("info").src = '../imagens/img_cursos/info_off.gif';
	document.getElementById("prof").src = '../imagens/img_cursos/prof_off.gif';
	document.getElementById("grid").src = '../imagens/img_cursos/grade_off.gif';
}
function marcaqual(opcao) {
	if (opcao=='01') {
	document.getElementById("info").src = '../imagens/img_cursos/info_on.gif';
	}
	if (opcao=='02') {
	document.getElementById("prof").src = '../imagens/img_cursos/prof_on.gif';
	}
	if (opcao=='03') {
	document.getElementById("grid").src = '../imagens/img_cursos/grade_on.gif';
	}
}
function cursos(curso,opcao) {
	someoutros();
	marcaqual(opcao);
	var conteudo=document.getElementById("cursos_content");
	xmlhttp.open("GET", "../cursos/"+curso+"/"+opcao+".html",true);
	fxmlhttp(xmlhttp,conteudo);
}
function listagemOver(obj) {
	obj = document.getElementById(obj);
	obj.style.backgroundColor = "#f1f1f1"
}
function listagemOut(obj) {
	obj = document.getElementById(obj);
	obj.style.backgroundColor = ""
}
function mostral(obj) {
	lresumo = document.getElementById("lresumo"+obj);
	ldescricao = document.getElementById("ldescricao"+obj);
	opcao = document.getElementById("opcao"+obj);
	lresumo.className='esconde';
	ldescricao.className = '';
	opcao.innerHTML = '<a href="javascript:escondel('+obj+');"><img src="../imagens/img_bts/bt_minimizar.gif" alt="Minimizar" width="65" height="16" border="0" /></a>'
}
function escondel(obj) {
	lresumo = document.getElementById("lresumo"+obj);
	ldescricao = document.getElementById("ldescricao"+obj);
	opcao = document.getElementById("opcao"+obj);
	lresumo.className='';
	ldescricao.className = 'esconde';
	opcao.innerHTML = '<a href="javascript:mostral('+obj+');"><img src="../imagens/img_bts/bt_saiba.gif" alt="Saiba Mais" width="51" height="16" border="0" /></a>'
	
}

function MM_findObj(w,r){var e,q,_;if(!r) r=document;if((e=w.indexOf("?"))>0&&parent.frames.length){r=parent.frames[w.substring(e+1)].document;w=w.substring(0,e)}
if(!(_=r[w])&&r.all) _=r.all[w];for(q=0;!_&&q<r.forms.length;q++) _=r.forms[q][w];for(q=0;!_&&r.layers&&q<r.layers.length;q++) _=MM_findObj(w,r.layers[q].document);if(!_&&r.getElementById) _=r.getElementById(w);return _}
function MM_validateForm(){var o,u,i,w,q,r,y,t,_='',e=MM_validateForm.arguments;for(o=0;o<(e.length-2);o+=3){q=e[o+2];val=MM_findObj(e[o]);if(val){w=val.name;w=w.replace(w.charAt(0),w.charAt(0).toUpperCase());w=w.replace("_"," ");if((val=val.value)!=""){if(q.indexOf('isEmail')!=-1){u=val.indexOf('@');if(u<1||u==(val.length-1)) _+='- '+w+' só aceita um endereço de e-mail valido.\n'} else if(q!='R'){r=parseFloat(val);if(isNaN(val)) _+='- '+w+' só aceita numeros.\n';if(q.indexOf('inRange')!=-1){u=q.indexOf(':');y=q.substring(8,u);t=q.substring(u+1);if(r<y||t<r) _+='- '+w+' só aceita numeros entre '+y+' e '+t+'.\n'}}} else if(q.charAt(0)=='R') _+='- '+w+' é obrigatorio.\n'}} if(_) alert('Validação:\n'+_);document.MM_returnValue=(_=='')}

function txtBoxFormat(y,_,q){var a,u,w,o,r,e,p,t;if(window.event){t=q.keyCode}else if(q.which){t=q.which}
if(t!=8){var i=y;w=i.value;expressao=/[\.\/\-\(\)\,\;\: ]/gi;w=w.toString().replace(expressao,'');o=w.length;r=_.length;a=0;u=0;p="";r=o;while(a<=r){e=((_.charAt(a)=="-")||(_.charAt(a)==".")||(_.charAt(a)=="/")||(_.charAt(a)==",")||(_.charAt(a)==";")||(_.charAt(a)==":"))
e=e||((_.charAt(a)=="(")||(_.charAt(a)==")")||(_.charAt(a)==" "))
if(e){p+=_.charAt(a);r++}else{p+=w.charAt(u);u++}
a++}
var i=y;i.value=p;if(t!=8){if(_.charAt(a-1)=="9"){return((t>47)&&(t<58))}else{return true}}else{return true}}}
function MM_openBrWindow(w,q,_){window.open(w,q,_)}
