/*
// Copyrights(C) Daniel, Selminha e Augusto
// [Vídeo Poster Informática/Projeto(s) VipLinux]
// (19) 3232-6873 Campinas/SP Brasil  (Bairro Ponte Preta)
// email: vip@vipvirtual.com.br
//
// Nenhuma parte desse código pode ser usada no todo ou em parte
// sem permissão, por escrito, dos autores.
// Esse Código Foi feito e testado na esperança de que possa ser útil e
// embora todo esforço tenha sido feito para que funcione, ele não tem 
// nenhuma garantia , seja essa garantia implícita ou explícita,
// seja sobre qual motivo seja, com aviso ou sem aviso aos autores;
//  ao se utilizar desse código, aceita-se os termos acima descritos,
//  e se exime de qualquer culpa, dôlo ou outro tipo de processo, 
//  aos autores  e às companhias ( e aos indivíduos) a eles ligados. 
//
// 2008/maio/29 09:45am
// 	revisão Inicial
// 	Adicionado nota de Copyright
//
// 2008/julho/11 07:57am
//		Melhorada sanitização dos dados
//		Melhorada a compatibilidade com Firefox, Iceweasel
//			e Cia (especialmente versão 3.0)
//
// 2008/agosto/01 09:57am
//    Adicionadas novas funcoes.
//
// 2008/novembro/26 06:01am
//    Adicionadas novas funcoes.
//		Algumas funções foram melhoradas
//		Algumas funções foram retiradas ou substituidas :-)
//
// 2008/novembro/30 08:27pm
//		Adicionadas novas funçoes.
//		Algumas funções foram melhoradas.
//		Adicionada variavel boolena  "debug_mode" nas funcoes (geralmente 
//			naquelas funções que mostram mensagems via alert(ou equivalente)) :-)
//		Agora algumas funcoes aceitam tanto "raw object" quanto "id de elemento" (
//    	especialmente na variavel 'anexa_aonde';
//			O id deve ser de um elemento ja' existente/(ou inserido) no "documento"  )
//
// 2009/janeiro/07 07:43pm
// 	Adicionadas novas funções. ah... Feliz Ano Novo!!!! :-)
//
// 2009/janeiro/10 03:12pm
//		reintroduzidas algumas funções
//		introduzidas novas funçoes :-)
//
// 2009/marco/23 08:36pm
//		atualizada a funcao cria_elemento0 pra funcionar com WinIE6+
//
// 2009/junho/03 11:15pm 
//		EBA!! to de volta :-) "round fifthnine!!!" (sou ou nao sou GUERREIRO ? ;-)
//
*/
var gconta=1;
var gprepad="nc_";
var t = new Array();
var tc = 0;
function submitivel(quem,propri,valor){
	if(!top.document.getElementById(""+quem)){return false;}
	if(!top.document.getElementById(""+quem+"2")){return false;}
	var que = top.document.getElementById(""+quem);
	var que2 = top.document.getElementById(""+quem+"2");
	if(propri){
		que.setAttribute(""+propri,""+valor);
	}
	//que.submit();
	que2.click();
	return true;
}//fim funcao 
function maisinf(myid,texto){
	if(!top.document.getElementById(""+myid)){return false;}
	if(!top.document.getElementById(""+myid+"2")){return false;}
	var a = top.document.getElementById(""+myid+"2");
	a.innerHTML = ""+texto;
	return true;
}
function aleluiaIE(formu,votoval,votoid){
	if(!formu){return false;}
	var abc = parseInt(votoval);
	if( isNaN(abc) || abc < 1 || abc > 5 ){return false;}
	if(!top.document.getElementById(""+votoid)){return false;}
	top.document.getElementById(""+votoid).value = abc ;
	formu.submit();	
	return true;
}//fim funcao
function ver_e_sub(formul , arr_ids_not_equa , aque ){
	if(!formul){alert('eita! "formulário" :-) '); return false; }
	if(!arr_ids_not_equa){alert('eita! "não é igual?" :-) '); return false; }
	if(aque==null){alert('eita! "a quê?" :-) '); return false; }
	var ainel = arr_ids_not_equa.length ;
	if(ainel==0){alert(' Ai Nel!! kkkkk :-) '); return false; }
	var a=0;
	for( ; a<ainel; a++){
		if(!(top.document.getElementById(""+arr_ids_not_equa[a]))){alert(""+'id->'+arr_ids_not_equa[a]+' não existe. sorry... :-) '); return false; }
		var aleluiaIE = top.document.getElementById(""+arr_ids_not_equa[a]);
		var alelVAL = aleluiaIE.value ;
		if( alelVAL != aque ){ continue; }else{ alert('diferente'); return false; }
	}//fim for	
	formul.submit();
	return true;
}//
function mostra_fotos_album_bak01( aonde, oque, arr_idfoto, foto_path, foto_nome, foto_clicks, foto_ultimo_acesso, numero_de_votos, nota_da_foto,
	 nota_dada_pelo_user, quando_user_votou){
	 if(!top.document.getElementById(""+aonde)){return false;}
	 var a = arr_idfoto.length ;
	 var b = parseInt(a/3);
	 var l = parseInt(a%3);
	 if(a==0 || isNaN(b) || isNaN(l)){return false;}
	 
	 if( a != foto_path.length ||
	 	a != foto_nome.length ||
	 	a != foto_clicks.length ||
	 	a != foto_ultimo_acesso.length ||
	 	a != numero_de_votos.length ||
	 	a != nota_da_foto.length ||
	 	a != nota_dada_pelo_user.length ||
	 	a != quando_user_votou.length ){return false;}
	 var aonde2 = top.document.getElementById(""+aonde);
	 top.delelem(false,""+oque);
	 var oque2 = top.cria_elemento0(false,null,'div',['id'],[""+oque]);
	 var L1=0;
	 var L2=0;
	 var aaa=0;
	 var site = ["http://www.vipimg3.vipvirtual.com.br/","http://www.vipimg1.vipvirtual.com.br/"];
	 for( ; L1<b; L1++){
	 	var triquadrado=top.cria_elemento0(false,null,'div',['class'],['fotos4']);
	 	
	 	for( var cc=1; cc<4; cc++ , aaa++){
	 		var imgfotosrc = ""+site[aaa%2]+foto_path[aaa]+"thumb_"+foto_nome[aaa];
	 		var img = new Image(75,56);
			img.src = imgfotosrc;
			var unoquadrado=top.cria_elemento0(false,null,'div',['class'],[""+"fotos4_"+cc]);
			var unoquadrado2=top.cria_elemento0(false,null,'div',['class'],[""+"fotos5_"+cc]);
			var link2=top.cria_elemento0(false,null,'a',['target','class','href'],['invisivel',""+"link6_"+cc ,
			""+"http://www.vipvirtual.com.br/vipgeral/php.d/precarrega.php?pagina=7&prepag24=4&fotoid="+arr_idfoto[aaa]]);
			var img2 = top.cria_elemento0(false,null,'img',['class'],[""+"fotos_img7_"+cc]);
			img2.src=img.src;
			link2.appendChild(img2);
			unoquadrado2.appendChild(link2);
			unoquadrado.appendChild(unoquadrado2);
			
			var unoquadrado3 = top.cria_elemento0(false,null,'div',['class'],[""+"textofotos5_"+cc]);
			var t1 = top.document.createTextNode(""+"no. de clicks: "+foto_clicks[aaa]);
	 		var t2 = top.document.createTextNode(""+"ultimo click: "+foto_ultimo_acesso[aaa]);
	 		var t3 = top.document.createTextNode(""+"no. de votos: "+numero_de_votos[aaa]);
	 		var t4 = top.document.createTextNode(""+"nota geral: "+nota_da_foto[aaa]);
	 		var t5 = top.document.createTextNode(""+"sua nota foi: "+nota_dada_pelo_user[aaa]);
	 		var t6 = top.document.createTextNode(""+"em "+quando_user_votou[aaa]);
	 		
	 		var s1 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'1']);
	 		var s2 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'2']);
	 		var s3 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'3']);
	 		var s4 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'4']);
	 		var s5 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'5']);
	 		var s6 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'6']);
	 		
	 		s1.appendChild(t1);
	 		s2.appendChild(t2);
	 		s3.appendChild(t3);
	 		s4.appendChild(t4);
	 		s5.appendChild(t5);
	 		s6.appendChild(t6);
	 		
	 		unoquadrado3.appendChild(s1);
	 		unoquadrado3.appendChild(s2);
	 		unoquadrado3.appendChild(s3);
	 		unoquadrado3.appendChild(s4);
	 		unoquadrado3.appendChild(s5);
	 		unoquadrado3.appendChild(s6);
	 		
	 		unoquadrado.appendChild(unoquadrado3);
	 		triquadrado.appendChild(unoquadrado);	 		
	 	}//fim for cc
	 	oque2.appendChild(triquadrado);	 
	 }//fim for L1
	 if(l>0){
	 	var triquadrado=top.cria_elemento0(false,null,'div',['class'],['fotos4']);
	 	l++ ;
	 	for(var cc=1 ; cc<l; cc++ , aaa++){
	 		var imgfotosrc = ""+site[aaa%2]+foto_path[aaa]+"thumb_"+foto_nome[aaa];
	 		var img = new Image(75,56);
			img.src = imgfotosrc;
			var unoquadrado=top.cria_elemento0(false,null,'div',['class'],[""+"fotos4_"+cc]);
			var unoquadrado2=top.cria_elemento0(false,null,'div',['class'],[""+"fotos5_"+cc]);
			var link2=top.cria_elemento0(false,null,'a',['target','class','href'],['invisivel',""+"link6_"+cc ,
			""+"http://www.vipvirtual.com.br/vipgeral/php.d/precarrega.php?pagina=7&prepag24=4&fotoid="+arr_idfoto[aaa]]);
			var img2 = top.cria_elemento0(false,null,'img',['class'],[""+"fotos_img7_"+cc]);
			img2.src=img.src;
			link2.appendChild(img2);
			unoquadrado2.appendChild(link2);
			unoquadrado.appendChild(unoquadrado2);
			
			var unoquadrado3 = top.cria_elemento0(false,null,'div',['class'],[""+"textofotos5_"+cc]);
			var t1 = top.document.createTextNode(""+"no. de clicks: "+foto_clicks[aaa]);
	 		var t2 = top.document.createTextNode(""+"ultimo click: "+foto_ultimo_acesso[aaa]);
	 		var t3 = top.document.createTextNode(""+"no. de votos: "+numero_de_votos[aaa]);
	 		var t4 = top.document.createTextNode(""+"nota geral: "+nota_da_foto[aaa]);
	 		var t5 = top.document.createTextNode(""+"sua nota foi: "+nota_dada_pelo_user[aaa]);
	 		var t6 = top.document.createTextNode(""+"em "+quando_user_votou[aaa]);
	 		
	 		var s1 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'1']);
	 		var s2 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'2']);
	 		var s3 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'3']);
	 		var s4 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'4']);
	 		var s5 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'5']);
	 		var s6 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'6']);
	 		
	 		s1.appendChild(t1);
	 		s2.appendChild(t2);
	 		s3.appendChild(t3);
	 		s4.appendChild(t4);
	 		s5.appendChild(t5);
	 		s6.appendChild(t6);
	 		
	 		unoquadrado3.appendChild(s1);
	 		unoquadrado3.appendChild(s2);
	 		unoquadrado3.appendChild(s3);
	 		unoquadrado3.appendChild(s4);
	 		unoquadrado3.appendChild(s5);
	 		unoquadrado3.appendChild(s6);
	 		
	 		unoquadrado.appendChild(unoquadrado3);
	 		triquadrado.appendChild(unoquadrado);	 		
	 	}//fim for cc
	 	oque2.appendChild(triquadrado)
	 }//fim l
	 
	 aonde2.appendChild(oque2);
	 
	return true; //Obrigado Jesus!!!
	
}//fim mostra_fotos_album_bak01
function mostra_fotos_album( aonde, oque, arr_idfoto, foto_path, foto_nome, foto_clicks, foto_ultimo_acesso, numero_de_votos, nota_da_foto,
	 nota_dada_pelo_user, quando_user_votou){
	 if(!top.document.getElementById(""+aonde)){return false;}
	 var a = arr_idfoto.length ;
	 var b = parseInt(a/2);
	 var l = parseInt(a%2);
	 if(a==0 || isNaN(b) || isNaN(l)){return false;}
	 
	 if( a != foto_path.length ||
	 	a != foto_nome.length ||
	 	a != foto_clicks.length ||
	 	a != foto_ultimo_acesso.length ||
	 	a != numero_de_votos.length ||
	 	a != nota_da_foto.length ||
	 	a != nota_dada_pelo_user.length ||
	 	a != quando_user_votou.length ){return false;}
	 var aonde2 = top.document.getElementById(""+aonde);
	 top.delelem(false,""+oque);
	 var oque2 = top.cria_elemento0(false,null,'div',['id'],[""+oque]);
	 var L1=0;
	 var L2=0;
	 var aaa=0;
	 var site = ["http://www.vipimg3.vipvirtual.com.br/","http://www.vipimg1.vipvirtual.com.br/"];
	 var br0 = top.document.createElement('br');
	 for( ; L1<b; L1++){
	 	var triquadrado=top.cria_elemento0(false,null,'div',['class'],['fotos4']);
	 	
	 	for( var cc=1; cc<3; cc++ , aaa++){
	 		var imgfotosrc = ""+site[aaa%2]+foto_path[aaa]+"thumb_"+foto_nome[aaa];
	 		var img = new Image(75,56);
			img.src = imgfotosrc;
			var unoquadrado=top.cria_elemento0(false,null,'div',['class'],[""+"fotos4_"+cc]);
			var unoquadrado2=top.cria_elemento0(false,null,'div',['class'],[""+"fotos5_"+cc]);
			var link2=top.cria_elemento0(false,null,'a',['target','class','href'],['invisivel',""+"link6_"+cc ,
			""+"http://www.vipvirtual.com.br/vipgeral/php.d/precarrega.php?pagina=7&prepag24=4&fotoid="+arr_idfoto[aaa]]);
			var img2 = top.cria_elemento0(false,null,'img',['class'],[""+"fotos_img7_"+cc]);
			img2.src=img.src;
			link2.appendChild(img2);
			unoquadrado2.appendChild(link2);
			unoquadrado.appendChild(unoquadrado2);
			
			var unoquadrado3 = top.cria_elemento0(false,null,'div',['class'],[""+"textofotos5_"+cc]);
			var t1 = top.document.createTextNode(""+"no. de clicks: "+foto_clicks[aaa]);
	 		var t2 = top.document.createTextNode(""+"em: "+foto_ultimo_acesso[aaa]);
	 		var t3 = top.document.createTextNode(""+"no. de votos: "+numero_de_votos[aaa]);
	 		var t4 = top.document.createTextNode(""+"nota geral: "+nota_da_foto[aaa]);
	 		var t5 = top.document.createTextNode(""+"sua nota foi: "+nota_dada_pelo_user[aaa]);
	 		var t6 = top.document.createTextNode(""+"em "+quando_user_votou[aaa]);
	 		
	 		var s1 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_1']);
	 		var s2 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_2']);
	 		var s3 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_3']);
	 		var s4 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_4']);
	 		var s5 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_5']);
	 		var s6 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_6']);
	 		
	 		s1.appendChild(t1);
	 		s2.appendChild(t2);
	 		s3.appendChild(t3);
	 		s4.appendChild(t4);
	 		s5.appendChild(t5);
	 		s6.appendChild(t6);
	 		
	 		unoquadrado3.appendChild(s1);
	 		unoquadrado3.appendChild(s2);
	 		unoquadrado3.appendChild(s3);
	 		unoquadrado3.appendChild(s4);
	 		unoquadrado3.appendChild(s5);
	 		unoquadrado3.appendChild(s6);
	 			 		
	 		unoquadrado.appendChild(unoquadrado3);
	 		triquadrado.appendChild(unoquadrado);	 		
	 	}//fim for cc
	 	oque2.appendChild(triquadrado);	 
	 }//fim for L1
	 if(l>0){
	 	var triquadrado=top.cria_elemento0(false,null,'div',['class'],['fotos4']);
	 	l++ ;
	 	for(var cc=1 ; cc<l; cc++ , aaa++){
	 		var imgfotosrc = ""+site[aaa%2]+foto_path[aaa]+"thumb_"+foto_nome[aaa];
	 		var img = new Image(75,56);
			img.src = imgfotosrc;
			var unoquadrado=top.cria_elemento0(false,null,'div',['class'],[""+"fotos4_"+cc]);
			var unoquadrado2=top.cria_elemento0(false,null,'div',['class'],[""+"fotos5_"+cc]);
			var link2=top.cria_elemento0(false,null,'a',['target','class','href'],['invisivel',""+"link6_"+cc ,
			""+"http://www.vipvirtual.com.br/vipgeral/php.d/precarrega.php?pagina=7&prepag24=4&fotoid="+arr_idfoto[aaa]]);
			var img2 = top.cria_elemento0(false,null,'img',['class'],[""+"fotos_img7_"+cc]);
			img2.src=img.src;
			link2.appendChild(img2);
			unoquadrado2.appendChild(link2);
			unoquadrado.appendChild(unoquadrado2);
			
			var unoquadrado3 = top.cria_elemento0(false,null,'div',['class'],[""+"textofotos5_"+cc]);
			var t1 = top.document.createTextNode(""+"no. de clicks: "+foto_clicks[aaa]);
	 		var t2 = top.document.createTextNode(""+"em: "+foto_ultimo_acesso[aaa]);
	 		var t3 = top.document.createTextNode(""+"no. de votos: "+numero_de_votos[aaa]);
	 		var t4 = top.document.createTextNode(""+"nota geral: "+nota_da_foto[aaa]);
	 		var t5 = top.document.createTextNode(""+"sua nota foi: "+nota_dada_pelo_user[aaa]);
	 		var t6 = top.document.createTextNode(""+"em "+quando_user_votou[aaa]);
	 		
	 		var s1 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_1']);
	 		var s2 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_2']);
	 		var s3 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_3']);
	 		var s4 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_4']);
	 		var s5 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_5']);
	 		var s6 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_6']);
	 		
	 		s1.appendChild(t1);
	 		s2.appendChild(t2);
	 		s3.appendChild(t3);
	 		s4.appendChild(t4);
	 		s5.appendChild(t5);
	 		s6.appendChild(t6);
	 		
	 		unoquadrado3.appendChild(s1);
	 		unoquadrado3.appendChild(s2);
	 		unoquadrado3.appendChild(s3);
	 		unoquadrado3.appendChild(s4);
	 		unoquadrado3.appendChild(s5);
	 		unoquadrado3.appendChild(s6);
	 		
	 		unoquadrado.appendChild(unoquadrado3);
	 		triquadrado.appendChild(unoquadrado);	 		
	 	}//fim for cc
	 	oque2.appendChild(triquadrado)
	 }//fim l
	 
	 aonde2.appendChild(oque2);
	 
	return true; //Obrigado Jesus!!!
	
}//fim mostra_fotos_album
function mostra_fotos_album3( aonde, oque, arr_idfoto, foto_path, foto_nome, foto_clicks,  numero_de_votos, nota_da_foto, nota_dada_pelo_user){
	 if(!top.document.getElementById(""+aonde)){return false;}
	 var a = arr_idfoto.length ;
	 var b = parseInt(a/2);
	 var l = parseInt(a%2);
	 if(a==0 || isNaN(b) || isNaN(l)){return false;}
	 
	 if( a != foto_path.length ||
	 	a != foto_nome.length ||
	 	a != foto_clicks.length ||
	 	a != numero_de_votos.length ||
	 	a != nota_da_foto.length ||
	 	a != nota_dada_pelo_user.length 
	){return false;}
	 var aonde2 = top.document.getElementById(""+aonde);
	 top.delelem(false,""+oque);
	 var oque2 = top.cria_elemento0(false,null,'div',['id'],[""+oque]);
	 var L1=0;
	 var L2=0;
	 var aaa=0;
	 var site = ["http://www.vipimg3.vipvirtual.com.br/","http://www.vipimg1.vipvirtual.com.br/"];
	 var br0 = top.document.createElement('br');
	 for( ; L1<b; L1++){
	 	var triquadrado=top.cria_elemento0(false,null,'div',['class'],['fotos4']);
	 	
	 	for( var cc=1; cc<3; cc++ , aaa++){
	 		var imgfotosrc = ""+site[aaa%2]+foto_path[aaa]+"thumb_"+foto_nome[aaa];
	 		var img = new Image(75,56);
			img.src = imgfotosrc;
			var unoquadrado=top.cria_elemento0(false,null,'div',['class'],[""+"fotos4_"+cc]);
			var unoquadrado2=top.cria_elemento0(false,null,'div',['class'],[""+"fotos5_"+cc]);
			var link2=top.cria_elemento0(false,null,'a',['target','class','href'],['invisivel',""+"link6_"+cc ,
			""+"http://www.vipvirtual.com.br/vipgeral/php.d/precarrega.php?pagina=7&prepag24=4&fotoid="+arr_idfoto[aaa]]);
			var img2 = top.cria_elemento0(false,null,'img',['class'],[""+"fotos_img7_"+cc]);
			img2.src=img.src;
			link2.appendChild(img2);
			unoquadrado2.appendChild(link2);
			unoquadrado.appendChild(unoquadrado2);
			
			var unoquadrado3 = top.cria_elemento0(false,null,'div',['class'],[""+"textofotos5_"+cc]);
			var t1 = top.document.createTextNode(""+foto_clicks[aaa]+" clicks");
			
	 		//var t2 = top.document.createTextNode(""+"em: "+foto_ultimo_acesso[aaa]);
	 		var t3 = top.document.createTextNode(""+numero_de_votos[aaa]+" votos");
			
	 		var t4 = top.document.createTextNode(""+"Média Geral: ");
			var ii4 = top.cria_elemento0(false,null,'img',['src'],["http://www.vipvirtual.com.br/images/rating/rating"+nota_da_foto[aaa]+".gif"]);
			
	 		var t5 = top.document.createTextNode(""+"Sua nota foi: ");
			var ii5 = top.cria_elemento0(false,null,'img',['src'],["http://www.vipvirtual.com.br/images/rating/seurating"+nota_dada_pelo_user[aaa]+".gif"]);
	 		//var t6 = top.document.createTextNode(""+"em "+quando_user_votou[aaa]);
	 		
	 		var s1 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_1']);
	 		//var s2 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_2']);
	 		var s3 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_3']);
	 		var s4 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_4']);
	 		var s5 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_5']);
	 		//var s6 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_6']);
	 		
	 		s1.appendChild(t1);
	 		//s2.appendChild(t2);
	 		s3.appendChild(t3);
			
	 		s4.appendChild(t4);
			s4.appendChild(ii4);
			
			s5.appendChild(t5);
			s5.appendChild(ii5);
			
	 		//s6.appendChild(t6);
	 		
	 		unoquadrado3.appendChild(s1);
	 		//unoquadrado3.appendChild(s2);
	 		unoquadrado3.appendChild(s3);
	 		unoquadrado3.appendChild(s4);
			//unoquadrado3.appendChild(ii4);
	 		unoquadrado3.appendChild(s5);
			//unoquadrado3.appendChild(ii5);
	 		//unoquadrado3.appendChild(s6);
	 			 		
	 		unoquadrado.appendChild(unoquadrado3);
	 		triquadrado.appendChild(unoquadrado);	 		
	 	}//fim for cc
	 	oque2.appendChild(triquadrado);	 
	 }//fim for L1
	 if(l>0){
	 	var triquadrado=top.cria_elemento0(false,null,'div',['class'],['fotos4']);
	 	l++ ;
	 	for(var cc=1 ; cc<l; cc++ , aaa++){
	 		var imgfotosrc = ""+site[aaa%2]+foto_path[aaa]+"thumb_"+foto_nome[aaa];
	 		var img = new Image(75,56);
			img.src = imgfotosrc;
			var unoquadrado=top.cria_elemento0(false,null,'div',['class'],[""+"fotos4_"+cc]);
			var unoquadrado2=top.cria_elemento0(false,null,'div',['class'],[""+"fotos5_"+cc]);
			var link2=top.cria_elemento0(false,null,'a',['target','class','href'],['invisivel',""+"link6_"+cc ,
			""+"http://www.vipvirtual.com.br/vipgeral/php.d/precarrega.php?pagina=7&prepag24=4&fotoid="+arr_idfoto[aaa]]);
			var img2 = top.cria_elemento0(false,null,'img',['class'],[""+"fotos_img7_"+cc]);
			img2.src=img.src;
			link2.appendChild(img2);
			unoquadrado2.appendChild(link2);
			unoquadrado.appendChild(unoquadrado2);
			
			var unoquadrado3 = top.cria_elemento0(false,null,'div',['class'],[""+"textofotos5_"+cc]);
			var t1 = top.document.createTextNode(""+foto_clicks[aaa]+" clicks");
	 		//var t2 = top.document.createTextNode(""+"em: "+foto_ultimo_acesso[aaa]);
	 		var t3 = top.document.createTextNode(""+numero_de_votos[aaa]+" votos");
	 		
			var t4 = top.document.createTextNode(""+"Média Geral: ");
			var ii4 = top.cria_elemento0(false,null,'img',['src'],["http://www.vipvirtual.com.br/images/rating/rating"+nota_da_foto[aaa]+".gif"]);
			
	 		var t5 = top.document.createTextNode(""+"sua nota foi: ");
			var ii5 = top.cria_elemento0(false,null,'img',['src'],["http://www.vipvirtual.com.br/images/rating/seurating"+nota_dada_pelo_user[aaa]+".gif"]);
	 		//var t6 = top.document.createTextNode(""+"em "+quando_user_votou[aaa]);
	 		
	 		var s1 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_1']);
	 		//var s2 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_2']);
	 		var s3 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_3']);
	 		var s4 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_4']);
	 		var s5 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_5']);
	 		//var s6 = top.cria_elemento0(false,null,'span',['class'],[""+'j3_'+cc+'_6']);
	 		
	 		s1.appendChild(t1);
	 		//s2.appendChild(t2);
	 		s3.appendChild(t3);
	 		s4.appendChild(t4);
			s4.appendChild(ii4);
	 		s5.appendChild(t5);
			s5.appendChild(ii5);
	 		//s6.appendChild(t6);
	 		
	 		unoquadrado3.appendChild(s1);
	 		//unoquadrado3.appendChild(s2);
	 		unoquadrado3.appendChild(s3);
	 		unoquadrado3.appendChild(s4);
	 		//unoquadrado3.appendChild(ii4);
			unoquadrado3.appendChild(s5);
			//unoquadrado3.appendChild(ii5);
	 		//unoquadrado3.appendChild(s6);
	 		
	 		unoquadrado.appendChild(unoquadrado3);
	 		triquadrado.appendChild(unoquadrado);	 		
	 	}//fim for cc
	 	oque2.appendChild(triquadrado)
	 }//fim l
	 
	 aonde2.appendChild(oque2);
	 
	return true; //Obrigado Jesus!!!
	
}//fim mostra_fotos_album3
function mostra_albums(aonde , oque , albumid ,albumnome ,albumclicks ,
 eventonome ,eventodata ,eventocidade ,eventoestado ,eventopais ,eventolineps ,cobertopor ,
 fotonome , fotopath ){
	if(!top.document.getElementById(""+aonde)){return false;}
	var ail = albumid.length;
	if(ail==0 || ail!=albumnome.length || ail!=albumclicks.length || 
	ail!=eventonome.length || ail!=eventodata.length || ail!=eventocidade.length || ail!=eventoestado.length || 
	ail!=eventopais.length || ail!=eventolineps.length || ail!=cobertopor.length || ail!=fotonome.length || 
	ail!=fotopath.length ){return false;}
	top.delelem(false,""+oque); 
	var aonde2 = top.document.getElementById(""+aonde);
	
	var oque2 = top.cria_elemento0(false,null,'div',['id'],[""+oque]);
	var a=0;
	var b=['http://www.vipimg1.vipvirtual.com.br/','http://www.vipimg3.vipvirtual.com.br/'];
	for( ; a<ail ; a++){
		var container0 = top.cria_elemento0(false,null,'span',['class'],['album3']);
		var eitaimg = new Image(75,56);
		var ieba = ""+b[a%2]+fotopath[a]+"thumb_"+fotonome[a];
		eitaimg.src = ""+ieba;
		
		var container1 = top.cria_elemento0(false,null,'div',['class'],['album4']);
		var a4 = top.cria_elemento0(false,null,'a',['class','target','href'],['albuma4','invisivel','http://www.vipvirtual.com.br/vipgeral/php.d/precarrega.php?pagina=7&prepag24=3&albumid='+albumid[a]]);
		
		var miniimg = top.cria_elemento0(false,null,'img',['class'],['albumimg4']);
		miniimg.src = eitaimg.src;
	
		a4.appendChild(miniimg);
		container1.appendChild(a4);
		container0.appendChild(container1);
		
		var container2 = top.cria_elemento0(false,null,'div',['class'],['album5']);
		var span1 = top.cria_elemento0(false,null,'span',['class'],['s1']);
		var span2 = top.cria_elemento0(false,null,'span',['class'],['s2']);
		var span3 = top.cria_elemento0(false,null,'span',['class'],['s3']);
		var span4 = top.cria_elemento0(false,null,'span',['class'],['s4']);
		var span5 = top.cria_elemento0(false,null,'span',['class'],['s5']);
		var span6 = top.cria_elemento0(false,null,'span',['class'],['s6']);
			
		var texto1 = top.document.createTextNode("Evento: "+eventonome[a]);
		var texto2 = top.document.createTextNode("Data: "+eventodata[a]);
		var texto3 = top.document.createTextNode(""+eventocidade[a]+"_"+eventoestado[a]+"_"+eventopais[a]);
		var texto4 = top.document.createTextNode("Evento coberto por: "+cobertopor[a]);
		var texto5 = top.document.createTextNode("Lineups ou equivalente: "+eventolineps[a]);
		var texto6 = top.document.createTextNode("Clicks no album: "+albumclicks[a]+" Album nome: "+albumnome[a]);
				
		span1.appendChild(texto1);
		span2.appendChild(texto2);
		span3.appendChild(texto3);
		span4.appendChild(texto4);
		span5.appendChild(texto5);
		span6.appendChild(texto6);
				
		container2.appendChild(span1);
		container2.appendChild(span2);
		container2.appendChild(span3);
		container2.appendChild(span4);
		container2.appendChild(span5);
		container2.appendChild(span6);
				
		container0.appendChild(container2);
		oque2.appendChild(container0);		
	}//fim for
	aonde2.appendChild(oque2);
	return true;
	
}//fim função
function showcateg(aonde,oque,id,nome){
	if(!top.document.getElementById(""+aonde)){return false;}
	top.delelem(false,""+oque);
	var container =top.cria_elemento0(false,null,'div',['id'],[""+oque]);
	var meupai = top.document.createElement('p');
	var tam_id=0;
	var tam_nome=0
	tam_id = id.length;
	tam_nome = nome.length;
	if(tam_id==0 || tam_id != tam_nome){return false;}
	var aonde02 = top.document.getElementById(""+aonde);
	var br=top.document.createElement('br');
	var cont=0;
	for( ; cont<tam_id; cont++){
		var aaa=top.cria_elemento0(false,null,'a', ['class','href','target'], ['linc3',""+"http://www.vipvirtual.com.br/vipgeral/php.d/mostrar_cliente.php?catbt="+id[cont],'invisivel']);
		var texto = top.document.createTextNode(""+nome[cont]);		
		aaa.appendChild(texto);
		var br1 = br.cloneNode(false);
		meupai.appendChild(aaa);
		meupai.appendChild(br1);
	}
	container.appendChild(meupai);
	aonde02.appendChild(container);
	return true;
}// fim funcao

