var UrlFotos = "http://wsan.ath.cx:83/tessmodels/mod/";

<!---------------- Botoes ------------------->

var buttonFolder = ""; /*** pasta dos botoes ***/

upSources   = new Array("agencia.png","eventos.png","trabalhos.png","modelos.png","cadastro.png","dicas.png","links.png","contato.png");

overSources = new Array("agencia1.png","eventos1.png","trabalhos1.png","modelos1.png","cadastro1.png","dicas1.png","links1.png","contato1.png");

totalButtons = upSources.length;

<!---------------- Funcao preload ------------------->

function preload() {
	for ( x=0; x<totalButtons; x++ ) {
		buttonUp = new Image();
		buttonUp.src = buttonFolder + upSources[x];
		buttonOver = new Image();
		buttonOver.src = buttonFolder + overSources[x];
	}
}

preload();

<!---------------- MontaMenu ------------------->

function MontaMenu()
{

document.write("<DIV style=\"position:absolute;overflow:hidden;width:100%;height:30%;top:0px;left:0px;vertical-align:middle;text-align:left;\">");
document.write("<DIV style=\"position:static;float:left;overflow:hidden;width:10%;height:70%; vertical-align:text-top;text-align:right;\">");
document.write("<IMG width=100% height=100%; SRC=\"agencias-de-modelos.gif\" alt=\"MAXFAMA - A melhor agência de modelos do Brasil\">");
document.write("</div>");
document.write("<DIV style=\"position:static;overflow:hidden;width:89%;height:70%;vertical-align:middle;text-align:right;font-size:20px; color:#0000ff;\">");
document.write("<marquee scrollamount=5>");
document.write(Mensagem);
document.write("</marquee>");
document.write("</div>");
document.write("<DIV style=\"position:static;overflow:hidden;width:99.9%;vertical-align:middle;text-align:left;\">");
<!------ Botao A Agencia -->
document.write("<a href=\"http://www.tessmodels.com.br/agencia-de-modelos.htm"+window.location.search+"\">");
document.write("<img width=12.4% border=0 id='btAgencia' src=\"agencia.png\" alt=\"A Agência Tess Models\"");
document.write("onmouseover='document.getElementById(\"btAgencia\").src=\"agencia1.png\"'");
document.write("onmouseout='document.getElementById(\"btAgencia\").src=\"agencia.png\"'");
document.write("></a>");
<!------ Botao cadastro -->
document.write("<a href=\"http://www.tessmodels.com.br/agencias-de-modelos.htm"+window.location.search+"\">");
document.write("<img width=12.4% border=\"0\" id='btcadastro' src=\"cadastro.png\" alt=\"Faça seu cadastro\"");
document.write("onmouseover = 'document.getElementById(\"btcadastro\").src = \"cadastro1.png\"'");
document.write("onmouseout =  'document.getElementById(\"btcadastro\").src = \"cadastro.png\"'");
document.write("></a>");
<!------ Botao modelos -->
document.write("<a href=\"http://wsan.ath.cx:83/tessmodels/modelos.htm"+window.location.search+"\">");
document.write("<img width=12.4% border=\"0\" id='btmodelos' src=\"modelos.png\" alt=\"Os nossos modelos\"");
document.write("onmouseover = 'document.getElementById(\"btmodelos\").src = \"modelos1.png\"'");
document.write("onmouseout =  'document.getElementById(\"btmodelos\").src = \"modelos.png\"'");
document.write("></a>");
<!------ Botao dicas -->
document.write("<a href=\"http://www.tessmodels.com.br/dicas.htm"+window.location.search+"\">");
document.write("<img width=12.4% border=\"0\" id='btdicas' src=\"dicas.png\" alt=\"Dicas de como ser modelo\"");
document.write("onmouseover = 'document.getElementById(\"btdicas\").src = \"dicas1.png\"'");
document.write("onmouseout =  'document.getElementById(\"btdicas\").src = \"dicas.png\"'");
document.write("></a>");
<!------ Botao Eventos -->
document.write("<a href=\"http://www.tessmodels.com.br/eventos.htm"+window.location.search+"\">");
document.write("<img width=12.4% border=0 id='btEventos' src=\"eventos.png\" alt=\"Eventos realizados\"");
document.write("onmouseover = 'document.getElementById(\"btEventos\").src = \"eventos1.png\"'");
document.write("onmouseout =  'document.getElementById(\"btEventos\").src = \"eventos.png\"'");
document.write("></a>");
<!------ Botao trabalhos -->
document.write("<a href=\"http://www.tessmodels.com.br/trabalhos.htm"+window.location.search+"\">");
document.write("<img width=12.4% border=\"0\" id='btTrabalhos' src=\"trabalhos.png\" alt=\"Trabalhos realizados\"");
document.write("onmouseover = 'document.getElementById(\"btTrabalhos\").src = \"trabalhos1.png\"'");
document.write("onmouseout =  'document.getElementById(\"btTrabalhos\").src = \"trabalhos.png\"'");
document.write("></a>");
<!------ Botao links -->
document.write("<a href=\"http://www.tessmodels.com.br/links.htm"+window.location.search+"\">");
document.write("<img width=12.4% border=\"0\" id='btlinks' src=\"links.png\" alt=\"Links úteis\"");
document.write("onmouseover = 'document.getElementById(\"btlinks\").src = \"links1.png\"'");
document.write("onmouseout =  'document.getElementById(\"btlinks\").src = \"links.png\"'");
document.write("></a>");
<!------ Botao contato -->
document.write("<a href=\"mailto:tessmodels@globo.com\">");
document.write("<img width=12.4% border=\"0\" id='btcontato' src=\"contato.png\" alt=\"Contate a Agência\"");
document.write("onmouseover = 'document.getElementById(\"btcontato\").src = \"contato1.png\"'");
document.write("onmouseout =  'document.getElementById(\"btcontato\").src = \"contato.png\"'");
document.write("></a>");
document.write("</div>");
document.write("</div>");

}

