// /js/new/login.js

// ---------------------------------------------------------------------------

// Java Script for Login functionality

// ---------------------------------------------------------------------------



var userIsLogin = false;

var cbolWin;

// ----------------------------------------------------------------

// Print appropriate HTML on the ACCESS top nav bar

// 'Login' or 'Log Off'

// ----------------------------------------------------------------

function checklogin() {

	

	var LoginStatusnon = "ssoSESSIONNONS" + "=";

	var LoginStatus = "ssoSESSION" + "=";

	var CookieValuenon = getcookie(LoginStatusnon);

	var CookieValue = getcookie(LoginStatus);



	var isNav = (navigator.appName == 'Netscape')

	var is_getElementById   = (document.getElementById) ? true : false;

	var isNav6 = isNav && is_getElementById;

	var bV=parseInt(navigator.appVersion);

	var NS4=(document.layers) ? true : false;

	var IE4=((document.all)&&(bV>=4))?true:false;



		//DZ 7/25/2007: DZ wrote if statement for fa.locator redirect

		if ( location.hostname == "fa.smithbarney.com" )

		{

			var Login_on = '<a href="https://www.smithbarney.com/cgi-bin/login/checklogout.cgi" target="_top"><span class="amtplus">Log On</span></a>';

		}

		else

		{

			//DZ 6/21/2007  added "cursor:pointer" to the css/new/standard.css as this is reading the .amtplus from there and not base.css

			var Login_on = '<a href="https://www.smithbarney.com/cgi-bin/login/login.cgi" target="_top"><span class="amtplus">Log On</span></a>';

		}

//		var Login_off = '<a href="https://www.smithbarney.com/cgi-bin/login/logout.cgi" target="_top"><span class="amtminus">Log Off</span></a>';

//      GVL - 5/15/2007 target from _top to _self

		var Login_off = '<a href="javascript:SBlogoff();" target="_self"><span class="amtminus">Log Off</span></a>';





	// ----------------------------------------------------------------------

	// 8/15/00, we are going to put 'logon' button on TeleScan,

	// and nothing on CBOE, anything else is as usual

	// ----------------------------------------------------------------------

	var specialDomain1 = "www.cboe.com";

	var specialDomain2 = "prosearch.mycititrade.telescan.com";

	var specialDomain3 = "www.mastercard.com";



	var currentLocation = window.location.toString().toLowerCase();

	if (currentLocation.indexOf(specialDomain1.toLowerCase())!= -1) {

		// ------------------------------------------------

		// CBOE

		// ------------------------------------------------

		//alert("cboe");

	} else if (currentLocation.indexOf(specialDomain3.toLowerCase())!= -1) {

		// ------------------------------------------------

		// Mastercard

		// ------------------------------------------------

	   	// mastercard

	} else if (currentLocation.indexOf(specialDomain2.toLowerCase())!=-1) {

		// ------------------------------------------------

		// telescan

		// ------------------------------------------------

		//alert("telescan");

		if (NS4) {

			document.layers["headlinksDiv"].document.write(Login_off);

		} else {

			document.write(Login_off);

		}

		userIsLogin = true;



	} else {



		if ((CookieValue.toLowerCase() == "logout") || (CookieValuenon.toLowerCase() == "logout")) {



			if (NS4) {

				document.layers["headlinksDiv"].document.write(Login_on);

			} else {

				document.write( Login_on );

			}

			userIsLogin = false;



		} else if ((CookieValue == "empty") && (CookieValuenon == "empty")) {



			if (NS4) {

				document.layers["headlinksDiv"].document.write(Login_on);

			} else {

				document.write( Login_on );

			}

			userIsLogin = false;



		} else {



			if (NS4) {

				document.layers["headlinksDiv"].document.write(Login_off);

			} else {

				document.write(Login_off);

			}

			userIsLogin = true;



		}

	}

}





// ----------------------------------------------------------------

// Get a cookie

// ----------------------------------------------------------------

function getcookie(in_cookiename) {

	var objCookies = document.cookie;

	var pos = objCookies.indexOf(in_cookiename);

	var begin = pos + in_cookiename.length;

	var end = objCookies.indexOf(";", begin);

	if (end  == -1) end= objCookies.length;

	var tempvalue = unescape(objCookies.substring(begin,end));

	if (pos == -1)  tempvalue = 'empty';

	return tempvalue;

}



// ----------------------------------------------------------------

