/* * $RCSfile$ * $Revision: 19342 $ * $Date: 2005-07-20 09:30:31 -0700 (Wed, 20 Jul 2005) $ * * Copyright (C) 2003-2008 Jive Software. All rights reserved. * * This software is the proprietary information of Jive Software. Use is subject to license terms. */ // Override the default trim method of String. String.prototype.trim = function() { var text = this; var start = 0; var end = text.length; var display = ""; for (var i = 0; i < text.length; i++) { display += text.charCodeAt(i) + " "; } for (var i = 0; i < text.length; i++) { var code = text.charCodeAt(i); if (code >= 33) { start = i; break; } else{ start++; } } for (var i = text.length; i > start; i--) { var code = text.charCodeAt(i - 1); if (code >= 33) { end = i; break; } } return text.substring(start, end); } // variable to tell whether or not a form has been clicked var clicked = false; function allowClick() { if (! clicked) { clicked = true; return true; } return false; } // Sequence for open window names var windowNameSeq = 0; // Array of all open windows var windows = new Array(); // Checks to see if a window exists function windowExists(name) { for (var i = 0; i < windows.length; i++) { // IE needs a try/catch here for to avoid an access violation on windows[i].name // in some cases. try { if (windows[i].name == name) { return true; } } catch (exception) { } } return false; } // Returns the window object - returns nothing if not found. function getWindow(name) { for (var i = 0; i < windows.length; i++) { try { if (windows[i].name == name) { return windows[i]; } } catch (exception) { } } } function removeWindow(name) { for (var i = 0; i < windows.length; i++) { try { if (windows[i].name == name) { windows.splice(i, 1); return; } } catch (exception) { } } } // Open a window given its unique name, url, width and height. function pushWin(name, url, width, height) { var defaultOptions = "location=yes,status=yes,toolbar=no,personalbar=no,menubar=no,directories=no,"; defaultOptions += "scrollbars=yes,resizable=yes,"; defaultOptions += "width=" + width + ",height=" + height; launchWinWithOptions(name, url, defaultOptions); } // Open a window given its unique name, url, width and height. function launchWin(name, url, width, height) { var defaultOptions = "location=no,status=no,toolbar=no,personalbar=no,menubar=no,directories=no,"; var winUp = 0; var dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : screen.left; var dualScreenTop = window.screenTop != undefined ? window.screenTop : screen.top; w = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width; h = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height; var winleft = ((w / 2) - (width / 2)) + dualScreenLeft; var wintop = ((h / 2) - (height / 2)) + dualScreenTop; defaultOptions += "scrollbars=no,resizable=yes,top=" + winUp + ",left=" + winleft + ",top=" + wintop + ","; defaultOptions += "width=" + width + ",height=" + height; return launchWinWithOptions(name, url, defaultOptions); } // Open a window with given name, url, and options list function launchWinWithOptions(name, url, options) { if (! windowExists(name)) { var winVar = window.open(url, name, options); windows[windows.length] = winVar; return winVar; } else{ var theWin = getWindow(name); theWin.focus(); return null; } } function getTopLevelWindow() { var win = window; if (win.parent == win) { return win; } while (win.parent != win) { win = window.parent.window; } return win; } // Close the current window object function closeWin(win) { win.close(); } // Handle closing of the current window function handleClose(message) { if (confirm(message)) { removeWindow(getTopLevelWindow().name); closeWin(getTopLevelWindow()); return true; } else{ return false; } } // Handle closing of the current window function confirmCancel(message) { if (confirm(message)) { getTopLevelWindow().location.href = rel2full(getTopLevelWindow(),'userinfo.jsp'); return true; } else{ return false; } } function cancelQueue(workgroup, chatID){ getTopLevelWindow().location.href = rel2full(getTopLevelWindow(),'userinfo.jsp?workgroup=' + workgroup +'&chatID='+chatID); return true; } function confirmCancelAndClose(message) { if (confirm(message)) { getTopLevelWindow().location.href = rel2full(getTopLevelWindow(),'userinfo.jsp');; getTopLevelWindow().close(); return true; } else{ return false; } } // Handle closing of the current window function confirmCancel(message, workgroup, chatID) { if (confirm(message)) { getTopLevelWindow().location.href = rel2full(getTopLevelWindow(),'userinfo.jsp?workgroup=' + workgroup +'&chatID='+chatID); return true; } else{ return false; } } function closeAll() { removeWindow(getTopLevelWindow().name); closeWin(getTopLevelWindow()); } // Opens the help window: function launchHelpWin() { var win = launchWin('helpwin', 'helpwin.jsp', 550, 350); } // Hide a DIV function hide(divId) { if (document.layers) { document.layers[divId].visibility = 'hide'; } else if (document.all) { document.all[divId].style.visibility = 'hidden'; } else if (document.getElementById) { document.getElementById(divId).style.visibility = 'hidden'; } } // Show a DIV function show(divId) { if (document.layers) { document.layers[divId].visibility = 'show'; } else if (document.all) { document.all[divId].style.visibility = 'visible'; } else if (document.getElementById) { document.getElementById(divId).style.visibility = 'visible'; } } function getDiv(divID) { if (document.layers) { return document.layers[divID]; } else if (document.all) { return document.all[divID]; } else if (document.getElementById) { return document.getElementById(divID); } } function getDivByDoc(divID, doc) { if (doc.layers) { return doc.layers[divID]; } else if (doc.all) { return doc.all[divID]; } else if (doc.getElementById) { return doc.getElementById(divID); } } function informConnectionClosed() { alert('Your support session has ended, you will be redirected to the transcript page.'); parent.location.href = rel2full(parent,'transcriptmain.jsp'); } function checkTime(i) { if (i < 10) { i = "0" + i; } return i; } var lastMessageFrom; var agentName = ''; var partecipants = new Array(); function getNumPartecipants(name) { var count = 0; for(var i=0;i 0 ) { partecipants.push(name); return true; } return false; } function delPartecipant(name) { for(var i=0;i 2) addName = true; if( partecipants.length == 2 && !isMe) { if( agentName != from ) { agentName = from; document.getElementById('initialAgent').innerHTML = agentName; } } var hours = today.getHours(); var minutes = today.getMinutes(); if(hours < 10){ hours = "0" + hours; } if(minutes < 10){ minutes = "0" + minutes; } var time = hours + ":" + minutes; var body = ''; if(isAnnouncement) { // Visualizzo messaggio centrale di benvenuto body = '
  • '; body += '

    '; if( !isdecode) body += text.replace(/
    /g,""); else body += decodeURIComponent(text); body += '

    '; body += '
  • '; yakDiv.append(body); } else { // Visualizzo mesaggio chat var cssClass = ''; if( isMe ){ if(sameFrom){ cssClass='bubble-right'; } else { cssClass='first-bubble-right'; } } else { if(sameFrom){ cssClass='bubble-left'; } else { cssClass='first-bubble-left'; } } if( boxid !== undefined ) body = '
  • '; else body = '
  • '; body += '
    '; // search for yakDiv.find('#msg1 .header .pull-right')[0]; // if found - Replace waiting with clock // va inserito al posto di //'+ time+... var elem = null; if( boxid !== undefined ) elem = yakDiv.find('#' + boxid + ' .header small')[1]; var rig = ''; var rsf = ''; if( state === undefined || (state !== undefined && state == 0) ) { rig = '' + time; rsf = ''; } if( state !== undefined && state == 1 ) { rig = ''; rsf = rig; } if( state !== undefined && state == -1 ) { rig = 'Message not sent! '; rsf = rig; } if( elem == null && text != '' ) { if(!sameFrom){ if(isMe) { body += ' '; body += ''+ rig+ ''; } else { if( addName) { body += ''+ from+ ''; } body += ''+ rig+ ''; } } else { if(isMe) { body += ' '; body += ''+ rsf+ ''; } else { body += ''+ rsf+ ''; } } body += '
    '; body += '

    '; if( !isdecode) body += text; else body += decodeURIComponent(text); body += '

    '; body += '
  • '; yakDiv.append(body); } else if( elem != null) { if( elem.getAttribute('role') == 'data-nsm') { elem.innerHTML = rig; } else { elem.innerHTML = rsf; } } } lastMessageFrom = from; } function toggleTyping(yakWin,flag) { var endDiv = $jq('#'+yakWin.name).contents().find('#enddiv'); if( flag) { endDiv.html(''); scrollYakToEnd(yakWin); } else { endDiv.html(''); } } function scrollYakToEnd(yakWin) { try { document.getElementsByName(yakWin.name)[0].contentWindow.scrollBottom(); } catch(er){ } } function doChatByURL(url, query) { var form = document.createElement("form"); form.setAttribute("method", "post"); form.setAttribute("action", url); // Check for query string if( query ) { var pairs = query.split("&"); for (var i = 0; i < pairs.length; i++) { var keyValuePair = pairs[i].split("="); var input = document.createElement("input"); input.setAttribute("type", "hidden"); input.setAttribute("name", keyValuePair[0]); input.setAttribute("value", unescape(keyValuePair[1])); form.appendChild(input); } } // Check for engagement parameter if (typeof(engagement) != 'undefined' && engagement && engagement.getDomainUserId() != null) { var domain_userid = document.createElement("input"); domain_userid.setAttribute("type", "hidden"); domain_userid.setAttribute("name", "engage_duid"); domain_userid.setAttribute("value", unescape(engagement.getDomainUserId())); form.appendChild(domain_userid); } if (typeof(engagement) != 'undefined' && engagement && engagement.getDomainSessionId() != null) { var domain_sessionid = document.createElement("input"); domain_sessionid.setAttribute("type", "hidden"); domain_sessionid.setAttribute("name", "engage_sid"); domain_sessionid.setAttribute("value", unescape(engagement.getDomainSessionId())); form.appendChild(domain_sessionid); } document.body.appendChild(form); form.target = "_self"; form.submit(); } function doChat(name, url, width, height, query) { var form = document.createElement("form"); form.setAttribute("method", "post"); form.setAttribute("action", url); // Check for query string if( query ) { var pairs = query.split("&"); for (var i = 0; i < pairs.length; i++) { var keyValuePair = pairs[i].split("="); var input = document.createElement("input"); input.setAttribute("type", "hidden"); input.setAttribute("name", keyValuePair[0]); input.setAttribute("value", unescape(keyValuePair[1])); form.appendChild(input); } } // Check for engagement parameter if (typeof(engagement) != 'undefined' && engagement && engagement.getDomainUserId() != null) { var domain_userid = document.createElement("input"); domain_userid.setAttribute("type", "hidden"); domain_userid.setAttribute("name", "engage_duid"); domain_userid.setAttribute("value", unescape(engagement.getDomainUserId())); form.appendChild(domain_userid); } if (typeof(engagement) != 'undefined' && engagement && engagement.getDomainSessionId() != null) { var domain_sessionid = document.createElement("input"); domain_sessionid.setAttribute("type", "hidden"); domain_sessionid.setAttribute("name", "engage_sid"); domain_sessionid.setAttribute("value", unescape(engagement.getDomainSessionId())); form.appendChild(domain_sessionid); } document.body.appendChild(form); var w = launchWin(name, '', width, height); if (w != null) { form.target = name; form.submit(); } } function inIframe () { try { return window.self !== window.top; } catch (e) { return true; } } function bindEvent(el, eventName, eventHandler) { if (el.addEventListener){ el.addEventListener(eventName, eventHandler); } else if (el.attachEvent){ el.attachEvent('on'+eventName, eventHandler); } } function oneTime(el, s, fn) { var evts = s.split(' '); for (var i=0, iLen=evts.length; i -1; } function removeElement(element) { element.parentNode.removeChild(element); } /* executeFunctionByName("My.Namespace.functionName", window, arguments); * http://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string * */ function executeFunctionByName(functionName, context /*, args */) { var args = [].slice.call(arguments).splice(2); var namespaces = functionName.split("."); var func = namespaces.pop(); for(var i = 0; i < namespaces.length; i++) { context = context[namespaces[i]]; } return context[func].apply(this, args); } function aurl(url) { if( parent == null) return url; var scheme = window.location.protocol; try { scheme = parent.location.protocol; } catch(err) {} var new_url = url; var indexs = url.indexOf("/"); if (indexs != -1) { new_url = scheme + url.substring( indexs ); } return new_url; } function rel2full(w, url) { var new_url = w.location.protocol + '//' + w.location.hostname; if( w.location.port != '' ) new_url += ':' + w.location.port; var path = w.location.pathname.split('/'); new_url += '/' + path[1] + '/'; new_url += url; return new_url; } function ajaxCall(url,params,onsuccess,onerror) { var ajax = new XMLHttpRequest(); ajax.open("GET", url+"?"+params, true); ajax.send(); ajax.onreadystatechange = function() { if (ajax.readyState == 4 ) { if (ajax.status == 200) { onsuccess(ajax.responseText); } else if (ajax.status == 400) { if( onerror) onerror(ajax.status); } else { if( onerror) onerror(ajax.status); } } } } /* Include engagement feature if enabled */ var _hs_documentAlias = document; var _hs_windowAlias = window; if( inIframe() ) { _hs_windowAlias = window.top; _hs_documentAlias = _hs_windowAlias.document; } // add stylesheet for engage var fileref=document.createElement("link") fileref.setAttribute("rel", "stylesheet") fileref.setAttribute("type", "text/css") fileref.setAttribute("href", aurl('http://chat.pa.hollywoodcasino.com/webchat') + "/engage.css") _hs_documentAlias.getElementsByTagName("head")[0].appendChild(fileref) // add snowplow javascript tracker ;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[]; p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments) };p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1; n.src=w;g.parentNode.insertBefore(n,g)}}(_hs_windowAlias,_hs_documentAlias,"script",aurl('http://chat.pa.hollywoodcasino.com/webchat') + "/_asset/js/sp.js","webchat_event_tracker")); (function(a,b){if(typeof define==="function"&&define.amd){define(b) }else{if(typeof exports!=="undefined"){module.exports=b() }else{a.atmosphere=b() }}}(this,function(){var c="2.2.12-javascript",a={},e,d=false,h=[],g=[],f=0,b=Object.prototype.hasOwnProperty; a={onError:function(i){},onClose:function(i){},onOpen:function(i){},onReopen:function(i){},onMessage:function(i){},onReconnect:function(j,i){},onMessagePublished:function(i){},onTransportFailure:function(j,i){},onLocalMessage:function(i){},onFailureToReconnect:function(j,i){},onClientTimeout:function(i){},onOpenAfterResume:function(i){},WebsocketApiAdapter:function(j){var i,k; j.onMessage=function(l){k.onmessage({data:l.responseBody}) }; j.onMessagePublished=function(l){k.onmessage({data:l.responseBody}) }; j.onOpen=function(l){k.onopen(l) }; k={close:function(){i.close() },send:function(l){i.push(l) },onmessage:function(l){},onopen:function(l){},onclose:function(l){},onerror:function(l){}}; i=new a.subscribe(j); return k },AtmosphereRequest:function(ae){var q={timeout:300000,method:"GET",headers:{},contentType:"",callback:null,url:"",data:"",suspend:true,maxRequest:-1,reconnect:true,maxStreamingLength:10000000,lastIndex:0,logLevel:"info",requestCount:0,fallbackMethod:"GET",fallbackTransport:"streaming",transport:"long-polling",webSocketImpl:null,webSocketBinaryType:null,dispatchUrl:null,webSocketPathDelimiter:"@@",enableXDR:false,rewriteURL:false,attachHeadersAsQueryString:true,executeCallbackBeforeReconnect:false,readyState:0,withCredentials:false,trackMessageLength:false,messageDelimiter:"|",connectTimeout:-1,reconnectInterval:0,dropHeaders:true,uuid:0,async:true,shared:false,readResponsesHeaders:false,maxReconnectOnClose:5,enableProtocol:true,pollingInterval:0,heartbeat:{client:null,server:null},ackInterval:0,closeAsync:false,reconnectOnServerError:true,onError:function(aJ){},onClose:function(aJ){},onOpen:function(aJ){},onMessage:function(aJ){},onReopen:function(aK,aJ){},onReconnect:function(aK,aJ){},onMessagePublished:function(aJ){},onTransportFailure:function(aK,aJ){},onLocalMessage:function(aJ){},onFailureToReconnect:function(aK,aJ){},onClientTimeout:function(aJ){},onOpenAfterResume:function(aJ){}}; var at={status:200,reasonPhrase:"OK",responseBody:"",messages:[],headers:[],state:"messageReceived",transport:"polling",error:null,request:null,partialMessage:"",errorHandled:false,closedByClientTimeout:false,ffTryingReconnect:false}; var ax=null; var ah=null; var A=null; var o=null; var Y=null; var v=true; var az=0; var K=0; var al="X"; var aH=false; var R=null; var i; var ay=null; var S=a.util.now(); var z; var aG; var Z=false; ap(ae); function ak(){v=true; aH=false; az=0; ax=null; ah=null; A=null; o=null }function V(){m(); ak() }function x(aJ){if(aJ=="debug"){return q.logLevel==="debug" }else{if(aJ=="info"){return q.logLevel==="info"||q.logLevel==="debug" }else{if(aJ=="warn"){return q.logLevel==="warn"||q.logLevel==="info"||q.logLevel==="debug" }else{if(aJ=="error"){return q.logLevel==="error"||q.logLevel==="warn"||q.logLevel==="info"||q.logLevel==="debug" }else{return false }}}}}function aI(aJ){if(x("debug")){a.util.debug(new Date()+" Atmosphere: "+aJ) }}function J(aK,aJ){if(at.partialMessage===""&&(aJ.transport==="streaming")&&(aK.responseText.length>aJ.maxStreamingLength)){return true }return false }function E(){if(q.enableProtocol&&!q.firstMessage){var aL="X-Atmosphere-Transport=close&X-Atmosphere-tracking-id="+q.uuid; a.util.each(q.headers,function(aN,aP){var aO=a.util.isFunction(aP)?aP.call(this,q,q,at):aP; if(aO!=null){aL+="&"+encodeURIComponent(aN)+"="+encodeURIComponent(aO) }}); var aJ=q.url.replace(/([?&])_=[^&]*/,aL); aJ=aJ+(aJ===q.url?(/\?/.test(q.url)?"&":"?")+aL:""); var aK={connected:false}; var aM=new a.AtmosphereRequest(aK); aM.connectTimeout=q.connectTimeout; aM.attachHeadersAsQueryString=false; aM.dropHeaders=true; aM.url=aJ; aM.contentType="text/plain"; aM.transport="polling"; aM.method="GET"; aM.data=""; aM.heartbeat=null; if(q.enableXDR){aM.enableXDR=q.enableXDR }aM.async=q.closeAsync; an("",aM) }}function I(){aI("Closing (AtmosphereRequest._close() called)"); aH=true; if(q.reconnectId){clearTimeout(q.reconnectId); delete q.reconnectId }if(q.heartbeatTimer){clearTimeout(q.heartbeatTimer) }q.reconnect=false; at.request=q; at.state="unsubscribe"; at.responseBody=""; at.status=408; at.partialMessage=""; aj(); E(); m() }function m(){at.partialMessage=""; if(q.id){clearTimeout(q.id) }if(q.heartbeatTimer){clearTimeout(q.heartbeatTimer) }if(q.reconnectId){clearTimeout(q.reconnectId); delete q.reconnectId }if(o!=null){o.close(); o=null }if(Y!=null){Y.abort(); Y=null }if(A!=null){A.abort(); A=null }if(ax!=null){if(ax.canSendMessage){aI("invoking .close() on WebSocket object"); ax.close() }ax=null }if(ah!=null){ah.close(); ah=null }ai() }function ai(){if(i!=null){clearInterval(z); document.cookie=aG+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"; i.signal("close",{reason:"",heir:!aH?S:(i.get("children")||[])[0]}); i.close() }if(ay!=null){ay.close() }}function ap(aJ){V(); q=a.util.extend(q,aJ); q.mrequest=q.reconnect; if(!q.reconnect){q.reconnect=true }}function av(){return q.webSocketImpl!=null||window.WebSocket||window.MozWebSocket }function au(){var aK=a.util.getAbsoluteURL(q.url.toLowerCase()); var aL=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/.exec(aK); var aJ=!!(aL&&(aL[1]!=window.location.protocol||aL[2]!=window.location.hostname||(aL[3]||(aL[1]==="http:"?80:443))!=(window.location.port||(window.location.protocol==="http:"?80:443)))); return window.EventSource&&(!aJ||!a.util.browser.safari||a.util.browser.vmajor>=7) }function ab(){if(q.shared){ay=aE(q); if(ay!=null){if(x("debug")){a.util.debug("Storage service available. All communication will be local") }if(ay.open(q)){return }}if(x("debug")){a.util.debug("No Storage service available.") }ay=null }q.firstMessage=f==0?true:false; q.isOpen=false; q.ctime=a.util.now(); if(q.uuid===0){q.uuid=f }at.closedByClientTimeout=false; if(q.transport!=="websocket"&&q.transport!=="sse"){M(q) }else{if(q.transport==="websocket"){if(!av()){aA("Websocket is not supported, using request.fallbackTransport ("+q.fallbackTransport+")") }else{ag(false) }}else{if(q.transport==="sse"){if(!au()){aA("Server Side Events(SSE) is not supported, using request.fallbackTransport ("+q.fallbackTransport+")") }else{D(false) }}}}}function aE(aN){var aO,aM,aR,aJ="atmosphere-"+aN.url,aK={storage:function(){function aS(aW){if(aW.key===aJ&&aW.newValue){aL(aW.newValue) }}if(!a.util.storage){return }var aV=window.localStorage,aT=function(aW){return a.util.parseJSON(aV.getItem(aJ+"-"+aW)) },aU=function(aW,aX){aV.setItem(aJ+"-"+aW,a.util.stringifyJSON(aX)) }; return{init:function(){aU("children",aT("children").concat([S])); a.util.on(window,"storage",aS); return aT("opened") },signal:function(aW,aX){aV.setItem(aJ,a.util.stringifyJSON({target:"p",type:aW,data:aX})) },close:function(){var aW=aT("children"); a.util.off(window,"storage",aS); if(aW){if(aP(aW,aN.id)){aU("children",aW) }}}} },windowref:function(){var aS=window.open("",aJ.replace(/\W/g,"")); if(!aS||aS.closed||!aS.callbacks){return }return{init:function(){aS.callbacks.push(aL); aS.children.push(S); return aS.opened },signal:function(aT,aU){if(!aS.closed&&aS.fire){aS.fire(a.util.stringifyJSON({target:"p",type:aT,data:aU})) }},close:function(){if(!aR){aP(aS.callbacks,aL); aP(aS.children,S) }}} }}; function aP(aV,aU){var aS,aT=aV.length; for(aS=0; aS1000){return }aM=aK.storage()||aK.windowref(); if(!aM){return }return{open:function(){var aS; z=setInterval(function(){var aT=aO; aO=aQ(); if(!aO||aT.ts===aO.ts){aL(a.util.stringifyJSON({target:"c",type:"close",data:{reason:"error",heir:aT.heir}})) }},1000); aS=aM.init(); if(aS){setTimeout(function(){W("opening","local",aN) },50) }return aS },send:function(aS){aM.signal("send",aS) },localSend:function(aS){aM.signal("localSend",a.util.stringifyJSON({id:S,event:aS})) },close:function(){if(!aH){clearInterval(z); aM.signal("close"); aM.close() }}} }function aF(){var aK,aJ="atmosphere-"+q.url,aO={storage:function(){function aP(aR){if(aR.key===aJ&&aR.newValue){aL(aR.newValue) }}if(!a.util.storage){return }var aQ=window.localStorage; return{init:function(){a.util.on(window,"storage",aP) },signal:function(aR,aS){aQ.setItem(aJ,a.util.stringifyJSON({target:"c",type:aR,data:aS})) },get:function(aR){return a.util.parseJSON(aQ.getItem(aJ+"-"+aR)) },set:function(aR,aS){aQ.setItem(aJ+"-"+aR,a.util.stringifyJSON(aS)) },close:function(){a.util.off(window,"storage",aP); aQ.removeItem(aJ); aQ.removeItem(aJ+"-opened"); aQ.removeItem(aJ+"-children") }} },windowref:function(){var aQ=aJ.replace(/\W/g,""),aP=document.getElementById(aQ),aR; if(!aP){aP=document.createElement("div"); aP.id=aQ; aP.style.display="none"; aP.innerHTML='