// JavaScript Document - www.APRAJ.com.br

var IE = document.all?true:false

// Borda dos Links

function borderize(what,color){
  what.style.borderColor=color
}



function borderize_on(e){

 if (document.all) {
   source3=event.srcElement;
 } else if (document.getElementById) {
   source3=e.target;
 }
 source3.style.cursor = 'hand';

 if (source3.className=="menulines"){
   borderize(source3,"#c0c0c0");
 } else{
  while(source3.tagName!="TABLE"){
   source3=document.getElementById? source3.parentNode : source3.parentElement
   if (source3.className=="menulines")
    borderize(source3,"c0c0c0")
  }
 }
}


function borderize_off(e){
 if (document.all){
  source4=event.srcElement;
 } else if (document.getElementById){
  source4=e.target;
 }

 if (source4.className=="menulines"){
  borderize(source4,"white");
 } else {

  while(source4.tagName!="TABLE"){
   source4=document.getElementById? source4.parentNode : source4.parentElement;
   if (source4.className=="menulines") {
    borderize(source4,"white");
   } // if
  }
 }
}


// Celulas mouseover



function mOvr(src) {
 clrOver="#00FF00";
 if (!src.contains(event.fromElement)) {
  src.style.cursor = 'hand';
  src.bgColor = clrOver;
 }
}


function mOut(src) {
 clrIn="#00CC00";
 if (!src.contains(event.toElement)) {
  src.style.cursor = 'default';
  src.bgColor = clrIn;
 }
}

// guia randomico

function img_rnd() {
 rnd_img = new Array();
 rnd_img[0]="/imagens/g_eu.jpg";
 rnd_img[1]="/imagens/g_am.jpg";

 rand = Math.floor(Math.random()*2);
 str_img="<img src='" + rnd_img[rand] + "' alt='Guias 2003' width='130' height='237' border='0'\/>";
 return str_img;
}

// Clima Tempo


function climatempo() {
	
//<iframe src='http://selos.climatempo.com.br/selos/MostraSelo.php?CODCIDADE=271,272,766,1323,4284' scrolling='no' frameborder='0' width=150 height='170' marginheight='0' marginwidth='0'></iframe>	
	
 rnd_city = new Array();
 rnd_city[0]="271" //curitiba";
 rnd_city[1]="766" // ilhadomel";
 rnd_city[2]="272" // fozdoiguacu";
 rnd_city[3]="1323" // paranagua";
 rnd_city[3]="4284" // matinhos";
 rnd_city[4]="1312" // guaratuba;
 rnd_city[5]="4284" // matinhos;

 rand = Math.floor(Math.random()*7);
 str_frame="<iframe src='http://selos.climatempo.com.br/selos/MostraSelo.php?CODCIDADE=" + rnd_city[rand] + "' scrolling='no' frameborder='0' width='150' height='170' marginheight='0' marginwidth='0'></iframe>";
 //return str_frame;
 document.write(str_frame);
}


function climatempo_antigo1() {
 rnd_img1 = new Array();
 rnd_img1[0]="http://selos.climatempo.com.br/pr-curitiba.gif";
 rnd_img1[1]="http://selos.climatempo.com.br/pr-ilhadomel.gif";
 rnd_img1[2]="http://selos.climatempo.com.br/pr-fozdoiguacu.gif";
 rnd_img1[3]="http://selos.climatempo.com.br/pr-paranagua.gif";
 rnd_img1[4]="http://selos.climatempo.com.br/pr-tibagi.gif";

 rand = Math.floor(Math.random()*5);
 str_img="<img src='" + rnd_img1[rand] + "' width='122' height='132' border='0'\/>";
 return str_img;
}

/* Funcoes do Dreamweaver */

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

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_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_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];}
}

function MM_Openning() {
	MM_preloadImages('/imagens/brasil_lt2.gif');
	MM_preloadImages('/imagens/pr_lt2.gif');
	MM_preloadImages('/imagens/interrogacao2.gif');
	MM_preloadImages('/imagens/hostels_v2_over-pencilhard_r2_c4.jpg'); // Curitiba Eco Hostel
	MM_preloadImages('/imagens/hostels_v2_over-pencilhard_r5_c6.jpg'); // Video Curitiba Eco Hostel
	MM_preloadImages('/imagens/hostels_v2_over-pencilhard_r2_c13.jpg'); // Roma Hostel
	MM_preloadImages('/imagens/hostels_v2_over-pencilhard_r5_c15.jpg'); // Video Roma Hostel
	MM_preloadImages('/imagens/hostels_v2-pencilhard_r7_c2.jpg'); // Zorro Hostel
	MM_preloadImages('/imagens/hostels_v2-pencilhard_r9_c3.jpg'); // Video Zorro
	MM_preloadImages('/imagens/hostels_v2-pencilhard_r7_c9.jpg'); // Matinhos
	MM_preloadImages('/imagens/hostels_v2-pencilhard_r7_c16.jpg');// Guaratuba
	MM_preloadImages('/imagens/hostels_v2-pencilhard_r11_c4.jpg');// Paudimar
	MM_preloadImages('/imagens/hostels_v2-pencilhard_r13_c7.jpg');// Video Paudimar
	MM_preloadImages('/imagens/hostels_v2-pencilhard_r11_c13.jpg');// Paudimar falls
	MM_preloadImages('/imagens/hostels_v2-pencilhard_r13_c14.jpg');// Video Paudimar falls
}
/* Fim das funcoes do Dreamweaver */

/* Funcoes para abrir janelas */
function abrir_janH(pagina)
{
jan_fotos  = window.open(pagina,"JaneladeFotos","statusbar,HEIGHT=270,WIDTH=410");
jan_fotos.focus();
}

function abrir_mapa(url,jan_height,jan_width)
{
jan_fotos  = window.open(url,"JaneladeFotos","statusbar,HEIGHT=" + jan_height + ",WIDTH=" +jan_width);
jan_fotos.focus();
}

function abre(url) {
    window.open(url,"_blank","resizable=yes,toolbar=no,status=yes,menubar=no,scrollbars=yes,width=516,height=490,top=2,left=2")
}

function abre_videos(url) {
    window.open(url,"_blank","resizable=no,toolbar=no,status=yes,menubar=no,scrollbars=no,width=520,height=450,top=2,left=2")
}
function abrir_janela(url,jan_height,jan_width)
{
jan_fotos  = window.open(url,"JaneladeFotos","HEIGHT=" + jan_height + ",WIDTH=" +jan_width+"innerHEIGTH=" + jan_height);
jan_fotos.focus();
}

function cart_mostra(id)
{	
	cart_close()
	if(id==0){
		divname = "_internacional"
	} else if (id==1){
		divname = "_internacional18"
	} else if (id==2){
		divname = "_nacional"
	} else if (id==3){		
		divname = "_familia"
	} else if (id==4){
		divname = "_grupos"		
	}
	elem = document.getElementById(divname);
	//elem.style.top = 900;
	//elem.style.left = 900;
	elem.style.visibility="visible";
	
}
function cart_close()
{
	elem = document.getElementById("_internacional");
	elem.style.visibility='hidden'
	elem = document.getElementById("_internacional18");
	elem.style.visibility='hidden'
	elem = document.getElementById("_nacional");
	elem.style.visibility='hidden'
	elem = document.getElementById("_familia");
	elem.style.visibility='hidden'
	elem = document.getElementById("_grupos");
	elem.style.visibility='hidden'

}
