if(navigator.appName == "Microsoft Internet Explorer")
{
		if(typeof(window.attachEvent) != 'undefined')
		{
			window.attachEvent('onload',activeXFix);
		}
}

function activeXFix()
{
	var strAgent			= navigator.userAgent.toLowerCase();

	// On IE5, these return 4, so use booIE5up to detect IE5.
	var intMajor			= parseInt(navigator.appVersion);
	var fltMinor				= parseFloat(navigator.appVersion);

	// Is the browser in question IE or something else.
	var booIE				= ((strAgent.indexOf("msie") != -1) && (strAgent.indexOf("opera") == -1));
	// If the briowser is IE then we work out which version it is.
	var booIE3				= (booIE && (intMajor < 4));
	var booIE4				= (booIE && (intMajor == 4) && (strAgent.indexOf("msie 4") != -1));
	var booIE4up			= (booIE && (intMajor >= 4));
	var booIE5				= (booIE && (intMajor == 4) && (strAgent.indexOf("msie 5.0") != -1));
	var booIE5_5			= (booIE && (intMajor == 4) && (strAgent.indexOf("msie 5.5") != -1));
	var booIE5up			= (booIE && !booIE3 && !booIE4);
	var booIE5_5up		= (booIE && !booIE3 && !booIE4 && !booIE5);
	var booIE6				= (booIE && (intMajor == 4) && (strAgent.indexOf("msie 6.") != -1));
	var booIE6up			= (booIE && !booIE3 && !booIE4 && !booIE5 && !booIE5_5);
    
	// We are only interested in executing the fix for IE.
	if(booIE)
	{
		try
		{
			// The three types of ActiveX plugins are object, embed and applet so we put those into an array.
			var arrElements = new Array(3);
			arrElements[0] = "object";
			arrElements[1] = "embed";
			arrElements[2] = "applet";
			
			for(intLoop1 = 0; intLoop1 < arrElements.length; intLoop1++)
			{
				// For each plugin type, find all corresponding elements.
				nodeElement = document.getElementsByTagName(arrElements[intLoop1]);
				
				for(intLoop2 = 0; intLoop2 < nodeElement.length; intLoop2++)
				{
					// Get the parent node of the element in which we are interested.
					nodeParent = nodeElement[intLoop2].parentNode;
					// Get the HTML of that parent node and place it into a variable.
					strHTML = nodeParent.innerHTML;
					// Remove the child element of the parent node.
					nodeParent.removeChild(nodeElement[intLoop2]);
					// Insert the HTML for the child of the parent node with the HTML we extracted previously.
					nodeParent.innerHTML = strHTML;
				}
			}
		}
		// If we get an error, give the user the option of continuing with the current page or switching to the home page.
		catch(objError)
		{
			//var strPage = document.referrer ? "page you came from" : "home page";
			//var strMsg = "An error has occurred on this page. If you wish to continue viewing this page click OK or click Cancel to return to the " + strPage + ".\n\n[" + objError.description + "]\n";
			//if(!confirm(strMsg))
			//{
				// Some pages are inside a frameset so we need to use window.top.
				//window.top.location.href = document.referrer ? document.referrer : "/";
			//}
		}
	}
}