fotoabre = 128; //256; //fotoabre = 12; //fotoabre = 9; // Número da foto do "abre"
thumbs = 128; //256; // thumbs = 12;  //thumbs = 9; // número de thumbs
reverso = 1; //Crescente coloque "0" ou Decrescente coloque "1"
dir = "imagens"; //  dir = "ellen";

//--------------------------------- Função para criar as Fotos -------------------------------//
function makefoto() {
Loc = location.href;
img = Loc.substring (Loc.indexOf ("imagem=")+7)
u=1;r=1;

// Creditos
credito = new Array();
credito[u++] =  "Da Surf";
credito[u++] =  "Da Surf";
credito[u++] =  "Da Surf";
credito[u++] =  "Da Surf";
credito[u++] =  "Hot Beach Babe";
credito[u++] =  "Da Surf";
credito[u++] =  "Da Surf";
credito[u++] =  "Da Surf";
credito[u++] =  "Da Surf";
credito[u++] =  "Beautiful Beach Babe";
credito[u++] =  "Beautiful Beach Babe";
credito[u++] =  "Beautiful Beach Babe";
credito[u++] =  "Da Surf";
credito[u++] =  "Da Surf";
credito[u++] =  "Da Surf";
credito[u++] =  "Da Surf";
credito[u++] =  "Da Surf - Take the Risk, Feel the Rush";
credito[u++] =  "Da Surf - Take the Risk, Feel the Rush";
credito[u++] =  "Da Surf";
credito[u++] =  "Da Surf";
credito[u++] =  "Da Surf";
credito[u++] =  "Da Surf";
credito[u++] =  "Da Surf";
credito[u++] =  "Da Surf";
credito[u++] =  "Da Surf";
credito[u++] =  "Da Surf";
credito[u++] =  "Reef Girls";
credito[u++] =  "Da Surf Board";
credito[u++] =  "Reef Beach Babe";
credito[u++] =  "Reef Beach Babe";
credito[u++] =  "Da Surf Beach Babe";
credito[u++] =  "Da Surf Beach Babe";
credito[u++] =  "Da Surf Beach Babe";
credito[u++] =  "Da Surf Beach Babe";
credito[u++] =  "Da Surf Beach Babe";
credito[u++] =  "Da Surf Beach Babe";
credito[u++] =  "Da Surf Board Babe";
credito[u++] =  "Reef Girl";
credito[u++] =  "Wicked Girl";
credito[u++] =  "Da Surf Girls";
credito[u++] =  "Beach Girl";
credito[u++] =  "Da Surf Girl";
credito[u++] =  "Da Surf Girls";
credito[u++] =  "Beach Girl";
credito[u++] =  "Beach Girl";
credito[u++] =  "Beach Girl";
credito[u++] =  "Da Surf Girl";
credito[u++] =  "Beach Girl";
credito[u++] =  "Da Surf Girl";
credito[u++] =  "Da Surf Girl";
credito[u++] =  "Da Surf Girl";
credito[u++] =  "Da Surf Girls";
credito[u++] =  "Reef Girls";
credito[u++] =  "Reef Girls";
credito[u++] =  "Da Surf Board Babe";
credito[u++] =  "Da Surf Beach Babe";
credito[u++] =  "Da Surf Babes";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Surf Babes";
credito[u++] =  "Da Surf Babes";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Surf Girls";
credito[u++] =  "Da Surf Team Member";
credito[u++] =  "Da Surf Girl Contest";
credito[u++] =  "Da Surf Beach Babe";
credito[u++] =  "Da Surf Beach Babe";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Horny Babes";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Surf Dolphins";
credito[u++] =  "Da Surf Babes";
credito[u++] =  "Da Surf Babes";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Bodyboard Babes";
credito[u++] =  "Da Surf Babes";
credito[u++] =  "Da Bikini Babe";
credito[u++] =  "Da Bikini Babe";
credito[u++] =  "Da Bikini Babe";
credito[u++] =  "Da Bikini Babe";
credito[u++] =  "Da Beach Babes";
credito[u++] =  "Da Bikini Babe";
credito[u++] =  "Da Ballantines Babes";
credito[u++] =  "Da Surf Team Babe";
credito[u++] =  "Da Surf Team Babe";
credito[u++] =  "Da Surf Team Babe";
credito[u++] =  "Da Boogieboard Babe";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Surf Babes";
credito[u++] =  "Da Surf Jury";
credito[u++] =  "Da Surf Babes";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Reef Babe";
credito[u++] =  "Da Reef Babe";
credito[u++] =  "Da Reef Babe";
credito[u++] =  "Da Reef Babe";
credito[u++] =  "Da Reef Babe";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Surf Babes";
credito[u++] =  "Da Roxy Babes";
credito[u++] =  "Da Roxy Babes";
credito[u++] =  "Da Surf Locals";
credito[u++] =  "Da Surf Girls";
credito[u++] =  "Da Surf Girl";
credito[u++] =  "Da Surf Babes";
credito[u++] =  "Roxy Team Babes";
credito[u++] =  "Roxy Surfgirl";
credito[u++] =  "Roxy Surfgirl";
credito[u++] =  "Beach Babe";
credito[u++] =  "Beach Babe";
credito[u++] =  "Da Surf Babes";
credito[u++] =  "Da Surf Babes";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Sexy Surf Babe";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Surf Babe";
credito[u++] =  "Da Surf Bikinicheck";
credito[u++] =  "Da Surf Babe";

legenda = new Array();
legenda[r++] =  "Beach Ball";
legenda[r++] =  "&nbsp;";
legenda[r++] =  "Nikla on a beach somewhere in Hawaii";
legenda[r++] =  "Nikla on a beach somewhere in Hawaii";
legenda[r++] =  "Mariana Zanchet from Brazil";
legenda[r++] =  "No comment at all here...";
legenda[r++] =  "Where is my dental floss?";
legenda[r++] =  "Another bikini contest";
legenda[r++] =  "3 beach girls";
legenda[r++] =  "Ann in a nice pose...";
legenda[r++] =  "Viviane Bordin from Brazil at the Suncoast Bikini Contest";
legenda[r++] =  "Viviane Bordin from Brazil";
legenda[r++] =  "Did you see that diving dolphin in the surf?";
legenda[r++] =  "Mariana Zanchet from Brazil at the Suncoast Bikini Contest";
legenda[r++] =  "Surfgirl returning to beach in Honolulu";
legenda[r++] =  "I want to go bodyboarding, but can't get through the surf...";
legenda[r++] =  "Girls from Blue Crush, the surf movie";
legenda[r++] =  "Girls from Blue Crush, the surf movie";
legenda[r++] =  "Sunset in Bali, Indonesia";
legenda[r++] =  "Walk along the beach";
legenda[r++] =  "Malia Alani relaxing at the beach after a cool day";
legenda[r++] =  "Elise Garrigue after riding some great Hawaiian waves";
legenda[r++] =  "Do you see waves? I don't...";
legenda[r++] =  "Tatiana Azevedo going out for some bodyboarding";
legenda[r++] =  "Quiksilver Boardriders Club - University Contest Rio de Janeiro";
legenda[r++] =  "Quiksilver Boardriders Club - University Contest Rio de Janeiro";
legenda[r++] =  "The Reef Girls posing for Da Surf";
legenda[r++] =  "Let's go bodyboarding!";
legenda[r++] =  "May we have the votes for number 4 please!";
legenda[r++] =  "Hey guys, check out that wave coming in!...";
legenda[r++] =  "Looks like one great tanned radius...no, make that two!";
legenda[r++] =  "....silence....We all know what God looked at on the 7th day! You can't blame him, nobody did a better job!";
legenda[r++] =  "Milena Toscano, nothing wrong with her!";
legenda[r++] =  "Milena Toscano, eeh...can I go on washing my car?";
legenda[r++] =  "Why is she looking at that billboard?";
legenda[r++] =  "Ana Sofía Henao, wanna join her for a swim?";
legenda[r++] =  "Let's paddle out";
legenda[r++] =  "Reef Girl Sofie isn't so sure about the sea temperature..";
legenda[r++] =  "She's out in the woods today";
legenda[r++] =  "Always fun to see good friends together!";
legenda[r++] =  "Where's that nice shell I just saw?";
legenda[r++] =  "Let's hit the waves!";
legenda[r++] =  "Hey, goodlooking support for a surfgirl!";
legenda[r++] =  "Denise Correa cools off!";
legenda[r++] =  "Vanessa Martinelli, blocking our view here, checks out the surf";
legenda[r++] =  "Vanessa Martinelli has curves like a beach";
legenda[r++] =  "Smile girl, you're on Da Surf!";
legenda[r++] =  "Looks like Beachbabe Fernanda Goeth fell down on the beach";
legenda[r++] =  "Hey babe, wanna go for a swim with me, instead of the dog?";
legenda[r++] =  "Looks like a cool concentrating surf babe!";
legenda[r++] =  "Looks like a cool sunny surf babe!";
legenda[r++] =  "Fortaleza Beach Babes";
legenda[r++] =  "This looks exactly like our Da Surf Beach and Bikini Girl Competition!";
legenda[r++] =  "This looks exactly like our Da Surf Beach and Bikini Girl Competition!";
legenda[r++] =  "Paddling is good for your bum";
legenda[r++] =  "Nothing wrong with a colorcombination of white and tancolor!";
legenda[r++] =  "Team Portugal at the Magnolia Pro, care for a beer ladies?";
legenda[r++] =  "Hawaiian top surfer Megan Abubo in Aloha style";
legenda[r++] =  "Megan Smith - Quiksilver Pro Fiji, Tavarua";
legenda[r++] =  "Nice conditions and a big smile at the Quiksilver Pro, Tavarua";
legenda[r++] =  "SurfBabes at the Oxbow Pro Longboard, Baleia, Sãn Sebastiãn";
legenda[r++] =  "SurfBabes at Oxbow Pro Longboard, Maresias, Sãn Sebastiãn";
legenda[r++] =  "Surfbabe Tassiana Arbiza feels great after another great session";
legenda[r++] =  "BikiniBabe Stephanie Cristine, at the Antiqueda Babe Contest";
legenda[r++] =  "Major SurfBabe Duty Rost, hot babe of the Tropical Surfteam";
legenda[r++] =  "Sexy SurfBabe at the Oxbow Pro Longboard, Sãn Sebastiãn";
legenda[r++] =  "She's wearing a top, but does it matter?";
legenda[r++] =  "Extremely rare footage of Da Surf Girls after a meeting. Did you already meet them at a beach near you?";
legenda[r++] =  "Our well respected Team Member Alani during a photoshoot at the beach in Maui";
legenda[r++] =  "Rare footage of Da Surf Girl Contest at the British Virgin Islands!";
legenda[r++] =  "Can I put down my towel overhere!?";
legenda[r++] =  "Oh my! This is Da Surf Girl for sure!!";
legenda[r++] =  "Paddling her way to the waves";
legenda[r++] =  "Can I touch you again while we walk? Nobody will see it, I promise...";
legenda[r++] =  "Very cool bodyboard action. Young Natasha Sagardia from Puerto Rico has more guts than a lot of men!";
legenda[r++] =  "A sexy pose for Da Surf from lovely Aline Pires at Praia Mole";
legenda[r++] =  "These dolphins are pretty cool, they're surfers!";
legenda[r++] =  "Cool surfbabes after some feeling good moves in the surf";
legenda[r++] =  "Portugal Surf Team for Da Surf at the Magnolia Pro";
legenda[r++] =  "Checking out the surf at the Roxy Jam";
legenda[r++] =  "Concentrating at the Quiksilver Pro in Niijima, Japan, WCT 2003";
legenda[r++] =  "Perfect pair found at surftrip to La Zurriola Playa in San Sebastian, Spain";
legenda[r++] =  "Bodyboard Babes at the Rio Bodyboard Super Pro";
legenda[r++] =  "Discussing the conditions at the Billabong Pro Junior 2003 in Maresias";
legenda[r++] =  "Relaxing after an elimination round at the Billabong Pro Junior 2003 in Maresias";
legenda[r++] =  "Beautiful scenery at the Biarritz Nokia Surf Festival in France";
legenda[r++] =  "What a great bikini! Let's ask her where she bought it!";
legenda[r++] =  "A perfect 10 lying around at Praya Mole in Florianópolis Brazil";
legenda[r++] =  "Rip Curl Pro 2003, Hossegor, France. We were here, where were you?";
legenda[r++] =  "Somewhere on a lovely beach in Brazil, where Da Surf Team loves to surf and watch.";
legenda[r++] =  "Look girls, on the left are the guys of Da Surf Team! Hurry, before they leave in their SurfBus.com for the Ballantines Surf Pro in Spain!";
legenda[r++] =  "Ane de Biase poses for our Da Surf Photographer, we were impressed...";
legenda[r++] =  "Our Team Babe Ane de Biase relaxing back home, after a cool beach tour with our surfspot scout";
legenda[r++] =  "Da Surf Babe Brenda likes to cool off at the pool after a surfsession";
legenda[r++] =  "Andrea Estrela from Portugal, winner of the Surf Girl Pro, Bali";
legenda[r++] =  "One of natures' finest creations....";
legenda[r++] =  "Miss Reef Contest at the Nokia Pro 2003 in Newquay, UK";
legenda[r++] =  "It's no problem to face this jury at the Onbongo Pro Surfing 2003!";
legenda[r++] =  "Lorraine Lima is World Champion Bodyboarding with the amateurs";
legenda[r++] =  "Duty Rosti, Estrela Rangel, Larissa Barbieri & Gabriele Borges are going for some action!";
legenda[r++] =  "Great bikinidesign! Reef Classic 2004";
legenda[r++] =  "Nice babe at the Hangloose Pro Contest 2004";
legenda[r++] =  "Miss Reef Contest 2004 at the Reef Classic, Torres Brazil";
legenda[r++] =  "Aline Pires: Miss Reef 2004 !";
legenda[r++] =  "Aline Pires, Miss Reef 2004, Torres Brazil";
legenda[r++] =  "Aline Pires, Miss Reef 2004, Torres Brazil";
legenda[r++] =  "Finalists Miss Reef Contest 2004 at Reef Classic";
legenda[r++] =  "Nice bum at Praia Mole, Florianópolis Brazil";
legenda[r++] =  "Cool babes at Cabarete, Dominican Republic";
legenda[r++] =  "Roxy Girls having fun in Fiji";
legenda[r++] =  "Roxy Girls on the beach in Fiji";
legenda[r++] =  "What does not fit in this cool surfer picture?";
legenda[r++] =  "Kwitcherbichen Girls pose especially for Da Surf Team";
legenda[r++] =  "Dream Babe at Praia da Silveira, Garopaba Brazil";
legenda[r++] =  "Roxy Surf Now Contest, France 2004 ";
legenda[r++] =  "Roxy Kauai Surf Jam, Hawaii 2004";
legenda[r++] =  "Cool surfbabe Veronica Kay from Team Roxy relaxing on the beach";
legenda[r++] =  "Cool surfbabe Veronica Kay from Roxy";
legenda[r++] =  "Where the f#$&copy;k are my lenses!!?";
legenda[r++] =  "Hmm, wonder if the surfers see my body from there...";
legenda[r++] =  "Spectators at the SuperSurf Contest 2004, Joaquina Brazil";
legenda[r++] =  "We like babes, bikinis and ofcourse...bubbles";
legenda[r++] =  "A young specialist in training!";
legenda[r++] =  "We think lovely Ashlee is every surfer's dream";
legenda[r++] =  "Camila Storchi at Petrobras 2005 Contest, Itamambuca, Brazil";
legenda[r++] =  "Camila Storchi at Petrobras 2005 Contest, Itamambuca, Brazil<br>This girl is sooo cool; she even has an incredible Hawaii tattoo on her great body!";
legenda[r++] =  "Beachbabe at SuperSurf 2004 contest, Maresias, Brazil";
legenda[r++] =  "Major dreambabe in Brazil let us make a logoprint on her 10+ assets";

// -------------------------------- NÃO EDITAR NADA A PARTIR DAQUI ---------------------------------//
/*
if (img < 10) { 
  fotoimg = "00" + img;
}
 else if (img < 100) { 
  fotoimg = "0" + img;
} else {
  fotoimg = img;
}
*/
  fotoimg = img;
// Carrega Credito, Imagem e Legenda

document.write('<table width=465 cellpadding=0 cellspacing=0 border=0>');                                                       
document.write('<tr bgcolor=#FFFFFF>');                                                                                       
document.write('<td>');                                                                                                     
document.write('	<table width=100% cellpadding=1 cellspacing=1 border=0>');  
document.write('	<tr>');                                               
document.write('  	<td bgcolor=#0080FF background=fundo.gif>');
document.write('		<table width=260 cellpadding=0 cellspacing=0 border=0 align=center>');
document.write('    	<tr><td>');                              
document.write('       		<div align=right><font size=1 face=verdana color=#000000><b>'+ credito[img] +'</b></font></div>');
document.write('            <div align=center><img src='+ dir +'/f'+ fotoimg +'.jpg border=1 vspace=4></div>');
document.write('        </td></tr>');
document.write('        </table>');
document.write('	</td>');
document.write('    </tr>');
document.write('    <tr>');
document.write('    <td bgcolor=#0080FF background=rodape.gif>');
document.write('    	<center><font size=1 face=verdana,arial>'+ autoBR(legenda[img]) +' </font></center>');
document.write('    </td>');
document.write('    </tr>');
document.write('    </table>');
document.write('</td>');
document.write('</tr>');
document.write('</table>');
}

