function SubmitAction(sAction)
{
	document.frmMain.Action.value = sAction;		
	document.body.style.cursor = "wait";
	
	document.frmMain.submit();
	return false;
}

function SubmitActionAndScroll(sAction) {
	if(document.getElementById("ScrollYPos") != null)
		document.getElementById("ScrollYPos").value = document.body.scrollTop;
	SubmitAction(sAction);
}

function ScrollPage(){
	if (document.getElementById("ScrollYPos") != null)
		document.body.scrollTop = document.getElementById("ScrollYPos").value;
	return false;
}

function FieldInt(e)
{
	var myChar;
	e = window.event;
	myChar = String.fromCharCode(e.keyCode);
	if (myChar >= 0 && myChar <= 9) { return true; } else { e.returnValue = false }
}
		
	
function FieldFloat(e)
{
	var myChar;
	e = window.event;
	myChar = String.fromCharCode(e.keyCode);
	if ((myChar >= 0 && myChar <= 9) || (myChar == ".")) { return true; } else { e.returnValue = false }
}

function AppendHiddenInput(sName, sValue)
{	
	sInput = "<input type='hidden' id='" + sName + "' name='" + sName + "' value='" + sValue + "'/>";
	oElement = document.createElement(sInput);
	document.frmMain.appendChild(oElement);
	if(document.getElementById && !document.getElementById(sName)){
		// netscape fix
		oElement = document.createElement('input');
		oElement.value = sValue;
		oElement.setAttribute('type', 'hidden');
		oElement.setAttribute('id', sName);
		oElement.setAttribute('name', sName);
		oElement.setAttribute('value', sValue);
		document.frmMain.appendChild(oElement);
	}
}

function ToggleEmailFields()
{
    // toggle ths display of email fields
    var emailFields = document.getElementById('emailfields');
    
    if (emailFields.style.display == 'none')
    {
        emailFields.style.display = "block";
        document.getElementById('DisplayEmailFriends').value = 'True';
    }
    else
    {
        emailFields.style.display = "none";
        document.getElementById('DisplayEmailFriends').value = 'False';
    }
}



imgHome = new Image();
imgHome.src = SiteRoot + '/resources/images/menu/home.gif';
imgHomeOn = new Image();
imgHomeOn.src = SiteRoot + '/resources/images/menu/home-on.gif';

imgAbout = new Image();
imgAbout.src = SiteRoot + '/resources/images/menu/about.gif';
imgAboutOn = new Image();
imgAboutOn.src = SiteRoot + '/resources/images/menu/about-on.gif';

imgContact = new Image();
imgContact.src = SiteRoot + '/resources/images/menu/contact.gif';
imgContactOn = new Image();
imgContactOn.src = SiteRoot + '/resources/images/menu/contact-on.gif';

imgJobs = new Image();
imgJobs.src = SiteRoot + '/resources/images/menu/jobs.gif';
imgJobsOn = new Image();
imgJobsOn.src = SiteRoot + '/resources/images/menu/jobs-on.gif';

imgMCCLive = new Image();
imgMCCLive.src = SiteRoot + '/resources/images/menu/mcc-live.gif';
imgMCCLiveOn = new Image();
imgMCCLiveOn.src = SiteRoot + '/resources/images/menu/mcc-live-on.gif';

imgServices = new Image();
imgServices.src = SiteRoot + '/resources/images/menu/services.gif';
imgServicesOn = new Image();
imgServicesOn.src = SiteRoot + '/resources/images/menu/services-on.gif';

