// JavaScript Document


function menu(opcio, idioma)
{

	// idioma 0 = castellano, 1 = catalan, 2 = english, 3 = française

	switch(idioma)

	{

	case "0":
		if(opcio == '0'){
			document.write("<li id='active'><a href='index.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Home</a></li>")
		}else{
			document.write("<li><a href='index.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Home</a></li>")
		}
	
		if(opcio == '1'){
			document.write("<li id='active'><a href='servicios_cs.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> AurumYacht - Servicios</a></li>")
		}else{
			document.write("<li><a href='servicios_cs.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> AurumYacht - Servicios</a></li>")
		}
	
		if(opcio == '2'){
			document.write("<li id='active'><a href='flot46_cs.php'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Flota</a></li>")
		}else{
			document.write("<li ><a href='flot46_cs.php'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Flota</a></li>")
		}
	
		if(opcio == '3'){
			document.write("<li id='active'><a href='tarifas_cs.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Tarifas</a></li>")
		}else{
			document.write("<li ><a href='tarifas_cs.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Tarifas</a></li>")
		}

		if(opcio == '4'){
			document.write("<li id='active'><a href='descubre_con_nosotros_cs.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Descubre con nosotros</a></li>")
		}else{
			document.write("<li ><a href='descubre_con_nosotros_cs.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Descubre con nosotros</a></li>")
		}
	
	
		if(opcio == '5'){
			document.write("<li id='active'><a href='como_llegar_cs.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Cómo llegar</a></li>")
		}else{
			document.write("<li ><a href='como_llegar_cs.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Cómo llegar</a></li>")
		}


		if(opcio == '6'){
			document.write("<li id='active'><a href='nuestros_clientes_cs.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Fotos y videos</a></li>")
		}else{
			document.write("<li ><a href='nuestros_clientes_cs.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Fotos y videos</a></li>")
		}

		if(opcio == '7'){
			document.write("<li id='active'><a href='contacta_con_nosotros_cs.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Información y Reservas</a></li>")
		}else{
			document.write("<li ><a href='contacta_con_nosotros_cs.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Información y Reservas</a></li>")
		}	
		if(opcio == '8'){
			document.write("<li id='active'><a href='links_cs.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Directorio Web</a></li>")
		}else{
			document.write("<li ><a href='links_cs.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Directorio Web</a></li>")
		}		
	break;
	
	case "1":
	    if(opcio == '0'){
			document.write("<li id='active'><a href='index_ct.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Home</a></li>")
		}else{
			document.write("<li><a href='index_ct.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Home</a></li>")
		}
	
		if(opcio == '1'){
			document.write("<li id='active'><a href='servicios_ct.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> AurumYacht - Serveis</a></li>")
		}else{
			document.write("<li><a href='servicios_ct.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> AurumYacht - Serveis</a></li>")
		}
	
		if(opcio == '2'){
			document.write("<li id='active'><a href='flot46_ct.php'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Flota</a></li>")
		}else{
			document.write("<li ><a href='flot46_ct.php'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Flota</a></li>")
		}
	
		if(opcio == '3'){
			document.write("<li id='active'><a href='tarifas_ct.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Tarifes</a></li>")
		}else{
			document.write("<li ><a href='tarifas_ct.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Tarifes</a></li>")
		}

		if(opcio == '4'){
			document.write("<li id='active'><a href='descubre_con_nosotros_ct.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Coneix amb nosaltres</a></li>")
		}else{
			document.write("<li ><a href='descubre_con_nosotros_ct.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Coneix amb nosaltres</a></li>")
		}
	
		if(opcio == '5'){
			document.write("<li id='active'><a href='como_llegar_ct.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Com arribar</a></li>")
		}else{
			document.write("<li ><a href='como_llegar_ct.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Com arribar</a></li>")
		}

		if(opcio == '6'){
			document.write("<li id='active'><a href='nuestros_clientes_ct.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Fotos i videos</a></li>")
		}else{
			document.write("<li ><a href='nuestros_clientes_ct.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Fotos i videos</a></li>")
		}

		if(opcio == '7'){
			document.write("<li id='active'><a href='contacta_con_nosotros_ct.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Informació i Reserves</a></li>")
		}else{
			document.write("<li ><a href='contacta_con_nosotros_ct.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Informació i Reserves</a></li>")
		}
		
		if(opcio == '8'){
			document.write("<li id='active'><a href='links_ct.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Directori Web</a></li>")
		}else{
			document.write("<li ><a href='links_ct.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Directori Web</a></li>")
		}
		
	break;
	
	case "2":
	if(opcio == '0'){
			document.write("<li id='active'><a href='index_en.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Home</a></li>")
		}else{
			document.write("<li><a href='index_en.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Home</a></li>")
		}
	
		if(opcio == '1'){
			document.write("<li id='active'><a href='servicios_en.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> AurumYacht - Services</a></li>")
		}else{
			document.write("<li><a href='servicios_en.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> AurumYacht - Services</a></li>")
		}
	
		if(opcio == '2'){
			document.write("<li id='active'><a href='flot46_en.php'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Fleet</a></li>")
		}else{
			document.write("<li ><a href='flot46_en.php'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Fleet</a></li>")
		}
	
		if(opcio == '3'){
			document.write("<li id='active'><a href='tarifas_en.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Prices</a></li>")
		}else{
			document.write("<li ><a href='tarifas_en.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Prices</a></li>")
		}

		if(opcio == '4'){
			document.write("<li id='active'><a href='descubre_con_nosotros_en.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Find out with us</a></li>")
		}else{
			document.write("<li ><a href='descubre_con_nosotros_en.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Find out with us</a></li>")
		}	
	
		if(opcio == '5'){
			document.write("<li id='active'><a href='como_llegar_en.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> How to get in</a></li>")
		}else{
			document.write("<li ><a href='como_llegar_en.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> How to get in</a></li>")
		}

		if(opcio == '6'){
			document.write("<li id='active'><a href='nuestros_clientes_en.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Photos and videos</a></li>")
		}else{
			document.write("<li ><a href='nuestros_clientes_en.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Photos and videos</a></li>")
		}
		
		if(opcio == '7'){
			document.write("<li id='active'><a href='contacta_con_nosotros_en.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Information and Booking</a></li>")
		}else{
			document.write("<li ><a href='contacta_con_nosotros_en.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Information and Booking</a></li>")
		}
		
		if(opcio == '8'){
			document.write("<li id='active'><a href='links_en.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Web Directory</a></li>")
		}else{
			document.write("<li ><a href='links_en.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Web Directory</a></li>")
		}

	break;
	
	case "3":
		if(opcio == '0'){
			document.write("<li id='active'><a href='index_fr.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Home</a></li>")
		}else{
			document.write("<li><a href='index_fr.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Home</a></li>")
		}
	
		if(opcio == '1'){
			document.write("<li id='active'><a href='servicios_fr.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> AurumYacht</a></li>")
		}else{
			document.write("<li><a href='servicios_fr.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> AurumYacht</a></li>")
		}
	
		if(opcio == '2'){
			document.write("<li id='active'><a href='flot46_fr.php'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Flota</a></li>")
		}else{
			document.write("<li ><a href='flot46_fr.php'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Flota</a></li>")
		}
	
		if(opcio == '3'){
			document.write("<li id='active'><a href='tarifas_fr.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Tarifas</a></li>")
		}else{
			document.write("<li ><a href='tarifas_fr.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Tarifas</a></li>")
		}

		if(opcio == '4'){
			document.write("<li id='active'><a href='descubre_con_nosotros_fr.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Descubre con nosotros</a></li>")
		}else{
			document.write("<li ><a href='descubre_con_nosotros_fr.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Descubre con nosotros</a></li>")
		}
	
	
		if(opcio == '5'){
			document.write("<li id='active'><a href='como_llegar_fr.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Comment Arriver</a></li>")
		}else{
			document.write("<li ><a href='como_llegar_fr.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Comment Arriver</a></li>")
		}


		if(opcio == '6'){
			document.write("<li id='active'><a href='nuestros_clientes_fr.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Photos et vidéos</a></li>")
		}else{
			document.write("<li ><a href='nuestros_clientes_fr.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Photos et vidéos</a></li>")
		}

		if(opcio == '7'){
			document.write("<li id='active'><a href='contacta_con_nosotros_fr.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Información y Reservas</a></li>")
		}else{
			document.write("<li ><a href='contacta_con_nosotros_fr.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Información y Reservas</a></li>")
		}	
		
		if(opcio == '8'){
			document.write("<li id='active'><a href='links_fr.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Web Directory</a></li>")
		}else{
			document.write("<li ><a href='links_fr.htm'><img src='img/trans.gif' border='0' width='10px' height='5px;'>> Web Directory</a></li>")
		}
	break;

	}
	
}