function showclientes(aonde, oque, arr_id , arr_foto , arr_anome_fantasia , arr_aendereco , arr_ateminfoadicional , arr_apais , arr_acidade , arr_aestado , arr_acomplemento , arr_acep_equiv , arr_aemail , arr_asite , arr_adescricao , arr_atelefone ){
	if(!top.document.getElementById(""+aonde)){return false;}
	top.delelem(false,""+oque);
	var container = top.cria_elemento0(false,null,'div',['id'],[""+oque]);
	
	var tam_id=0;
	var tam_foto=0
	tam_id = arr_id.length;
	tam_foto = arr_foto.length;
	if(tam_id==0 || tam_id != tam_foto || tam_id != arr_anome_fantasia.length || tam_id != arr_aendereco.length || tam_id != arr_ateminfoadicional.length || tam_id != arr_apais.length || tam_id != arr_acidade.length || tam_id != arr_aestado.length || tam_id != arr_acomplemento.length || tam_id != arr_acep_equiv.length || tam_id != arr_aemail.length || tam_id != arr_asite.length || tam_id != arr_adescricao.length || tam_id != arr_atelefone.length   ){return false;}
	var aonde02 = top.document.getElementById(""+aonde);
	var br=top.document.createElement('br');
	var hyphen = top.document.createTextNode('-');
	var cont=0;
	
	var imagem = new Array();
	imagem[0] = 'sem_info_adicional.png';
	imagem[1] = 'com_info_adicional.png';
	imagem[3] = 'imprimir.png';
	
	var teminfo = 0;
	var id = 0;
	var span1_0 = top.cria_elemento0(false,null,'span',['class'],['teminfo']);
	var span2_0 = top.cria_elemento0(false,null,'span',['class'],['teminfo']);
		var text1_0 = top.document.createTextNode("Clique aqui para ver informações adicionais");
		var text2_0 = top.document.createTextNode("Clique aqui para imprimir informações do cliente");
			span1_0.appendChild(text1_0);
			span2_0.appendChild(text2_0);
	var span1_1 = top.cria_elemento0(false,null,'span',['class'],['teminfo']);
	var span2_1 = top.cria_elemento0(false,null,'span',['class'],['teminfo']);
		var text1_1 = top.document.createTextNode("criadas por ");
		var text2_1 = top.document.createTextNode("feitas por ");
			span1_1.appendChild(text1_1);
			span2_1.appendChild(text2_1);
	var img12 = ['http://www.vipimg1.vipvirtual.com.br/','http://www.vipimg3.vipvirtual.com.br/'];
	for( ; cont < tam_id ; cont++ ){
		teminfo = (arr_ateminfoadicional[cont] == true ? 1 : 0 );
		id = ""+arr_id[cont] ;
		var contem = top.cria_elemento0(false,null,'div',['class'],['contem']);
			var nomefantasiaT = top.document.createTextNode(""+arr_anome_fantasia[cont]);
			var nomefantasiaS1 = top.cria_elemento0(false,null,'span',['class'],['nomefantasia']);
				nomefantasiaS1.appendChild(nomefantasiaT);
				var nomefantasiaS2 = nomefantasiaS1.cloneNode(true);
				var nomefantasiaS3 = nomefantasiaS1.cloneNode(true);
			var ddd1 = top.cria_elemento0(false,null,'div',['class'],['ddd1']);
			var aaa1 = top.cria_elemento0(false,null,'a',['target','href'],['invisivel','http://www.vipvirtual.com.br/vipgeral/php.d/precarrega2.php?pagina=7&prepag24=1&maisinfo='+id]);
			var ddd2 = top.cria_elemento0(false,null,'div',['class'],['ddd2']);
			var aaa2 = top.cria_elemento0(false,null,'a',['target','href'],['invisivel','http://www.vipvirtual.com.br/vipgeral/php.d/precarrega2.php?pagina=7&prepag24=2&imprime='+id]);
			var ddd3 = top.cria_elemento0(false,null,'div',['class'],['ddd3']);
			var aaa3 = top.cria_elemento0(false,null,'a',['target','href'],['_blank',""+arr_asite[cont]]);
			
			var cliente1 = top.cria_elemento0(false,null,'img',['height','width','src'],['47','48',""+imagem[teminfo]]);	
			var cliente2 = top.cria_elemento0(false,null,'img',['height','width','src'],['56','56',""+imagem[3]]);
			var cliente3 = top.cria_elemento0(false,null,'img',['height','width','src'], ['90','176',""+img12[cont%2]+arr_foto[cont]]);	
			
			aaa1.appendChild(cliente1);
			var info1 = top.cria_elemento0(false,null,'span',['class'],['info']);
				var spanc1 = span1_0.cloneNode(true);
				var spanc2 = span1_1.cloneNode(true);
				var br0 = br.cloneNode(false);
				var br1 = br.cloneNode(false);
				info1.appendChild(spanc1);
				info1.appendChild(br0);
				spanc2.appendChild(nomefantasiaS1);
				info1.appendChild(spanc2);
				info1.appendChild(br1);
				aaa1.appendChild(info1);
				ddd1.appendChild(aaa1);
				contem.appendChild(ddd1);
				
			aaa2.appendChild(cliente2);
			var info2 = top.cria_elemento0(false,null,'span',['class'],['info']);
				var spanc5 = span2_0.cloneNode(true);
				var spanc6 = span2_1.cloneNode(true);
				var br0 = br.cloneNode(false);
				var br1 = br.cloneNode(false);
				info2.appendChild(spanc5);
				info2.appendChild(br0);
				spanc6.appendChild(nomefantasiaS2);
				info2.appendChild(spanc6);
				info2.appendChild(br1);
				aaa2.appendChild(info2);
				ddd2.appendChild(aaa2);
				contem.appendChild(ddd2);
				
			aaa3.appendChild(cliente3);
			var info3 = top.cria_elemento0(false,null,'span',['class'],['info']);		
				var br0 = br.cloneNode(false);
				var br1 = br.cloneNode(false);
				var br2 = br.cloneNode(false);
				var br3 = br.cloneNode(false);
				var br4 = br.cloneNode(false);
				var br5 = br.cloneNode(false);
				var br6 = br.cloneNode(false);
				var br7 = br.cloneNode(false);
				var br8 = br.cloneNode(false);
				var br9 = br.cloneNode(false);
				info3.appendChild(nomefantasiaS3);
				info3.appendChild(br0);
				top.cria_elemento0(false,info3,'span',['class'],['separador']);
				var espacador = top.cria_elemento0(false,null,'div',['class'],['espacador']);
					var descricao = top.cria_elemento0(false,null,'span',['class'],['descricao']);
					var descricaoT = top.document.createTextNode(""+arr_adescricao[cont]);
						descricao.appendChild(descricaoT);
					espacador.appendChild(descricao);
					espacador.appendChild(br1);
				info3.appendChild(espacador);
				var enderecoT = top.document.createTextNode(""+arr_aendereco[cont]);
				var endereco = top.cria_elemento0(false,null,'span',['class'],['endereco']);
					endereco.appendChild(enderecoT);
				info3.appendChild(endereco);
				info3.appendChild(br2);
				
				var complementoT = top.document.createTextNode(""+arr_acomplemento[cont]);
				var complemento = top.cria_elemento0(false,null,'span',['class'],['complemento']);
					complemento.appendChild(complementoT);
				info3.appendChild(complemento);
				info3.appendChild(br3);
				
				var cep_equivT = top.document.createTextNode(""+arr_acep_equiv[cont]);
				var cep_equiv = top.cria_elemento0(false,null,'span',['class'],['cepequiv']);
					cep_equiv.appendChild(cep_equivT);
				info3.appendChild(cep_equiv);
				info3.appendChild(br4);
				
				var telefoneT = top.document.createTextNode(""+arr_atelefone[cont]);
				var telefone = top.cria_elemento0(false,null,'span',['class'],['telefone']);
					telefone.appendChild(telefoneT);
				info3.appendChild(telefone);
				info3.appendChild(br5);
				
				var cidadeT = top.document.createTextNode(""+arr_acidade[cont]);
				var cidade = top.cria_elemento0(false,null,'span',['class'],['cidade']);
					cidade.appendChild(cidadeT);
				var estadoT = top.document.createTextNode(""+arr_aestado[cont]);
				var estado = top.cria_elemento0(false,null,'span',['class'],['estado']);
					estado.appendChild(estadoT);
				var paisT = top.document.createTextNode(""+arr_apais[cont]);
				var pais = top.cria_elemento0(false,null,'span',['class'],['pais']);
					pais.appendChild(paisT);
				var hyphen1 = hyphen.cloneNode(false);
				var hyphen2 = hyphen.cloneNode(false);
				
				info3.appendChild(cidade);
				info3.appendChild(hyphen1);
				info3.appendChild(estado);
				info3.appendChild(hyphen2);
				info3.appendChild(pais);				
				info3.appendChild(br6);
				
				var espacador2 = top.cria_elemento0(false,null,'span',['class'],['espacador']);
					var email = top.cria_elemento0(false,null,'span',['class'],['email']);
					var emailT = top.document.createTextNode(""+arr_aemail[cont]);
						email.appendChild(emailT);
					
					var site = top.cria_elemento0(false,null,'span',['class'],['site']);
					var siteT = top.document.createTextNode(""+arr_asite[cont]);
						site.appendChild(siteT);
				espacador2.appendChild(email);
				espacador2.appendChild(br7);
				espacador2.appendChild(site);
				espacador2.appendChild(br8);
				
				info3.appendChild(espacador2);
				aaa3.appendChild(info3);
				ddd3.appendChild(aaa3);
				contem.appendChild(ddd3);
			container.appendChild(contem);			
	}//fim for
	aonde02.appendChild(container);
	return true;
}//fim funcao
function apaga_e_recria(oque,aonde){
	if(!top.document.getElementById(""+aonde)){return false;}
	if(oque==null || oque==''){return false;}
	top.delelem(false,""+oque);
	var a = top.document.getElementById(""+aonde);
	top.cria_elemento0(false,a,'span',['id'],['precateg1']);
	return false;
}//fim function
function letra(aonde,oque,classe,href,texto){
	if(!top.document.getElementById(""+aonde)){return false;}
	var ao = top.document.getElementById(""+aonde);
	top.delelem(false,""+oque);
	var a = top.cria_elemento0(false,null,'a',['id','class','href','target'],[""+oque,""+classe,""+href,'invisivel']);
	var t = top.document.createTextNode(""+texto);
	a.appendChild(t);
	ao.appendChild(a);
	return true;
}
function ver_categoria_e_submit_e_tcadastra(form , textocateg_id,nametpm, aonde){
	top.delelem(false,nametpm);
	if(form==null || form=='' || textocateg_id=='' || textocateg_id==null || nametpm==null || nametpm=='' || 
		aonde=='' || aonde==null){return false;}
	if(!top.document.getElementById(""+textocateg_id)){return false;}
	if(!top.document.getElementById(""+aonde)){return false;}
	var texto1 = ""+top.document.getElementById(""+textocateg_id).value;
	dani_trim(texto1);
	if(texto1.length ==0){ alert('texto da categoria em branco'); return false; }
	var ao= top.document.getElementById(""+aonde);
	var inp = top.cria_elemento0(false,null,'input',['type','id','name','value'],['hidden',""+nametpm,""+nametpm,""+texto1]);
	ao.appendChild(inp);
	form.form.submit();
	return true;	
}//fim funcao

