function change( imgName, imgLocation )
{
 document.getElementById(imgName).src = imgLocation;
}


function loadImages()
{

}

function checkFlash() 
{
/*
document.write (navigator.mimeTypes.toString());
document.write(navigator.mimeTypes["application/x-shockwave-flash"].toString());
*/
/*
    if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) 
    {
        
    }
    
    else 
    {
        // change to img tag
        document.getElementById("theSplashBox").innerHTML = "<img src='images/websplashwithlogo.jpg' />";
    }
*/
}

function initMenuPosition()
{
document.getElementById("companymenu").style.top="-200px";	
document.getElementById("clientmenu").style.top="-270px";	
document.getElementById("employmentmenu").style.top="-70px";
document.getElementById("relationsmenu").style.top = "-100px";
document.getElementById("contactmenu").style.top = "-50px";	
}

function initMenuVars()
{
document.getElementById("companymenu").menuWasOpened=false;
document.getElementById("clientmenu").menuWasOpened=false;
document.getElementById("employmentmenu").menuWasOpened=false;
document.getElementById("relationsmenu").menuWasOpened = false;
document.getElementById("contactmenu").menuWasOpened = false;
document.getElementById("companymenu").isOnMenu=false;
document.getElementById("clientmenu").isOnMenu=false;
document.getElementById("employmentmenu").isOnMenu=false;
document.getElementById("relationsmenu").isOnMenu = false;
document.getElementById("contactmenu").isOnMenu = false;
document.getElementById("companymenu").isOnFrame=false;
document.getElementById("clientmenu").isOnFrame=false;
document.getElementById("employmentmenu").isOnFrame=false;
document.getElementById("relationsmenu").isOnFrame = false;
document.getElementById("contactmenu").isOnFrame = false;
}


function menuRollover (rolloverId)
{
var menuId = rolloverId+"menu";
var frameId = rolloverId + "menuoptions";

document.getElementById(menuId).menuWasOpened=true;
document.getElementById(menuId).isOnMenu=true;
document.getElementById(frameId).style.zIndex=2;

if (document.getElementById(menuId).statusTimer){clearTimeout (document.getElementById(menuId).statusTimer);}
if (document.getElementById(menuId).outTimer){clearTimeout(document.getElementById(menuId).outTimer);}

document.getElementById(menuId).statusTimer = setTimeout (function(){StatusCheck(rolloverId, 0);},400);

}


function menuOut (outId, resetPosition)
{
menuId= outId + "menu";

document.getElementById(menuId).isOnMenu=false;

if (document.getElementById(menuId).statusTimer){clearTimeout (document.getElementById(menuId).statusTimer);}
if (document.getElementById(menuId).outTimer){clearTimeout(document.getElementById(menuId).outTimer);}
document.getElementById(menuId).statusTimer = setTimeout (function(){StatusCheck(outId, resetPosition);},400);
}


function frameRollover (rolloverId)
{

var menuId = rolloverId + "menu";

if (document.getElementById(menuId).menuWasOpened==true)
	{
	document.getElementById(menuId).isOnFrame=true;
	}

if (document.getElementById(menuId).isOnFrame==true)
	{
	if (document.getElementById(menuId).statusTimer){clearTimeout (document.getElementById(menuId).statusTimer);}
	if (document.getElementById(menuId).outTimer){clearTimeout(document.getElementById(menuId).outTimer);}
	document.getElementById(menuId).statusTimer = setTimeout (function(){StatusCheck(rolloverId, 0);}, 400);
	}


}

function frameOut (outId, resetPosition)
{

var menuId = outId + "menu";


document.getElementById(menuId).isOnFrame=false;

if (document.getElementById(menuId).statusTimer){clearTimeout (document.getElementById(menuId).statusTimer);}
if (document.getElementById(menuId).outTimer){clearTimeout(document.getElementById(menuId).outTimer);}
document.getElementById(menuId).statusTimer= setTimeout (function(){StatusCheck(outId, resetPosition);},400);
}

function StatusCheck (statusId, resetPosition)
{
var menuId = statusId + "menu";

if ((document.getElementById(menuId).isOnMenu==true)||(document.getElementById(menuId).isOnFrame==true))
	{
	clearInterval(document.getElementById(menuId).rollTimer);
	document.getElementById(menuId).rollTimer = setInterval (function (){menuIdMover(statusId);},5);
	}

if ((document.getElementById(menuId).isOnMenu==false)&&(document.getElementById(menuId).isOnFrame==false))
	{
	if (document.getElementById(menuId).menuWasOpened==true)
		{
		document.getElementById(menuId).menuWasOpened=false;
		}
	document.getElementById(menuId).outTimer = setTimeout(function(){endTimer(statusId,resetPosition);},30);
	}

}

function menuIdMover(moverId) 
{

var menuId = moverId+"menu";

if ((parseInt(document.getElementById(menuId).style.top))<0) 
	{
	document.getElementById(menuId).style.top=(parseInt(document.getElementById(menuId).style.top)+10)+"px";
	}
} 


function endTimer (endId, resetPosition)
{
var menuId = endId + "menu";
var frameId = endId + "menuoptions";

clearInterval(document.getElementById(menuId).rollTimer);
clearTimeout(document.getElementById(menuId).outTimer);
document.getElementById(menuId).style.top= resetPosition+"px";
document.getElementById(frameId).style.zIndex=-1;
}


function optionHighlight (optiontype, optioncounter)
{
var optionname = optiontype + "Option" + optioncounter;
document.getElementById(optionname).style.background="#0000FF";
document.getElementById(optionname).style.color="#FFFFFF";
}



function optionDeHighlight (optiontype, optioncounter)
{
var optionname = optiontype + "Option" + optioncounter;
document.getElementById(optionname).style.background="#EEEEEE";
document.getElementById(optionname).style.color="#02024a";
}

function myCheckForFlash() 
{

    document.getElementById("theSplashCell").innerHTML = "<img src='images/webSplashWithLogo.jpg' height=\"450\" width=\"646\">";
}

