//Account login drop down begin (unique to raymondjames.com)
document.write("<div class='dropdown' id='account_login' style='top: 38px; left: 539px;' onmouseover='clearTimeout(timer[this.id]);' onmouseout='closeCounter(this.id);'><div><a href='https://wallstreet.rjf.com/investor/login.asp' onclick=\"urchinTracker('IA login');\"><img src='/images/build07/udd_inv_acc.gif' width='142' height='20' alt='Investor Access' onmouseover='hovChange(this.id);' onmouseout='hovChange(this.id)' id='ac_udd_1' /></a></div><div><a href='https://secure.rjbank.com/internetbanking/login.htm' onclick=\"urchinTracker('RJB login');\"><img src='/images/build07/udd_internet_bank.gif' width='142' height='20' alt='Internet Banking' onmouseover='hovChange(this.id);' onmouseout='hovChange(this.id)' id='ac_udd_2' /></a></div><div><a href='http://www.rjecm.com/login_main.asp' onclick=\"urchinTracker('ECM login');\"><img src='/images/build07/udd_cap_mkts.gif' width='142' height='20' alt='Capital Markets' onmouseover='hovChange(this.id);' onmouseout='hovChange(this.id)' id='ac_udd_3' /></a></div></div>")
//Account login drop down for MAC
document.write("<div class='dropdown' id='mac_account_login' style='top: 38px; left: 539px;' onmouseover='clearTimeout(timer[this.id]);' onmouseout='closeCounter(this.id);'><div><map name='dd_account_login'><area alt='' coords='0,-3,141,17' href='https://wallstreet.rjf.com/investor/login.asp' onclick=\"urchinTracker('IA login');\"><area alt='' coords='0,20,141,37' href='https://secure.rjbank.com/internetbanking/login.htm' onclick=\"urchinTracker('RJB login');\"><area alt='' coords='0,40,141,58' href='http://www.rjecm.com/login_main.asp' onclick=\"urchinTracker('ECM login');\"></map><img src='/images/dd_account_login.gif' width='142' height='59' border='0' usemap='#dd_account_login'></div></div>")
//Account login drop down end


//modify for 800x600 resolution - resize elements
function changeWidth(id, width){
	if(document.getElementById(id)){document.getElementById(id).style.width = width + "px"}
}

if (screen.width < 801){
	
	changeWidth("lcol_spacer", 192)
	changeWidth("mcol_spacer", 384)
	changeWidth("rcol_spacer", 192)
	changeWidth("grand", 770)
	changeWidth("main", 770)
	changeWidth("buttons", 770)
	changeWidth("button_ll_div", 192)
	changeWidth("button_l_div", 192)
	changeWidth("button_r_div", 192)
	changeWidth("button_rr_div", 192)
	
	//drop down positions
	if(document.getElementById("account_login")){document.getElementById("account_login").style.left = "360px"}
	/*if(document.getElementById("personal_investing")){document.getElementById("personal_investing").style.left = "109px"}
	if(document.getElementById("institutional")){document.getElementById("institutional").style.left = "302px"}
	if(document.getElementById("opportunities")){document.getElementById("opportunities").style.left = "494px"}
	if(document.getElementById("about")){document.getElementById("about").style.left = "634px"}*/
	
	// utility button spacing
	if(document.getElementsByTagName){
	var el = document.getElementsByTagName("DIV");
		for(var i=0; i < el.length; i++){
			if(el[i].className.indexOf("u_spacer") != -1){
				el[i].style.paddingLeft = "10px"
				el[i].style.paddingRight = "10px"
			}
		}
	}
	
	/*if(document.getElementById("u_go")){document.getElementById("u_go").style.paddingRight = "15px"}
	if(document.getElementById("u_account_access")){
		document.getElementById("u_account_access").style.paddingRight = "15px"
		document.getElementById("u_account_access").style.paddingLeft = "15px"
	}
	if(document.getElementById("account_login")){
		document.getElementById("account_login").style.left = "439px"
		
	}
	
	if(document.getElementById("u_office_locator")){
		document.getElementById("u_office_locator").style.paddingRight = "15px"
		document.getElementById("u_office_locator").style.paddingLeft = "15px"
	}
	
	if(document.getElementById("u_contact")){
		document.getElementById("u_contact").style.paddingRight = "0px"
		document.getElementById("u_contact").style.paddingLeft = "15px"
	}*/

}
// end 800x600 modify


