﻿<!--

    function SearchGlossary()
    {
		//var theForm = document.getElementById("searchForm");
        //alert(theForm);
  	    //theForm.action = "Default.aspx";
  	    //theForm.submit();
    }
    
    
function ClearInputSearchBox(sSearchType)
{

    var text = document.getElementById("SearchTerm");
    if (text.value == "Search Glossary")
    {
		text.value = "";
	}

}

function openDelicious(title)
{
    window.open('http://del.icio.us/post?v=4&noui&jump=close&url='+encodeURIComponent(location.href) + '&title=' + title,'delicious','toolbar=0,scrollbars=yes, resizable=yes, width=700,height=400');
}

function openDigg(title, bodytext)
{

    window.open('http://www.digg.com/submit?phase=2&url=' + encodeURIComponent(location.href) + '&title=' + title + '&bodytext=' + bodytext + '&topic=business_finance', 'digg','toolbar=no, scrollbars=yes,resizable=yes');
}

function winOpen(url,width,height) {
	    //Incoming width and height are formatted for IE on windows platform.		
		if ((navigator.appVersion.indexOf("Mac") != -1) && (navigator.appName == "Microsoft Internet Explorer")) {
		    height = height * .892;
			window.open(url,'macie','menubar=no,resizable=yes,status=no,scrollbars=yes,width='+width+',height='+height); }
		if ((navigator.appVersion.indexOf("Mac") != -1) && (navigator.appName == "Netscape")) {
		    height = height * .941;
			window.open(url,'macNN','menubar=no,resizable=yes,status=no,scrollbars=yes,width='+width+',height='+height); }		
		if ((navigator.appVersion.indexOf("Win") != -1) && (navigator.appName == "Netscape")) {
		    height = height * 1.059;
			window.open(url,'NN','menubar=no,resizable=yes,status=no,scrollbars=yes,width='+width+',height='+height); }
		if ((navigator.appVersion.indexOf("Win") != -1) && (navigator.appName == "Microsoft Internet Explorer")) {
			window.open(url,'IE','menubar=no,resizable=yes,scrollbars=yes,width='+width+',height='+height); }	
	}

function getCookie(cookiesname) {
  var dc = document.cookie;
  var prefix = cookiesname + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}

	<!------ OAS SETUP begin ------>
	var l_usertype;
	//TODO: get this working
	l_usertype = getCookie( "PSI" );
	
	
	if (l_usertype == "S")
		{OAS_listpos = 'Top,Top1,x43,Middle,Middle2,Left2,Position1,Position2,Position3,Position4,Bottom1,Bottom2,x01,x02,Bottom';}
	else
		{OAS_listpos = 'Top,Top1,x43,Middle,Middle2,Left2,Position1,Position2,Position3,Position4,Bottom1,Bottom2,x01,x02,Bottom,x07,x08';}

	
	
	//configuration
	OAS_sitepage = 'www.morningstar.com/articles';
	OAS_query = 'topic=GLOSSARY';	
	
	OAS_url ='http://ads.morningstar.com/RealMedia/ads/';
	//end of configuration
	OAS_version = 10;
	OAS_rn = '001234567890'; OAS_rns = '1234567890';
	OAS_rn = new String (Math.random()); OAS_rns = OAS_rn.substring (2, 11);
	
	function OAS_NORMAL(pos) { 
		document.write('<A HREF="' + OAS_url + 'click_nx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + '!' + pos + '?' + OAS_query + '" TARGET=_top>');
		document.write('<IMG SRC="' + OAS_url + 'adstream_nx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + '!' + pos + '?' + OAS_query + '" BORDER=0></A>');
	}
	
	OAS_version = 11;
	if ((navigator.userAgent.indexOf('Mozilla/3') != -1) || (navigator.userAgent.indexOf('Mozilla/4.0 WebTV') != -1))
	OAS_version = 10;
	if (OAS_version >= 11)
	document.write('<SCR'+ 'IPT LANGUAGE=JavaScript1.1 SRC="' + OAS_url + 'adstream_mjx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + '?' + OAS_query + '"><\/SCRIPT>');
	 
	 document.write('');
	
	function OAS_AD(pos) {
		if (OAS_version >= 11)
		OAS_RICH(pos);
		else
		OAS_NORMAL(pos);
	}
	
	<!------ OAS SETUP end ------>