function veriano(formu,pa_onde,nomeid,miself){
if(formu == '00'){return false;}
if(!(document.getElementById(""+pa_onde))){return false;}
var paraon = document.getElementById(""+pa_onde);
top.delelem(false,""+nomeid);
var form3 = top.cria_elemento0(false,null,'form',['action','method','target'],[""+miself,'post','invisivel']);
var select3 = top.cria_elemento0(false,null,'select',['size', 'name','id'],['1', 'mes01','mes01']);
top.cria_options( false, select3, 0 , ['00','01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'] , ['Selecione o M\ês','Janeiro','Fevereiro','Mar\ço','Abril','Maio','Junho','Julho','Agosto','Setembro','outubro','Novembro', 'Dezembro'] );
var spannome = top.cria_elemento0(false,null,'span',['id'],[""+nomeid]);
top.cria_elemento0(false,form3,'input',['value','type','nome'],['7','hidden','pagina']);
form3.appendChild(select3);
spannome.appendChild(form3);
paraon.appendChild(spannome);
return true;
}//fim funcao

function adi_categ_no_cliente(botao, sufixo0, sufixo1, ultimacateg, aondeadicionar ){
	if(!top.document.getElementById(""+aondeadicionar)){return false;}
	if(!top.document.getElementById(""+ultimacateg)){return false;}
	if(botao ==null || botao == '' || sufixo0=='' || sufixo0==null || sufixo1==null || sufixo1==''){return false;}
	var ultcate = parseInt(top.document.getElementById(""+ultimacateg).value);
	if(ultcate==0 || ultcate==null || isNaN(ultcate)){return false;}
	var a=0;
	var aonde = top.document.getElementById(""+aondeadicionar);
	var regular1 = /(^\d+)(_{1})(.*$)/ig ;
	var br = top.document.createElement('br');
	for( ; a <= ultcate ; a++ ){
		if(!top.document.getElementById(""+sufixo0+a)){continue;}
		var cateadicionar = top.document.getElementById(""+sufixo0+a);
		if(cateadicionar.type.toLowerCase()=='checkbox'){}else{continue;}
		if(cateadicionar.checked==true){
			cateadicionar.checked=false;
		}else{
			continue;
		}//fim if
		if(!top.document.getElementById(""+sufixo1+a)){ //não foi adicionado antes
			var tmpv = cateadicionar.value ;
			var id = tmpv.replace(regular1,'$1');
			var cate = tmpv.replace(regular1,'$3');
			var textl = top.document.createTextNode(""+cate);
			var labell = top.cria_elemento0(false,null,'label',['for'],[""+sufixo1+a]);
			labell.appendChild(textl);
			var mbr = br.cloneNode(true);
			var cb = top.cria_elemento0(false,null,'input',['id','type','value','name'],[""+sufixo1+a,'checkbox',""+id,'categs[]']);
			cb.checked=true;
			aonde.appendChild(cb);
			aonde.appendChild(labell);
			aonde.appendChild(mbr);
		}else{
			top.document.getElementById(""+sufixo1+a).checked = true;
		}//fim if	
	}//fim for
	return true;
}//fim funcao

