window.onload = init;
//window.onload = setMessage;

var counter = 1;
var names = new Array("Westchester", "Putnam", "Central", "Labor", "Body");

var str="" // the message to display

// Set the status bar message
function setMessage()
{
    if (str == "")
    {
        /* Initialize: pad front of string with blanks */
        for (var ii = 0; ii < 120; ii += 10) {str = str + "          "}

        /* Add the pad before the string */
        str = str + "Welcome to the Westchester/Putnam Central Labor Body, AFL - CIO!!!"
    }
    else
    {
        /* remove a blank at a time */
        str = str.substring(2, str.length)
    }

    // Update the status bar message and set a new timeout
    window.status = str
    JSCTimeOutID = window.setTimeout('setMessage()',300)
}


function init()
{
	var nav = document.getElementById('hovers');
		
	nav.onclick = mouseC;
	
	
	//nav.onmouseout = mouseGoesOut;
	
}


function mouseC()
{
	var picture = document.getElementById('hovers');

	counter = counter + 1;

    picture.src = "/Pics/mainPage/" + counter + ".jpg"; 

	picture.alt = names[counter-1];
		
	if( counter == 5)
		{
			counter = 0;		//Resets counter
		}
}




function mouseGoesOut()
{
	counter = 1;
}

