var velocitat = 1 		// velocitat apració lletres en ms
var pausa = 3000 		// pausa entre frases en ms
var timerID = null
var bannerOn = false
var missatge = ""
var offset = 0 			//Inicialització Posició

function clearBanner() { 	//By Saro '^_^
	if(bannerOn)
	clearTimeout(timerID)
	offset=0
	bannerOn = false
	window.status = ' '
	}

function showBanner(codi) {

	
	if (codi == 0) {missatge = "Adquiere alguno de nuestros CDs de RacingCars"}
	if (codi == 1) {missatge = "Contacta con nosotros"}
	if (codi == 2) {missatge = "Bajate los codecs para ver nuestros videos"}
	if (codi == 3) {missatge = "Todo tipo de ayuda"}
	if (codi == 4) {missatge = "Los mejores enlaces a las mejores paginas"}
	if (codi == 5) {missatge = "Mapa completo de nuestro sitio WEB"}
	if (codi == 6) {missatge = "Forums"}
	if (codi == 7) {missatge = "Ultimas actualizaciones"}
	if (codi == 8) {missatge = "Lista de los mas descargados"}
	if (codi == 9) {missatge = "Quienes somos nostros?"}
	if (codi == 10) {missatge = "Gana una maqueta 1:18 en nuestro concurso"}

	if (codi == 22) {missatge = "Videos de Todo Terrenos"}
	if (codi == 23) {missatge = "Videos de Formula 1"}
	if (codi == 24) {missatge = "Videos de VideoJuegos"}
	if (codi == 25) {missatge = "Videos de Motos!"}
	if (codi == 26) {missatge = "Videos de Película :)"}
	if (codi == 27) {missatge = "Videos de Rallies!"}
	if (codi == 28) {missatge = "Videos un poco raros :)"}
	if (codi == 29) {missatge = "Videos de Tuning!"}
	if (codi == 30) {missatge = "Videos de Superdeportivos"}
	if (codi == 31) {missatge = "Videos de Anuncios"}
	if (codi == 32) {missatge = "Videos de Versus"}

  	if (codi == 39) {missatge = "Fotos de todoterrenos en acción"}
  	if (codi == 40) {missatge = "Fotos de chicas y coches :)~"}
  	if (codi == 41) {missatge = "Fotos de todoterrenos!"}
  	if (codi == 42) {missatge = "Fotos de F1 y Monoplazas!"}
  	if (codi == 43) {missatge = "Fotos con mucho humor x)"}
  	if (codi == 44) {missatge = "Fotos de todo tipo de Motos"}
  	if (codi == 45) {missatge = "Fotos de coches de Rally"}
  	if (codi == 46) {missatge = "Fotos un poco raras %)"}
  	if (codi == 47) {missatge = "Fotos clasicas de coches y motos"}
  	if (codi == 48) {missatge = "Fotos de superdeportivos: Ferrari, McLaren, Porsche ... "}
  	if (codi == 49) {missatge = "Fotos de coches Tuneados"}

	if (codi == 'veure') {missatge ="Ver"}
	if (codi == 'veurefoto') {missatge = "Ver imagen"}
	if (codi == 'descarregar') {missatge = "Descargar"}
	if (codi == 'url') {missatge = "www.racingcars.cjb.net"}
	if (codi == 'help') {missatge = "Ayuda"}
	if (codi == 'noticies') {missatge = "Noticias anteriores"}


	if (offset < missatge.length) {
		if (missatge.charAt(offset) == " ")
			offset = offset+1
			var partialMessage = missatge.substring(0, offset + 2) 
			window.status = partialMessage  //  'missatge' x 'partialMessage'
			offset++ 
			timerID = setTimeout("showBanner()", velocitat)
			bannerOn = true
		} 
		else {
			offset = 0
			timerID = setTimeout("showBanner()", pausa)
			bannerOn = true
		}
	}

function obrir(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
  }

function copyright() {
   
   document.write ("<table width='100%' border='0' cellspacing='0' cellpadding='0' align='center' bgcolor='#CF0000' height='75'> ")
   document.write ("  <tr> ")
   document.write ("    <td><img src='../../grafics/costat_1.gif' width='34' height='18'></td> ")
   document.write ("    <td> ")
   document.write ("      <div align='center'></div> ")
   document.write ("	</td> ")
   document.write ("    <td> ")
   document.write ("      <div align='center'><img src='../../grafics/costa_sd.gif' width='34' height='18'></div> ")
   document.write ("	</td> ")
   document.write ("  </tr> ")
   document.write ("  <tr> ")
   document.write ("    <td>&nbsp;</td> ")
   document.write ("    <td> ")
   document.write ("      <center><span class='Copyright'><b>www.racing-files.com</b> est&aacute; &iacute;ntegramente dise&ntilde;ada por <i>SWD</i> ©</span></center> ")
   document.write ("    </td> ")
   document.write ("	<td>&nbsp;</td> ")
   document.write ("  </tr> ")
   document.write ("  <tr> ")
   document.write ("    <td>&nbsp;</td> ")
   document.write ("    <td> ")
   document.write ("	<center><span class='Copyright'>www.racing-files.com | Blanqueria, 2 | 17850 Besal&uacute; | Girona | 972 590 795 | 654 190 199 | info@racing-files.com</span></center> ")
   document.write ("    </td> ")
   document.write (" 	<td>&nbsp;</td> ")
   document.write ("  </tr> ")
   document.write ("  <tr> ")
   document.write ("    <td><img src='../../grafics/costa_ie.gif' width='34' height='19'></td> ")
   document.write ("    <td>&nbsp;</td> ")
   document.write ("    <td><img src='../../grafics/costa_id.gif' width='34' height='19'></td> ")
   document.write ("  </tr> ")
   document.write ("</table> ")

   }