// ------------------------------------------------------ gestio events AJAX (1) ---
var isIE = false;
//	Creamos una variable para el objeto XMLHttpRequest
var req;
var id_actual;

function carrega_id(url,id) {
	if(url==''){ return; }
	id_actual = id;

	//	Usuario inteligente...
	if (window.XMLHttpRequest) {
		req = new XMLHttpRequest();
		req.onreadystatechange = processReqChange;
		req.open('GET', url, true);
		req.send(null);
		//	...y usuario de Internet Explorer Windows
	} else
	  if (window.ActiveXObject) {
		isIE = true;
		req = new ActiveXObject('Microsoft.XMLHTTP');
		if (req) {
		req.onreadystatechange = processReqChange;
		req.open('GET', url, true);
		req.send();
	  }
	}
}// fi function carrega_id

//	Funcion que se llama cada vez que se dispara el evento onreadystatechange del objeto XMLHttpRequest
function processReqChange(){
    	var element_id_actual = document.getElementById(id_actual);
	if(req.readyState == 4){
		element_id_actual.innerHTML = req.responseText;
	} else {
		element_id_actual.innerHTML = '<img src="../img/ajax-loader.gif" >';
	}
}

// ------------------------------------------------------ gestio events AJAX (2) ---
var isIE = false;
//	Creamos una variable para el objeto XMLHttpRequest
var req2;
var id_actual2;