/*change on master*/
/*change on master*/
/*change on master*/
/*change on master*/
/*change on master*/
//begin horizontal nav hightlight
function navHighlight (horiz_bkg){
	var id
	if (horiz_bkg == "pi"){id = "b_per_inv"}
	else if (horiz_bkg == "po"){id = "b_pro_opp"}
	else if (horiz_bkg == "ab"){id = "b_about"}
	else if (horiz_bkg == "ic"){id = "b_inst_corp"}
	else {return false;}
	document.getElementById(id).src = "/images/build07/" + id + "_.gif"
	document.getElementById(id).onmouseout = function(){
		document.getElementById(id).src = "/images/build07/" + id + "_.gif"
	}
}
//check if horiz_bkg exists and run the function if true
if(window.horiz_bkg && document.getElementById){navHighlight(horiz_bkg)}
// end horizontal nav hightlight




//make sure the top lines in the content area align on interior pages
if (document.getElementById("right_top_spacer") && document.getElementsByTagName("h2")[0] && document.getElementsByTagName("h2")[0].offsetHeight > 40) {
	document.getElementById("right_top_spacer").style.height = document.getElementsByTagName("h2")[0].offsetHeight - 14 + "px"
}

// set right vertical bar height
if (document.getElementById("body_content") && document.getElementById("body_content").offsetHeight < 358)
document.getElementById("body_content").style.height = "343px" // 15px less because of padding-bottom in style sheet

// set right vertical bar height
if (document.getElementById("body_content_wide") && document.getElementById("body_content_wide").offsetHeight < 358)
document.getElementById("body_content_wide").style.height = "343px" // 15px less because of padding-bottom in style sheet

//safari scroll bar - html { min-height: 100%; margin-bottom: 1px; }



/*change on master*/
/*change on master*/
/*change on master*/
/*change on master*/
/*change on master*/
// give alternating colors to tables with the regTbl class
if(document.getElementsByTagName){
	var el = document.getElementsByTagName("TR");
	for(var i=0; i < el.length; i++){
		if(el[i].parentNode.parentNode.className.indexOf("regTbl") != -1){
			if(i%2 == 1){el[i].className = "tblon";} 
			else {el[i].className = "tbloff";}
		}
	}
}




// place banners on page
//var banner_annual = "<div class=\"related_info\"><div style=\"text-indent: -20px;\"><a href=\"/annualreport.pdf\" target=\"_blank\"><img src=\"/images/build07/sdbr/annualreport.gif\" width=\"177\" height=\"127\" title=\"\" alt=\"2006 Annual Report\" /></a></div><div style=\"text-indent: -20px;\"><img src=\"/images/build07/horiz_rule.gif\" width=\"177\" height=\"19\" title=\"\" alt=\"=============\" /></div>"

var banner_annual = "<div class=\"related_info\"><div style=\"text-indent: -20px;\"><a href=\"/annualreport/index.htm\" target=\"_blank\" onclick=\"window.open(this.href, '_blank', 'width=960, height=700, resizable=yes, status=no'); return false;\"><img src=\"/images/build07/sdbr/annualreport.gif\" width=\"177\" height=\"127\" title=\"\" alt=\"2008 Annual Report\" /></a></div><div style=\"text-indent: -20px;\"><img src=\"/images/build07/horiz_rule.gif\" width=\"177\" height=\"19\" title=\"\" alt=\"=============\" /></div>"

var banner_pro_speak = "<div class=\"related_info\"><div style=\"text-indent: -20px;\"><a href=\"/experts\"><img src=\"/images/build07/sdbr/pro_speak.gif\" width=\"177\" height=\"127\" title=\"\" alt=\"Professionaly Speaking\" /></a></div><div style=\"text-indent: -20px;\"><img src=\"/images/build07/horiz_rule.gif\" width=\"177\" height=\"19\" title=\"\" alt=\"=============\" /></div>"