// Begin user type (CBOL, FLS, CIS, etc.) detection code block.

//

// This block of code should be duplicated in the following files

// since various includes pull in the .js files out of order:

//	/js/01_login.js

//	/js/new/login.js

//	/js/new/CoreCookies.js

// ----------------------------------------------------------------



if ( typeof core_user == "undefined" )

{

	var core_user = false;

	var core_ctx = getcookie("CORE_CTX");



	if ( core_ctx != null && core_ctx != "" && core_ctx != "empty" )

	{

		core_user = true;

	}

}



if ( typeof cbol_user == "undefined" )

{

	var cbol_user = false;

	var cis_ctx = getcookie("CIS_CTX");

	var cbol_bc = getcookie("CBOLBreadcrumbs");

	var cis_exists = false;

	var cbolbc_exists = false;



	if ( cis_ctx != null && cis_ctx != "" && cis_ctx != "empty" )

	{

		if ( cbol_bc != null && cbol_bc != "" && cbol_bc != "empty" )

		{

			cis_exists = true;

			cbolbc_exists = true;

			cbol_user = true;

		}

		else

		{

			cis_exists = true;

			cbolbc_exists = false;

		}

	}

}



if ( typeof fls_user == "undefined" )

{

	var fls_user = false;

	var fls_ctx = getcookie("FLS_CTX");



	if ( fls_ctx != null && fls_ctx != "" && fls_ctx != "empty" )

	{

		fls_user = true;

	}

}



if ( typeof pcr_user == "undefined" )

{

	var pcr_user = false;

	var pcr_ctx = getcookie("PCR_CTX");



	if ( pcr_ctx != null && pcr_ctx != "" && pcr_ctx != "empty" )

	{

		pcr_user = true;

	}

}

// ----------------------------------------------------------------

// End user type code block.

// ----------------------------------------------------------------



if ( typeof cbb_user == "undefined" )

{

	var cbb_user = false;

}



if ( cbol_user )

{

	var cbb_ctx = getcookie("CBB_CTX");



	if ( cbb_ctx != null )

	{

		cbb_user = true;

	}

}





// ----------------------------------------------------------------

// Set Login Image Src

// ----------------------------------------------------------------

function checkLoginImage() {

	if (document.images["login"]){

		document.images["login"].src =

			(userIsLogin) ? "http://fa.smithbarney.com/images/locator-images/0_btn_logoff.gif" : "http://fa.smithbarney.com/images/locator-images/0_btn_logon.gif";

	}

}



var ns4 = (document.layers)? true:false

var ie4 = (document.all)? true:false

var isNav = (navigator.appName.indexOf("Netscape") != -1 );

var isIE = (navigator.appName.indexOf("Microsoft") != -1 );



function handleEnterSubmission(field, evt)

{

	var keyCode = evt.which ? evt.which : evt.keyCode;



	if ( keyCode == 13 )

	{

		document.getElementById("submitbtn").click();

		return false;

	}

	else

	{

		return true;

	}

}



function handleEnterSubmission2(evt)

{

	var keyCode = 0;

	if ( isIE )

	{

		keyCode = event.keyCode;

		var nKey = 0;

	}

	if ( isNav )

	{

		keyCode = evt.which;

		var ieKey = 0;

	}

	if ( keyCode == 13 )

	{

		if ( isNav || isIE )

		{

			document.forms["logon"].submit();

		}

		return false;

	}

	else

	{

		return true;

	}

}



if ( isNav && ns4 )

{

	document.onkeydown = handleEnterSubmission

	document.captureEvents(Event.KEYDOWN)

}



function form_funcs()

{

	if ( document.forms["logon"].username.value == "" )

	{

		document.forms["logon"].username.focus();

		document.forms["logon"].username.select();

	}

}

var FORM_NAME='logon';