<!---------------- getParameter ------------------->

var request = { getParameter: _getParameter };   
  
function _getParameter(querystring)   
  {   
   var querystr = new Array();   
   loc = window.location.search.substr(1).split('&');   
   for (query in loc)   
     {   
      var q = loc[query].split('=');   
      querystr[q[0]] = q[1];   
     }   
   return querystr[querystring];   
  }   

<!---------------- FileExist ------------------->

function FileExists(strURL)
{
 oHttp = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); 
 oHttp.open("HEAD", strURL, false);
 oHttp.send();

 return (oHttp.status==404) ? false : true;
}

<!---------------- MostraBook ------------------->

function MostraBook() {
var strKeyWord    = new String(document.frmBoxBusca.txtBusca.value);

if ((Math.round(strKeyWord/100000-0.5)==9) && 
    FileExists('http://wsan.ath.cx:83/tessmodels/mod/10/slicapa.jpg') && 
    !(FileExists('http://wsan.ath.cx:83/tessmodels/mod/'+strKeyWord+'/slicapa.jpg'))) 
     window.location.href='agenciamento.htm?co='+strKeyWord+"&"+window.location.search;   
 else 
     window.open('http://wsan.ath.cx:83/tessmodels/mod/'+strKeyWord+'/index.htm', 'JanelaBook');
}

<!---------------- MostraCatalogo ------------------->

function MostraCatalogo() {
var strSenha=new String(document.frmCat.senha.value);
var objJanela;

objJanela = window.open('http://wsan.ath.cx:83/tessmodels/' + strSenha + '/' + 'modelos2.htm', 'Catalogo','');
objJanela.focus();
}

<!---------------- AmpliaFoto ------------------->

function AmpliaFoto(Foto,Width,Height) {
 if (Width>screen.width-20) Width=screen.width-20;
 if (Height>screen.height-52) Height=screen.height-52;
 PosEsqu = (screen.width-Width)/2;
 PosTopo = (screen.height-Height-52)/2;
 if (PosEsqu<0) PosEsqu=0;
 if (PosTopo<0) PosTopo=0;
 window.open(Foto,'JanelaFoto','width='+Width+',height='+Height+',top='+PosTopo+',left='+PosEsqu+',scrollbars=yes')
}

<!---------------- CodigoDoBook ------------------->

function CodigoDoBook()
{var n=document.URL.lastIndexOf("index.htm")-1;
 if (n<0) n=document.URL.lastIndexOf("index.shtm")-1;
 var URL=document.URL.slice(0,n);
 n=URL.lastIndexOf("/");
 if (URL.length-n>10) n=URL.lastIndexOf("\\");
 return (URL.slice(n+1,URL.length));
}