var banner_legacy = "<div class=\"related_info\"><div style=\"text-indent: -20px;\"><a href=\"/planning_legacy.htm\"><img src=\"/images/build07/sdbr/legacy.gif\" width=\"177\" height=\"127\" title=\"\" alt=\"Legacy Planning\" /></a></div><div style=\"text-indent: -20px;\"><img src=\"/images/build07/horiz_rule.gif\" width=\"177\" height=\"19\" title=\"\" alt=\"=============\" /></div>"

var banner_expert = "<div class=\"related_info\"><div style=\"text-indent: -20px;\"><a href=\"/fin_news.htm\"><img src=\"/images/build07/sdbr/expert.gif\" width=\"177\" height=\"127\" title=\"\" alt=\"Expert Commentary\" /></a></div><div style=\"text-indent: -20px;\"><img src=\"/images/build07/horiz_rule.gif\" width=\"177\" height=\"19\" title=\"\" alt=\"=============\" /></div>"

var banner_advisor = "<div class=\"related_info\"><div style=\"text-indent: -20px;\"><a href=\"/advisor_why_use.htm\"><img src=\"/images/build07/sdbr/rj_advisor.gif\" width=\"177\" height=\"127\" title=\"\" alt=\"Why Use a Raymond James Advisor\" /></a></div><div style=\"text-indent: -20px;\"><img src=\"/images/build07/horiz_rule.gif\" width=\"177\" height=\"19\" title=\"\" alt=\"=============\" /></div>"

var smart_money = "<div class=\"related_info\"><div style=\"text-indent: -20px;\"><a href=\"/pr/090609.htm\"><img src=\"/images/smartMoney.jpg\" width=\"177\" height=\"127\" title=\"\" alt=\"Raymond James Financial, Inc. was recently ranked the best full-service broker in the 2009 SmartMoney Annual Broker Survey.\" id=\"smart_money\" onmouseover=\"hovChange(this.id);\" onmouseout=\"hovChange(this.id);\" /></a></div><div style=\"text-indent: -20px; padding-top: 7px;\"><img src=\"/images/build07/horiz_rule.gif\" width=\"177\" height=\"19\" title=\"\" alt=\"=============\" /></div>"

var time_ad = "<div class=\"related_info\"><div style=\"text-indent: -20px;\"><a href=\"/pdfs/time_advertorial_2008_10_20.pdf\" target=\"_blank\"   onclick=\"urchinTracker('/pdfs/time_advertorial_2008_10_20.pdf');\"><img src=\"/images/build07/sdbr/time_ad_2008_10_20.gif\" width=\"177\" height=\"127\" title=\"\" alt=\"Featured in TIME October 20\" id=\"time_ad\" onmouseover=\"hovChange(this.id);\" onmouseout=\"hovChange(this.id);\" /></a></div><div style=\"text-indent: -20px; padding-top: 7px;\"><img src=\"/images/build07/horiz_rule.gif\" width=\"177\" height=\"19\" title=\"\" alt=\"=============\" /></div>"

var banner_random 
var ranNum = Math.floor(Math.random()*7);
if (ranNum == 0) {banner_random = smart_money}
else if (ranNum == 1) {banner_random = banner_pro_speak}
else if (ranNum == 2) {banner_random = banner_legacy}
else if (ranNum == 3) {banner_random = banner_expert}
else if (ranNum == 4) {banner_random = banner_advisor}
else if (ranNum == 5) {banner_random = smart_money}
else if (ranNum == 6) {banner_random = time_ad}
else {banner_random = banner_advisor}

if(document.getElementById("pibanner")){document.getElementById("pibanner").innerHTML = banner_random}









//begin image viewer
function imageViewer (image_path,top,left) {
	
	//var close_window = "<p style='margin-top: 10px; margin-bottom: 0px; text-align: center;'><a href='Close window' onclick='document.getElementById(\"image_viewer\").style.visibility = \"hidden\"; return false;'>Close window</a></p>"
	
	if((top == "") || (top == null))
	{ top = "50" }
	if((left == "") || (left == null))
	{ left = "250" }
	
	document.getElementById("image_viewer").innerHTML = "<p style='margin-top: 10px; margin-bottom: 0px; text-align: center;'><a href='Close window' onclick='hideLayer(\"image_viewer\"); return false;'><img src=" + image_path + " border=\"0\"><br />Close window</a></p>"
	document.getElementById("image_viewer").style.top = top + "px"
	document.getElementById("image_viewer").style.left = left + "px"
	//above code uses hide layer from top of document js file
	//document.getElementById("image_viewer").style.visibility = "visible"
	showLayerOp("image_viewer") //use fade-in from top of document js file

}