function getCookieNames() {

	if (typeof(window.nameList)=="undefined" || window.nameList.length==0)

	{

		document.write('<input type="text" id="username" name="username" class="tbox3 unpw"  maxlength="35" autocomplete="off">');

		//document.write('<input type="text" id="username" name="username" class="unpw"  maxlength="16" autocomplete="off">');

		

		//DZ added this 10/16/2007 to give username focus when no user

		document.forms["logon"].username.focus();

		return;

	}



        var l=[];

        if (typeof(window.nameList)!="undefined")

        {

			l = window.nameList.split("\&");

			//alert(l); //This brings up the username

        }

        l=l.join('|').split('|');

		//alert(l); This brings up the user name into an array and then writes it out.

        var elSelect='';

        elSelect+='<select name="username" id="username" class="tbox3 unpw" onChange="onSelectUser(this);">';

        //elSelect+='<select name="username" id="username" class="unpw" onChange="onSelectUser(this);">';

        elSelect+='<option>------ Sign on as: -------';

        for( var i = 0; i < l.length; i++ )

        {

					elSelect+='<option value="'+l[i]+'"'+(i==l.length-1?' selected':'')+'>'+l[i];

					//elSelect+='<option value="'+l[i]+'"'+(i==0?' selected':'')+'>'+l[i];

        }

        elSelect+='<option>----- Other Options -----';

        elSelect+='<option value="inputUserName">A different user';

        elSelect+='<option value="removeUserName">Remove a User ID (cookie)';

        elSelect+='</select>';



        elSelect+='<input style="display:none; padding-left:3px; margin-top:-1px; margin-bottom:-1px;" class="tbox3 unpw" type="text" name="username2" id="username2" value="" />';

        //elSelect+='<input style="display:none; padding-left:3px; margin-top:-1px; margin-bottom:-1px;" class="unpw" type="text" name="username2" id="username2" value="" />';



        document.write(elSelect);

}



function getCheckBox4RememberID() {

        //if (window.inputUserName) {

	if (typeof(window.nameList)=="undefined" || window.nameList.length==0) {

                //document.write(' <tr>' );

                //document.write(' <td class="rgt" ><input type="checkbox" name="rememberId" ></td> ');

                //document.write(' <td >Remember user name</td> ');

                //document.write(' </tr>' );

		document.write('<input type="checkbox" id="rememberId"  name="rememberId" />');

		document.write('<label for="rememberId" style="font-weight:normal; color:black;">Remember User Name</label>&nbsp;');

                return;

	}

	//DZ 10/15/2007 - as per Max that if there's a username present, the password field will get focus.

	else

	{

		document.forms["logon"].password.focus();

	}

}



function onSelectUser(e)

{

        var n=e[e.selectedIndex].value;

        if(n=="") {

				//alert("If n==''");

                e.selectedIndex=1;

                return;

        }

        if(n=='inputUserName')  {

				

				//DZ added this 9/11/2007

				var passwordValue = document.forms[FORM_NAME].password.value;

				if(passwordValue !="")

				{

					document.forms[FORM_NAME].password.value = ""

				}

				//End DZ addition

                document.forms[FORM_NAME].submit();

                return;

        }

        if(n=='removeUserName') {

                document.forms[FORM_NAME].submit();

                return;

        }

}





function SBlogoff()

{

	if ( typeof core_user != "undefined" )

	{



		if ( ( core_user ) && ( getcookie("CORE_CTX").indexOf("ON") != -1 ) )

		{

			if ( confirm("Would you like to log off of Citibank Online as well?") )

			{

				CBOLLogOffWin = window.open("", "CBOLLogOff");



				//FOR STAGING: DZ had to put this in for Citibank to test. 10/1/2007

				//CBOLLogOffWin.location.href = "https://web-uat1.citibankonlineqa.com/cgi-bin/citifi/portal/sb/checkSessionStatus.do?SignOff=SIGNOFF&BV_UseBVCookie=Yes&pageType=SIGNOFF&eACE-TOKEN=null";

				

				//FOR PRODUCTION: DZ changed URL as per Glenn - 6/14/2007

				CBOLLogOffWin.location.href = "https://web.da-us.citibank.com/cgi-bin/citifi/portal/sb/checkSessionStatus.do?SignOff=SIGNOFF&BV_UseBVCookie=Yes&pageType=SIGNOFF&eACE-TOKEN=null";

			}

		}

		

		//DZ added this to the code 7/26/2007

		if ( location.hostname == "fa.smithbarney.com" )

		{

			document.location.href = "https://www.smithbarney.com/cgi-bin/login/logout.cgi";

		}

		else

		{

			document.location.href = "https://www.smithbarney.com/cgi-bin/login/logout.cgi"; //Original here

		}

	}

	//DZ added this 7/27/2007 to redirect from the "fa.locator.com"

	if ( location.hostname == "fa.smithbarney.com" )

	{

		document.location.href = "https://www.smithbarney.com/cgi-bin/login/logout.cgi";



		// GL - 13JUN2007 - This code is used to close any open child window with the name of 'PCR' on user logout.

		var MSG = "https://www.smithbarney.com/kill_window.html"

		window.open( MSG , 'PCR' , 'top=10000,left=-1000,height=1,width=1,alwaysLowered=yes' );

	}

	else

	{

		// GL - 13JUN2007 - This code is used to close any open child window with the name of 'PCR' on user logout.

		var MSG = window.location.protocol + "//" + window.location.hostname + "/kill_window.html"

		window.open( MSG , 'PCR' , 'top=10000,left=-1000,height=1,width=1,alwaysLowered=yes' );

	}

}