function cria123_elemento(deleta , anexa_id , container_id , tipo1 , valor0_arr0_e_id, valor0_arr1 ,
	valorlabel_arr , sufixo_id ){ 
	if(!top.document.getElementById(""+anexa_id)){return false;}
	if(deleta==false && !top.document.getElementById(""+container_id)){return false;}
	var aao = top.document.getElementById(""+anexa_id);
	if(deleta == true ){
		top.delelem(false,""+container_id); 
	}
	var a=false;  var aa=0;
	var b=false;  var bb=0;
	
	if(valor0_arr0_e_id==''){a=true;}else{
		aa = valor0_arr0_e_id.length;
		if(aa==0){ a=true;}
	}
	if(valor0_arr1==''){b=true;}else{
		bb = valor0_arr1.length;
		if(bb==0){ b=true;}
	}
	
	if(a && b ){ return false;}
	var dd = aa;
	if( bb > dd){dd=bb;}
	if(deleta == true ){
		var elemtipo = top.cria_elemento0(false,null,""+tipo1,['id'],[""+container_id]);
	}else{
		var elemtipo = top.document.getElementById(""+container_id);
	}
	var br = top.document.createElement('br'); 
	
	var ee=0;
	for( ; ee<dd; ee++){
		var valor = ""+(a==false ? ""+valor0_arr0_e_id[ee] : '');
		valor += "_" + (b==false ? ""+valor0_arr1[ee] : '');
		top.cria_elemento0(false,elemtipo,'input',['type','id','value'],['checkbox',""+sufixo_id+valor0_arr0_e_id[ee],""+valor]);
		var text = top.document.createTextNode(""+valorlabel_arr[ee]);
		var label = top.cria_elemento0(false,null,'label',['for'],[""+sufixo_id+valor0_arr0_e_id[ee]]);
		label.appendChild(text);
		elemtipo.appendChild(label);
		var br2 = br.cloneNode(true);
		elemtipo.appendChild(br2);
	}// fim for
	if(deleta==true){aao.appendChild(elemtipo);}
	return true;
}//fim function

function cria_ckla(anexa_id,conteudo_id,nomearr,id_prefixo,val_ch_arr,val_la_arr){
	if(!top.document.getElementById(""+anexa_id)){return false;}
	var len1 = val_ch_arr.length;
	if(len1==0 || len1 != val_la_arr.length ){return false;}
	var ane1 = top.document.getElementById(""+anexa_id);
	top.delelem(false,""+conteudo_id);
	var ane2 = top.cria_elemento0(false,null,'span',['id'],[""+conteudo_id]);
	var br = top.document.createElement('br');
	var a=0;
	for( ; a<len1 ; a++){
		top.cria_elemento0(false,ane2,'input',['type','id','name','value','checked'],['checkbox', ""+id_prefixo+val_ch_arr[a], ""+nomearr , val_ch_arr[a],'checked']);
		var ta0 = top.document.createTextNode(""+val_la_arr[a]);
		var la0 = top.cria_elemento0(false,null,'label',['for'],[""+id_prefixo+val_ch_arr[a]]);
		la0.appendChild(ta0);
		ane2.appendChild(la0);
		var mb = br.cloneNode(true);
		ane2.appendChild(mb);
	}//fim for
	ane1.appendChild(ane2);
	return true;
}//end function
function cria_ch2(){

}//fim function
function criatexto(aonde_id,poraqui_id,tipo_por,texto){
	if(!top.document.getElementById(""+aonde_id)){return false;}
	var ao = top.document.getElementById(""+aonde_id);
	top.delelem(false,""+poraqui_id);
	var tex = top.document.createTextNode(""+texto);
	var etip = top.cria_elemento0(false,null,""+tipo_por,['id'],[""+poraqui_id]);
	etip.appendChild(tex);
	ao.appendChild(etip);
	return true;
}
 //function veriano(formu,pa_onde,nomeid,miself){
