//alert(navigator.appName + navigator.appVersion); var ua = navigator.userAgent.toLowerCase(); var isOpera = (ua.indexOf('opera') != -1); var isSafari = (navigator.userAgent.indexOf('Safari') != -1); var isMoz = (navigator.appName == 'Netscape'); var isIE = (ua.indexOf('msie') != -1 && !isOpera); // Next 3 functions are called to refresh the session when the tab is clicked to show // the contents. Call initiated line 778 // Creates the ajax xmlhttprequest object function GetXmlHttpObject() { var xmlHttp = null; try { // Firefox, Opera, Safari xmlHttp = new XMLHttpRequest(); } catch (e) { // IE try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp = new ActiveXObject("Microsoft.HMLHTTP"); } } return xmlHttp; }; // This will refresh the session every time a tab is clicked function refreshSession() { xmlHttp = GetXmlHttpObject(); // Gives error if ajax not supported if (xmlHttp == null) { window.alert("Your browser doesn't support AJAX!"); return; } // Page resets session with passed flag var url = '/config/checkSession.php?reset=reset'; // Function to analyze php response and respond to it xmlHttp.onreadystatechange = doStuff; xmlHttp.open("GET", url, true); xmlHttp.send(null); }; // Takes the response from checkSession.php and acts accordingly function doStuff() { /* if (xmlHttp.readyState == 4) { // does nothing at this point } */ }; //YUI Namespacing var $Anim = YAHOO.util.Anim; var $Dom = YAHOO.util.Dom; var $Event = YAHOO.util.Event; var $Connect = YAHOO.util.Connect; var $ = $Dom.get; g_Func = new Object(); g_FuncETF = new Object(); g_Func13F = new Object(); c_Func = new Object(); shares_Func = new Object(); dates = new Array(); //Browser check function srcEl(e) { if(isIE) { var el = e.srcElement; } else { var el = e.target; } return el; } //IE indexOf support if(!Array.indexOf) { Array.prototype.indexOf = function(obj, start) { var found = -1; for(var i=(start||0); i\n\n\n\n\n'); tmp.write(content); tmp.write('\n'); tmp.close(); //targ.alert("My name is "+targ.name); }); //create menuClose img tag var menuClose = document.createElement("IMG"); menuClose.setAttribute('class', 'menu_close'); $Dom.addClass(menuClose, "menu_close"); menuClose.setAttribute('src', '/images/icons/close.gif'); menuClose.setAttribute('title', 'Close this tab'); //create menuClose click event $Event.on(menuClose, "click", function(e){ //Browser check if(isIE) { var el = e.srcElement; } else { var el = e.target; } jslog.info("CLOSE CLICK ON "+el.parentNode.id); var tab = el.parentNode.id; //alert("tab = "+tab); //alert("tab length = "+tab.length); var contentbox = tab.substr(0, tab.length-3); //alert("STR = "+contentbox); if($(tab).previousSibling){ triggerClick($(tab).previousSibling); } if(!$(tab).previousSibling){ if($(tab).nextSibling) { triggerClick($(tab).nextSibling); } } $(tab).parentNode.removeChild($(tab)); $(contentbox).parentNode.removeChild($(contentbox)); //Add History Entry //jsHistory.loadNextBookmark("remove:"+targ+":"+tabTitle+":"+path); }); //append tab to #tabList document.getElementById("tabList").appendChild(node); //append text to p element var p = document.createElement("P"); p.appendChild(text); //append p element to tab node.appendChild(p); //append popOut to tab node.appendChild(popOut); //apend menuClose to tab node.appendChild(menuClose); //create content container var container = document.createElement("SPAN"); //add contentbox class to span element $Dom.addClass(container, 'contentbox'); $Dom.addClass(container, 'hide'); container.setAttribute('id', targ); //append span to tabContent document.getElementById("tabContent").appendChild(container); } //alert("EL = "+el.parentNode.id); //hide all contentboxes but the one passed to the function hideContent(targ); //remove selected class from all other tabs removeSelected(); if($Dom.isAncestor(targ, el)) { jslog.warning(targ+" is ancestor of "+el+". not scrolling"); } if( ($(targ).scrollTop != 0) && (!$Dom.isAncestor(targ, el)) ) { scrollResponse(targ); } jslog.info("setting innerhtml to contentbox "+targ); document.getElementById(targ).innerHTML = o.responseText; //Append script tags with src attribute appendJS(document.getElementById(targ)); //Evaluate script tags in response target var doEval = function(){execJS(document.getElementById(targ));}; setTimeout(doEval, 500); //Add History Entry (do not record login failure) if(targ != "login_failure" && targ != "reset_password") jsHistory.loadNextBookmark("create:"+targ+":"+tabTitle+":"+path); //Hide Loader hideLoader(); //If container is hidden //show (currently jQuery) //$('div#liquidity_quote:hidden').slideDown('normal'); //$('div#quote_view:hidden').slideDown('normal'); //show contentbox target that was clicked if( $Dom.hasClass(targ, "hide") ) { jslog.debug(targ+" has 'hide' class, changing to 'show'"); $Dom.replaceClass(targ, "hide", "show"); $Dom.removeClass(targ+"Tab", "selected"); } else if ( $Dom.hasClass(targ, "show") ) { jslog.debug(targ+" has 'show' class doing nothing"); } else { jslog.debug(targ+" has no class... adding show class..."); $Dom.addClass(targ, "show"); $Dom.addClass(targ+"Tab", "selected"); } }; var responseFailure = function(o) { jslog.error("Error: "+o.responseText); } var callback = { success:responseSuccess, failure:responseFailure, argument:args }; var makeTab = function(id, href, text) { //argument passing test var items = makeTab.arguments.length; for(i=0;i\n\n\n\n\n'+content+''); }); //create menuClose img tag var menuClose = document.createElement("IMG"); menuClose.setAttribute('class', 'menu_close'); $Dom.addClass(menuClose, "menu_close"); menuClose.setAttribute('src', '/images/icons/close.gif'); menuClose.setAttribute('title', 'Close this tab'); menuClose.setAttribute('id', 'menu_close'); //create menuClose click event $Event.on(menuClose, "click", function(e){ //Browser check if(isIE) { var el = e.srcElement; } else { var el = e.target; } jslog.info("CLOSE CLICK ON "+el.parentNode.id+" from makeTab()"); var tab = el.parentNode.id; //alert("tab = "+tab); //alert("tab length = "+tab.length); var contentbox = tab.substr(0, tab.length-3); //alert("STR = "+contentbox); if($(tab).previousSibling){ if($(tab).nextSibling){ triggerClick($(tab).nextSibling); } else { triggerClick($(tab).previousSibling); } } if(!$(tab).previousSibling){ if($(tab).nextSibling) { triggerClick($(tab).nextSibling); } } $(tab).parentNode.removeChild($(tab)); $(contentbox).parentNode.removeChild($(contentbox)); //Add History Entry //jsHistory.loadNextBookmark("remove:"+targ+":"+tabTitle+":"+path); }); //append tab to #tabList document.getElementById("tabList").appendChild(node); //append text to p element var p = document.createElement("P"); p.appendChild(text); //append p element to tab node.appendChild(p); //append popOut to tab node.appendChild(popOut); //apend menuClose to tab node.appendChild(menuClose); //create content container var container = document.createElement("SPAN"); //add contentbox class to span element $Dom.addClass(container, 'contentbox'); $Dom.addClass(container, 'hide'); container.setAttribute('id', id); //append span to tabContent document.getElementById("tabContent").appendChild(container); /*************************************************************************************/ var targ = node.attributes['xref'].value; //alert("makeTab targ = "+targ); //alert("container.id = "+container.id); showLoader(); $Connect.asyncRequest("GET", path, { success:responseSuccess, failure:responseFailure, argument:[targ, container, tabTitle, path] }); triggerClick(node); } }; //THIS IS CURRENTLY BROKEN var removeSelected = function() { //remove selected class from all other tabs without a visible contentbox var el = document.getElementById("tabContent").getElementsByTagName("SPAN"); for(i=0;i'); $('#GB_overlay').center(); } } $.xmlDestroy = function() { $('#ajax-loading').fadeOut('normal'); $('#GB_overlay').remove(); $('html').removeClass("cursor-wait"); overLay = 0; } */