function relaunch_pcr_window( URL )

{

	//Kill the old PCR window	

	var MSG = window.location.protocol + "//" + window.location.hostname + "/kill_window.html"

	window.open( MSG , 'PCR' , 'top=10000,left=-1000,height=1,width=1,alwaysLowered=yes' );

	

	//Launch new PCR widnow with new URL

	MSG = window.location.protocol + "//" + window.location.hostname + URL

	window.open( URL , 'PCR' , 'top=100,left=100,height=600,width=800,status=1,menubar=1,location=1,toolbar=1,scrollbars=1,resizable=1' ); 

}



function displayFLSHeader()

{

	if ( fls_user )

	{

		//The below works in Safari

		if (document.getElementById('headerDiv'))

		{ 

			if ( document.getElementById("sblogo") )

			{

				var lcImage = document.getElementById("sblogo");

				//alert(lcImage.src); 

				lcImage.src = "http://fa.smithbarney.com/images/locator-images/new/myFI.gif";

				lcImage.width = "92";

				lcImage.height = "55";

				

				document.getElementById("headerDiv").style.height="100px";

			}

		}

		else

		{

			return;

		}

	}

}



function displayMirandaFooter()

{

	if ( core_user )

	{

		document.write('<img src="http://fa.smithbarney.com/images/locator-images/new/miranda_banner.gif" height="59" width="142" alt="Citgroup" id="miranda" />');

	}

}



function hideFCInfo()

{

	if ( cbol_user )

	{

		document.getElementById("fcinfo").style.display = 'none';

	} 

	else

	{

		document.getElementById("fcinfo").style.display = 'block';

	}

}



function displayFooterText()

{	

	if ( fls_user )

	{

		//New disclaimer copy

		document.write('Smith Barney is a division and service mark of Citigroup Global Markets Inc. <br />and its affiliates and is used and registered throughout the world.<br />myFi from Smith Barney is a business of Smith Barney. <br/>myFi is a service mark of Citigroup Global Markets Inc.<br />Citi with Arc Design is a registered service mark of Citigroup Inc.<br />Citigroup Global markets Inc. and Citibank are affiliated companies <br/>under the common control of Citigroup Inc.');

	}

	else

		//New footer copy

	{

		document.write('Smith Barney is a division and service mark of Citigroup Global Markets Inc. <br />and its affiliates and is used and registered throughout the world.<br />Citi and Citi with Arc Design are trademarks and service marks of Citigroup Inc. <br />and its affiliates, and are used and registered throughout the world.<br /><a href="http://www.citigroup.com" style="color:#000099; font-weight:bold; text-decoration:underline;">www.citigroup.com</a>');

	}

}





document.write('<script type="text/javascript" src="http://fa.smithbarney.com/js/locator-js/new/CoreCookies.js"></scr' + 'ipt>');



function write_conditional_text()

{

	

	// this block added by RR 14Jun2007

	//pcr_user = true;

	if(pcr_user){

		if(document.getElementById("highlights_ul")){

			var pcrLi = document.createElement("li");

			document.getElementById("highlights_ul").appendChild(pcrLi);

			pcrLi.innerHTML = '<a href="https://www.smithbarney.com/app-bin/twr/TwrSSO">Total Wealth Report</a>';

		}

	

	}

	// end RR block //



	//Enter generic text strings to be displayed

	var string_array = new Array();

	string_array[0] = "your Financial Advisor";

	//string_array[1] = "the myFi Team Manager"; //New FLS copy

	string_array[1] = "the myFi Team"; //New FLS copy

	//added by DZ for Bondsearch.html

	string_array[2] = 'your Financial Advisor';

	string_array[3]= "the <a href=\"javascript:void(0);\" onclick=\"window.open('https://www.smithbarney.com/cgi-bin/emp/contactfc.cgi','FC','width=800,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=1,resizable=yes');\">myFi Team Manager</a>"; //New FLS copy



	//Loop through all SPAN tags and check the NAME

	var span_tags = document.getElementsByTagName("span")

	for( i = 0 ; i < span_tags.length ; i ++)

	{

		switch ( span_tags[i].id ){

			case "swapCopy[]": 

				if (fls_user)

				{

			  		span_tags[i].innerHTML = string_array[1]

				}

				else

				{

			  		span_tags[i].innerHTML = string_array[0]				

				}

				break;

			//Added by DZ for Bondsearch.html

			case "changeEmailContact[]": 

				if (fls_user)

				{

			  		span_tags[i].innerHTML = string_array[3]

				}

				else if (cbol_user)

				{

			  		span_tags[i].innerHTML = string_array[2]				

				}

				break;			

			default:

			  //else do nothing

		}

	}

}



