function setfocus()
{
	var myElement;
	
	//we changed this to form[1] instead of form[0]
	//the cusip search 'form' is form[0] because it is the first form on the page
	//all other data entry forms are form[1]
	var myForm = document.forms[1];
	
	// loop through all elements on form
	for (var i = 0; i < myForm.length;i++)
	{  
		myElement = myForm[i];

		if (myElement.tabIndex == "1")
		{
			myElement.focus();
			i=100;
		}
	}
}
function mobilesetfocus() {
    var myElement;

    //these pages do not have the cusip lookup form, so the form is form[0]
    var myForm = document.forms[0];

    // loop through all elements on form
    for (var i = 0; i < myForm.length; i++) {
        myElement = myForm[i];

        if (myElement.tabIndex == "1") {
            myElement.focus();
            i = 100;
        }
    }
}

//see this site for explanation
//http://www.sitepoint.com/article/standards-compliant-world/1
function externalLinks()
{ 
 if (!document.getElementsByTagName)
	return; 

 var anchors = document.getElementsByTagName("a"); 
 
 for (var i=0; i<anchors.length; i++)
 { 
   var anchor = anchors[i]; 
   
   if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") 
     anchor.target = "_blank"; 
 } 
} 
window.onload = externalLinks;

