if (($("#teasers").length) && (!$("#flash_wrapper").length))
{
	if ($("#manual_start").length)
	{
		//<![CDATA[
		/*onload event per page*/
		$(function(){BAXTER.teaser.init({"autostart":false,"speed":5000,"label":""});});
		//]]>
	}
	else
	{
		//<![CDATA[
		/*onload event per page*/
		$(function(){BAXTER.teaser.init();});
		//]]>
	}
}

if (typeof(flash_array) != "undefined")
	{
		var flashvars={},params={},attributes={"wmode":"opaque"};

		for (var i=0, len=flash_array.length; i<len; ++i)
		{
			swfobject.embedSWF(flash_array[i].Url, flash_array[i].Name, flash_array[i].Width, flash_array[i].Height, "10",flashvars,params,attributes);
		}
	}



var links = document.getElementsByTagName("A");

function loopThroughLinks()
	{
   	//Loop thru all links

		var links = document.getElementsByTagName('A');
		for (i=0; i<links.length; i++) 
      	{   
			// FF fix
			if ((links[i].getAttribute("href") != null) && ((links[i].getAttribute("href").indexOf("http://") == 0) || (links[i].getAttribute("href").indexOf("https://") == 0)))
 				{checklink(links[i]);}
		}
	}

function chglink(objlnk)
   {
	objlnk.target = "";
	objlnk.href = "/information/linking/external_link_disclaimer.html?s=" + objlnk.getAttribute("href");
   }

function checklink(objlnk)
	{


		if ((objlnk.getAttribute("href").indexOf("WT.excl") == -1) && (objlnk.getAttribute("href").indexOf("WT.svl") == -1) && (objlnk.getAttribute("href").indexOf("mailto:") == -1) && (objlnk.getAttribute("href").indexOf(".pdf") == -1) && (objlnk.getAttribute("href").indexOf("http://video.baxter") == -1) && (objlnk.getAttribute("href").indexOf("http://teamsite") == -1) && (objlnk.getAttribute("href").indexOf("http://www.baxter") == -1) && (objlnk.getAttribute("href").indexOf("https://www.baxter") == -1) && (objlnk.getAttribute("href").indexOf("http://10.77") == -1) && (objlnk.getAttribute("href").indexOf("http://usbdz1web800") == -1) && (objlnk.getAttribute("href").indexOf("javascript:") == -1) && (objlnk.getAttribute("href").indexOf("http://phx.corporate") == -1) && (objlnk.getAttribute("href").indexOf("http://investor.baxter.com") == -1))
		{
		
			if (objlnk.getAttribute("rel") != "image") {objlnk.rel = "external";}
			chglink(objlnk);
		}
	}
	

if (document.location.href.indexOf("external_link_disclaimer.html") == -1)
	{
		loopThroughLinks();
	}

function formHandler(obj)
{
	if((obj.options[obj.selectedIndex].value).substring(7,0) =='http://'){
		window.open(obj.options[obj.selectedIndex].value);
	}
	else{
		document.location=obj.options[obj.selectedIndex].value;
	}
}