/*Updated 4/23/2007-4/25/2007 by DZ - The functions below swaps out the default Smith Barney working

  with that for the Financial Life Services uers. */

  

//New copy 3/12/2008



function flsWelcomeText() {



	if (fls_user)

	{

	var newbody = document.getElementById("headtextBasicDiv")



	var newtext = "<div class=\"dropshadow\">Welcome to myFi</div>";

	newtext+= "Stay in touch with the myFi Team, pay your bills, research securities, receive your monthly statements online and more. <a href=\"/help/features/\">Learn</a> how to maximize your experience on smithbarney.com.";



	newbody.innerHTML=newtext;

	}

}



function swapFLSFooter() {



	if (fls_user)

	{

	var newbody = document.getElementById("fcinfo")



	var newtext = "<img src=\"http://fa.smithbarney.com/images/locator-images/0_blustar.gif\" alt=\"\" /> For more information, please contact the <a href=\"javascript:void(0);\" onclick=\"window.open('https://www.smithbarney.com/cgi-bin/emp/contactfc.cgi','FC','width=800,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=1,resizable=yes');\"><strong>myFi Team</strong>.";



	newbody.innerHTML=newtext;

	}

}



function swapFLSText(lcText) {



	if (fls_user)

	{

	var newbody = document.getElementById(lcText)



	var newtext = "the myFi Team";



	newbody.innerHTML=newtext;

	}

}



function swapFLSWithURL_orig(lcText, URL) {



	if (fls_user)

	{

		var newbody = document.getElementById(lcText);

		var newtext = 'the <a href="';

		newtext+= URL;

		newtext+='">';

		newtext+='myFi Team</a>';

		newbody.innerHTML=newtext;

	}

}



function swapFLSWithURL(lcText, URL, oAttrib) 

{

	if (fls_user)

	{

		var newbody = document.getElementById(lcText);

		var oLink   = document.createElement('a');

		var _url  = URL ? URL : 'javascript:void(0)';

		var closure = '';

		oLink.setAttribute('href', _url);

		try

		{

			for (i in oAttrib)

			{

				switch (i)

				{

					case 'onclick':

						closure = oAttrib[i];

						oLink.onclick = function(){	eval(closure); }

						break;

					default:

						oLink.setAttribute(i, oAttrib[i]);

				}

			}

		}

		catch(e){alert('oAttrib error');}

		

		var oThe   = document.createTextNode('the ');

		var oTeam  = document.createTextNode('myFi Team');

		oLink.appendChild(oTeam);

		newbody.innerHTML = '';

		newbody.appendChild(oThe);

		newbody.appendChild(oLink);

	}

}



function removeElement(lcText) {

	if (fls_user)

	{

		var anchor = document.getElementById(lcText);

		var parent = anchor.parentNode;

		var removedChild = parent.removeChild(anchor);

	}

}



function changeContactCopy(lcTag) {

	if (fls_user)

   {

	var newbody = document.getElementById(lcTag);

	var newtext = "Technical Support: 1-800-221-3636";



	newbody.innerHTML=newtext;



   }

}



function addCoreUserListItem(lcTag, lcText, lcClassName) {

	

	if (core_user)

	{

		var currentNode = document.getElementById(lcTag);

		var list = currentNode.parentNode;

		var newNode = document.createElement("li");

		var spanNode = document.createElement("span");

		

		var newTextNode = document.createTextNode(lcText);

		spanNode.appendChild(newTextNode);

		

			if (lcClassName)

			{

			   spanNode.className=lcClassName;

			}

		

		newNode.appendChild(spanNode);

		list.insertBefore(newNode, currentNode);

	}

}



