function linc_menu(linc,enllac)
{
	if(enllac!='')
	{
		window.open(enllac);
	}
	else
	{
		document.location=linc;
	}
}
function linca(URL)
{
	win=window.open(URL,'CBGIRONA');
}
function on(obj){obj.style.backgroundColor="EFEFEF"}
function off(obj){obj.style.backgroundColor=""}
function add_image(que)
{
	if(que && que != "images/spacer.gif")
	{
		document.write("<a href='javascript:top.preview(\""+que+"\")'><img src='templates/PUBLIC/images/camera.gif' border=0></a><br>");
	}
}
function download(ruta)
{
	x=300;
	y=100;
	t=(screen.availHeight-y)/2;
	l=(screen.availWidth-x)/2;
	win=window.open(ruta,'download_win','status=yes,menubar=yes,scrollbars=yes,resizable=yes,left='+l+',top='+t+',width='+x+',height='+y);
	//w_open(ruta,'download_win',300,200);
}

function PopUp(ruta)
{
	x=100;
	y=100;
	t=(screen.availHeight-y)/2;
	l=(screen.availWidth-x)/2;
	win=window.open(ruta,'download_win','status=no,menubar=no,scrollbars=no,resizable=no,left='+l+',top='+t+',width='+x+',height='+y);
	//w_open(ruta,'download_win',300,200);
}


// JavaScript Document
function Display(id) { 
	document.getElementById('descr').style.display = "none"
	document.getElementById('mapa').style.display = "none"
	document.getElementById('mes').style.display = "none"
	document.getElementById(id).style.display = "block"
	//CANVI DE CALSSE DEL LINK
	document.getElementById('link_descr').className = "f13 n"
	document.getElementById('link_mapa').className = "f13 n"
	document.getElementById('link_mes').className = "f13 n"
	document.getElementById('link_'+id).className = "f13 n sel"

}


function ChangeClassRadio(id){
	//CANVI DE CALSSE DEL LINK
	document.getElementById('venda').className = "f5"
	document.getElementById('lloguer').className = "f5"
	document.getElementById(id).className = "selec"
}

function ChangeClassCheck(id){
	if(document.getElementById(id).className == "f5"){
		document.getElementById(id).className = "selec";	
	}else{
		document.getElementById(id).className = "f5";
	}
	
}

function Open(ruta)
{

	var x=608;
	var y=423;
	var t = (screen.height-y)/2;
	var l = (screen.width-x)/2;
	win=window.open(ruta,'Mapa',',width='+x+',height='+y+',top='+t+',left='+l+'');

}
function canvia_action(formulari,accio)
{
	
	f=eval("document.forms."+formulari);
	f.action.value=accio;
}
