function MM_changeProp(objName,x,theProp,theValue) { //v3.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  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 MM_swapImage() { //v3.0
  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 newsPopup(storyNum) {

	var url_string = 'http://ir.thomsonfn.com/InvestorRelations/PubNewsStory.aspx?partner=Mzg0TXpRNU9RPT1QJFkEQUALSTO&product=MzgwU1ZJPVAkWQEQUALSTOEQUALSTO&storyId=' + storyNum;

                        if (document.all)
	                        var xMax = screen.width, yMax = screen.height;
                        else
                        if (document.layers)
	                        var xMax = window.outerWidth, yMax = window.outerHeight;
                        else
 	                       var xMax = 640, yMax=480;
	                        var w = (xMax/2), h = (yMax-150);
	                        var xOffset = (xMax - w)/2, yOffset = (yMax - h)/2;

                        window.open(url_string,storyNum,'width='+w+',height='+h+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+',directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no');
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// Gets value of cookie named "NameOfCookie"
//
function getCookie(NameOfCookie)
{
        if (document.cookie.length > 0)
        {
                begin = document.cookie.indexOf(NameOfCookie+"=");
                if (begin != -1) // Note: != means "is not equal to"
                {
                        begin += NameOfCookie.length+1;
                        end = document.cookie.indexOf(";", begin);
                        if (end == -1) end = document.cookie.length;
                        return unescape(document.cookie.substring(begin, end));
                }
        }
        return null;
}

// Sets cookie values. Expiration date is optional
//
function setCookie(NameOfCookie, value, expiredays)
{

// Three variables are used to set the new cookie.
// The name of the cookie, the value to be stored,
// and finally the number of days until the cookie expires.
// The first lines in the function convert
// the number of days to a valid date.

        var ExpireDate = new Date ();
        ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));

        document.cookie = NameOfCookie + "=" + escape(value) + ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}

function register(name,value) {
         setCookie(name, value, 30);
}


function updateHistory(temp_hist_var,page_info_var) {

     //Read in history cookies
     for (var i=0; i<=3; i++){
          temp_hist_var[i] = getCookie("ARC_hist" + i);
     }
     if (!(temp_hist_var[0] == page_info_var)) //make sure the page was not simply refreshed
     {
            for (var j=1; j<=3; j++)
            {
                     // check to see if page exists in the history
                     if (temp_hist_var[j] == page_info_var)
                     {
                             //overwrite that duplicate, bump everything back in the queue
                             for (var i=j; i >= 1; i--)
                             {
                                      if (!(temp_hist_var[i] == null))
                                              temp_hist_var[i] = temp_hist_var[i-1];
                             }

                             // Add the current page into the history
                             temp_hist_var[0] = page_info_var;

                             //Save history cookies
                             for (var i=0; i<=3; i++)
                             {
                                      register("ARC_hist" + i,temp_hist_var[i]);
                             }
                     }
             } // end for
             if (!(temp_hist_var[0] == page_info_var)) //this is true if nothing was changed in the above loop
             {
                     // Pop off last element from queue, shift rest down
                     for (var i=2; i>=0; i--)
                     {
                              if (!(temp_hist_var[i] == null))
                                      temp_hist_var[i+1] = temp_hist_var[i];
                     }

                     // Add the current page into the history
                     temp_hist_var[0] = page_info_var;

                     //Save history cookies
                     for (var i=0; i<=3; i++)
                     {
                              register("ARC_hist" + i,temp_hist_var[i]);
                     }
             } // end if
     } // end if

/*
//Read in history cookies
for (var i=0; i<=3; i++){
     temp_hist_var[i] = getCookie("ARC_hist" + i);
}

if (temp_hist_var[0] != page_info_var)
{
    // Pop off last element from queue
    for (var i=2; i>=0; i--)
    {
         if (temp_hist_var[i] != null)
             temp_hist_var[i+1] = temp_hist_var[i];
    }

    // Add the current page into the history
    temp_hist_var[0] = page_info_var;

    //Save history cookies
    for (var i=0; i<=3; i++)
    {
         register("ARC_hist" + i,temp_hist_var[i]);
    }
} */


     return temp_hist_var;
}


function printHistory(history_array) {
         var temp_cookie = '';
         document.write('<center><img src="images/history_wide.gif" width="188" height="23" alt="Previous Locations"></center><table width="188" cellpadding=2 cellspacing=0 border=0>');
         for (var i=0; i<=3; i++)
         {
              if (history_array[i] != null)
              {
                  temp_cookie = history_array[i];
                  temp_info = temp_cookie.split(',');
                                  temp_main = temp_info[0].indexOf(' :: ');
                                  titles = temp_info[0].split(' :: ');
                  if ((temp_info[0] != 'null') && (temp_info[0] != null))
                  {
                        if (temp_main > -1)
                        {
                               document.write('<tr><td width="8">&nbsp;</td><td width=16 valign=top align=center><font face="Arial, sans-serif" size=2 color="#999999"><b>o</b></td><td width=*><a href="' +
                               temp_info[1] + '"><font face="Arial, sans-serif" size=1 color="#6699CC" style="font-size: 11px;"> ' + titles[0]
                               + ' <br><font size=2 color="#006699"> ' + titles[1] + '</font></font></a></td></tr>');
                        }
                        else
                        {
                               document.write('<tr><td width="8">&nbsp;</td><td width=16 valign=top align=center><font face="Arial, sans-serif" size=2 color="#999999"><b>o</b></td><td width=*><a href="' +
                               temp_info[1] + '"><font face="Arial, sans-serif" size=2 color="#006699"> ' + titles[0]
                               + ' <br></font></a></td></tr>');
                        }
                  }
              }
         }
         document.write('</table>');
}