function carrega_id2(url,id) {
	if(url==''){ return; }
	id_actual2 = id;

	//	Usuario inteligente...
	if (window.XMLHttpRequest) {
		req2 = new XMLHttpRequest();
		req2.onreadystatechange = processReqChange2;
		req2.open('GET', url, true);
		req2.send(null);
		//	...y usuario de Internet Explorer Windows
	} else
	  if (window.ActiveXObject) {
		isIE = true;
		req2 = new ActiveXObject('Microsoft.XMLHTTP');
		if (req2) {
		req2.onreadystatechange = processReqChange2;
		req2.open('GET', url, true);
		req2.send();
	  }
	}
}// fi function carrega_id

//	Funcion que se llama cada vez que se dispara el evento onreadystatechange del objeto XMLHttpRequest
function processReqChange2(){
    	var element_id_actual = document.getElementById(id_actual2);
	if(req2.readyState == 4){
		element_id_actual.innerHTML = req2.responseText;
	} else {
		element_id_actual.innerHTML = '<img src="../img/ajax-loader.gif" >';
	}
}


// ------------------------------------------------------ gestio events AJAX (3) ---
var isIE = false;
//	Creamos una variable para el objeto XMLHttpRequest
var req3;
var id_actual3;

function carrega_id3(url,id) {
	if(url==''){ return; }
	id_actual3 = id;

	//	Usuario inteligente...
	if (window.XMLHttpRequest) {
		req3 = new XMLHttpRequest();
		req3.onreadystatechange = processReqChange3;
		req3.open('GET', url, true);
		req3.send(null);
		//	...y usuario de Internet Explorer Windows
	} else
	  if (window.ActiveXObject) {
		isIE = true;
		req3 = new ActiveXObject('Microsoft.XMLHTTP');
		if (req3) {
		req3.onreadystatechange = processReqChange3;
		req3.open('GET', url, true);
		req3.send();
	  }
	}
}// fi function carrega_id