if(document.getElementById){
	document.write ("<div id='image_viewer' style='position: absolute; top: 50px; left: 250px; visibility: hidden; background: #ddd9d5; padding: 10px; border: 1px solid #999490'></div>")
}
//end image viewer

if(document.getElementById && !document.all){
	document.getElementById("grand").style.height = document.getElementById("grand").style.height + 1 + "px"
}

// check file name and highlight if it matches a link

var file_name = location.href
// get rid of query string
if (file_name.indexOf('?')!= -1){
		var query = true
		var ques_loc = file_name.indexOf('?')
		var query_string = file_name.substring(ques_loc, file_name.length)
		file_name=file_name.substring(0,ques_loc)
}

// get rid of bookmarks
if (file_name.indexOf('#')!= -1){
		var bm = true
		var bm_loc = file_name.indexOf('#')
		var bookmark = file_name.substring(bm_loc, file_name.length)
		file_name=file_name.substring(0,bm_loc)
}

// loop through all the links
for (check_links = 0; check_links < document.links.length; check_links++) {
	var link_name = document.links[check_links].href	
	// highlight link if it matches filename
	// exclude nn4 and others
		if(document.getElementById){
			if (link_name == file_name) {
				document.links[check_links].style.color='#236fdc';
			}
		}
}


//write out "rate this page" link and links for text sizer
//start of code for "rate this page"

var cval, x;

cval = "empty";
cval = unescape(GetCookie('rjfeedback')); //get the cookie for the "rate this page"
x = document.location.href;

if (cval.indexOf(x) < 0 && document.getElementById("ratePageDis")) //compare the cookie to the page the user is on to see if they match if true then DON'T provide link, also checks to make sure span tag is there before writting
{
	document.getElementById("ratePageDis").innerHTML = "<a href=\"/feedback.htm?ref=" + x + "\" target=\"_blank\" onclick=\"window.open('/feedback.htm?ref=" + x + "','_blank','scrollbars=no,resizable=yes,width=600,height=470');return false;\">Comment on this page</a> | "
}

//end of code for "rate this page"

//start of code for text sizer icons
if (document.getElementById("textSizer")) //check to make sure span tag is there before writting to it.
{
	document.getElementById("textSizer").innerHTML =	"Text size:\
														<a href=\"#\" onclick=\"changeStyle(0); urchinTracker('font_size_sml'); return false;\"><img src=\"/images/build07/text_size_sm.gif\" id=\"text_size_sm\" width=\"16\" height=\"15\" alt=\"\" onmouseover=\"hovChange(this.id);\" onmouseout=\"hovChange(this.id)\" /></a>\
														<a href=\"#\" onclick=\"changeStyle(1); urchinTracker('font_size_med'); return false;\"><img src=\"/images/build07/text_size_m.gif\" id=\"text_size_m\" width=\"16\" height=\"15\" alt=\"\" onmouseover=\"hovChange(this.id);\" onmouseout=\"hovChange(this.id)\" /></a>\
														<a href=\"#\" onclick=\"changeStyle(2); urchinTracker('font_size_lrg'); return false;\"><img src=\"/images/build07/text_size_lg.gif\" id=\"text_size_larg\" width=\"16\" height=\"15\" alt=\"\" onmouseover=\"hovChange(this.id);\" onmouseout=\"hovChange(this.id)\" /></a>"
}
//end of code for text sizer icons
//end section to write out "rate this page" and links for text sizer


//add terms of use to every page
var disc_div = document.getElementById("disclosures")
if(disc_div && disc_div.innerHTML.indexOf("Site Map") > -1 && disc_div.innerHTML.indexOf("Terms of Use") == -1){
	disc_div.innerHTML = disc_div.innerHTML + " | <a href='/terms.htm'>Terms of Use</a>"
}