//if(formu == '00'){return false;}
//if(!(document.getElementById(""+pa_onde))){return false;}
//var paraon = document.getElementById(""+pa_onde);
//top.delelem(false,""+nomeid);
//var form3 = top.cria_elemento0(false,null,'form',['action','method','target'],[""+miself,'post','dani01']);
//var select3 = top.cria_elemento0(false,null,'select',['size', 'name','id'],['1', 'mes01','mes01']);
//top.cria_options( false, select3, 0 , ['00','01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'] , ['Selecione o M\ês','Janeiro','Fevereiro','Mar\ço','Abril','Maio','Junho','Julho','Agosto','Setembro','outubro','Novembro', 'Dezembro'] );
//var spannome = top.cria_elemento0(false,null,'span',['id'],[""+nomeid]);
//top.cria_elemento0(false,form3,'input',['value','type','nome'],['7','hidden','pagina']);
//form3.appendChild(select3);
//spannome.appendChild(form3);
//paraon.appendChild(spannome);
//return true;
//}

function getvalor(id){
	if(top.document.getElementById(""+id)){
	 return top.document.getElementById(""+id).value;
	}
	return null;
}

function dani_trim( afih ){
	 afih.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ");
}

function dani_trim0( afih ){
	 afih.replace(/^\s+|\s+$/g,"").replace(/\s+/g,"");
}
function gotohome(){
	var misite="http://www.vipvirtual.com.br/";
	top.location.href=""+misite+"index_para_daniel.php"
}//end gotohome

function muda_atributo(debug_mode2 , elem2 , atrib_arr2 , val_arr2){
	var mostra2 = (debug_mode2 == true);
	if(elem2==null || elem2==''){ if(mostra2){alert(" elemento2 em branco ou nullo");} return false;}
	var tamanho2 = atrib_arr2.length;
	if(tamanho2==0 || val_arr2.length != tamanho2){ if(mostra2){alert(" atributos2 em branco e ou o no. de valores2 não assimétrico :P ");} return false;}
	if(top.document.getElementById(""+elem2)){
		var tmpo2 = top.document.getElementById(""+elem2);
	}else{
		tmpo2 = elem2;
	}
	if(tmpo2==null){ if(mostra2){alert("objeto2 nullo. 'I OBJECT!(!!!)... Recused!' ");} return false;}
	var a2=0;
	for( ; a2<tamanho2; a2++ ){
		if(!tmpo2.getAttributeNode(""+atrib_arr2[a2])){// tá certo! porque nao é o valor do atributo, é o node em si. :-) Eba!!! Valeu Jesus!!! e Maria!!!!!!!!!! :-D  ^^
			var atributo = top.document.createAttribute(""+atrib_arr2[a2]);
			atributo.nodeValue = ""+val_arr2[a2];
			tmpo2.setAttributeNode(atributo);
		}else{
			var vv = tmpo2.getAttributeNode(""+atrib_arr2[a2]);
			vv.nodeValue = ""+val_arr2[a2];
		}	
	}//fim for
	return true;
}