//	Funcion que se llama cada vez que se dispara el evento onreadystatechange del objeto XMLHttpRequest
function processReqChange3(){
    	var element_id_actual = document.getElementById(id_actual3);
	if(req3.readyState == 4){
		element_id_actual.innerHTML = req3.responseText;
	} else {
		element_id_actual.innerHTML = '<img src="../img/ajax-loader.gif" >';
	}
}


// ------------------------------------------------------ gestio events AJAX (4) ---
var isIE = false;
//	Creamos una variable para el objeto XMLHttpRequest
var req4;
var id_actual4;

function carrega_id4(url,id) {
	if(url==''){ return; }
	id_actual4 = id;

	//	Usuario inteligente...
	if (window.XMLHttpRequest) {
		req4 = new XMLHttpRequest();
		req4.onreadystatechange = processReqChange4;
		req4.open('GET', url, true);
		req4.send(null);
		//	...y usuario de Internet Explorer Windows
	} else
	  if (window.ActiveXObject) {
		isIE = true;
		req4 = new ActiveXObject('Microsoft.XMLHTTP');
		if (req4) {
		req4.onreadystatechange = processReqChange4;
		req4.open('GET', url, true);
		req4.send();
	  }
	}
}// fi function carrega_id

//	Funcion que se llama cada vez que se dispara el evento onreadystatechange del objeto XMLHttpRequest
function processReqChange4(){
    	var element_id_actual = document.getElementById(id_actual4);
	if(req4.readyState == 4){
		element_id_actual.innerHTML = req4.responseText;
	} else {
		element_id_actual.innerHTML = '<img src="../img/ajax-loader.gif" >';
	}
}



// ------------------------------------------------------ gestio events AJAX (5) ---
var isIE = false;
//	Creamos una variable para el objeto XMLHttpRequest
var req5;
var id_actual5;

function carrega_id5(url,id) {
	if(url==''){ return; }
	id_actual5 = id;

	//	Usuario inteligente...
	if (window.XMLHttpRequest) {
		req5 = new XMLHttpRequest();
		req5.onreadystatechange = processReqChange5;
		req5.open('GET', url, true);
		req5.send(null);
		//	...y usuario de Internet Explorer Windows
	} else
	  if (window.ActiveXObject) {
		isIE = true;
		req5 = new ActiveXObject('Microsoft.XMLHTTP');
		if (req5) {
		req5.onreadystatechange = processReqChange5;
		req4.open('GET', url, true);
		req4.send();
	  }
	}
}// fi function carrega_id

//	Funcion que se llama cada vez que se dispara el evento onreadystatechange del objeto XMLHttpRequest
function processReqChange4(){
    	var element_id_actual = document.getElementById(id_actual4);
	if(req4.readyState == 4){
		element_id_actual.innerHTML = req4.responseText;
	} else {
		element_id_actual.innerHTML = '<img src="../img/ajax-loader.gif" >';
	}
}




function reload_calendari(idva,yearID,monthID,dayID){

	url = 'http://www.aurumyacht.com/mant/php/id-calendari-flota111.php?idva=' + idva + '&yearID=' + yearID + '&monthID=' + monthID + '&dayID=' + dayID; 
	//carrega_id6('http://www.aurumyacht.com/mant/php/id-calendari-flota111.php?idva=3&yearID=".$yearID."&monthID=".$monthID."&dayID=".$dayID."&idnoti=".$idnoti."','calendari_flota');
	carrega_id4(url,'calendari_flota');
}

