function MM_findObj(n, d)
{
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage()
{
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_swapImgRestore()
{
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MouseOutAndOver(img, ref)
{ 
	document.getElementById(img).src = ref; 
}

function DoPrinterFriendly()
{
	window.print();
}

function CreatePrinterFriendlyLinks()
{
  try
  {
    var elementToAddLinksTo = document.getElementById("LinksHere");
    var elementToGetLinksFrom = document.getElementById("ctl00_MainContent");
    
    var allLinks = elementToGetLinksFrom.getElementsByTagName("a");
    var previousTocElement = null;

    for (var i = allLinks.length - 1; i >= 0; i--)
    {
      var myLink = allLinks[i];
      if (myLink.href != null && myLink.href != "")
      {
        if (myLink.href != myLink.innerHTML)
        {
          if (myLink.parentNode.id != "plcContentComments")
          {
            // Found a link with a description different from its href
            // First, insert a footnote reference number.
            var newElement = document.createElement("span");
            newElement.innerHTML = "&nbsp;(" + (i + 1) + ")";
            newElement.className = "PrintOnlySpan";
            myLink.parentNode.insertBefore(newElement, myLink.nextSibling);

            // Now add the link to the Links TOC at the end of the article
            var newTocLink = document.createElement("span");
            newTocLink.innerHTML = "(" + (i + 1) + ") " + myLink.href;

            elementToAddLinksTo.insertBefore(newTocLink, previousTocElement);
            newTocLink.parentNode.insertBefore(
                document.createElement("br"), newTocLink.nextSibling);
            previousTocElement = newTocLink;
          }
        }
      }
    }
  }
  catch(ex)
  {}
}

function WriteFlashObject(flashURL, width, height, uniqueId)
{
	var theUniqueid = '';
	if (uniqueId != null)
	{
		if (uniqueId.length > 0)
		{
			theUniqueid = ' id=\"' + uniqueId + '\"';
		}
	}
	if (navigator.userAgent.indexOf("MSIE") == -1){
   document.write('<embed src="' + flashURL + '"' + theUniqueid + ' quality="high" wmode="transparent" pluginspage="<http://www.macromedia.com/go/getflashplayer>http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width +'" height="' +  height +'"></embed>');
  }else if(navigator.userAgent.indexOf("MSIE") != -1){
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="<http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0>http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"  width="' + width +  '" height="' + height + '"><param name="movie" value="'  +  flashURL +'" /><param name="wmode" value="transparent" /><param name="quality" value="high" /></object>')
  }
}