
// ########## FUNCIO AMAGA ELS E-MAILS ANTI SPAM I TAL 

function vinclecorreu(usuari,hostname,hostext,text)
{

	    // Constants per "amagar" les paraules clau

        c1="mai";
        c2="lto";

        if (text == "")
        {
                text = usuari + "@" + hostname + "." + hostext;
        }

        AnchorHREF = "<A class='gris10' HREF='" + c1 + c2 + ":" + usuari + "@" + hostname + "."  + hostext + "'>" + text + "</A>";

        document.write(AnchorHREF);
}

function vinclecorreublanc(usuari,hostname,hostext,text)
{

	    // Constants per "amagar" les paraules clau

        c1="mai";
        c2="lto";

        if (text == "")
        {
                text = usuari + "@" + hostname + "." + hostext;
        }

        AnchorHREF = "<A class='blanc10' HREF='" + c1 + c2 + ":" + usuari + "@" + hostname + "."  + hostext + "'>" + text + "</A>";

        document.write(AnchorHREF);
}

function vinclecorreugrana(usuari,hostname,hostext,text)
{

	    // Constants per "amagar" les paraules clau

        c1="mai";
        c2="lto";

        if (text == "")
        {
                text = usuari + "@" + hostname + "." + hostext;
        }

        AnchorHREF = "<A class='grana10b' HREF='" + c1 + c2 + ":" + usuari + "@" + hostname + "."  + hostext + "'>" + text + "</A>";

        document.write(AnchorHREF);
}
/*sense scroll*/
function OpenWindowCentered(theURL,winName, width, height) {
	var aw = screen.availWidth - 10;
	var xc = (aw - width) / 2;
	var aw2 = screen.availHeight - 10;
	var xc2 = (aw2 - height) / 2;	
	features = "menubar=no,status=no,scrollbars=no,resizable=no, top=" + xc2 + ", left=" + xc + ",screenX=" + xc+", width=" + width + ", height=" + height;
	window.open(theURL,winName,features);
	
}
/*amb scroll*/
function OpenWindowCenteredNotes(theURL,winName, width, height) {
	var aw = screen.availWidth - 10;
	var xc = (aw - width) / 2;
	var aw2 = screen.availHeight - 10;
	var xc2 = (aw2 - height) / 2;	
	features = "menubar=no,status=no,scrollbars=yes,resizable=no, top=" + xc2 + ", left=" + xc + ",screenX=" + xc+", width=" + width + ", height=" + height;
	window.open(theURL,winName,features);	
}

function get_random_foto_cat()
{
    var ranNum= Math.round(Math.random()*5);
	ranNum += 1;
	document.write('<img src="./images/foto_portada'+ranNum+'.jpg" alt="Josep Maria Pou, Actor" width="433" height="253" />');
}

function get_random_foto_es()
{
    var ranNum= Math.round(Math.random()*5);
	ranNum += 1;
	document.write('<img src="./images/foto_portada'+ranNum+'.jpg" alt="José María Pou, Actor" width="433" height="253" />');
}


function tornar()
{
	var finestra = new String(document.location);
	var array_top = finestra.split("#");
	
	if( array_top.length == 2 )
	{
		history.go(-2);
		return false;
//		history.back();
//		history.back();
	}
	else if(array_top.length == 1)
	{
		history.go(-1);
		return false;
//		history.back();
	}
	else
	{
		history.go(-1);
		return false;
//		history.back();

	}
return false;
}
