﻿// JScript File

function getObj(id) {
	if(document.layers) {
		return document.layers[id];
	} else if(document.all) {
		return document.all[id];
	} else if(document.getElementById) {
		return document.getElementById(id);
	}
}

$(document).ready(function() 
{
//    setInterval ( "changeSplashImage()", 5000 );
    
    $("img.navrollover").hover(
        function()
        {		
		    var name = $(this).attr("src");		    
    		
		    $(this).attr("src", name.replace("-off.gif", "-over.gif"));
		}, 
		function() 
		{
		    var name = $(this).attr("src");
		    $(this).attr("src", name.replace("-over.gif", "-off.gif"));
        });
    
    $("img.navrolloveron").hover(
        function()
        {		
		    var name = $(this).attr("src");		    
    		
		    $(this).attr("src", name.replace("-over.gif", "-on.gif"));
		}, 
		function() 
		{
		    var name = $(this).attr("src");
		    $(this).attr("src", name.replace("-on.gif", "-over.gif"));
        });
});

function changeSplashImage()
{
    if(null != getObj('splashImage'))
    {
        if (getObj('splashImage').src.toUpperCase().indexOf("IMAGES/SPLASH-PROMO.JPG", 0) > 0)
            getObj('splashImage').src = 'Images/splash-balance.jpg';
        else
            getObj('splashImage').src = 'Images/splash-promo.jpg';
    }
}


function changeStory()
{
    if(null != getObj('splashstory'))
    {
        if (getObj('splashstory').style.display == 'block')
        {
            getObj('splashstory').style.display = 'none';
            getObj('splashstoryout').style.display = 'block';
        }
        else
        {
            getObj('splashstory').style.display = 'block';
            getObj('splashstoryout').style.display = 'none';
        }
    }
}
