/*************************************/
/*                DATA               */
/*************************************/
/*
* le visuel
*/
//var imgH = "../commun/images/home.jpg";

/******************************************************************************************/
/*
* FORMAT DES TABLEAUX
*/  
var nf = new String("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=250>\n");
        nf += "<TR><TD class='titre'><!--title//--></TD></TR>\n";
        nf += "<TR><TD class='txtvertb'><!--date//--></TD></TR>\n";
        nf += "<TR><TD class='txt'><!--texte//--></TD></TR>\n";
        nf += "<TR><TD ALIGN='right'><A HREF='<!--lien//-->' class='txtorangeub'><!--txtlien//--></TD></TR>\n";
        nf += "</TABLE>\n";
  
function buildNews(t,p)
{
        var lt = t;
        var str = new String(nf);
		if(p!=null)
	        str = str.replace("<!--title//-->","<IMG SRC='"+p+"' HSPACE=4><!--title//-->")
        for(prop in lt)
                str = str.replace("<!--"+prop+"//-->",lt[prop]);
        return str;
}

/* format teableau central */
var lineH = new String("<TABLE BORDER=0 WIDTH=255 HEIGHT=1 CELLPADDING=0 CELLSPACING=0>\n<TR>\n<TD BGCOLOR='#000000' HEIGHT=1>\n<IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=1 WIDTH=1></TD>\n</TR>\n</TABLE>\n");

var hf = new String("<IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=10 WIDTH=410><BR><TABLE BORDER=0 WIDTH=510 CELLPADDING=0 CELLSPACING=0>\n");
        hf += "<TR>\n<TD VALIGN='top' WIDTH=250><SPAN class='txtgrisb'><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100><BR>> En ligne<BR><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100></SPAN><BR>\n<!--news1//--><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100 BORDER=0><!--news2//--><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100 BORDER=0><!--news3//--><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100>" + lineH + " <SPAN class='txtgrisb'><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100><BR>> FO M&eacute;taux, le journal<BR><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100></SPAN><BR><!--event//--><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100>" + lineH + "<SPAN class='txtgrisb'><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100><BR>> Pratique<BR><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100></SPAN><BR>\n<!--pratique//--><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100>" + lineH + "<SPAN class='txtgrisb'><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100><BR>> Vos droits<BR><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100></SPAN><BR>\n<!--droit//--><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100>"+ lineH + "</TD>";
        hf += "<TD><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=1 WIDTH=10></TD>";
        hf += "<TD VALIGN='top' WIDTH=250>\n<!--img//-->\n<BR><SPAN class='txtgrisb'><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100><BR>> Communiqu&eacute;s de presse<BR><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100></SPAN><BR>\n<!--press//--><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100>"
                + lineH + "<SPAN class='txtgrisb'><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100><BR>> Agenda<BR><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100></SPAN><BR>\n<!--agenda//--><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100>"+ lineH ;
		hf += "<SPAN class='txtgrisb'><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100><BR>> Convention collective<BR><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100></SPAN><BR>\n<!--conv//-->\n<!--conv1//-->\n<!--conv2//--><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100>"+ lineH + "<SPAN class='txtgrisb'><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100><BR><a href='transv.php?id=link' class='txtorangeub'>> Les liens FO-Metaux</a><BR><IMG SRC='../commun/images/imgrd/trsp.gif' HEIGHT=6 WIDTH=100></SPAN><BR>\n";
		hf += "</TD></TR>\n";
        hf += "</TABLE>\n";
        
//<SPAN class='txtgrisb'></SPAN><BR><BR>
var cornerPic = new Array();
 cornerPic[0] = new Image();
 cornerPic[0].src = "../commun/images/imgrd/corner_blue0.gif";
 cornerPic[1] = new Image();
 cornerPic[1].src = "../commun/images/imgrd/corner_red0.gif";
 
function HomePage()
{
        this.tag = new String("");
        this.htm = new String(hf);
        this.news1 = buildNews(nd[0],cornerPic[0].src);
        this.news2 = buildNews(nd[1],cornerPic[0].src);
        this.news3 = buildNews(nd[2],cornerPic[0].src);
        this.event = buildNews(fo,cornerPic[1].src);       
        this.agenda = buildNews(ag,cornerPic[1].src);
        this.press = buildNews(cp,cornerPic[0].src);
        this.pratique = buildNews(pr,cornerPic[1].src);
        this.droit = buildNews(dr,cornerPic[1].src);
        this.conv = buildNews(co,null);
        this.conv1 = buildNews(co1,null);
		this.conv2 = "";
		for(var i=0; i<co2.length;i++)
        	this.conv2 += buildNews(co2[i],null);
        this.picto = new Image();
        this.picto.src = imgH;
        this.img = "<DIV ALIGN='center'><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD BGCOLOR=#000000><TABLE BORDER=0 CELLPADDING=2 CELLSPACING=1><TR><TD BGCOLOR=#FFFFF5 ALIGN='center' class='texte'><IMG SRC='"+this.picto.src+"' HSPACE=5 VSPACE=5></TD></TR><TR><TD BGCOLOR=#FFFFF5 ALIGN='center' class='texte'>&nbsp;"+txtH+"&nbsp;</TD></TR></TABLE></TD></TR></TABLE></DIV>";
        
        this.build = cretaHT;        
        this.init = initObj;
}

function cretaHT()
{
        this.tag = this.htm;        
        for(prop in this)
                if(typeof(this[prop]) != "object" && typeof(this[prop]) != "function")
                        this.tag = this.tag.replace("<!--"+prop+"//-->",unescape(this[prop]));
}