function banner () 
   {
document.write('<center><iframe src="http://www.racing-files.com/grafics/banners/bannerie.jpg" width="468" height="60" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" target="_top"></iframe>');
   }


function link ()
   {
   document.write(" <table width='100%' border='0' cellspacing='0' cellpadding='5' class='taula' bgcolor='#DDDDDD'> ")
   document.write("      <tr class='taula'> ")
   document.write("         <td> ")
   document.write("         <div align='right'> </div> ")
   document.write("         <span class='general'>Y recuerda que si quieres insertar un link en este apartado, s&oacute;lo tienes que <a OnMouseOver=\"showBanner(\'veure\')\" OnMouseOut=\"clearBanner()\" href='../contact/index.htm' class='linkgeneral'>contactar con nosotros!</a> Vamos a analizar y puntuar tu web y, en pocos d&iacute;as, va a aparecer en nuestra secci&oacute;n. </span></td> ")
   document.write("      </tr> ")
   document.write(" </table> ")
   }
      
function insertar_foto ()
   {
   document.write(" <table width='100%' border='0' cellspacing='0' cellpadding='5' class='taula' bgcolor='#DDDDDD'> ")
   document.write("      <tr class='taula'> ")
   document.write("         <td> ")
   document.write("         <div align='right'> </div> ")
   document.write("         <center><span class='general'>Recuerda que si quieres publicar tus fotograf&iacute;as en este apartado, s&oacute;lo tienes que <a OnMouseOver=\"showBanner(\'veure\')\" OnMouseOut=\"clearBanner()\" href='../../home/contact/index.htm' class='linkgeneral'>contactar con nosotros!</a></span></center></td> ")
   document.write("      </tr> ")
   document.write(" </table> ")
   }

function insert_pic ()
   {
   document.write(" <table width='100%' border='0' cellspacing='0' cellpadding='5' class='taula' bgcolor='#DDDDDD'> ")
   document.write("      <tr class='taula'> ")
   document.write("         <td> ")
   document.write("         <div align='right'> </div> ")
   document.write("         <center><span class='general'>Don't forget to publish your photographs here, you simply have to <a OnMouseOver=\"showBanner(\'veure\')\" OnMouseOut=\"clearBanner()\" href='../../home/contact/index.htm' class='linkgeneral'>contact to us!</a></span></center></td> ")
   document.write("      </tr> ")
   document.write(" </table> ")
   }

// *********************************************************

function frame_pho () 
   {
   parent.mainFrame.location.href = "photo/php/index.php";
   }

function frame_pho_2 () 
   {
   parent.mainFrame.location.href = "photo/babe/jordan.htm";
   }

function frame_4x4x () {
   parent.mainFrame.location.href ="video/php/index.php?tipus=4x4x&nou=s";
   }      

function frame_f1xx () {
   parent.mainFrame.location.href ="video/php/index.php?tipus=f1xx&nou=s";
   }      

function frame_rall () {
   parent.mainFrame.location.href ="video/php/index.php?tipus=rall&nou=s";
   }

function frame_rare () {
   parent.mainFrame.location.href ="video/php/index.php?tipus=rare&nou=s";
   }      

function frame_spor () {
   parent.mainFrame.location.href ="video/php/index.php?tipus=spor&nou=s";
   }      

function frame_spot () {
   parent.mainFrame.location.href ="video/php/index.php?tipus=spot&nou=s";
   }      

function frame_game () {
   parent.mainFrame.location.href ="video/php/index.php?tipus=game&nou=s";
   }      

function frame_movi () {
   parent.mainFrame.location.href ="video/php/index.php?tipus=movi&nou=s";
   }      

function frame_moto () {
   parent.mainFrame.location.href ="video/php/index.php?tipus=moto&nou=s";
   }      

function frame_tunn () {
   parent.mainFrame.location.href ="video/php/index.php?tipus=tunn&nou=s";
   }    

function frame_vsxx () {
   parent.mainFrame.location.href ="video/php/index.php?tipus=vsxx&nou=s";
   }    
      
function frame_news () {
   parent.mainFrame.location.href ="home/news/news_1.php?especials=10";
   }      

function frame_video () {
   parent.leftFrame.location.href ="../../left_vid.htm";
   }      

function frame_photo () {
   parent.leftFrame.location.href ="../../left_pho.htm";
   } 


function vertop (grup,tipus,fons,limit)
	{
	var dir='http://www.granavenida.com/php3/publicidad.php3?id=368'
	var fons_2=fons.substr(1,6);

	b=open("",grup,"width=790,height=580,top=0,left=0,scrollbars=no,resizable=no,status=no");
	b.document.write ('<html><head><title>TOP ' +grup+ ' >>> wwww.racing-files.com</title></head>'); 
        b.document.write (' <body bgcolor="' +fons+ '" ');
        b.document.write ("link='#FFFFFF' vlink='#FFFFFF' alink='#FFFFFF' leftmargin='0' marginwidth='0' marginheight='0'>")

	b.document.write('<center><iframe src=../home/topten/index.php?grup='+ grup +'&tipus='+tipus+'&fons='+fons_2+'&limit='+limit+'  width="700" height="550" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="yes" target="_top"></iframe>');
	        b.document.write('<ilayer src=../home/topten/index.php?grup='+ grup +'&tipus='+tipus+'&fons='+fons_2+'&limit='+limit+'  width="700" height="550"></ilayer><center><br>');

	b.document.write ("</html>");
	b.document.close();
	}
