var agt=navigator.userAgent.toLowerCase();
var is_major=parseInt(navigator.appVersion); 
var isNS4 = (agt.indexOf("mozilla/4")!= -1) && (agt.indexOf("msie")==-1);
var isNS6 = (agt.indexOf("netscape6")!= -1);
var isNS = (isNS4 || isNS6);
var isIE=(agt.indexOf("msie") != -1);
var isIE3=(isIE && (is_major < 4)); 
var isIE4 = (agt.indexOf("msie 4")!= -1);
var isIE5 = (agt.indexOf("msie 5")!= -1);
var isIE5up=(isIE  && !isIE3 && !isIE4 )? true : false;
var isIE6 = (agt.indexOf("msie 6")!= -1);
var isMac=(agt.indexOf("mac")!=-1);
var isMac68k=(this.mac && ( (agt.indexOf("68k")!=-1) || (agt.indexOf("68000")!=-1) ) );
var isMacppc=(this.mac && ( (agt.indexOf("ppc")!=-1) || (agt.indexOf("powerpc")!=-1) || (agt.indexOf("mac_")!=-1)  ) );
if (isMac || isMac68k || isMacppc){
  isMac=true;
}else{ 
  isMac=false; 
}

// /LSnS/bookmarks.jhtml 
function getBookMarksPage(sURL) { 
	if (isIE || isNS4) {
		// Open Outlook link in a new window
		if (sURL.indexOf("GetPdf") != -1) {
			openWindow(sURL);
		} else {
			parent.location.href=sURL; 
		}	
	} else {
		document.bookmarkForm.action=sURL;
		document.bookmarkForm.submit();
	} 
}

// /LSnS/breakingNews.jhtml
function NN_redirect(URL) { 
	setCookie('breakingNewsHistory', 'true');
	if (isIE || isNS4) {
		parent.frames['body'].location.href="bnNews.jhtml?redirectText="+URL; }
	else {
	    var sTemp = document.bnForm.action;
		sTemp += "bnNews.jhtml?redirectText="+URL;
		document.bnForm.bnText.value = URL;
		document.bnForm.submit(); }
} 

function setCookie(name, value) {
  	document.cookie = name + "=" + escape(value) + ";path=/";
}

// /LSnS/myMessages/rtm_targeted.jhtml
function openRTMWin(offerCode) {
	 newWin = window.open('/RTMOffer.dyn?action=getOfferFile&offerCd='+offerCode,'rtmWindow','width=300,height=380,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes');
	 newWin.opener = window;
}

// LSnS/myPortfolio/balances.jhtml
function swapLookthroughChart() {
	document.images['LTCHART'].src = '/LookthroughImg.dyn?acctId=' + document.xxForm.acctId[document.xxForm.acctId.selectedIndex].value + '&analysis=' + document.xxForm.analysisType[document.xxForm.analysisType.selectedIndex].value;
	return false;
}

function launchLegal(url) {
     important = window.open(url,"important",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,height=400, width=800');
}

// LSnS/myWeekend/content/*.* 
function swapImage(imgName,newImage){
  document.images[imgName].src = '/LSnS/myWeekend/content/hot/inline' + newImage + '.gif';
}

// LSnS/scripts/popWindow.jhtml
function openWindow(urlToLoad, theWidth, theHeight, theName, theOptions,virtual) {
  var windowWidth;
  var windowHeight;
  var windowOptions;
  if (theWidth != null || theWidth) {windowWidth = 800; } else { windowWidth = 800; }
  if (theHeight != null|| theHeight) {windowHeight = theHeight; } else { windowHeight = 640; }
  var windowName = (theName != null) ? (theName) : ("newWin");
  if (theOptions != null || theOptions) { windowOptions = ("width=" + windowWidth + ",height=" + windowHeight + "," + theOptions); } else { windowOptions = ("width=" + windowWidth + ",height=" + windowHeight + ",toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes"); }
  var newWin = window.open(urlToLoad, windowName, windowOptions);
  newWin.opener = self;
  newWin.focus();
  if (newWin.opener == null) newWin.opener = window;
}
function legalPop(){
alert('You are about to leave the www.OrlandoLaw.org Web site for a Web site\n that is unaffiliated with www.OrlandoLaw.org. www.OrlandoLaw.org has not been involved\n in the preparation of the content supplied at the unaffiliated site \nand does not guarantee or assume any responsibility for its content.');
}

function legalPopCommercial(){
alert('This hyperlink will leave the www.OrlandoLaw.org Web site. \nThe link is provided to a third party Web site and www.OrlandoLaw.org \ndoes not guarantee that the information supplied is \naccurate, complete or timely, or make any warranties \nwith regard to the results obtained from its \nuse or otherwise.');
}

function legalPopEducational(){
alert('This hyperlink will leave the www.OrlandoLaw.org Web site. \nThe link is provided to a Web site that is for educational purposes, \nand www.OrlandoLaw.org does not guarantee that the \ninformation supplied is accurate, complete or timely, \nor make any warranties with regard to the results \nobtained from its use or otherwise.');
}

function closeWindow() {
	self.close();
	return true;
}

function updateParent(newURL){
window.opener.top.location = newURL;
}

// LSnS/searchNews.jhtml
function isLetter(c) {return ( ((c >= "a") && (c <= "z")) || ((c >= "A") && (c <= "Z")))}
function errorCheck(){ 
	var txtSymbol=document.mainForm.symbol.value;
	if (txtSymbol==""){ 
		alert("Please enter a symbol for news.");
		document.mainForm.symbol.focus();
		return false;}
	else {return true;}}

/*	HTML CODE FOR JAVASCRIPT COMMANDS

		<div style="text-align: center;">

			<div style="margin: 0 0 10px 0;">
				<A href="javascript:window.print()">Print Page</a>
			</div>
			<div style="margin: 0 0 20px 0;">
				<a href="javascript:popWin('/investorsWeekly/redirect.jhtml',617,380,80,80)">E-mail Page</a>
			</div>
			
		</div>
*/