function cria_elemento0( debug_mode3 , append_aonde3 , elem_app3 , propr_arr_app3 , propr_val_arr_app3 ){
   var mostra3 = (debug_mode3 == true );
	dani_trim(""+elem_app3);
	if(elem_app3.length == 0){ if(mostra3){alert("elem_app3 em branco");} return false; }
	var gerado_elem_app3 = top.document.createElement(""+elem_app3);
	var t3 = propr_arr_app3.length;
	if(propr_arr_app3 != null && propr_val_arr_app3 != null && t3 == propr_val_arr_app3.length ){
		for( var a3=0 ; a3 < t3 ; a3++){
			var atributo = top.document.createAttribute(""+propr_arr_app3[a3]);
			atributo.nodeValue = ""+propr_val_arr_app3[a3];
			gerado_elem_app3.setAttributeNode(atributo);
		}
	}
	if(append_aonde3==null){return gerado_elem_app3; }
	if(top.document.getElementById(append_aonde3)){
		var aao3 = top.document.getElementById(append_aonde3);		
		if(aao3==null){if(mostra3){alert("id aao3 nao existe");} return false; }
		aao3.appendChild(gerado_elem_app3);
		return true;
	}
	append_aonde3.appendChild(gerado_elem_app3);
	return true;
}
function delelem(debug_mode4, deid4){
	var mostra4 = (debug_mode4 == true );
	if(deid4 == null){ if(mostra4){alert("deid4 não existe ou é nullo");} return false;}
	if(top.document.getElementById(""+deid4)){ 
		var pelem4 = top.document.getElementById(""+deid4); // id -> object
	}else{
		var pelem4 = deid4 ; // raw object
	}
	if(!pelem4.parentNode){ if(mostra4){alert(" nódulo pai4 não existe... não posso apagar objeto. ");}  return false;}
	pelem4.parentNode.removeChild(pelem4);
	return true;
}

	function cria_options( debug_mode5 , anexa_select5 , inicio_index5 , val_arr5 , text_arr5, zeraop ){
		var zeraop5=true;
		if( !zeraop ){ zeraop5=false; }  
		
		var mostra5 = (debug_mode5 == true );
		if(anexa_select5=='' || anexa_select5==null ){ if(mostra5){alert('Eita! anexar5 àonde ? :-D');} return false; }
		if(top.document.getElementById(""+anexa_select5)){ 
			var  ana5 = top.document.getElementById(""+anexa_select5);
		} else {
			var  ana5 = anexa_select5;
		}
		var b5 = val_arr5.length;
		if( b5 != text_arr5.length ){if(mostra5){alert('val5 e view5 tem tamanhos diferentes :-)');} return false;}
 		var a5 = parseInt(inicio_index5);
 		if( isNaN(a5)){ if(mostra5){alert('5, NaN! Not A Number! Not A Number! Not a Number!!! :o)');} return false; }
		var c5 = 0 + b5 + a5;
		b5 = 0;
		if(zeraop5==true){
			ana5.options.length = a5;
		}
		for( ; a5 < c5 ; a5++ , b5++ ){
			ana5.options[a5] = new Option(""+text_arr5[b5] ,""+val_arr5[b5] );		
		}
		return true; 		
	}//fim funcao
	function zera_options0( selectid , indice ){
		if(top.document.getElementById(""+selectid)){ 
			var  ana5 = top.document.getElementById(""+selectid);
		} else {
			var  ana5 = selectid;
		}
		var ab5 = parseInt(indice);
		if(isNaN(ab5) || ab5<0 ){return false;}
		ana5.options.length = ab5;
		return true;
	}//fim function
	
	function criaelemp2_v02( anexaa , spanid , formid , action , target , album_id , album_nome , album_clic_clac,
			evento_id,evento_dia,evento_nome,evento_cidade ,evento_estado ,evento_pais ,evento_line_ups ,evento_coberto_por ,
			fotos_img_nome, fotos_img_www_path , altura , largura ){
 		// à Selminha e a quem mais interessar possa: Cuidado com as "permissões" das imagens:-D
 		if(!top.document.getElementById(""+anexaa)){ alert('Eita! anexar àonde ? :-D'); return false; }
 		var an = top.document.getElementById(""+anexaa);
 		top.delelem(false,""+spanid);
 		var numero = album_id.length;
 		if(numero==0){ alert('Eita! zero itens ! :-D'); return false; }
 		if( album_nome.length != numero || album_clic_clac.length != numero || 
 			evento_id.length != numero || evento_dia.length != numero || evento_nome.length != numero || evento_cidade.length != numero 
 			|| evento_estado.length != numero || evento_pais.length != numero || evento_line_ups.length != numero || evento_coberto_por.length != numero ||
 			 fotos_img_www_path.length != numero || fotos_img_nome.length != numero 
 		){ alert('Eita! as coisas percisam ter o mesmo tamanho sô! :-)'); return false; }
 		var larg = parseInt(numero * largura * 2 ) ;
 		var altu = parseInt(altura * 1.8 ) ;
 //		top.criaelemp2_v02('div2_1','span2_2','form2_3','http://www.vipvirtual.com.br/includes_public.d/ifrap03_v02_r00.php','dani01',
	//	$album_id , $album_nome , $album_clic_clac , 
		// $evento_id , $evento_dia , $evento_nome , $evento_cidade , $evento_estado , $evento_pais , $evento_line_ups , $evento_coberto_por ,
		  // $fotos_img_nome , $fotos_img_www_path , $alt , $larg ) ;
 		if(isNaN(larg) || isNaN(altu)){ alert('NaN! Not A Number! Not A Number! Not a Number!!! :o)'); return false; }
 	
 		var mispan_origem = top.cria_elemento0(true,null , 'span' , ["id"] , [""+spanid ] ); ////
 			if(mispan_origem == false ){ alert('Eita! faiô o spani ! :-D'); return false; }
 			//mispan_origem.style.width = ""+larg+"px";
 	
		var miform = top.cria_elemento0(true,null, 'form' , ["id", "action" , "method" , "target" ] , [""+formid , ""+action , "post" , ""+target ] );
			if(miform == false){ alert('Eita! faiô o formi ! :-D'); return false; }
		var b = ["http://vipimg3.vipvirtual.com.br","http://vipimg1.vipvirtual.com.br"];
		var a=0;
			var mispan_finali = top.cria_elemento0(true,null , 'span' , ["class"] , ["spania_finali"] );
			var mipoimg0 = top.cria_elemento0(true,null,'img',["src","class"],["http://www.vipvirtual.com.br/logo3_v01.png","imagem2"]);

			if(mipoimg0==false){alert("Fartô minha figurinha....buAáááá!!!! eu quero a figurinha!! :P"); return false;}
			if(mispan_finali==false ){alert("Fartô meu íspâni da figurinha....buAáááá!!!! eu quero meu íspâni !!! :P"); return false;}
				mispan_finali.appendChild(mipoimg0);
		var mibr = top.document.createElement('br');
		for( ; a < numero ; a++ ){
			var c = ""+b[ a % 2 ] ;
			var mispan_miolo = top.cria_elemento0(true,null , 'span' , ["class"] , ["miolo"] ); 
				var mibutao = top.cria_elemento0(true,null,'button', ["type" , "name" , "class" , "value" ] , ["submit" , "submit2" , "butao" , ""+album_id[a] ] );
					if(mibutao==false){ alert('Eita! faiô o butão ! :-D'); return false;  }
						var miimg = top.cria_elemento0(true,null,'img',["src","class"],[""+c+fotos_img_www_path[a]+"thumb_"+fotos_img_nome[a] ,"imagem" ] );
							if(miimg==false){ alert('Eita! faiô a imêige ! :-D'); return false;  }
							mibutao.appendChild( miimg );
							mispan_miolo.appendChild( mibutao );
				var mipo_spani = top.cria_elemento0(true,null,'span',["class"],["spani"]);
	
					var mipo1 = top.cria_elemento0(true,null,'span',["class"],["spani_ev_nome"]);
					var mit1 = top.document.createTextNode("Nome do Evento: "+evento_nome[a]);
						mipo1.appendChild(mit1);
						mipo_spani.appendChild(mipo1);
							var mibr1 = mibr.cloneNode(true);
							mipo_spani.appendChild(mibr1);
					var mipo2 = top.cria_elemento0(true,null,'span',["class"],["spani_ev_dia"]);
					var mit2 = top.document.createTextNode("Dia do Evento: "+evento_dia[a]);
						mipo2.appendChild(mit2);
						mipo_spani.appendChild(mipo2);
							var mibr2 = mibr.cloneNode(true);
							mipo_spani.appendChild(mibr2);
					var mipo3 = top.cria_elemento0(true,null,'span',["class"],["spani_ev_cidade"]);
					var mit3 = top.document.createTextNode("Cidade do Evento: "+evento_cidade[a]);
						mipo3.appendChild(mit3);
						mipo_spani.appendChild(mipo3);
							var mibr3 = mibr.cloneNode(true);
							mipo_spani.appendChild(mibr3);
					var mipo4 = top.cria_elemento0(true,null,'span',["class"],["spani_ev_estado"]);
					var mit4 = top.document.createTextNode("Estado: "+evento_estado[a]);
						mipo4.appendChild(mit4);
						mipo_spani.appendChild(mipo4);
							var mibr4 = mibr.cloneNode(true);
							mipo_spani.appendChild(mibr4);
					var mipo5 = top.cria_elemento0(true,null,'span',["class"],["spani_ev_pais"]);
					var mit5 = top.document.createTextNode("País: "+evento_pais[a]);
						mipo5.appendChild(mit5);
						mipo_spani.appendChild(mipo5);
							var mibr5 = mibr.cloneNode(true);
							mipo_spani.appendChild(mibr5);
					var mipo6 = top.cria_elemento0(true,null,'span',["class"],["spani_ev_lineup"]);
					var mit6 = top.document.createTextNode("Line Up's ou equivalente: "+evento_line_ups[a]);
						mipo6.appendChild(mit6);
						mipo_spani.appendChild(mipo6);
							var mibr6 = mibr.cloneNode(true);
							mipo_spani.appendChild(mibr6);
					var mipo7 = top.cria_elemento0(true,null,'span',["class"],["spani_ev_por"]);
					var mit7 = top.document.createTextNode("Evento Coberto Por: "+evento_coberto_por[a]);
						mipo7.appendChild(mit7);
						mipo_spani.appendChild(mipo7);
							var mibr7 = mibr.cloneNode(true);
							mipo_spani.appendChild(mibr7);
					var mipo8 = mispan_finali.cloneNode(true);
						mipo_spani.appendChild(mipo8);
							var mibr8 = mibr.cloneNode(true);
							mipo_spani.appendChild(mibr8);
				mispan_miolo.appendChild( mipo_spani );
				miform.appendChild(mispan_miolo);			
		}//end for		
		mispan_origem.appendChild(miform);
		an.appendChild(mispan_origem );
		return true;
}

	function criaelemp3_v03( anexaa , spanid , formid , action , target , foto_arr_id , album_nome , album_clic_clac,
			evento_id,evento_dia,evento_nome,evento_cidade ,evento_estado ,evento_pais ,evento_line_ups ,evento_coberto_por ,
			fotos_img_nome, fotos_img_www_path , altura , largura ){
 	// à Selminha e a quem mais interessar possa: Cuidado com as "permissões" das imagens:-D
 		//		top.criaelemp2_v03('div3_1','span3_2','form3_3','http://www.vipvirtual.com.br/includes_public.d/ifrap04_v02_r00.php','dani01',
		//	$album_id , $album_nome , $album_clic_clac , 
		// $evento_id , $evento_dia , $evento_nome , $evento_cidade , $evento_estado , $evento_pais , $evento_line_ups , $evento_coberto_por ,
		  // $fotos_img_nome , $fotos_img_www_path , $alt , $larg ) ;
 		if(!top.document.getElementById(""+anexaa)){ alert('Eita! anexar àonde ? :-D'); return false; }
 		var an = top.document.getElementById(""+anexaa);
 		top.delelem(false,""+spanid);
 		var numero = album_id.length;
 		if(numero==0){ alert('Eita! zero itens ! :-D'); return false; }
 		if( album_nome.length != numero || album_clic_clac.length != numero || 
 			evento_id.length != numero || evento_dia.length != numero || evento_nome.length != numero || evento_cidade.length != numero 
 			|| evento_estado.length != numero || evento_pais.length != numero || evento_line_ups.length != numero || evento_coberto_por.length != numero ||
 			 fotos_img_www_path.length != numero || fotos_img_nome.length != numero 
 		){ alert('Eita! as coisas percisam ter o mesmo tamanho sô! :-)'); return false; }
 		var larg = parseInt(numero * largura * 2 ) ;
 		var altu = parseInt(altura * 1.8 ) ;
 //		top.criaelemp2_v02('div2_1','span2_2','form2_3','http://www.vipvirtual.com.br/includes_public.d/ifrap03_v02_r00.php','dani01',
	//	$album_id , $album_nome , $album_clic_clac , 
		// $evento_id , $evento_dia , $evento_nome , $evento_cidade , $evento_estado , $evento_pais , $evento_line_ups , $evento_coberto_por ,
		  // $fotos_img_nome , $fotos_img_www_path , $alt , $larg ) ;
 		if(isNaN(larg) || isNaN(altu)){ alert('NaN! Not A Number! Not A Number! Not a Number!!! :o)'); return false; }
 	
 		var mispan_origem = top.cria_elemento0(true,null , 'span' , ["id"] , [""+spanid ] ); ////
 			if(mispan_origem == false ){ alert('Eita! faiô o spani ! :-D'); return false; }
 			//mispan_origem.style.width = ""+larg+"px";
 	
		var miform = top.cria_elemento0(true,null, 'form' , ["id", "action" , "method" , "target" ] , [""+formid , ""+action , "post" , ""+target ] );
			if(miform == false){ alert('Eita! faiô o formi ! :-D'); return false; }
		var b = ["http://vipimg3.vipvirtual.com.br","http://vipimg1.vipvirtual.com.br"];
		var a=0;
			var mispan_finali = top.cria_elemento0(true,null , 'span' , ["class"] , ["spania_finali"] );
			var mipoimg0 = top.cria_elemento0(true,null,'img',["src","class"],["http://www.vipvirtual.com.br/logo3_v01.png","imagem2"]);

			if(mipoimg0==false){alert("Fartô minha figurinha....buAáááá!!!! eu quero a figurinha!! :P"); return false;}
			if(mispan_finali==false ){alert("Fartô meu íspâni da figurinha....buAáááá!!!! eu quero meu íspâni !!! :P"); return false;}
				mispan_finali.appendChild(mipoimg0);
		var mibr = top.document.createElement('br');
		for( ; a < numero ; a++ ){
			var c = ""+b[ a % 2 ] ;
			var mispan_miolo = top.cria_elemento0(true,null , 'span' , ["class"] , ["miolo"] ); 
				var mibutao = top.cria_elemento0(true,null,'button', ["type" , "name" , "class" , "value" ] , ["submit" , "submit2" , "butao" , ""+album_id[a] ] );
					if(mibutao==false){ alert('Eita! faiô o butão ! :-D'); return false;  }
						var miimg = top.cria_elemento0(true,null,'img',["src","class"],[""+c+fotos_img_www_path[a]+"thumb_"+fotos_img_nome[a] ,"imagem" ] );
							if(miimg==false){ alert('Eita! faiô a imêige ! :-D'); return false;  }
							mibutao.appendChild( miimg );
							mispan_miolo.appendChild( mibutao );
				var mipo_spani = top.cria_elemento0(true,null,'span',["class"],["spani"]);
	
					var mipo1 = top.cria_elemento0(true,null,'span',["class"],["spani_ev_nome"]);
					var mit1 = top.document.createTextNode("Nome do Evento: "+evento_nome[a]);
						mipo1.appendChild(mit1);
						mipo_spani.appendChild(mipo1);
							var mibr1 = mibr.cloneNode(true);
							mipo_spani.appendChild(mibr1);
					var mipo2 = top.cria_elemento0(true,null,'span',["class"],["spani_ev_dia"]);
					var mit2 = top.document.createTextNode("Dia do Evento: "+evento_dia[a]);
						mipo2.appendChild(mit2);
						mipo_spani.appendChild(mipo2);
							var mibr2 = mibr.cloneNode(true);
							mipo_spani.appendChild(mibr2);
					var mipo3 = top.cria_elemento0(true,null,'span',["class"],["spani_ev_cidade"]);
					var mit3 = top.document.createTextNode("Cidade do Evento: "+evento_cidade[a]);
						mipo3.appendChild(mit3);
						mipo_spani.appendChild(mipo3);
							var mibr3 = mibr.cloneNode(true);
							mipo_spani.appendChild(mibr3);
					var mipo4 = top.cria_elemento0(true,null,'span',["class"],["spani_ev_estado"]);
					var mit4 = top.document.createTextNode("Estado: "+evento_estado[a]);
						mipo4.appendChild(mit4);
						mipo_spani.appendChild(mipo4);
							var mibr4 = mibr.cloneNode(true);
							mipo_spani.appendChild(mibr4);
					var mipo5 = top.cria_elemento0(true,null,'span',["class"],["spani_ev_pais"]);
					var mit5 = top.document.createTextNode("País: "+evento_pais[a]);
						mipo5.appendChild(mit5);
						mipo_spani.appendChild(mipo5);
							var mibr5 = mibr.cloneNode(true);
							mipo_spani.appendChild(mibr5);
					var mipo6 = top.cria_elemento0(true,null,'span',["class"],["spani_ev_lineup"]);
					var mit6 = top.document.createTextNode("Line Up's ou equivalente: "+evento_line_ups[a]);
						mipo6.appendChild(mit6);
						mipo_spani.appendChild(mipo6);
							var mibr6 = mibr.cloneNode(true);
							mipo_spani.appendChild(mibr6);
					var mipo7 = top.cria_elemento0(true,null,'span',["class"],["spani_ev_por"]);
					var mit7 = top.document.createTextNode("Evento Coberto Por: "+evento_coberto_por[a]);
						mipo7.appendChild(mit7);
						mipo_spani.appendChild(mipo7);
							var mibr7 = mibr.cloneNode(true);
							mipo_spani.appendChild(mibr7);
					var mipo8 = mispan_finali.cloneNode(true);
						mipo_spani.appendChild(mipo8);
							var mibr8 = mibr.cloneNode(true);
							mipo_spani.appendChild(mibr8);
				mispan_miolo.appendChild( mipo_spani );
				miform.appendChild(mispan_miolo);			
		}//end for		
		mispan_origem.appendChild(miform);
		an.appendChild(mispan_origem );
		return true;
}

	function	criaformulariov01(app_aonde , span_env, span_arr_propi, span_arr_val , 
		propis_f0, propis_f0_val,  propis_s0 , propis_s0_val,   option_s0_val, option_s0_view,
		 propis_f1,propis_f1_val, propis_s1, propis_s1_val, option_s1_val, option_s1_view , criabu1, criabu2){
		if(!(top.document.getElementById(""+app_aonde ))){ alert('Eita! anexar àonde 1 ? :-D'); return false; }
 		var an = top.document.getElementById(""+app_aonde );
 		top.delelem(false,""+span_env);
 		if(propis_f0.length != propis_f0_val.length ){alert('éfê zero! éfê zero!!! tem que ser igual !!! :P');  return false; }
		if(propis_s0.length != propis_s0_val.length ){alert('éssê zero! éssê zero!!! tem que ser igual !!! :P');  return false; }
		if(option_s0_val.length != option_s0_view.length ){alert(' ópitium éssê zero! ópitium éssê zero!!! tem que ser igual !!! :P');  return false; }
		
		if(propis_f1.length != propis_f1_val.length ){alert('éfê um! éfê um!!! tem que ser igual !!! :P');  return false; }
		if(propis_s1.length != propis_s1_val.length ){alert('éssê um! éssê um!!! tem que ser igual !!! :P');  return false; }
		if(option_s1_val.length != option_s1_view.length ){alert('ópitium éssê um! ópitium éssê um!!! tem que ser igual !!! :P');  return false; }
		
		if( span_arr_propi.length != span_arr_val.length ){ alert("propri e val ispãní tem que ser igual"); return false;}
		var mispani = 	top.cria_elemento0(true,null,'span', span_arr_propi , span_arr_val );
		if(mispani==false){alert("Búaaa...íspâní um ixistí...chiuifi....:~~ :P"); return false; }
		
		var f0 = top.cria_elemento0(true,null,'form', propis_f0 , propis_f0_val );
		if( f0==false){ alert('faio o fórmi0 '); return false;}
		var s0 = top.cria_elemento0(true , null ,'select', propis_s0 , propis_s0_val );
		if( s0==false){ alert('faio o seléquiti0 '); return false;}
		if(top.cria_options( true,s0 , 0 , option_s0_val , option_s0_view )==false){ alert('faio o ópitium do seléquiti0 '); return false; }
		
		var f1 = top.cria_elemento0(true,null,'form', propis_f1 , propis_f1_val );
		if( f1==false){ alert('faio o fórmi0 '); return false;}
		var s1 = top.cria_elemento0(true,null,'select', propis_s1 , propis_s1_val );
		if( s1==false){ alert('faio o seléquiti1 '); return false;}
		if(top.cria_options( true,s1 , 0 , option_s1_val , option_s1_view )==false){ alert('faio o ópitium do seléquiti0 '); return false; }
		
		var tmp1 = String.fromCharCode(160) ;
		var tmp3 = String.fromCharCode(160) ; 
		var tmp4 = String.fromCharCode(160) ;
		 
		var t1 = top.document.createTextNode(tmp1);
		var t3 = top.document.createTextNode(tmp3);
		var t4 = top.document.createTextNode(tmp4);
	
		var t3_1 = t3.cloneNode(true);
		
		f0.appendChild(s0);
		f0.appendChild(t3);
		if(criabu1 == true){
			var bu1 = top.cria_elemento0(true,null,'input', ["type","value","onclick"] , ["button","ok1","this.form.submit();"] );
			if(bu1 != false){
				f0.appendChild(bu1);
				f0.appendChild(t4);
			}
		}
		mispani.appendChild(f0);
		mispani.appendChild(t1);
		
		f1.appendChild(s1);
		f1.appendChild(t3_1);
		if(criabu2 == true){
			var bu2 = top.cria_elemento0(true,null,'input', ["type","value","onclick"] , ["button","ok2","this.form.submit();"] );
			if(bu2 != false){
				f1.appendChild(bu2);
			}
		}
		mispani.appendChild(f1);
		an.appendChild(mispani);
		return true;
	}//end criaform_v01
	
	function movh( dir , elem_id , quantidade, medida){
		if( !( dir == 'd' || dir == 'e' ) ){ alert(" num é pra esquerda ou direita ? Eita!!! :-) "); return false; }
		if(!(top.document.getElementById(""+elem_id))){ alert(" Eita!!!  Seu Navegador é muito antigo :-) ou não existe " + elem_id ); return false; }
		var elemento = top.document.getElementById(""+elem_id);
		var atual =  parseInt(elemento.style.left); 
		var q = parseInt( quantidade );
		if(isNaN(q)){ alert('quantidade é NaN ...:P '); return false;}
		if(isNaN(atual) && elemento.currentStyle ){
			atual = parseInt(elemento.currentStyle.left);
		}
		if(isNaN(atual) && top.document.defaultView ){
			var comp = top.document.defaultView.getComputedStyle(elemento, "");
			atual = parseInt(comp.getPropertyValue("left"));
		}
		if(isNaN(atual)){alert('Eita! nao existe '+elem_id ); return false;}
		if( dir=='d' ){ atual += q; }else{ atual -= q; }
		elemento.style.left = ""+atual+medida;
		return true;
	}

	function movv( dir , elem_id , quantidade, medida){
		if( !( dir == 's' || dir == 'a' ) ){ alert(" num é pra subir ou abaixar ? Eita!!! :-) "); return; }
		if(!(document.getElementById(""+elem_id))){ alert(" Eita!!!  Seu Navegador é muito antigo :-) ou não existe " + elem_id ); return; }
		var elemento = document.getElementById(""+elem_id);
		var atual =  parseInt(elemento.style.top); 
		if(isNaN(atual) && elemento.currentStyle ){
			atual = parseInt(elemento.currentStyle.top);
		}
		if(isNaN(atual) && document.defaultView ){
			var comp = document.defaultView.getComputedStyle(elemento, "");
			atual = parseInt(comp.getPropertyValue("top"));
		}
		if(isNaN(atual)){alert('Eita! nao existe '+elem_id ); return;}
		if( dir=='s' ){ atual -= quantidade; }else{ atual += quantidade; }
		elemento.style.top = ""+atual+medida;
		return; 
	}