<!---------------- Funcoes para mostrar a foto do modelo ------------------->

function MM_findObj(n, d) { 
  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_showHideLayers() {
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

<!---------------- PaginaModelo ------------------->

function PaginaModelo()
{
document.write("<table width=300>");
document.write(" <tr><td height=100 align=left valign=top><a href=\"../../index.htm\"><img src=\"../../maxfama.gif\" width=300 BORDER=0 ALT=\"MaxFama - A melhor agência de modelos do Brasil\"></a></td></tr>");
document.write("<tr><td align=center valign=center width=75%><FONT SIZE=6>"+Nome+"<br><br></FONT></td></tr>");
document.write(" <tr><td>");
document.write(" <table>");
document.write(" <tr><td><b>Código do Book</b></td><td>"+CodigoDoBook()+"</td></tr>");
document.write(" <tr><td><b>Data de nascimento</b></td><td>"+Nascimento+"</td></tr>");
document.write(" <tr><td><b>Cor dos olhos</b></td><td>"+CorDosOlhos+"</td></tr>");
document.write(" <tr><td><b>Cor do cabelo</b></td><td>"+CorDoCabelo+"</td></tr>");
document.write(" <tr><td><b>Manequim</b></td><td>"+Manequin+"</td></tr>");
document.write(" <tr><td><b>Sapato</b></td><td>"+Sapato+"</td></tr>");
document.write(" <tr><td valign=top><b>Trabalhos já realizados</b></td><td>"+Trabalhos+"</td></tr>");
document.write(" </table></td>");
document.write("</tr>");
document.write("<tr><td>");
document.write("<br><br>");
document.write("<IMG onmouseover=\"MM_showHideLayers('Layer1','','show','Layer2','','hide','Layer3','','hide','Layer4','','hide','Layer5','','hide')\" height=62 src=\"MVC-001P.jpg\" border=0>&nbsp;");
document.write("<IMG onmouseover=\"MM_showHideLayers('Layer1','','hide','Layer2','','show','Layer3','','hide','Layer4','','hide','Layer5','','hide')\" height=62 src=\"MVC-002P.jpg\" border=0>&nbsp;");
document.write("<IMG onmouseover=\"MM_showHideLayers('Layer1','','hide','Layer2','','hide','Layer3','','show','Layer4','','hide','Layer5','','hide')\" height=62 src=\"MVC-003P.jpg\" border=0>&nbsp;");
document.write("<IMG onmouseover=\"MM_showHideLayers('Layer1','','hide','Layer2','','hide','Layer3','','hide','Layer4','','show','Layer5','','hide')\" height=62 src=\"MVC-004P.jpg\" border=0>&nbsp;");
document.write("<IMG onmouseover=\"MM_showHideLayers('Layer1','','hide','Layer2','','hide','Layer3','','hide','Layer4','','hide','Layer5','','show')\" height=62 src=\"MVC-005P.jpg\" border=0>");
document.write("</td></tr>");
document.write("</table>");
document.write("<DIV id=Layer1 style=\"LEFT: 315px; VISIBILITY: visible; POSITION: absolute; TOP: 13px; \"><IMG src=\"MVC-001P.jpg\" border=0></DIV>");
document.write("<DIV id=Layer2 style=\"LEFT: 315px; VISIBILITY: hidden;  POSITION: absolute; TOP: 13px; \"><IMG src=\"MVC-002P.jpg\" border=0></DIV>");
document.write("<DIV id=Layer3 style=\"LEFT: 315px; VISIBILITY: hidden;  POSITION: absolute; TOP: 13px; \"><IMG src=\"MVC-003P.jpg\" border=0></DIV>");
document.write("<DIV id=Layer4 style=\"LEFT: 315px; VISIBILITY: hidden;  POSITION: absolute; TOP: 13px; \"><IMG src=\"MVC-004P.jpg\" border=0></DIV>");
document.write("<DIV id=Layer5 style=\"LEFT: 315px; VISIBILITY: hidden;  POSITION: absolute; TOP: 13px; \"><IMG src=\"MVC-005P.jpg\" border=0></DIV>");
}