//--------------------------------- Função para fazer os Thumbs -------------------------------
function makethumbs() 
{
n = 0;
quebra = thumbs / 2; //thumbs / 3;

resto=thumbs%2; //thumbs%3
document.write('<table width=210 cellpadding=2 cellspacing=0 border=0 align=center>');

if(reverso ==1) n = thumbs + 1;
for(i=1; i<=quebra; i++) 
	{
	document.write('<tr>');
	for(j=0; j<2; j++) //for(j=0; j<3; j++)
		{
       		(reverso ==1) ? n-- : n++;
       		/* if (n < 10) nthumb = "00" + n;
			else if (n < 100) nthumb = "0" + n;
			else */
			nthumb = n;
		    
	        document.write('<td><a href=fotos.html?imagem=' + n + ' target=main><img src='+ dir +'/t'+ nthumb + '.jpg width=100 height=70 border=0></a></td>');
		}
  	document.write('<tr>');
	}
	//-- faz thumbs com nao divisores de 3 //----//
	for(r=0; r<resto; r++) 
  		{
  		(reverso==1) ? n-- : n++; 
  		//(n < 10) ? nthumb = "0" + n : 
		nthumb = n;
  		document.write('<td><a href=fotos.html?imagem=' + n + ' target=main><img src='+ dir +'/t'+ nthumb + '.jpg width=100 height=70 border=0></a></td>');
		}
  	document.write('<tr>');
	//-------------------------------------------//
document.write('</table>');
}