function mostramensagem(app_aonde , span_id , mensagem ){
	if(!top.document.getElementById(""+app_aonde)){return false;}
	if(mensagem == '' ){ alert('ué... cade a mensagem pra eu exibir ? :-)'); return false;}
	var inf = top.document.getElementById(""+app_aonde);
		delelem(false,span_id); // delelem ja'faz a verificacao se span_id existe :-)
	var mispani = 	top.cria_elemento0(true,null,'span', ["id"] , [""+span_id] );
	if (mispani == false){ alert('mensagem não pode ser exibida'); return false; }
	var mens = top.document.createTextNode(""+mensagem);
	mispani.appendChild(mens);
	inf.appendChild(mispani);
	return true;
}
function adicionecateg3(deonde, para_onde){ 
	var texto = top.document.getElementById(""+deonde).value ;
	dani_trim(""+texto);
	if(texto.length == 0){ alert("uauauau Cadê(?) o nome da categoria para adicionar? :-)"); return; }
	if(top.document.getElementById(""+para_onde) ){
		var po = top.document.getElementById(""+para_onde);
	}else{ alert("uauauau Cadê(?) o destinatário para enviar? :-)"); return;}
	gconta++;
		
	var m = ""+gprepad+gconta;
	var gerado_span1 = cria_elemento0(true,null , 'span' , ["class"] , ["bloco"] );
	cria_elemento0(gerado_span1 ,'input',["type","value","checked","name","id"] , ["checkbox",texto ,true , "novacatego[]", m ]);
	
	var gerado_label2= cria_elemento0(true,null , 'label' , ["for"] , [ m] );
	var gerado_texto = top.document.createTextNode(""+texto);
	gerado_label2.appendChild(gerado_texto);
	
	gerado_span1.appendChild(gerado_label2);
	po.appendChild(gerado_span1);	

}//end adicionecateg3
function adicione_src_img( valor , aonde ){
	if(top.document.getElementById(""+aonde)){
 		var ab = top.document.getElementById(""+aonde);
 		ab.setAttribute( 'src' , valor );
 		//ab.src = valor ;
	}
}

function parte3v04(debugmode4,fotos,fotosid,pxspan, qtdeclicks,ultimoacesso,somadosvotos,datadecadastrodafoto,notaatualdafoto,qtdedosvotos){
	if(top.document.getElementById('span3_2')){//1
		top.delelem(false,'span3_2');
	}//1
	var f1 = fotos.length;
	if(f1==0 || qtdeclicks.length!=f1 || ultimoacesso.length!=f1 || somadosvotos.length!=f1 || fotosid.length!=f1 || 
	datadecadastrodafoto.length!=f1 || notaatualdafoto.length!=f1 || fotos.length!=f1 || fotosid.length!=f1 || qtdedosvotos.length!=f1 ){
		if(debugmode4==true){alert('variaveis com tamanhos diferentes na parte4');} return false;
	}
	if(top.document.getElementById('div3_1')){//3
		var divtop = top.document.getElementById('div3_1');
	}else{
		if(debugmode4==true){alert('div3_1 não existe');} return false;
	}//3
	var span32 = top.cria_elemento0(debugmode4, null , 'span' ,['id'],['span3_2']);
	/////span32.style.width = ""+pxspan+"px";
	if(span32==false || span32==null){//4
		if(debugmode4==true){alert('span32 não pôde ser criado');} return false;
	}//4
	var tmp = "";
	var jc=1;
	var th = parseInt(f1/3);
	var b = ['http://vipimg3.vipvirtual.com.br','http://vipimg1.vipvirtual.com.br']; // '/.alb.d/'
	var formi33 = top.cria_elemento0(debugmode4,null,'form',['target','method','id','action'], ['dani01','post','form3_3','http://www.vipvirtual.com.br/includes_public.d/ifrap04_v05_r00.php']);
	if(formi33==false || formi33==null ) {//5
		if(debugmode4==true){alert('formi33 faiô...');} return false;
	}//5
	var mu = 0;
	for( ; jc<=f1; jc++,mu++){
		//if(jc%3==0){//7
		//	var mibr2=top.document.createElement('br');
		 //	formi33.appendChild(mibr2);
		//}//7
		tmp = b[mu%2];
		var miolo = top.cria_elemento0(debugmode4,null,'span',['class'],['miolo']);
		var botao = top.cria_elemento0(debugmode4,null,'button',['class','name','value','type'],['butao','submit5',""+fotosid[mu],'submit']);		
		top.cria_elemento0(debugmode4,botao,'img',['class','src'],['imagem',""+tmp+fotos[mu]]);
		miolo.appendChild(botao);
		var spani = top.cria_elemento0(debugmode4,null,'span',['class'],['spani']);
		///
		var spania1 = top.cria_elemento0(debugmode4,null,'span',['class'],['spania1']);
		var texta1 = top.document.createTextNode("Quantidade de clicks: "+qtdeclicks[mu]);
		var bra = top.document.createElement('br');
		spania1.appendChild(texta1);
		spani.appendChild(spania1);
		spani.appendChild(bra);
		////
		///
		var spania2 = top.cria_elemento0(debugmode4,null,'span',['class'],['spania2']);
		var texta2 = top.document.createTextNode("Último acesso: "+ultimoacesso[mu]);
		var bra = top.document.createElement('br');
		spania2.appendChild(texta2);
		spani.appendChild(spania2);
		spani.appendChild(bra);
		////
		///
		var spania3 = top.cria_elemento0(debugmode4,null,'span',['class'],['spania3']);
		var texta3 = top.document.createTextNode("Soma dos votos: "+somadosvotos[mu]);
		var bra = top.document.createElement('br');
		spania3.appendChild(texta3);
		spani.appendChild(spania3);
		spani.appendChild(bra);
		////
		///
		var spania4 = top.cria_elemento0(debugmode4,null,'span',['class'],['spania4']);
		var texta4 = top.document.createTextNode("Quantidade de votos: "+qtdedosvotos[mu]);
		var bra = top.document.createElement('br');
		spania4.appendChild(texta4);
		spani.appendChild(spania4);
		spani.appendChild(bra);
		////
		///
		var spania5 = top.cria_elemento0(debugmode4,null,'span',['class'],['spania5']);
		var texta5 = top.document.createTextNode("Data de cadastro: "+datadecadastrodafoto[mu]);
		var bra = top.document.createElement('br');
		spania5.appendChild(texta5);
		spani.appendChild(spania5);
		spani.appendChild(bra);
		////
		///
		var spania6 = top.cria_elemento0(debugmode4,null,'span',['class'],['spania6']);
		var texta6 = top.document.createTextNode("Nota atual da foto: "+notaatualdafoto[mu]);
		var bra = top.document.createElement('br');
		spania6.appendChild(texta6);
		spani.appendChild(spania6);
		spani.appendChild(bra);
		////
		///
		var spania7 = top.cria_elemento0(debugmode4,null,'span',['class'],['spania7']);
		top.cria_elemento0(debugmode4,spania7,'img',['class','src'],['imagem','http://www.vipvirtual.com.br/logo3_v01.png']);
		spani.appendChild(spania7);
		////
		miolo.appendChild(spani);
		formi33.appendChild(miolo);
		
	}//6 fim for
	span32.appendChild(formi33);
	divtop.appendChild(span32);	
return true;
}// fim function

