/*function geraCombo(nivel) {
	//alert('');
	var sel = "<select name=\"serie\" class=\"form\" id=\"serie\">\n";
	switch (nivel) {
		case "cad":
			sel += "\t<option value=\"21\">1&ordf; Série</option>\n";
			sel += "\t<option value=\"22\">2&ordf; Série</option>\n";
			sel += "\t<option value=\"23\">3&ordf; Série</option>\n";
			sel += "\t<option value=\"24\">4&ordf; Série</option>\n";
			break;
		case "list":
			sel += "\t<option value=\"35\">5&ordf; Série</option>\n";
			sel += "\t<option value=\"36\">6&ordf; Série</option>\n";
			sel += "\t<option value=\"37\">7&ordf; Série</option>\n";
			sel += "\t<option value=\"38\">8&ordf; Série</option>\n";
			sel += "\t<option value=\"331\">1&ordf; Ano</option>\n";
			sel += "\t<option value=\"332\">2&ordf; Ano</option>\n";
			sel += "\t<option value=\"333\">3&ordf; Ano</option>\n";			
			break;
		case "4":
			sel += "\t<option value=\"41\">Pré-Vestibular Manhã</option>\n";
			sel += "\t<option value=\"42\">Pré-Vestibular Noite</option>\n";		
			break;
	}
	sel += "</select>";
	document.getElementById("series").innerHTML = sel;
}*/
//Usado no carrosel das noticias
			function startGallery() {
				var myGallery = new gallery($('myGallery'), {
					timed: true
				});
			}
			window.addEvent('domready',startGallery);

// ComboBox com Link
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
// Aviso de Excluir com Redirecionamento escondido #
function excluir(theURL) { //v2.0
  if(confirm('Tem certeza que deseja excluir?'))
  window.location.href = (theURL);
}
// Alterar com Redirecionamento escondido #
function alterar(theURL) { //v2.0
  //if(confirm('Tem certeza que deseja excluir?'))
  window.location.href = (theURL);
}
// Alterar com Redirecionamento escondido #
function vizualizar(theURL) { //v2.0
  //if(confirm('Tem certeza que deseja excluir?'))
  window.location.href = (theURL);
}
//Função validação de login no formulario
function envia_login() {
	document.getElementById("btnEnviar").disable = true;
	if (document.getElementById("login").value == "" || document.getElementById("login").value == "seu login") {
		alert("Informe o Login");
		document.getElementById("login").select();
		document.getElementById("btnEnviar").disable = false;
		return false;
	} else if (document.getElementById("senha").value == "" || document.getElementById("senha").value == "sua senha") {
		alert("Informe a Senha");
		document.getElementById("senha").select();
		document.getElementById("btnEnviar").disable = false;
		return false;
	} else {
		document.login.submit();		
	}	
}
//Função para aparecer as imgs dos diretores
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
// função para passar o caminho e email do usuario
function muda(id,img,texto,cargo,banco){
document.getElementById(id).src=img
document.getElementById('emailamigo').value=texto
document.getElementById('cargo').value=cargo
document.getElementById('banco').value=banco
//document.getElementById("txt").value == ""
}
function enviarOrkut(titulo, subtitulo, link, imgParentSelector){
    var params = {};
    params[google.orkut.share.Field.TITLE] = titulo;
    params[google.orkut.share.Field.DESTINATION_URL] = link;
    imgs = [];
    $( imgParentSelector+' img').each(function() {
        imgs.push($(this).attr('src'));
    });
    params[google.orkut.share.Field.CONTENT] = subtitulo;
    params[google.orkut.share.Field.THUMBNAIL] = imgs;
    var connection = new google.orkut.share.Connection(params);
    connection.send('orkut.com', {}); 
}

