var top_finestra = 0
var left_finestra = 0
/*if (window.screen.height > 600)
	top_finestra = Math.round((window.screen.height -600) / 2)
else
	top_finestra = 0
if (window.screen.width > 800)
	left_finestra = Math.round((window.screen.width - 800) / 2)
else
	left_finestra = 0
*/
var dies_semana = new Array()
var i
for(i=0;i<7;i++)
{
	dies_semana[i] = new Array(2)
}
dies_semana[0][0] = "Dilluns"
dies_semana[0][1] = "Lunes"
dies_semana[1][0] = "Dimarts"
dies_semana[1][1] = "Martes"
dies_semana[2][0] = "Dimecres"
dies_semana[2][1] = "Miercoles"
dies_semana[3][0] = "Dijous"
dies_semana[3][1] = "Jueves"
dies_semana[4][0] = "Divendres"
dies_semana[4][1] = "Viernes"
dies_semana[5][0] = "Dissabte"
dies_semana[5][1] = "Sabado"
dies_semana[6][0] = "Diumenge"
dies_semana[6][1] = "Domingo"

var noms_mesos = new Array()
var i
for(i=0;i<12;i++)
{
	noms_mesos[i] = new Array(2)
}

noms_mesos[0][0] = "Gener"
noms_mesos[0][1] = "Enero"
noms_mesos[1][0] = "Febrer"
noms_mesos[1][1] = "Febrero"
noms_mesos[2][0] = "Marc"
noms_mesos[2][1] = "Marzo"
noms_mesos[3][0] = "Abril"
noms_mesos[3][1] = "Abril"
noms_mesos[4][0] = "Maig"
noms_mesos[4][1] = "Mayo"
noms_mesos[5][0] = "Juny"
noms_mesos[5][1] = "Junio"
noms_mesos[6][0] = "Juliol"
noms_mesos[6][1] = "Julio"
noms_mesos[7][0] = "Agost"
noms_mesos[7][1] = "Agosto"
noms_mesos[8][0] = "Setembre"
noms_mesos[8][1] = "Septiembre"
noms_mesos[9][0] = "Octubre"
noms_mesos[9][1] = "Octubre"
noms_mesos[10][0] = "Novembre"
noms_mesos[10][1] = "Noviembre"
noms_mesos[11][0] = "Desembre"
noms_mesos[11][1] = "Diciembre"




function Contingut()
{
	document.write ('<iframe id="CONTINGUT" NAME="CONTINGUT" scrolling=yes frameborder=no src="webenterprise_presentacio.asp" width="' +eval(window.screen.width - 300)+ '" height="' + eval(window.screen.height -320)  + '"></iframe>');
}

function DescDia(dia_semana,dia,mes,any,idioma)
{
	var str
	var de
	var idi
	
	idi = idioma -1
	
	str = dies_semana[dia_semana-1][idi]
	de = " de "
	if (idi == 0)
	{
		if (mes == 4 || mes == 8 || mes == 10)
		{
			de = " d' "
		}
	}
	str = str + ", " + dia + de + noms_mesos[mes-1][idi] 
	if (idi == 0)
		str = str + " del " + any
	else
		str = str + " de " + any
	return str
		
}
function Carrega(location)
{
	
	document.getElementById('CONTINGUT').contentWindow.document.location.href = location
}
function Presentacio()
{
	Carrega("webenterprise_presentacio.asp")
}
function Contacte()
{
	Carrega("webenterprise_contacte.asp")
}
function Inscripcio(id)
{
	Carrega("webenterprise_inscripcio.asp?id=" + id)
}
function Clients(id)
{
	Carrega("webenterprise_clients.asp?id=" + id)
}
function Producte(id_sector,id_producte)
{
	Carrega("webenterprise_producte.asp?id_sector=" + id_sector + "&id_producte=" + id_producte)
}
function Noticies(tipus)
{
	Carrega("webenterprise_noticies.asp?tipus=" + tipus)
}
function Incidencies()
{
	Carrega("webenterprise_incidencies.asp")
}
function Versions()
{
	Carrega("webenterprise_versions.asp")
}

function Administracio()
{
	Carrega("webenterprise_admin.asp")
}

function Identificacio()
{
	Carrega("webenterprise_ident.asp")
}

document.writeln("<style>");
document.writeln("#finestra{position:relative;top:0px;left:50px;width:" + eval(window.screen.width-200)+ "px;height:" +  eval(window.screen.height - 500)+ "px;}");
document.writeln("</STYLE>");

var noticies
noticies = new NewsTicker(left_finestra + 240,top_finestra +40,600,30)
var i 
for(i=0;i<llista_not.length;i++)
{
noticies.addItem(llista_not[i])
}
noticies.build()
noticies.WriteCSS()
