//   *****************************************************
//   ***           web icon begin            ***
//   *****************************************************
document.write("<link rel='shortcut icon' href='/favicon.ico' type='image/ico'>")
//   web icon end 



//   *****************************************************
//   ***          Prof Speak RSS Feed begin            ***
//   *****************************************************
document.write("<link href='http://www.raymondjames.com/experts/mp3/rjpodcast.xml' rel='alternate' type='application/rss+xml' title='Raymond James Professionally Speaking' /> ")
//   Prof Speak RSS Feed end 


//   *****************************************************
//   ***           search box scripts begin            ***
//   *****************************************************
var search_box = "<input type='hidden' name='param_autonomyretrieval_1_imMethod' value='submitquery'><input type='text' size='10' name='param_autonomyretrieval_1_imQuery' style='height: 17px; font-size: 9px; width: 100px; margin-top: 0px; margin-right: 10px;'><input type='hidden' name='param_autonomyretrieval_1_imStart' value='1'> <input type='hidden' name='param_autonomyretrieval_1_imNumResults' value='10'> <input type='hidden' name='param_autonomyretrieval_1_imThreshold' value='20'><input type='hidden' name='param_autonomyretrieval_1_imSortBy' value='Relevance'> <input type='hidden' name='param_autonomyretrieval_1_iDB' value='Public' id='Checkbox2'><div><input type='image' src='/images/build/clear.gif' border='0'></div>"
//   search box scripts end





//   *****************************************************
//   ***        office locator scripts begin           ***
//   *****************************************************
function offlocsubmitIt() {
	var link_to
	if (document.locate_office.zip.value == "" || document.locate_office.zip.value.length < 3 && document.locate_office.zip.value.toLowerCase() != "gu")
		{alert("Please fill out a zip code or financial advisor last name of at least 3 characters.");return false;}
		


	else if(document.locate_office.zip.value.indexOf("1") > -1 || document.locate_office.zip.value.indexOf("2") > -1 || document.locate_office.zip.value.indexOf("3") > -1 || document.locate_office.zip.value.indexOf("4") > -1 || document.locate_office.zip.value.indexOf("5") > -1 || document.locate_office.zip.value.indexOf("6") > -1 || document.locate_office.zip.value.indexOf("7") > -1 || document.locate_office.zip.value.indexOf("8") > -1 || document.locate_office.zip.value.indexOf("9") > -1 || document.locate_office.zip.value.indexOf("0") > -1 )
		{link_to = "/advisorsearch/siteAdvantage/Advantage.aspx";
		 document.location.href = link_to + "?mode=search&&radius=20&zip=" + document.forms.locate_office.zip.value;}

	else {link_to = "/advisorsearch/list_fas.asp";
	document.location.href = link_to + "?last_name=" + document.forms.locate_office.zip.value;}

	return false;	
	}
	


var offloc_form = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"width: 179px; margin-left: 10px; margin-right: 10px; \"><tr><td bgcolor=\"#F3F3F7\"><form method=\"get\" id=\"locate_office\" name=\"locate_office\" target=\"_top\" onsubmit=\"return offlocsubmitIt()\"><input type=\"HIDDEN\" name=\"closestprox\" value=\"1\"> <div style=\"font-family: arial; font-size: 11px; background: #792720; color: white; padding: 1px; text-transform: uppercase; text-align: center; margin-bottom: 0px; margin-right: 0px;\">Find your local branch</div><div style=\"font-family: arial; font-size: 10px; margin-left: 3px; margin-right: 3px; margin-top: 2px; margin-bottom: 0px;\"><input name=\"zip\"  id= \"zip\" onchange=\"{quoteChange(this.id)}\" maxlength=\"10\" size=\"15\" value=\"\" size=\"20\" style=\"background: #ffffff; font-weight: normal; width: 125px; margin-right: 3px; height: 20px;\"><input type=\"button\" value=\"Go\" style=\"background: #792720; color: #ffffff; font-weight: bold; height: 20px; font-size: 12px;\" onClick=\"offlocsubmitIt()\"><br> Enter zip code or financial advisor&#146;s last name.<br><div style=\"margin-left: 0px; margin-top: 5px;margin-bottom: 0px;\"><a href=\"/office_locator.htm\">Advanced branch search</a><br><a href=\"http://www.raymondjames.ca/\">International branches</a></div></div></form></td></tr></table>"


// office locator scripts end


// top nav arrow - turn off if set to false in page
var top_nav_arrow = true

// check to see if the browser is IE 4 or better of NS 6+
var new_browser
if(document.getElementById || document.all){new_browser = true}
else {new_browser = false}
var id





var show_it = "visible"
var hide_it = "hidden"

function toggleLayer(id) {
	if(new_browser && document.getElementById(id)){
		if(document.all) {var obj = document.all(id).style}
		if(document.getElementById){var obj = document.getElementById(id).style}
		if(document.layers) {var obj = document.layers[id]; show_it = "show"; hide_it = "hide"}
		if(navigator.userAgent.indexOf("Opera")==0) {show_it = "VISIBLE"; hide_it = "HIDDEN"}
		if(obj.visibility == hide_it){obj.visibility = show_it}
		else {obj.visibility = hide_it}	
	}
}

function showLayer(id) {
	if(new_browser && document.getElementById(id)){
		if(document.all) {var obj = document.all(id).style}
		if(document.getElementById){var obj = document.getElementById(id).style}
		if(document.layers) {var obj = document.layers[id]; show_it = "show"; hide_it = "hide"}
		if(navigator.userAgent.indexOf("Opera")==0) {show_it = "VISIBLE"; hide_it = "HIDDEN"}
		obj.visibility = show_it

	}
}

function hideLayer(id) {
	if(new_browser && document.getElementById(id)){
		if(document.all) {var obj = document.all(id).style}
		if(document.getElementById){var obj = document.getElementById(id).style}
		if(document.layers) {var obj = document.layers[id]; show_it = "show"; hide_it = "hide"}
		if(navigator.userAgent.indexOf("Opera")==0) {show_it = "VISIBLE"; hide_it = "HIDDEN"}
		obj.visibility = hide_it
	}
}

function quoteChange(field) 
{
	 var field_value = document.getElementById(field).value
 
 	if(field_value.indexOf("'") > -1)
	{
		for (i = 0;  i < field_value.length; i++)
		{
   			field_value = field_value.replace("'", "’");
  		}
  		document.getElementById(field).value = field_value;
	}
 	if(field_value.indexOf('"') > -1)
	{
		for (i = 0;  i < field_value.length; i++)
		{
   			field_value = field_value.replace('"', '”');
  		}
		document.getElementById(field).value = field_value;
 	}
}
function isNumeric(value)
//Returns true if the value is numeric; 
//returns false if the value is not numeric
{
    text = value;
    var numberList = "0123456789";
    var isNumber = true;
    for(i = 0; i < text.length && isNumber == true; i++)
    {
        testChar = text.charAt(i);
        if (numberList.indexOf(testChar) == -1)
            isNumber = false;
    }
    
    return isNumber;
}