//--------------------------------- Função para criar os frames do álbum -------------------------------

function makeframes() {
document.write('  <frameset rows=45,* frameborder=no border=0 framespacing=0>');
document.write('    <frameset cols=485,* frameborder=no border=0 framespacing=0>');
document.write('        <frame src=topesq.html name=topesq scrolling=no frameborder=NO marginwidth=0 marginheight=0 noresize>');
document.write('        <frame src=topdir.html name=topdir scrolling=no frameborder=NO marginwidth=0 marginheight=0 noresize>');
document.write('    </frameset>');
document.write('    <frameset cols=485,* frameborder=no border=0 framespacing=0>');
document.write('        <frame src=fotos.html?imagem=' + fotoabre + ' name=main scrolling=yes frameborder=NO marginwidth=0 marginheight=0 noresize>');
document.write('        <frameset rows=47,* frameborder=no border=0 framespacing=0>');
document.write('           <frame src=datas.html name=datas scrolling=no frameborder=NO marginwidth=0 marginheight=0 noresize>');
document.write('           <frame src=thumbs.html name=thumbs scrolling=auto frameborder=NO marginwidth=0 marginheight=0 noresize>');
document.write('        </frameset>');
document.write('     </frameset>');
document.write('  </frameset>');
}

//---- Coloca <BR> automaticamente nas legendas ----
function autoBR(bla)
{
o=bla.toUpperCase();
if(bla.length>70&&(o.indexOf('<BR>')==-1)) {	
for(c=0;c<bla.length;c++) {
    if(bla.substring(c,c+1)==" "){
	if (c>=parseInt(bla.length/2)) {
	    ini=bla.substring(0,c)
	    fim=bla.substring(c,bla.length)
	    return(ini+"<br>"+fim);
}   }   }   }
else{return(bla)}
}