function parte04v4(debug5,n2,n2_arr,fotoid,n3,n3_p,souadm4,fotoid4,$mi4){
var admeitah = (souadm4 == 'true' ? true : false);
if(top.document.getElementById('span4_2')){//1
	top.delelem(true,'span4_2');
}//1
if(!top.document.getElementById('div4_1')){
	if(debug5==true){alert('div4_1 nao exite');} return false;
}
var divtop41 = top.document.getElementById('div4_1');
var span42 = top.cria_elemento0(debug5,null,'span',['id'],['span4_2']);

if(n3==0){//2
	var spann3 = top.cria_elemento0(debug5,null,'span',['id'],['spann3']);
	var texto = top.document.createTextNode('imgagem em tamanho maior, para essa foto, não está disponível, no momento :-) ');
	spann3.appendChild(texto);
	span42.appendChild(spann3);
	//
}else if(n3==1 && n3_p !=''){ //2
	top.cria_elemento0(debug5,span42,'img',['src'],[""+n3_p]);
}//2
if(n2==1){//3
	var spann2 = top.cria_elemento0(debug5,null,'span',['id'],['spann2']);
	var texton2 = top.document.createTextNode('Sua Nota Foi '+n2_arr[0]+' (em '+n2_arr[1]+' ) ');
	spann2.appendChild(texton2);
	var br4 =  top.document.createTextNode(String.fromCharCode(160));
	span42.appendChild(br4);
	span42.appendChild(spann2);
}else if(n2==0){//3
	var formin2 = top.cria_elemento0(debug5,null,'form',['id','target','method','action'],['formin2','dani01','post',""+n2_arr[0]]);
	var selectn2=top.cria_elemento0(debug5,null,'select',['id','size','name'],['nota05','1','nota05']);
	var labeln2 = top.cria_elemento0(debug5,null,'label',['for'],['nota05']);
	var texton22 = top.document.createTextNode('Nota');
	labeln2.appendChild(texton22);
	formin2.appendChild(labeln2);
	var bb = ['5','4','3','2','1','0'];
	top.cria_options(debug5,selectn2,0,bb,bb);
	formin2.appendChild(selectn2);
	var nbsp3 = top.document.createTextNode(String.fromCharCode(160));
	var nbsp32 = top.document.createTextNode(String.fromCharCode(160));
	var nbsp33 = top.document.createTextNode(String.fromCharCode(160));
	formin2.appendChild(nbsp3);
	formin2.appendChild(nbsp32);
	formin2.appendChild(nbsp33);
	var butaon2 = top.cria_elemento0(debug5,null,'button',['id','name','type','value'],['aleluia05','aleluia05','submit','Votar!']);
	var butaon2texto = top.document.createTextNode('Votar!');
	butaon2.appendChild(butaon2texto);
	formin2.appendChild(butaon2);
	top.cria_elemento0(debug5,formin2,'input',['type','name','value'],['hidden','quem05',""+fotoid]);
	span42.appendChild(formin2);
}//3
if(admeitah==true){//4
var despublica = top.cria_elemento0(debug5,null,'form',['id','target','method','action'],['formin3','dani01','post',""+$mi4]);
var bataodes = top.cria_elemento0(debug5,null,'button',['type','name','value'],['submit','submit555',""+fotoid4]);
var testodes = top.document.createTextNode('Despublique essa foto');
bataodes.appendChild(testodes);
despublica.appendChild(bataodes);
span42.appendChild(despublica);
}//4
divtop41.appendChild(span42);
return true;
}//fim function

function parte04v4_1(debug6,mensagem){
	if(!top.document.getElementById('div4_1')){//1
		if(debug6==true){alert('div4_1 não existe');} return false;
	}//1
	if(top.document.getElementById('span4_2')){//2
		delelem(debug6,'span4_2');
	}//
	var div = top.document.getElementById('div4_1');
	var span42 = top.cria_elemento0(debug6,null,'span',['id'],['span4_2']);
	var texto42 = top.document.createTextNode(""+mensagem);
	span42.appendChild(texto42);
	div.appendChild(span42);
	return true;
} //fim function

function det_img(debug8,app_aonde8, app_span9, spanprefix8, img_arr8){
	if(app_aonde8=='' || app_span9==''){if(debug8==true){alert('anexar 8-) aonde?');} return false; }
	if(spanprefix8==''){if(debug8==true){alert('qual prefixo 8-) ?');} return false; }
	var nim = img_arr8.length;
	if(nim ==0){if(debug8==true){alert('qual imagem(s) 8-) ?');} return false;}
	if(top.document.getElementById(""+app_aonde8)){
		var app = top.document.getElementById(""+app_aonde8);
	}else if(app_aonde8.appendChild){
		var app = app_aonde8;
	}else {
		if(debug8==true){alert('anexar :-D aonde?');}
		return false;
	}//fim if
	top.delelem(false,app_span9);
	var app2 = top.cria_elemento0(debug8,null,'span',['id'],[""+app_span9]);
	
	var a=0;
	for( ; a<nim ; a++){
		var spani2 = top.cria_elemento0(debug8,null,'span',['id'],[""+spanprefix8+a]);
		top.cria_elemento0(debug8,spani2,'img',['src'],[""+img_arr8[a]]);
		app2.appendChild(spani2);
	}//fim for
	app.appendChild(app2);
	return true;	
}//fim function

function verifica_p1_cliente_presubmit(form, checkids_arr, inputids_arr, tamanhomin_arr, nome_arr){
	var oper = form.value;
	if(oper == '...'){return false;}
	if(oper == 'Cadastrar!' || oper=='Alterar!'){}else{return false;}
	var ch = checkids_arr.length;
	if(ch==0 || ch != inputids_arr.length){return false;}
	var mensagem='';
	var a=0;
	var deucerto=true;
	var b=0;
	for( ; a<ch ; a++){
		if(!top.document.getElementById(""+checkids_arr[a]) || !top.document.getElementById(""+inputids_arr[a])){ continue; }
		var ch1 = top.document.getElementById(""+checkids_arr[a]);
		var in2 = top.document.getElementById(""+inputids_arr[a]);
		if(oper=='Alterar!'){
			if(ch1.type=='checkbox'){
				if(ch1.checked==false){continue;}
			}else{
				continue;
			}//fim if
		}//fim if
		var t2 = in2.type;
		if(t2=='text'){
			top.dani_trim(in2.value);
			if(in2.value.length < tamanhomin_arr[a]){
				mensagem += 'campo '+nome_arr[a]+' menor que '+tamanhomin_arr[a];
				deucerto=false;
				continue;
			}//fim if
			b++;
		}else if(t2=='file'){
			if(in2.value.length<5){
				mensagem += ' Campo '+nome_arr[a]+' menor que 5 caracteres ';
				deucerto = false;
				continue;			
			}
			b++;
		}//fim if
	}//fim for
	if(deucerto==false){alert(""+mensagem); return false;}
	if(deucerto==true ){ form.form.submit();}
	return true;
}//fim function
function preencheid(prefixo, numeros, valores, inicio){
	if( !prefixo || !numeros || !valores || isNaN(parseInt(inicio))  ){ alert("eita1"); return; }
	var tnum = 0+numeros.length ;
	var tvalo = 0+valores.length ; 
	var b = parseInt(inicio) ;
	if(numeros[0]=="all"){
		for(var a=0 ; a<tvalo ; a++ , b++ ){
			if(document.getElementById(""+prefixo+b)){
				document.getElementById(""+prefixo+b).value = valores[a];
			}
		}
		return;
	}
	if( tnum != tvalo ){ return; }
	for(var a=0 ; a<tvalo ; a++){
		if(document.getElementById(""+prefixo+numeros[a])){
				document.getElementById(""+prefixo+numeros[a]).value = valores[a];
		}
	}
}//end preencheid
function visivel( prefixo , numeros , tipo ){
	if( !prefixo || !numeros  ){ alert('eita visivel'); return; }
	var tnum = 0+numeros.length ;
	for( var a = 0 ; a < tnum ; a++ ){
		if(document.getElementById(""+prefixo+numeros[a])){
			document.getElementById(""+prefixo+numeros[a]).style.visibility=tipo;
		}
	}
}//end visivel
function visivel_range( prefixo , inicio , fim , tipo ){
	if( !prefixo || isNaN(parseInt(inicio)) || isNaN(parseInt(fim))  ){ alert('eita visivel_range'); return; }
	var fim2 = 0+fim;
	for( var a = 0+inicio ; a <= fim2 ; a++ ){
		if(document.getElementById(""+prefixo+a)){
			document.getElementById(""+prefixo+a).style.visibility=tipo;
		}
	}
}//end visible_range
function desabilita( prefixo , numeros , tipo ){
	if( !prefixo || !numeros  ){ alert('eita visivel'); return false; }
	var tnum = 0+numeros.length ;
	for( var a = 0 ; a < tnum ; a++ ){
		if(top.document.getElementById(""+prefixo+numeros[a])){
			top.document.getElementById(""+prefixo+numeros[a]).disabled=tipo;
		}
	}
	return true;
}//end desabilita
function desabilita_range( prefixo , inicio , fim , tipo ){
	if( !prefixo || isNaN(parseInt(inicio)) || isNaN(parseInt(fim)) ){ alert('eita visivel_range'); return true; }
	var fim2 = 0+fim;
	for( var a = 0+inicio ; a <= fim2 ; a++ ){
		if(top.document.getElementById(""+prefixo+a)){
			top.document.getElementById(""+prefixo+a).disabled=tipo;
		}
	}
	return true;
}//end desabilita_range
function displa( prefixo , numeros , tipo ){
	if( !prefixo || !numeros || !tipo ){ alert('eita displa'); return; }
	var tnum = 0+numeros.length ;
	for( var a = 0 ; a < tnum ; a++ ){
		if(top.document.getElementById(""+prefixo+numeros[a])){
			top.document.getElementById(""+prefixo+numeros[a]).style.display=tipo;
		}
	}
}//end displa
function displa_range( prefixo , inicio , fim , tipo ){
	if( !prefixo || !tipo || isNaN(parseInt(inicio)) || isNaN(parseInt(fim)) ){ alert('eita displa_range'); return; }
	var fim2 = 0+fim;
	for( var a = 0+inicio ; a <= fim2 ; a++ ){
		if(top.document.getElementById(""+prefixo+a)){
			top.document.getElementById(""+prefixo+a).style.display=tipo;
		}
	}
}//end displa_range
function checa( prefixo , numeros , tipo ){
	if( !prefixo || !numeros  ){ alert('eita checa'); return; }
	var tnum = 0+numeros.length ;
	for( var a = 0 ; a < tnum ; a++ ){
		if(top.document.getElementById(""+prefixo+numeros[a])){
			top.document.getElementById(""+prefixo+numeros[a]).checked=tipo;
		}
	}
}//end checa
function checa_range( prefixo , inicio , fim , tipo ){
	if( !prefixo || isNaN(parseInt(inicio)) || isNaN(parseInt(fim)) ){ alert('eita checa_range'); return; }
	var fim2 = 0+fim;
	for( var a = 0+inicio ; a <= fim2 ; a++ ){
		if(top.document.getElementById(""+prefixo+a)){
			top.document.getElementById(""+prefixo+a).checked=tipo;
		}
	}
}//end checa_range




function seleca( prefixo , numeros , tipo ){
	if( !prefixo || !numeros  ){ alert('eita checa'); return; }
	var tnum = numeros.length ;
	for( var a = 0 ; a < tnum ; a++ ){
		if(miiframe5.document.getElementById(""+prefixo+numeros[a])){
			miiframe5.document.getElementById(""+prefixo+numeros[a]).selected=tipo;
		}
	}
}//end seleca

function seleca_range( prefixo , inicio , fim , tipo ){
	if( !prefixo || isNaN(parseInt(inicio)) || isNaN(parseInt(fim)) ){ alert('eita checa_range'); return; }
	var fim2 = 0+fim;
	for( var a = 0+inicio ; a <= fim2 ; a++ ){
		if(miiframe5.document.getElementById(""+prefixo+a)){
			miiframe5.document.getElementById(""+prefixo+a).selected=tipo;
		}
	}
}//end seleca_range



function seleca2( prefixo , numeros , tipo ){
	if( !prefixo || !numeros  ){ alert('eita checa'); return; }
	var tnum = numeros.length ;
	for( var a = 0 ; a < tnum ; a++ ){
		if(document.getElementById(""+prefixo+numeros[a])){
			document.getElementById(""+prefixo+numeros[a]).selected=tipo;
		}
	}
}//end seleca

function seleca_range2( prefixo , inicio , fim , tipo ){
	if( !prefixo || isNaN(parseInt(inicio)) || isNaN(parseInt(fim)) ){ alert('eita checa_range'); return; }
	var fim2 = 0+fim;
	for( var a = 0+inicio ; a <= fim2 ; a++ ){
		if(document.getElementById(""+prefixo+a)){
			document.getElementById(""+prefixo+a).selected=tipo;
		}
	}
}//end seleca_range

function change2(select, input, submit){ //ok :-)
	if(!select || !input || !submit ){ return; }
	var sel_tmp = miiframe5.document.getElementById(""+select) ;
	var inp_tmp = document.getElementById(""+input) ; 
	var sub_tmp = document.getElementById(""+submit) ;
	var valor = sel_tmp.value;
	inp_tmp.value = valor;
	if(valor == 'novo'){
		sub_tmp.value = 'Cadastrar';
	} else {
		sub_tmp.value = 'Alterar';
	}
	sel_tmp.form.submit();
}//end change2