function changeUserCopy(lcTag, lcText) {



	if (fls_user)

	{

		var newbody = document.getElementById(lcTag);

		var newtext = lcText;

		newbody.innerHTML=newtext;

	}

}

//end DZ additions





// DZ 5/8/2007 additions

function changeUserCopy_CBOL(lcTag, lcText) {



	if (cbol_user)

	{

		var newbody = document.getElementById(lcTag);

		var newtext = lcText;

		newbody.innerHTML=newtext;

	}

}



function removeElement_CBOL(lcText) {

	if (cbol_user)

	{

		var anchor1 = document.getElementById(lcText);

		

		if (anchor1)

		{

			var parent = anchor1.parentNode;

			var removedChild = parent.removeChild(anchor1);

		}

	}

}

// End DZ additions



//DZ add 5/8/2007

function killAds_CBOL() {

	if (cbol_user)

	{

		var siteAdNav = document.getElementById("localDiv");

		if (siteAdNav)

		{		

			var siteAdNav2 = siteAdNav.getElementsByTagName("div");

	

			if (siteAdNav2.length>0)

			{

				for (var i=0; i < siteAdNav2.length; i++)

				{

					//alert(siteAdNav2[i].id.toUpperCase());

					switch (siteAdNav2[i].id.toUpperCase())

					{

						case "QUOTEBOX" :

							continue; 

						case "LOCALNAV" :

							if (siteAdNav2[i].innerHTML.indexOf("<img ") && siteAdNav2[i].innerHTML.toUpperCase().indexOf("<UL ")==-1)

							{

								//alert(siteAdNav2[i].innerHTML.indexOf("<UL "));

								siteAdNav2[i].innerHTML = ""; 

							}

							else

							{

								continue;

							} 

						default: 

							siteAdNav2[i].innerHTML = "";

							break;

					}

				}

			}

		}

	}

}

//End DZ



//Below is for use for protected URLS or PDFS

function oToolBox_CONSTRUCTOR()

{

	this.protected_url_check = function( origional_url , protected_url )

	{

		var cookie_string = unescape(document.cookie)

		if( cookie_string.indexOf('ssoSESSION=')>-1) 

		{

			window.open( protected_url , '' , '' );

		}

		else

		{

			oToolBox.create_cookie( 'protect_url_check' , 'orignal_html=' + origional_url + '|file_loc=' + protected_url + '|protect_url_check=' , 1 )

			window.location = 'https://www.smithbarney.com/cgi-bin/redirect/toolbox/protected_file_redirect.html'

		}

	}



	this.create_cookie = function( name , value , days ) 

	{

		if (days) {

			var date = new Date();

			date.setTime(date.getTime()+(days*24*60*60*1000));

			var expires = "; expires="+date.toGMTString();

		}

		else var expires = "";

		document.cookie = name+"="+value+expires+"; path=/";

	}



	this.read_cookie = function ( name ) 

	{

		var nameEQ = name + "=";

		var ca = document.cookie.split(';');

		for(var i=0;i < ca.length;i++) {

			var c = ca[i];

			while (c.charAt(0)==' ') c = c.substring(1,c.length);

			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);

		}

		return null;

	}



	this.erase_cookie = function ( name ) 

	{

		createCookie(name,"",-1);

	}



}

var oToolBox = new oToolBox_CONSTRUCTOR()



//DZ 1/30/2008: temp fix to the homepage banner. Only used for Homepage Banners

function quickHomeBannerFix()

{

	var banner = document.getElementById("noPZNHolder");

	

	if (banner)

	{

		//alert(banner);

		banner.innerHTML = '<a href="https://www.smithbarney.com/research/special_reports/marketvolatility.html"><img src="http://fa.smithbarney.com/images/locator-images/homepage/logged_in_banner.jpg" style="border: medium none ; float: left; position: absolute; top: 18px; right: 20px;z-index:1000;"></a>';

	}

	else

	{

		return;

	}

}

//pop-up window for feedback form

function feedbackNewWind(){

	var newWind;

	if (!newWind || newWind.closed) {

		newWind = window.open("https://www.smithbarney.com/salesforce/feedback.html","popup","status,height=500px,width=490px,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes");

		if (!newWind.opener){

			newWind.opener = window;

		}

			newWind.document.close();

			self.name="main";

	

			}else{

				newWind.focus(); 

	}

}

