// image selector
// CM-FCR

// Created on 09-02-2000 by Dom Digital - FR
// http://www.domdigital.pt

function RandomImageLinkLong(apub,sborder)
{
	// ind: random index of image
	// nelem: number onf elements

 nelem= apub.length;
  
 if (nelem !=0 )
 {
	nelem= apub.length / 4;  
	ind = Math.floor(Math.random()*nelem);
	ind = ind *4;
	document.writeln("<a href=\""+apub[ind+1]+"\"><img src="+apub[ind]+" "+sborder+" "+apub[ind+3]+" alt=\""+apub[ind + 2]+"\"></a><br><br>");	
  }
}


function pub(location)
{
  
  apub = new Array();

  switch (location)
  {	case 9999:	
		{
		//element 1
		
		//element ..n

		break;
		}
		case 100:	
		{
		//element 1
		
		//apub[0]= "/pub/images/recrutamento.gif"
		//apub[1]= "/recrutamento.htm"
		//apub[2]= "Estão abertas 2 Vagas para Recepcionistas"
		//apub[3]= "WIDTH=169 HEIGHT=70"

		break;
		}
		case 200:	
		{
		//element 1
		
		//apub[0]= "/pub/images/pub_beira.gif"
		//apub[1]= "/beiralta.htm"
		//apub[2]= "Aventura na Beira Alta"
		//apub[3]= "WIDTH=80 HEIGHT=65"

		break;
		}
		case 800:	
		{
		//element 1
		
		//apub[0]= "/pub/images/logo_skiparque.gif"
		//apub[1]= "http://www.skiparque.pt/"
		//apub[2]= "Ski Parque"
		//apub[3]= "WIDTH=80 HEIGHT=48"
		
		//apub[4]= "/pub/images/logo-aquarios.gif"
		//apub[5]= "http://www.rest-aquarius.com/"
		//apub[6]= "Restaurante Aquarius"
		//apub[7]= "WIDTH=80 HEIGHT=30"

		break;
		}

default:
		{		
		
		//element 2
		
		//apub[0]= "/pub/images/logo_qrebelo.jpg"
		//apub[1]= ""
		//apub[2]= "Quinta do Rebelo"
		//apub[3]= "WIDTH=80 HEIGHT=44"

		//apub[4]= "/pub/images/logo_ojaime.gif"
		//apub[5]= "http://www.restauranteojaime.com/"
		//apub[6]= "Restaurante o Jaime"
		//apub[7]= "WIDTH=80 HEIGHT=23"
		}
  } 
//  RandomImageLinkLong(apub,"border=0");
nelem = apub.length; 
sborder = "border=0";
for (ind=0; ind<nelem ;ind=ind+4){
	document.writeln("<a href=\""+apub[ind+1]+"\"><img src="+apub[ind]+" "+sborder+" "+apub[ind+3]+" alt=\""+apub[ind + 2]+"\"></a><br><br>");
}

}
