/*
this is to load the flash component at the top of the page
to fix that IE rights isue they tried to fix with an update
*/
function loadFlash()
{
                        var fo = new FlashObject("/images/hero1.swf", "animationName", "740", "50", "8", "#FFFFFF");
                        fo.addParam("allowScriptAccess", "sameDomain");
                        fo.addParam("menu","false");
                        fo.addParam("quality", "high");
                        fo.addParam("wmode","transparent");
                        fo.addParam("SCALE","exactfit");
                        //fo.addParam("loop", "false");
                        fo.write("flhobj");
}

//NOTE: This function is called by products\eventsensor.aspx. 
//It has no affect there, however, and appears to be obsolete.
function oo(obj, state)
{
	try
	{
		//-off.gif -on.gif
	   var imgtag =  obj.getElementsByTagName("img")[0];
	   var oldName = imgtag.src;
	   if(state == true)
			imgtag.src = oldName.replace("-off","-on");
	   else
			imgtag.src = oldName.replace("-on","-off");
	}
	catch(err)
	{}
}

/* 
this function gets used by the /solutions/guidetofinding.asp page
to switch the iframe depending on what kind of product you want
to search for
*/

function swapI(ifrmsrc)
{
	document.getElementById("guideI").src = ifrmsrc;
}

/*
this function gets used by 
- /information/productfeatures.asp
to hide and display diferent articles based on the radio butons 
the user chooses
*/
function showArticles(radioBtn)
{
	var parent   = document.getElementById("articles");
	var articles = parent.childNodes;
	var i 		 = 0;

	do
	{
		//make sure im only going trough the div tags
		if(articles[i].nodeName == "DIV")
		{
			if(radioBtn.value == 1)
			{
				articles[i].style.display = (articles[i].className == 1 || articles[i].getAttribute("class") == 1 || articles[i].className == 2 || articles[i].getAttribute("class") == 2) ? "block" : "none";
			}
			else if(radioBtn.value == 2)
			{
				articles[i].style.display = (articles[i].className == 2 || articles[i].getAttribute("class") == 2 || articles[i].className == 3 || articles[i].getAttribute("class") == 3) ? "block" : "none";
			}
			else if(radioBtn.value == 3)
			{
				articles[i].style.display = "block";
			}
		}
		i++;
	}
	while(articles[i])
}