// JavaScript Document


	function showInfoUltimaHora(noticia) {
		var especificacions="top=0, left=0, toolbar=no,location=no, status=yes, menubar=no, scrollbars=yes, resizable=no, width=600,height=300";
		infoWindow=window.open("../news/new.php?id="+noticia,"InformacioUltimahora",especificacions);
		infoWindow.moveTo(250,180);
	}

	function showCalendar() {
		var especificacions="top=0, left=0, toolbar=no,location=no, status=no, menubar=no, scrollbars=no, resizable=no, width=360,height=175";
		calWindow=window.open("../agenda/calendari.php","Calendari",especificacions);
		calWindow.moveTo(450,160);
	}

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var swidth=130 //slider's width
var sheight=200 //slider's height
var sspeed=1 //slider's speed

//messages: change to your own; use as many as you'd like; set up Hyperlinks to URLs as you normally do: <a target=... href="... URL ...">..message..
var asingletext=new Array()
/*
asingletext[0]='<div align="center"><font face="Formata Regular" size="1" color="#004454"><a href="#" onclick="javascript:showInfoUltimaHora(130);"><b>Presentació de la memòria d\'activitats del 2005</b><br>Balanç positiu d\'activitats de l\'any 2005 de Mas Carandell</a></div></FONT>'
asingletext[1]='<div align="center"><font face="Formata Regular" size="1" color="#004454"><a href="#" onclick="javascript:showInfoUltimaHora(131);"><b>Acord de col·laboració amb CIBERCAT</b><br>Acord de col·laboració amb CIBERCAT</a></div></FONT>'
*/	

if (asingletext.length>1)
  i=1
else
  i=0
function start()
{
	if (document.all)
	{
		ieslider1.style.top=sheight
		iemarquee(ieslider1)
	}
	else if (document.layers)
	{
		document.ns4slider.document.ns4slider1.top=sheight
		document.ns4slider.document.ns4slider1.visibility='show'
		ns4marquee(document.ns4slider.document.ns4slider1)
	}
	else if (document.getElementById&&!document.all)
	{
		document.getElementById('ns6slider1').style.top=sheight
		ns6marquee(document.getElementById('ns6slider1'))
	}
} 

// Funcions per l'agenda
function iemarquee(whichdiv)
{
	iediv=eval(whichdiv)
	if (iediv.style.pixelTop>0&&iediv.style.pixelTop<=sspeed)
	{
		iediv.style.pixelTop=0
		setTimeout("iemarquee(iediv)",100)
	}
	if (iediv.style.pixelTop>=sheight*-1)
	{
		iediv.style.pixelTop-=sspeed
		setTimeout("iemarquee(iediv)",100)
	}
	else
	{
		iediv.style.pixelTop=sheight
		iediv.innerHTML=asingletext[i]
		if (i==asingletext.length-1)
			i=0
		else
			i++
	}
}

function ns4marquee(whichlayer)
{
	ns4layer=eval(whichlayer)
	if (ns4layer.top>0&&ns4layer.top<=sspeed)
	{
		ns4layer.top=0
		setTimeout("ns4marquee(ns4layer)",100)
	}
	if (ns4layer.top>=sheight*-1)
	{
		ns4layer.top-=sspeed
		setTimeout("ns4marquee(ns4layer)",100)
	}
	else
	{
		ns4layer.top=sheight
		ns4layer.document.write(asingletext[i])
		ns4layer.document.close()
		if (i==asingletext.length-1)
			i=0
		else
			i++
	}
}

function ns6marquee(whichdiv)
{
	ns6div=eval(whichdiv)
	if (parseInt(ns6div.style.top)>0&&parseInt(ns6div.style.top)<=sspeed)
	{
		ns6div.style.top=0
		setTimeout("ns6marquee(ns6div)",100)
	}
	if (parseInt(ns6div.style.top)>=sheight*-1)
	{
		ns6div.style.top=parseInt(ns6div.style.top)-sspeed
		setTimeout("ns6marquee(ns6div)",100)
	}
	else
	{
		ns6div.style.top=sheight
		ns6div.innerHTML=asingletext[i]
		if (i==asingletext.length-1)
			i=0
		else
			i++
	}
}
//  End -->

