// funções de Javascript

/*
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
oncontextmenu='return false';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
*/



function mostraapenasfoto(foto_url) 
{ 

var destino = '../ferramentas/mostrafoto.php?foto_url=' + foto_url;

var largura=50;
var altura=50;
var esquerda=(screen.availWidth)/2;
var topo=(screen.availHeight)/2;


if(screen.availWidth<1024 || screen.availHeight<768)
	{
	var temscroll="yes";
	}
else
	{
	var temscroll="no";
	}


window.open(destino, '','toolbar=no, scrollbars=' + temscroll + ', left=' + esquerda + ', top=' + topo + ', width=' + largura + ', height= ' + altura + ''); 
} 




function janela_400_400(endereco) 
{ 

var destino = 'http://www.andersonbicicletas.com.br/foto.php?endereco=';

destino = destino + endereco;

window.open(destino, '','toolbar=no, scrollbars=no, left=0, top=0, width=400, height=400'); 
} 


function janela_640_480(endereco) 
{ 

var destino = 'http://www.andersonbicicletas.com.br/foto.php?endereco=';

destino = destino + endereco;

window.open(destino, '','toolbar=no, scrollbars=no, left=0, top=0, width=640, height=480'); 
} 


function janela_480_640(endereco) 
{ 

var destino = 'http://www.andersonbicicletas.com.br/foto.php?endereco=';

destino = destino + endereco;

window.open(destino, '','toolbar=no, scrollbars=no, left=0, top=0, width=480, height=640'); 
} 


function janela_resultado(endereco) 
{ 

var destino = 'http://www.andersonbicicletas.com.br/resultados/';

destino = destino + endereco;

window.open(destino, '','toolbar=no, scrollbars=1, left=0, top=0, width=770, height=500'); 
} 

function aviso() 
{ 
window.open('http://www.andersonbicicletas.com.br/aviso_importante.htm', '','toolbar=no, scrollbars=0, left=200, top=250, width=400, height=120'); 
} 



function mostra_perfil(perfil)
{
var destino = 'http://www.andersonbicicletas.com.br/mostra_perfil.php?perfil=';

destino = destino + perfil;

window.open(destino, '','toolbar=no, scrollbars=no, left=0, top=0, width=600, height=350'); 
} 


function camisas() 
{ 
window.open('http://www.andersonbicicletas.com.br/tour_camisas.htm', '','toolbar=no, scrollbars=yes, left=150, top=0, width=500, height=430'); 
} 





function ampliar()
     {
	 //alert("ampliaria a foto: " + formajuda.grande.value);
	 var destino = 'ferramentas/mostrafoto.php?foto_url=' + formajuda.grande.value;

	 var largura=200;
	 var altura=200;
	 var esquerda=(screen.availWidth-largura)/2;
	 var topo=(screen.availHeight-altura)/2;
	 window.open(destino, '','toolbar=no, status=no, scrollbars=no, left=' + esquerda + ', top=' + topo + ', width=' + largura + ', height= ' + altura + ''); 
	 } 

	 
function detalhe(titulo, desc, img_media, img_grande, topo, esq)
      {
	  formajuda.grande.value=img_grande;
	  
	  ptitulo.innerHTML="<strong>" + titulo + "</strong>";
	  pdesc.innerHTML= '<a href="' + desc + '" target="_blank">' + desc + '</a>';
	  media.src="imagens/" + img_media;

	  divdetalhe.style.top=topo + "px";
	  divdetalhe.style.left=esq + "px";
	  divdetalhe.style.display="block";
	  
	  var topo_sombra=topo+5;
	  var esq_sombra=esq+5;
	  
	  sombra.style.top=topo_sombra + "px";
	  sombra.style.left=esq_sombra + "px";
	  sombra.style.display="block";
	  }







