// funcao corrige flash no IE
function embeds(url,w,h){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+w+'" height="'+h+'">');
document.write('<param name="movie" value="'+url+'">');
document.write('<param name="quality" value="high">');
document.write('<param name="wmode" value="transparent">');
document.write('<param name="menu" value="false">');
document.write('<embed src="'+url+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'" wmode="transparent"></embed>');
document.write('</object>');
}
//-->


// Adicionar aos favoritos
function addBookmark(title,url) {
if (window.sidebar)
{
window.sidebar.addPanel(title, url,"");
}
else if( document.all )
{
window.external.AddFavorite( url, title);
}
else
{
return true;
}
}

// Função abre janela no centro da tela
function MM_openBrWindow(theURL,winName,w,h,scroll) { //v2.0
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2 - 20;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+''
	window.open(theURL,winName,winprops);
}

// Função abre janela no centro da tela com possibilidade de maximizar
function MM_openBrWindow2(theURL,winName,w,h,scroll) { //v2.0
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2 - 20;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=yes'
	window.open(theURL,winName,winprops);
}




// Para efeito Area do Aluno

$(document).ready(function() {
	$("div.panel_button").click(function(){
		$("div#panel").animate({
			height: "130px"
		})
		.animate({
			height: "80px"
		}, "fast");
		$("div.panel_button").toggle();
	
	});	
	
   $("div#hide_button").click(function(){
		$("div#panel").animate({
			height: "0px"
		}, "fast");
		
	
   });	
	
});



// move cursos para form de contato
function movecursor(){document.form_contato.pessoa_nome.focus()}



function valida_form_enquete() { 
    
     Form = document.form_enquete;

      if ((Form.opcao[0].checked==false)&&(Form.opcao[1].checked==false)&&(Form.opcao[2].checked==false)&&(Form.opcao[3].checked==false)&&(Form.opcao[4].checked==false)){
	alert("Por favor, escolha uma das respostas para votar!");
        Form.opcao[0].focus();
        return false;
     }	 

}	 