<!--
var agt=navigator.userAgent.toLowerCase();var is_major=parseInt(navigator.appVersion);var is_gecko=(agt.indexOf("gecko")!=-1);var is_nav=((agt.indexOf('mozilla')!=-1)&&(agt.indexOf('spoofer')==-1)&&(agt.indexOf('compatible')==-1)&&(agt.indexOf('opera')==-1)&&(agt.indexOf('webtv')==-1));var is_nav4up=(is_nav&&(is_major>=4));var is_mac=(agt.indexOf("mac")!=-1);function makeParams(form)
{var params="";if(form.compidx1.value)params+="&compidx1="+form.compidx1.value;if(form.compidx2.value)params+="&compidx2="+form.compidx2.value;if(form.compidx3.value)params+="&compidx3="+form.compidx3.value;if(form.fromdate.value)params+="&fromdate="+form.fromdate.value;if(form.todate.value)params+="&todate="+form.todate.value;if(form.daysb4.value)params+="&daysb4="+form.daysb4.value;if(form.freq.value)params+="&freq="+form.freq.value;if(form.dr.value)params+="&dr="+form.dr.value;if(form.symbs.value)params+="&symbs="+form.symbs.value;if(params.indexOf('&')==0){return"?"+params.substring(1);}
else{return params;}}
function isAol5()
{var is_5=navigator.appVersion.indexOf("AOL 5.0");if(is_5!=-1){return true;}
return false;}
function isAol6()
{var is_6=navigator.appVersion.indexOf("AOL 6.0");if(is_6!=-1){return true;}
return false;}
function artzOvr(o){o.className=o.className.substr(0,15)+" "+o.className.substr(8,15)+"Hov"}
function artzOff(o){o.className=o.className.substr(0,15)}
function artzClk(o){o.className=o.className.substr(0,15)+" "+o.className.substr(8,15)+"Clk"}
function goListPort(daform,errorStr)
{var dist=daform.pid.options[daform.pid.selectedIndex].value;var url="";url="../portfolios/listview?pid="+dist;window.location=url;}
function goPort(daform,errorStr)
{var dist=daform.pid.options[daform.pid.selectedIndex].value;var sym=whichEncode(daform.sym.value);var exch=daform.exch.value;var tabs=daform.tabs.value;var url="";if(dist=="myport"){url="/usw/portfolios/myportfolios?sym="+sym+"&exch="+exch+"&tabs="+tabs;window.location=url;}
else if(dist=="true")
goCreate(true,errorStr);else if(dist=="false")
goCreate(false,errorStr);else{url="/usw/portfolios/view?pid="+dist+"&sym="+sym+"&exch="+exch+"&tabs="+tabs;window.location=url;}}
function updateSym(chartform,quoteform)
{chartform.sym.value=quoteform.sym.value;}
function validateSym(str)
{var invalids=":<";for(i=0;i<invalids.length;i++){if(str.indexOf(invalids.charAt(i))>=0){return false;}}
return true;}
function goQuotes(daform)
{if(!validateSym(daform.sym.value)){alert("There are characters in the symbol that are not allowed.");return;}
var exch=daform.exch.value.toLowerCase();var sym=makeSym(daform.sym.value).toLowerCase();var url="";if((sym!=null)&&(sym.length>0)){url="/quotes/"+sym+"/"+exch;}
else{url="/quotes/"+exch;}
window.location=url;}
function makeSym(sym)
{var invalids="/+";var seosym="";var seoindex=-1;for(i=0;i<invalids.length;i++){while((seoindex=sym.indexOf(invalids.charAt(i)))>=0){seosym=sym.substring(0,seoindex);seosym+=whichEncode(invalids.charAt(i));seosym+=sym.substring(seoindex+1,sym.length);sym=seosym;}}
return whichEncode(sym);}
function goTab(daform,chartform)
{if(!validateSym(daform.sym.value)){alert("There are characters in the symbol that are not allowed.");return;}
var dist=daform.tabs.options[daform.tabs.selectedIndex].value;var sym=makeSym(daform.sym.value).toLowerCase();var pid=daform.pid.value;var exch=daform.exch.value.toLowerCase();var dur="";var symbs="";var compidx1="";var compidx2="";var compidx3="";var url="";if((dist=="charts")&&(chartform!=null)&&(chartform.dr.value)){dur=chartform.dr.value;symbs=chartform.symbs.value;if((chartform.compidx1!=null)&&(chartform.compidx1.checked==true))
compidx1=chartform.compidx1.value;if((chartform.compidx2!=null)&&(chartform.compidx2.checked==true))
compidx2=chartform.compidx2.value;if((chartform.compidx3!=null)&&(chartform.compidx3.checked==true))
compidx3=chartform.compidx3.value;}
else{dur=daform.dr.value;symbs=daform.symbs.value;compidx1=daform.compidx1.value;compidx2=daform.compidx2.value;compidx3=daform.compidx3.value;}
if(dist=="quotesandnews"){if((sym!=null)&&(sym.length>0)){url="/quotes/"+sym+"/"+exch+"?tabs="+dist;}
else{url="/quotes/"+exch+"?tabs="+dist;}}
else{if((sym!=null)&&(sym.length>0)){url="/quotes/"+sym+"/"+exch+"/"+dist+"?tabs="+dist;}
else{url="/quotes/"+exch+"/"+dist+"?tabs="+dist;}}
if((pid!=null)&&(pid!=""))url+="&pid="+pid;if((symbs!=null)&&(symbs!=""))url+="&symbs="+symbs;if((dur!=null)&&(dur!=""))url+="&dr="+dur;if((compidx1!=null)&&(compidx1!=""))url+="&compidx1="+compidx1;if((compidx2!=null)&&(compidx2!=""))url+="&compidx2="+compidx2;if((compidx3!=null)&&(compidx3!=""))url+="&compidx3="+compidx3;if((dist=="charts")&&(chartform!=null)){if(chartform.ag.value)url+="&ag="+chartform.ag.value;if(chartform.index.value)url+="&index="+chartform.index.value;if(chartform.te.value)url+="&te="+chartform.te.value;if(chartform.se.value)url+="&se="+chartform.se.value;if(chartform.vl.checked==true)url+="&vl="+chartform.vl.value;if(chartform.ss.checked==true)url+="&ss="+chartform.ss.value;if(chartform.dv.checked==true)url+="&dv="+chartform.dv.value;if(chartform.hs.checked==true)url+="&hs="+chartform.hs.value;if(chartform.vs.checked==true)url+="&vs="+chartform.vs.value;if(chartform.state.value)url+="&state="+chartform.state.value;if(chartform.settings.value)url+="&settings="+chartform.settings.value;if(chartform.vl1.value)url+="&vl1="+chartform.vl1.value;if(chartform.ss1.value)url+="&ss1="+chartform.ss1.value;if(chartform.dv1.value)url+="&dv1="+chartform.dv1.value;if(chartform.hs1.value)url+="&hs1="+chartform.hs1.value;if(chartform.vs1.value)url+="&vs1="+chartform.vs1.value;if(chartform.scs.value)url+="&scs="+chartform.scs.value;if(chartform.daysb4.value)url+="&daysb4="+chartform.daysb4.value;if(chartform.fromdate.value)url+="&fromdate="+chartform.fromdate.value;if(chartform.todate.value)url+="&todate="+chartform.todate.value;if(chartform.freq.value)url+="&freq="+chartform.freq.value;if(chartform.timeframe.value)url+="&timeframe="+chartform.timeframe.value;}
window.location=url;}
function goFreeTab(daform)
{if(!validateSym(daform.sym.value)){alert("There are characters in the symbol that are not allowed.");return;}
var exch=daform.exch.options[daform.exch.selectedIndex].value;var sym=whichEncode(daform.sym.value);var url="../free/quotesandnews"+"?sym="+sym+"&exch="+exch;window.location=url;}
function saveChartSettings(daform)
{daform.scs.value=1;daform.submit();}
function closeAll()
{if(exchangeWin)exchangeWin.close();if(aboutWin)aboutWin.close();if(helpWin)helpWin.close();if(rtqWin)rtqWin.close();if(managealertWin)managealertWin.close();if(addalertWin)addalertWin.close();if(addholdingWin)addholdingWin.close();if(addCreateWin)addCreateWin.close();if(downloadchartWin)downloadchartWin.close();if(prophetWin)prophetWin.close();if(pop)pop.close();if(createWin)createWin.close();if(advanceCreateWin)advanceCreateWin.close();if(editWin)editWin.close();}
function getLeftCoord(width){return 10;}
function getTopCoord(height){return 25;}
var alarmId;mediaWin=null;function openMedia(rurl,url)
{var rparams=rurl+"&url="+whichEncode(url);mediaWin=window.open(rparams,'newWin','scrollbars=yes, resizable=yes')}
forumWin=null;function openForum(url)
{forumWin=window.open(url,'forumWin','scrollbars=yes, resizable=yes',toolbar=yes)}
relatedWin=null;function openRelated(url)
{relatedWin=window.open(url,'relatedWin','scrollbars=yes, resizable=yes, height=420, width=705')}
messageWin=null;function openMessage(url)
{messageWin=window.open(url,'newWin','scrollbars=yes, width=705, height=420')}
prophetWin=null;function openProphet(params)
{prophetWin=window.open('http://www.prophet.net','prophetWin','toolbar=no, menubar=no, resizable=no, location=no, directories=no, scrollbars=no, width=705, height=420')}
downloadchartWin=null;function openDownloadChart(params)
{closeAll();downloadchartWin=window.open('/quotes/chartdata'+params,'newWin','toolbar=no, menubar=no, resizable=no, location=no, directories=no, scrollbars=no, width=705, height=460')
downloadchartWin.focus();}
function openDownloadChartMac(params)
{downloadchartWin=window.open('/quotes/chartdata'+params,'newWin','toolbar=no, menubar=no, resizable=no, location=no, directories=no, scrollbars=no, width=705, height=460')
downloadchartWin.focus();}
managealertWin=null;function openManageAlert()
{managealertWin=window.open('http://content.alerts.aol.com/PFProd.adp','manageAlertWin','toolbar=no, menubar=no, resizable=no, location=no, directories=no, scrollbars=no, width=705, height=420')}
addalertWin=null;function openAddAlert(params)
{closeAll();addalertWin=window.open('http://alerts.aol.com/ar/dlink/dlink.rr'+params,'newWin','toolbar=no, menubar=no, resizable=no, location=no, directories=no, scrollbars=yes, width=705, height=420')}
function openAddAlertMac(params)
{addalertWin=window.open('http://alerts.aol.com/ar/dlink/dlink.rr'+params,'newWin','toolbar=no, menubar=no, resizable=no, location=no, directories=no, scrollbars=yes, width=705, height=420')}
addCreateWin=null;function openAddCreate(syms)
{closeAll();addCreateWin=window.open('../portfolios/createoradd?'+syms,'addCreateWin','toolbar=no, menubar=no, resizable=yes, location=no, directories=no, scrollbars=no, width=700, height=530');}
addholdingWin=null;function openAddholding(exch,sym,frm)
{closeAll();exch=whichEncode(exch);sym=whichEncode(sym);var params="?exchange="+exch+"&symbols="+sym+"&from="+frm;if((isAol5())||(isAol6())){addholdingWin=window.open('/usw/portfolios/addholding'+params,'addholdWin','toolbar=no, menubar=no, resizable=yes, location=no, directories=no, scrollbars=no, width=480, height=400');}else{addholdingWin=window.open('/usw/portfolios/addholding'+params,'addholdWin','toolbar=no, menubar=no, resizable=yes, location=no, directories=no, scrollbars=no, width=480, height=320');}}
function openAddholdingMac(exch,sym,frm)
{exch=whichEncode(exch);sym=whichEncode(sym);var params="?exchange="+exch+"&symbols="+sym+"&from="+frm;if((isAol5())||(isAol6())){addholdingWin=window.open('/usw/portfolios/addholding'+params,'addholdWin','toolbar=no, menubar=no, resizable=yes, location=no, directories=no, scrollbars=no, width=480, height=500');}else{addholdingWin=window.open('/usw/portfolios/addholding'+params,'addholdWin','toolbar=no, menubar=no, resizable=yes, location=no, directories=no, scrollbars=no, width=480, height=420');}}
function openAddholdingNoAuth(exch,sym,frm)
{closeAll();exch=whichEncode(exch);sym=whichEncode(sym);var params="?exchange="+exch+"&symbols="+sym+"&from="+frm;addholdingWin=window.open('/usw/portfolios/addholding'+params,'addholdWin','toolbar=no, menubar=no, resizable=yes, location=no, directories=no, scrollbars=no, width=710, height=420');}
additemWin=null;function openAddItem(params)
{if(additemWin!=null)additemWin.close();additemWin=window.open('../portfolios/additem'+params,'additemWin','toolbar=no, menubar=no, resizable=no, location=no, directories=no, scrollbars=no, width=480, height=320');additemWin.focus();}
function openEditholding(params)
{if(newWindow!=null)newWindow.close();newWindow=window.open('../portfolios/editholding'+params,'newWin','toolbar=no, menubar=no, resizable=no, location=no, directories=no, scrollbars=no, width=480, height=370')}
aboutWin=null;function openAboutWindow()
{if(aboutWin!=null)aboutWin.close();aboutWin=window.open('../quotes/about','newWin','toolbar=no, location=no, directories=no, scrollbars=yes, status=yes, width=620, height=610, top=25,left=10')}
helpWin=null;function openHelpWindow()
{if(helpWin!=null)helpWin.close();helpWin=window.open('../quotes/help','newWin','toolbar=no, location=no, directories=no, scrollbars=yes, status=yes, width=705, height=420');}
googleWin=null;function openGoogleWindow(params)
{if(googleWin&&(!googleWin.closed)){googleWin.close();}
googleWin=window.open(params,'googleWin','toolbar=no, location=no, directories=no, scrollbars=yes, resizable=yes, status=yes, top=25,left=10');googleWin.focus();}
rtqWin=null;function openRTQWindow(sym,exch,name)
{closeAll();rtqWin=window.open('/quotes/'+name+'/'+whichEncode(sym)+'/'+exch+'/realtime','rtqWin','toolbar=no, location=no, directories=no, scrollbars=no, status=yes, width=705, height=355, top=25,left=10');rtqWin.focus();}
function openRTQWindowMac(sym,exch,name)
{rtqWin=window.open('/quotes/'+name+'/'+whichEncode(sym)+'/'+exch+'/realtime','rtqWin','toolbar=no, location=no, directories=no, scrollbars=no, status=yes, width=705, height=355, top=25,left=10');rtqWin.focus();}
exchangeWin=null;function openExchangeWindow(params)
{closeAll();exchangeWin=window.open('/quotes/exchange'+params,'newWin','toolbar=no, menubar=no, resizable=no, location=no, directories=no, scrollbars=no, status=no, width=420, height=190, top=25,left=10');exchangeWin.focus();}
function openExchangeWindowMac(params)
{exchangeWin=window.open('/quotes/exchange'+params,'newWin','toolbar=no, menubar=no, resizable=no, location=no, directories=no, scrollbars=no, status=no, width=420, height=190, top=25,left=10');exchangeWin.focus();}
createWin=null;function openCreateWindow(params)
{if(createWin!=null)createWin.close();createWin=window.open('/usw/portfolios/create?'+params,'createWin','resizable=yes, toolbar=no, location=no, directories=no, scrollbars, status=yes, width=728, height=395, left='+getLeftCoord(728)+', top='+getTopCoord(395));createWin.focus();}
advanceCreateWin=null;function openAdvancedCreateWindow(params)
{enparams=params;var i=params.indexOf("+");if(i>=0){enparams=params.substring(0,i);enparams+=whichEncode("+");enparams+=params.substring(i,params.length);}
if(advanceCreateWin!=null)advanceCreateWin.close();advanceCreateWin=window.open('/usw/portfolios/advancedCreate?'+enparams,'advCreateWin','resizable=yes, toolbar=no, location=no, directories=no, scrollbars=yes, status=yes, width=728, height=395');advanceCreateWin.focus();}
function openAdvancedCreateWindowMac(params)
{enparams=params;var i=params.indexOf("+");if(i>=0){enparams=params.substring(0,i);enparams+=whichEncode("+");enparams+=params.substring(i,params.length);}
advanceCreateWin=window.open('/usw/portfolios/advancedCreate?'+enparams,'advCreateWin','resizable=yes, toolbar=no, location=no, directories=no, scrollbars=yes, status=yes, width=728, height=420');advanceCreateWin.focus();}
editWin=null;function openEditPortfolioWindow(params)
{if(editWin!=null)editWin.close();editWin=window.open('/usw/portfolios/edit?'+params,'editWin','resizable=yes, toolbar=no, location=no, directories=no, scrollbars=yes, status=yes, width=728, height=500, left='+getLeftCoord(728)+', top='+getTopCoord(395));editWin.focus();}
function openEditPortfolioWindowMac(params)
{editWin=window.open('/usw/portfolios/edit?'+params,'editWin','toolbar=no, location=no, directories=no, scrollbars=yes, status=yes, width=728, height=395, left='+getLeftCoord(728)+', top='+getTopCoord(395));editWin.resizeTo(728,395);editWin.focus();}
symLookupWin=null;function openSymLookupWindow(params)
{if(symLookupWin!=null)symLookupWin.close();symLookupWin=window.open('/quotes/lookup?'+params,'symLookupWin','toolbar=no, location=no, directories=no, status=yes, width=703, height=326, left='+getLeftCoord(728)+', top='+getTopCoord(395));symLookupWin.focus();}
function openSymLookupWindowMac(params)
{symLookupWin=window.open('/quotes/lookup?'+params,'symLookupWin','toolbar=no, location=no, directories=no, status=yes, width=723, height=346, left='+getLeftCoord(728)+', top='+getTopCoord(395));symLookupWin.focus();}
function UpdateExchange(exch)
{selectedexch="";for(var i=0;i<exch.length;i++)
{if(exch[i].checked)
selectedexch=exch[i].id;}
if(window.opener.window.document.quote){window.opener.window.document.quote.exch.value=selectedexch;window.opener.window.document.port.exch.value=selectedexch;if(selectedexch=="USA"){window.opener.window.document.getElementById("USA").style.display="inline";window.opener.window.document.getElementById("CAN").style.display="none";window.opener.window.document.getElementById("GBR").style.display="none";}
else if(selectedexch=="CAN"){window.opener.window.document.getElementById("USA").style.display="none";window.opener.window.document.getElementById("CAN").style.display="inline";window.opener.window.document.getElementById("GBR").style.display="none";}
else if(selectedexch=="GBR"){window.opener.window.document.getElementById("USA").style.display="none";window.opener.window.document.getElementById("CAN").style.display="none";window.opener.window.document.getElementById("GBR").style.display="inline";}}
window.opener.window.document.quote.submit();window.close();}
function populateDate(theForm,i){if(theForm.symbols[i].value!=""&&theForm.month[i].value==""&&theForm.day[i].value==""&&theForm.year[i].value==""){theForm.month[i].value=getMonth();theForm.day[i].value=getDay();theForm.year[i].value=getYear();}}
function AddZero(value)
{if(value<10)
return("0"+value)
return value;}
function PrintDateUK()
{date=new Date();ampm="PM";year=date.getFullYear().toString().substring(2,4);month=date.getMonth()+1;day=date.getDate();minute=date.getMinutes();if((hour=date.getHours()%12)==0)
hour=12;if(date.getHours()<12)
ampm="AM";month=AddZero(month);day=AddZero(day);minute=AddZero(minute);return(": "+hour+":"+minute+" "+ampm+" on "+day+"/"+month+"/"+year);}
function PrintDateCA()
{date=new Date();ampm="PM";year=date.getFullYear().toString().substring(2,4);month=date.getMonth()+1;day=date.getDate();minute=date.getMinutes();if((hour=date.getHours()%12)==0)
hour=12;if(date.getHours()<12)
ampm="AM";month=AddZero(month);day=AddZero(day);minute=AddZero(minute);return(": "+hour+":"+minute+" "+ampm+" on "+month+"/"+day+"/"+year);}
function PrintDate()
{date=new Date();ampm="PM";year=date.getFullYear().toString().substring(2,4);month=date.getMonth()+1;day=date.getDate();minute=date.getMinutes();if((hour=date.getHours()%12)==0)
hour=12;if(date.getHours()<12)
ampm="AM";month=AddZero(month);day=AddZero(day);minute=AddZero(minute);return(": "+hour+":"+minute+" "+ampm+" on "+month+"/"+day+"/"+year);}
function popDelete(location,portfolio,id){document.hiddenForm.pid.value=id;document.hiddenForm.portfolio.value=portfolio;var url="/usw/portfolios/"+location+"?popup=yes&portfolio="+escape(portfolio);pop=prntPack(url,420,190);}
pop=null;function popCustomTimeRange(form,show)
{if((form!=null)&&(form.dr!=null)&&(form.dr.selectedIndex==(form.dr.length-1))){pop=prntPack('/usw/quotes/chartsCTR',420,190);}
else if(show==true){pop=prntPack('/usw/quotes/chartsCTR',420,190);}}
function popCustomTimeRangeMac(form,show){if((form!=null)&&(form.dr!=null)&&(form.dr.selectedIndex==(form.dr.length-1))){pop=prntPack('/usw/quotes/chartsCTR',420,190);}
else if(show==true){pop=prntPack('/usw/quotes/chartsCTR',420,190);}}
var prntPackNoticePop=null;function prntNoticePop(args,width,height){if(prntPackNoticePop&&(!prntPackNoticePop.closed))
{prntPackNoticePop.close();}
prntPackNoticePop=window.open(args,"windowRef_popnotice","width="+width+",height="+height+",top=10,left=150");prntPackNoticePop.focus();}
var prntPackHelpPop=null;function prntHelpPop(args,width,height){if(prntPackHelpPop&&(!prntPackHelpPop.closed))
{prntPackHelpPop.close();}
prntPackHelpPop=window.open(args,"windowRef_pophelp","width="+width+",height="+height+",top=25,left=10,scrollbars=yes");prntPackHelpPop.focus();}
var myWidth=0,myHeight=0;function alertSize(){if(typeof(window.innerWidth)=='number'){myWidth=window.innerWidth;myHeight=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){myWidth=document.documentElement.clientWidth;myHeight=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){myWidth=document.body.clientWidth;myHeight=document.body.clientHeight;}}
var launchTicker=null;function launchTickerPop(args,width,height){if(launchTicker&&(!launchTicker.closed))
{launchTicker.close();}
launchTicker=window.open(args,"windowRef_poptick","width=786,height=60,top=0,left=0,scrollbars=no,resizable=yes");launchTicker.focus();}
var launchLView=null;function launchLViewPop(args,width,height){if(launchLView&&(!launchLView.closed))
{launchLView.close();}
launchLView=window.open(args,"windowRef_poplaunchlview","width="+width+",height="+height+",top=25,left=10,scrollbars=yes,resizable=yes");launchLView.focus();}
var custTickerView=null;function popCustTickerView(args,width,height){custTickerView=window.open(args,"windowRef_poplaunchtickcust","width="+width+",height="+height+",top=25,left=10,scrollbars=no");custTickerView.focus();}
var custListView=null;function popCustListView(args,width,height){if(custListView&&(!custListView.closed))
{custListView.close();}
custListView=window.open(args,"windowRef_poplaunchlvcust","width="+width+",height="+height+",top=25,left=10,scrollbars=no");custListView.focus();}
var parentWinn=null;function goParent(url){if(window.opener!=null&&(!window.opener.closed)){window.opener.location=url;}else{parentWinn=window.open(url,"windowRef_parent","top=25px,left=10px,width=786,height=500,toolbar=yes,menubar=yes,resizable=yes,location=yes,directories=yes,scrollbars=yes");parentWinn.focus();}}
var launchMain=null;function launchMainPop(args,t1,t2){if(window.opener!=null&&(!window.opener.closed)){if(window.opener.window.document.title!=t1&&window.opener.window.document.title!=t2){window.opener.location=args;}else{if(window.opener.window.opener!=null&&(!window.opener.window.opener.closed)){if(window.opener.window.opener.window.document.title!=t1&&window.opener.window.opener.window.document.title!=t2){window.opener.window.opener.location=args;}else{launchMain=window.open(args,"windowRef_main","top=25px,left=10px,toolbar=yes,menubar=yes,resizable=yes,location=yes,directories=yes");}}else{launchMain=window.open(args,"windowRef_main","top=25px,left=10px,toolbar=yes,menubar=yes,resizable=yes,location=yes,directories=yes");}}}else{launchMain=window.open(args,"windowRef_main","top=25px,left=10px,toolbar=yes,menubar=yes,resizable=yes,location=yes,directories=yes,scrollbars=yes");}}
function launchMainPop2(args1,args2,args3,t1,t2){args2=whichEncode(args2);args=args1+args2+args3;try{if(window.opener!=null&&(!window.opener.closed)&&(window.opener.window.document.title!=t1)){}}catch(ex){window.opener.location=args;}
if(window.opener!=null&&(!window.opener.closed)){if(typeof(window.opener.window)=='unknown'||typeof(window.opener.window.document)!='object'){window.opener.location=args;}else if(window.opener.window.document.title!=t1&&window.opener.window.document.title!=t2){window.opener.location=args;}else{if(window.opener.window.opener!=null&&(!window.opener.window.opener.closed)){if(window.opener.window.opener.window.document.title!=t1&&window.opener.window.opener.window.document.title!=t2){window.opener.window.opener.location=args;}else{launchMain=window.open(args,"windowRef_main","top=25px,left=10px,toolbar=yes,menubar=yes,resizable=yes,location=yes,directories=yes,scrollbars=yes");}}else{launchMain=window.open(args,"windowRef_main","top=25px,left=10px,toolbar=yes,menubar=yes,resizable=yes,location=yes,directories=yes,scrollbars=yes");}}}else{launchMain=window.open(args,"windowRef_main","top=25px,left=10px,toolbar=yes,menubar=yes,resizable=yes,location=yes,directories=yes,scrollbars=yes");}}
prntPackSymPop=null;function prntSymPop(args,width,height)
{var subtopicNumber=args;var launcher=subtopicNumber;if(prntPackSymPop&&(!prntPackSymPop.closed))
{prntPackSymPop.close();}
prntPackSymPop=window.open(launcher,"windowRef_popsym","width="+width+",height="+height+",toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,directories=no,top=25px,left=10px");prntPackSymPop.focus();}
prntPackPop=null;function prntPack(args,width,height)
{if(prntPackPop&&(!prntPackPop.closed))
{prntPackPop.close();}
prntPackPop=window.open(args,"prntPackRef","width="+width+",height="+height+",toolbar=no,menubar=no,scrollbars=no,resizable=yes,location=no,directories=no");prntPackPop.focus();}
function prntPackScroll(args,width,height)
{if(prntPackPop&&(!prntPackPop.closed))
{prntPackPop.close();}
prntPackPop=window.open(args,"windowRef","width="+width+",height="+height+",top=25,left=10,scrollbars=yes");prntPackPop.focus();}
function prntPackMac(args,width,height)
{prntPackPop=window.open(args,"windowRef","width="+width+",height="+height+",top=25,left=10,scrollbars=yes,resizable=yes");prntPackPop.resizeTo(width,height);prntPackPop.focus();}
function prntPackMacNoScroll(args,width,height)
{prntPackPop=window.open(args,"windowRef","width="+width+",height="+height+",top=25,left=10,scrollbars=no,resizable=yes");prntPackPop.resizeTo(width,height);prntPackPop.focus();}
function prntPackScrollNotices(args,width,height,scroll)
{var subtopicNumber=args;var notices=subtopicNumber;if(prntPackPop&&(!prntPackPop.closed))
{prntPackPop.close();}
prntPackPop=window.open(notices,"notices","width="+width+",height="+height+",top=10,left=150"+",scrollbars="+scroll);prntPackPop.focus();}
function initFocus(elemnt)
{elemnt.focus();elemnt.select();}
function goCreate(max,errorStr){var isMax=max;if(isMax==true){alert(errorStr);}else{openCreateWindow('');}}
function isZero(str){var numPat=/^([-]?[0]*[\.]?[0]+|[-]?[0]+[\.]?[0]*)$/;var matchStr=str.match(numPat);if(matchStr!=null){return true;}else{return false;}}
function split(pos,theform){var symbol=document.pref.symbols[pos].value;var shares=document.pref.number_of_shares[pos].value;var price=document.pref.purchase_price[pos].value;var day=document.pref.day[pos].value;var month=document.pref.month[pos].value;var year=document.pref.year[pos].value;var commission=document.pref.commission_fees[pos].value;if(symbol==""){alert('Sorry, no security available');return;}
if(shares==""||isZero(shares)){alert('Sorry, cannot split a Security which has no shares associated with it');return;}
if(symbol==""&&shares==""&&price==""&&day==""&&month==""&&year==""&&commission==""){alert('Sorry, no security available');return;}
var url="split?pid=1&position="+pos+"&symbol="+symbol+"&from=edit_split";symb="theform.symbolsid"+pos;if(eval(symb).checked==true){alert("Sorry, you cannot Split or Transfer an item that is marked for deletion.");return;}
if(!confirm("Your Portfolio details must be saved before the Split operation can occur.\n Click 'OK' if you are sure you want to save this portfolio.")){return;}
theform.split_trans.value=1;theform.split_transPosition.value=pos;theform.splitOrTrans.value="split";theform.submit();}
function transfer(pos,theform){var symbol=document.pref.symbols[pos].value;var shares=document.pref.number_of_shares[pos].value;var price=document.pref.purchase_price[pos].value;var day=document.pref.day[pos].value;var month=document.pref.month[pos].value;var year=document.pref.year[pos].value;var commission=document.pref.commission_fees[pos].value;if(symbol==""){alert('Sorry, no security available');return;}
if(symbol==""&&shares==""&&price==""&&day==""&&month==""&&year==""&&commission==""){alert('Sorry, no security available');return;}
var url="transfer?pid=1&position="+pos+"&from=edit_transfer";symb="theform.symbolsid"+pos;if(eval(symb).checked==true){alert("Sorry, you cannot Split or Transfer an item that is marked for deletion.");return;}
if(!confirm("Your Portfolio details must be saved before the Transfer operation can occur.\n Click 'OK' if you are sure you want to save this portfolio.")){return;}
theform.split_trans.value=1;theform.split_transPosition.value=pos;theform.splitOrTrans.value="transfer";theform.submit();}
function utf8(wide){var c,s;var enc="";var i=0;while(i<wide.length){c=wide.charCodeAt(i++);if(c>=0xDC00&&c<0xE000)continue;if(c>=0xD800&&c<0xDC00){if(i>=wide.length)continue;s=wide.charCodeAt(i++);if(s<0xDC00||c>=0xDE00)continue;c=((c-0xD800)<<10)+(s-0xDC00)+0x10000;}
if(c<0x80)enc+=String.fromCharCode(c);else if(c<0x800)enc+=String.fromCharCode(0xC0+(c>>6),0x80+(c&0x3F));else if(c<0x10000)enc+=String.fromCharCode(0xE0+(c>>12),0x80+(c>>6&0x3F),0x80+(c&0x3F));else enc+=String.fromCharCode(0xF0+(c>>18),0x80+(c>>12&0x3F),0x80+(c>>6&0x3F),0x80+(c&0x3F));}
return enc;}
var hexchars="0123456789ABCDEF";function toHex(n){return hexchars.charAt(n>>4)+hexchars.charAt(n&0xF);}
var okURIchars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-";function encodeURIComponentNew(s){var s=utf8(s);var c;var enc="";for(var i=0;i<s.length;i++){if(okURIchars.indexOf(s.charAt(i))==-1)
enc+="%"+toHex(s.charCodeAt(i));else
enc+=s.charAt(i);}
return enc;}
function whichEncode(fld)
{var encodedField="";var s=fld;if(typeof encodeURIComponent=="function")
{encodedField=encodeURIComponent(s);}
else
{encodedField=encodeURIComponentNew(s);}
return encodedField;}
function reFocus(){}
function refocus(){reFocus();}
function parentRefresh(){if(opener.window){opener.window.location.reload();}}
function showRow(rowId){document.getElementById(rowId).style.display='';}
function hideRows(rowId1,errRowId2){document.getElementById(rowId1).style.display='none';if(document.getElementById(errRowId2)!=null){document.getElementById(errRowId2).style.display='none';}}
function sendForm(){var strUrl="stockscreener";var strQueryString="?c_i="+whichEncode(document.getElementById('ssformselect2').value);for(var i=3;i<26;i++)
{str="ssformselect"+i;elem=document.getElementById(str);strQueryString=strQueryString+"&"+elem.name+"="+whichEncode(elem.value);if(elem.value=="cust"){elemVal=document.getElementById(elem.name+"_f").value;strQueryString=strQueryString+"&"+elem.name+"_f="+whichEncode(elemVal);elemVal=document.getElementById(elem.name+"_t").value;strQueryString=strQueryString+"&"+elem.name+"_t="+whichEncode(elemVal);}}
location.replace(strUrl+strQueryString);}
function populateDropdown(contentsArray,dropdownObject,previousSelectionValue){var dropdownLabel,dropdownValue;var previousValue=previousSelectionValue;for(i=0;i<contentsArray.length;i++){dropdownLabel=contentsArray[i].l;dropdownValue=contentsArray[i].v;dropdownObject.options[i]=new Option(dropdownLabel,dropdownValue);if(previousValue==dropdownValue){dropdownObject.options[i].selected=true;}else{dropdownObject.options[i].selected=false;}}}
function openAddOrCreate(){if(checkboxesCheckedTotal==0){alert("You have not selected any stocks.\nPlease review and try again.");return false;}
if(checkboxesCheckedTotal>100){alert("We're sorry! New portfolios are available\nfor up to 100 symbols. Please review your\nlist and try again. Thank you.");return false;}
checkSelection();if(document.pref.selectedsymbols.value!=""){openAddCreate(document.pref.selectedsymbols.value);}}
function checkCharts(){if(checkboxesCheckedTotal==0){alert("You have not selected any stocks.\nPlease review and try again.");return false;}
if(checkboxesCheckedTotal>8){alert("We're sorry! Comparison charts are\navailable for up to 8 stocks. Please review\nyour selection and try again. Thank you.");return false;}
var numcheckboxes=document.getElementById("totalrows").value;document.pref.chartsurl.value="";for(var i=0;i<numcheckboxes;i++)
{str="document.pref.symbolsid"+i;if(eval(str).checked&&eval("document.getElementById('symbols"+i+"').value"))
{if(document.pref.chartsurl.value==""){document.pref.chartsurl.value="charts?exch=USA&sym="+document.getElementById("symbols"+i).value;}else{if(document.pref.chartsyms.value==""){document.pref.chartsyms.value="&symbs="+document.getElementById("symbols"+i).value;}else{document.pref.chartsyms.value=document.pref.chartsyms.value+"+"+document.getElementById("symbols"+i).value;}}}}
document.location.href=document.pref.chartsurl.value+document.pref.chartsyms.value;}
function checkSelection(){var numcheckboxes=document.getElementById("totalrows").value;document.pref.selectedsymbols.value="";for(var i=0;i<numcheckboxes;i++)
{str="document.pref.symbolsid"+i;if(eval(str).checked&&eval("document.getElementById('symbols"+i+"').value"))
{if(document.pref.selectedsymbols.value==""){document.pref.selectedsymbols.value="symbols_together="+document.getElementById("symbols"+i).value;}else{document.pref.selectedsymbols.value=document.pref.selectedsymbols.value+","+document.getElementById("symbols"+i).value;}}}}
function columnView(dropDownId){var columnViewValue=document.getElementById(dropDownId).value;window.location.href=columnViewValue}
var checkboxesCheckedTotal=0;function countChecks(){var numcheckboxes=document.getElementById("totalrows").value;var checked=0;for(var i=0;i<numcheckboxes;i++){if(document.getElementById("symbolsid"+i).checked)checked++;}
if(checked>0){checkboxesCheckedTotal=checked;document.getElementById("checkboxCounterId-top").innerHTML=checkboxesCheckedTotal;document.getElementById("checkboxCounterId-bottom").innerHTML=checkboxesCheckedTotal;}}
function checkboxCounter(selectedCheckboxId){if(document.getElementById(selectedCheckboxId).checked)checkboxesCheckedTotal++;else checkboxesCheckedTotal--;document.getElementById("checkboxCounterId-top").innerHTML=checkboxesCheckedTotal;document.getElementById("checkboxCounterId-bottom").innerHTML=checkboxesCheckedTotal;}
function checkboxSelectAll(theElement,theSelectAllCheckboxId)
{var theForm=document.getElementById(theSelectAllCheckboxId).form.name;if(!document.forms[theForm])
return;var theCheckValue;if(document.getElementById(theSelectAllCheckboxId).checked)theCheckValue=true;else theCheckValue=false;var theCheckboxesObject=document.forms[theForm].elements[theElement];if(!theCheckboxesObject)
return;var countCheckboxes=theCheckboxesObject.length;if(!countCheckboxes){if(theCheckValue&&!theCheckboxesObject.checked){checkboxesCheckedTotal++;document.getElementById("checkboxCounterId-top").innerHTML=checkboxesCheckedTotal;document.getElementById("checkboxCounterId-bottom").innerHTML=checkboxesCheckedTotal;}else if(!theCheckValue&&theCheckboxesObject.checked){checkboxesCheckedTotal--;document.getElementById("checkboxCounterId-top").innerHTML=checkboxesCheckedTotal;document.getElementById("checkboxCounterId-bottom").innerHTML=checkboxesCheckedTotal;}
theCheckboxesObject.checked=theCheckValue;}else{for(var i=0;i<countCheckboxes;i++){if(theCheckValue&&!theCheckboxesObject[i].checked){checkboxesCheckedTotal++;document.getElementById("checkboxCounterId-top").innerHTML=checkboxesCheckedTotal;document.getElementById("checkboxCounterId-bottom").innerHTML=checkboxesCheckedTotal;}else if(!theCheckValue&&theCheckboxesObject[i].checked){checkboxesCheckedTotal--;document.getElementById("checkboxCounterId-top").innerHTML=checkboxesCheckedTotal;document.getElementById("checkboxCounterId-bottom").innerHTML=checkboxesCheckedTotal;}
theCheckboxesObject[i].checked=theCheckValue;}}}
function resizeResultsMaintable(){var tbl=document.getElementById("ss-resultsMaintable");var scroller=document.getElementById("scroller");var tblHeight=tbl.offsetHeight;var tblWidth=tbl.offsetWidth;if(tblWidth>756){scroller.style.height=tblHeight+20+"px";}}
function instructionsText(){var tbl=document.getElementById("ss-resultsMaintable");var tblWidth=tbl.offsetWidth;if(tblWidth>756){document.getElementById("useScrollbarText-top").innerHTML=document.getElementById("useScrollbarText-top").innerHTML+" Use the scrollbar under results to see more data.";document.getElementById("useScrollbarText-bottom").innerHTML=document.getElementById("useScrollbarText-bottom").innerHTML+" Use the scrollbar under results to see more data.";}}
function columnView(dropDownId){var columnViewValue=document.getElementById(dropDownId).value;window.location.href=columnViewValue}
function resizeCompareMaintable(){var tbl=document.getElementById("ss-compareMaintable");var scroller=document.getElementById("scroller");var tblHeight=tbl.offsetHeight;var tblWidth=tbl.offsetWidth;if(tblWidth>756){scroller.style.height=tblHeight+20+"px";}}
function printArticle(){var prn=new Image();if(window.print){setTimeout('window.print();',200);}
else if(agt.indexOf("mac")!=-1){alert("Press 'Cmd+p' on your keyboard to print article.");}
else{alert("Press 'Ctrl+p' on your keyboard to print article.")}}
function selectRandom(max)
{var r=Math.random()
r*=max
r=parseInt(r)
if(isNaN(r))
r=0
else
r%=max
return r}
function randomiseAds(adsToShow,magicNum1,magicNum2,magicNum3,magicNum4){var ADS_TO_SHOW=adsToShow;FB_MagicNums=new Array(magicNum1,magicNum2,magicNum3,magicNum4);var arraySize=ADS_TO_SHOW;var max=FB_MagicNums.length;randomArray=new Array();var n;var unique=0;var allUnique=true;if(ADS_TO_SHOW>FB_MagicNums.length)
{allUnique=false;}
n=selectRandom(max)
randomArray[0]=n;for(var i=0;i<ADS_TO_SHOW;i++)
{if(allUnique)
{while(unique==0)
{j=0;while(n!=randomArray[j]&&j<=max)
{j++;}
if(j<arraySize&&max!=1)
n=selectRandom(max);else
{randomArray[i]=n;unique=1;}}
unique=0;randomArray[i]=n;}
else
{n=selectRandom(max);randomArray[i]=n;}}}