 var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Hook for Internet Explorer
if (navigator.appName && 
  navigator.appName.indexOf("Microsoft") != -1 &&
  navigator.userAgent.indexOf("Windows") != -1 && 
  navigator.userAgent.indexOf("Windows 3.1") == -1) 
{
  document.write('<SCRIPT LANGUAGE=VBScript\> \n');
  document.write('on error resume next \n');
  document.write(
    'Sub sampleFlaMovie_FSCommand(ByVal command, ByVal args)\n');
  document.write(
    ' call sampleFlaMovie_DoFSCommand(command, args)\n');
  document.write('end sub\n');
  document.write('</SCRIPT\> \n');
}

	function ActivateModule(activate) {
		switch (activate){
			case "sponsorship":
				doActivateModule("module1");
				doDeactivateModule("module2");
				doDeactivateModule("module3");
				break;
			case "donateNow":
				doDeactivateModule("module1");
				doActivateModule("module2");
				doDeactivateModule("module3");
				break;	
			case "giftCatalog":
				doDeactivateModule("module1");
				doDeactivateModule("module2");
				doActivateModule("module3");
				break;	
		}
	}
	
	function doActivateModule(moduleID) {
		elem = document.getElementById(moduleID);
		elem.className = "moduleActive";	
	}
	function doDeactivateModule(moduleID) {
		elem = document.getElementById(moduleID);
		elem.className = "";
	}


function turnOn(obj)
{
    obj.src=obj.src.replace("-off.gif", "-on.gif");
}
function turnOff(obj)
{
    if (obj.parentNode.parentNode.id != "active")
    {
        obj.src=obj.src.replace("-on.gif", "-off.gif");
    }
}

function turnParentOn(id)
{
    document.getElementById(id).src=document.getElementById(id).src.replace("-off.gif", "-on.gif");
}
function turnParentOff(id)
{
    document.getElementById(id).src=document.getElementById(id).src.replace("-on.gif", "-off.gif");
}
function changeTab(classname, id)
{
    var alltabs = document.getElementById("tabs");
    for (var i = 0; i < alltabs.childNodes.length; i++)
    {
        var tempId = alltabs.childNodes[i].id
        if (tempId != "" && tempId != null)
        {
            if (tempId.indexOf(id) > -1)
            {
                alltabs.childNodes[i].className = classname+"-tabon";
            }
            else
            {
                alltabs.childNodes[i].className = classname+"-taboff";
            }
        }
    }
    
    var alltabcontent = document.getElementById("tabcontent");
    for (var i = 0; i < alltabcontent.childNodes.length; i++)
    {
        var tempId = alltabcontent.childNodes[i].id
        if (tempId != "" && tempId != null)
        {
            if (tempId.indexOf(id) > -1)
            {
                alltabcontent.childNodes[i].style.display = "block";
            }
            else
            {
                alltabcontent.childNodes[i].style.display = "none";
            }
        }
    }
}