// declare global variables
 
var NS4 = document.layers;
var IE4 = document.all;
var beg = 10;
var max = 20;
var font_size = beg;
var style_strng = "<STYLE TYPE='text/css'>\n";
 
var msg = new Array("EBNA Ente Bilaterale Nazionale Artigianato","Ente No Profit che promuove e sostiene", "il Sistema degli Enti Bilaterali dell'Artigianato", "attivitą", "bilateralitą e artigianato", "fabbisogni formativi", "pubblicazioni", "ambiente e sicurezza", "enti bilaterali", "benvenuti nel sito EBNA.IT");
var the_color = new Array("color: #000A7F;", "color: #000A7F;", "color: #28B1C2;", "color: #6249C2;", "color: #ABD582;", "color: #DEBD73;", "color: #952626;", "color: #A6963D;", "color: #7D9BD2;", "color: #000A7F;");
 
for (var m=0; m<msg.length; m++)                                                 // function to build font sizes and color 
{   for (var i=beg; i<=max; i++) 
    {   style_strng += ".f" + i + m + " { font-size:" + i + "pt; " + the_color[m] + " }\n";
    }
    style_strng += "</STYLE>";
    document.write(style_strng);
    style_strng = "<STYLE TYPE='text/css'>\n";                                   // reset for next color 
}
 
function writeIt(id, text)                                                       // this function writes the text
{  	if  (NS4) 
    { 		var the_layer = eval("document.parentDiv.document." + id + ".document"); // Netscape must reference parent layer
		      the_layer.open();                                                        // looks ridiculous doesn't it
		      the_layer.write(text);
		      the_layer.close();
	   }
	   else 
    if  (IE4) 
    {   document.all[id].innerHTML = text;                                       // IE can reference it directly           
    }
}
 
function scaleMsg(x)                                                             // calls function to write text specifying size and color
{   if  (font_size <= max)                                                       // stop at max size
    {   writeIt("childDiv", "<DIV ALIGN='CENTER'><SPAN CLASS='f" + font_size + x + "'>" + msg[x] + "</SPAN></DIV>");
        font_size++;
        setTimeout("scaleMsg(" + x + ")", 20);
    }
    else 
    {   font_size=beg;                                                           // reset for next msg
    }
}
 
function startShow()
{   m=0; 
    scaleMsg(m);                                                                 // show first msg 
    m=1; 
    setTimeout("scaleMsg(" + m + ")", 3000);                                     // show second msg
    m=2;
    setTimeout("scaleMsg(" + m + ")", 6000);                                     // show third msg
    m=3;
    setTimeout("scaleMsg(" + m + ")", 9000); 
	m=4;
    setTimeout("scaleMsg(" + m + ")", 12000);
	m=5;
    setTimeout("scaleMsg(" + m + ")", 15000);
	m=6;
    setTimeout("scaleMsg(" + m + ")", 18000);									
	m=7;
    setTimeout("scaleMsg(" + m + ")", 21000); 
	m=8;
    setTimeout("scaleMsg(" + m + ")", 24000);
	m=9;
    setTimeout("scaleMsg(" + m + ")", 27000);                                  // show last msg
}