// preload shim images
  var aryImages = new Array();
  aryImages[0]  = "/images/empty_box_disabled.gif";
  aryImages[1]  = "/images/filter_gray_bg.gif";
  aryImages[2]  = "/images/filter_bg.gif";
  aryImages[3]  = "/images/filter_arrow_1.gif";
  aryImages[4]  = "/images/header_thomson_financial.gif";  
  aryImages[5]  = "/images/shim.gif";
  aryImages[6]  = "/images/shim_000000.gif";
  aryImages[7]  = "/images/shim_0033CC.gif";
  aryImages[8] = "/images/shim_333333.gif";
  aryImages[9] = "/images/shim_999999.gif";
  aryImages[10] = "/images/shim_bbbbbb.gif";
  aryImages[11] = "/images/shim_b5c7de.gif";
  aryImages[12] = "/images/shim_b5c7ed.gif";
  aryImages[13] = "/images/shim_cccccc.gif";
  aryImages[14] = "/images/shim_dddddd.gif";
  aryImages[15] = "/images/shim_f6f6ea.gif";
  aryImages[16] = "/images/sm_monitor_logo.gif";
  aryImages[17] = "/images/stars_1.gif";
  aryImages[18] = "/images/stars_1_sm.gif";  
  aryImages[19] = "/images/stars_2.gif";
  aryImages[20] = "/images/stars_2_sm.gif";  
  aryImages[21] = "/images/stars_3.gif";
  aryImages[22] = "/images/stars_3_sm.gif";  
  aryImages[23] = "/images/stars_4.gif";
  aryImages[24] = "/images/stars_4_sm.gif";  
  aryImages[25] = "/images/stars_5.gif";
  aryImages[26] = "/images/stars_5_sm.gif";
  aryImages[27] = "/images/xbox.gif"; 
  aryImages[28] = "/images/xbox_1.gif";  
  
  for (i=0; i < aryImages.length; i++) {
    var preload = new Image();
    preload.src = aryImages[i];
  }

//  End -->


   /* This Function inserts a text field of approximately equal visual length in NN and IE
      since NN and IE interpret length differently */
function insertTextField(len, max, name, currval, style) { 
	if (style=="" || style==null) style="text";

//len should be equal to the IE length needed. It will be equated for NN.
	if (len<=10) if (browserName=='Netscape') Math.round(len=len/2);
	if (len>10) if (browserName=='Netscape') Math.round(len=len/1.3);
	document.write('<input type="text" name="' + name + '" size="' + len + '" maxlength="' + max + '" value="' + currval + '" class="' + style + '">');
}


   /* This Function does the same thing, using the class smallprompt */
function insertSmTextField(len, max, name, currval, style) { 
	if (style=="" || style==null) style="smallprompt";

//len should be equal to the IE length needed. It will be equated for NN.
	if (len<=10) if (browserName=='Netscape') Math.round(len=len/2);
	if (len>10) if (browserName=='Netscape') Math.round(len=len/1.3);
	document.write('<input type="text" name="' + name + '" size="' + len + '" maxlength="' + max + '" value="' + currval + '" class="' + style + '">');
}


   /* Same thing as the first, but using the focus element -- specific to research toolbar */
function insertTextFieldFocus(len, max, name, currval, style) { 
	if (style == "" || style == null) style="smallprompt";

//len should be equal to the IE length needed. It will be equated for NN.
	if (len<=10) if (browserName=='Netscape') Math.round(len=len/2);
	if (len>10) if (browserName=='Netscape') Math.round(len=len/1.3);
	document.write('<input type="text" name="' + name + '" size="' + len + '" maxlength="' + max + '" value="' + currval + '" onfocus="getresearch.foc.value=\'' + name + '\';" class="' + style + '">');
}






/* This function activates selector drop-downs for navigation */
function jumpto(s)
	{	var where = s.options[s.selectedIndex].value;
		if (s.selectedIndex == 3)
			top.location.href = where;
		else
			location.href = where;
	}

//THIS FUNCTION HELPS THE HELP WINDOW MANAGE ITSELF ... it needs to be in the onLoad event every help document.
function helpLoader() {
	window.focus();
} //end helpLoader

//THIS FUNCTION IS TO BRING A POP UP WINDOW THAT CONTAIN THE SAME DATA BUT WITHOUT HEADER AND FOOTER. And move to offscreen.
function print_version(link) {

 w=window.open((link),'print_version','width=500,height=100,scrollbars=auto,resizable');
// //w=window.open((link),'print_version','width=680,height=500,scrollbars=auto,resizable');
// w.moveTo(10000,10000)
}//end print_version

/* Function that displays status bar messages. */
function MM_displayStatusMsg(msgStr)  { //v3.0
	status=msgStr; document.MM_returnValue = true;
}

function MM_findObj(n, d) { //v3.0
  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); return x;
}
/* Functions that swaps images. */
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 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;
}

/* Functions that handle preload. */
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 help_window(host, link, width, height, scrollbars, name) {
	newWindow = window.open((host + link),(name),'width='+width+',height='+height+',scrollbars='+scrollbars+',resizable');
	newWindow.focus();
}

function popUp_window(link, width, height, scrollbars, name) {
	newWindow = window.open((link),(name),'width='+width+',height='+height+',scrollbars='+scrollbars+',resizable');
	newWindow.focus();
}

//added by Jliew on March 26th, 2004. 
// This is to solve the problem when a column header that need to break into 2 seperate links with the same URL after inserting a footnote number in between. 
//For example; <a href="link_1">Stock</a><sup><a target="fn_3">3</a></sup><br><a href="link_1">Return</a>

function chgLinkColorOver(id1, id2) {
	ele = document.getElementById(id1);
	ele.style.color = '#333333';
	ele = document.getElementById(id2);
	ele.style.color = '#333333';	
}
function chgLinkColorOut(id1, id2) {
	ele = document.getElementById(id1);
	ele.style.color = '#0033cc';
	ele = document.getElementById(id2);
	ele.style.color = '#0033cc';	
}
