var Spry;Spry||(Spry={});if(!Spry.Widget)Spry.Widget={};Spry.Widget.MenuBar=function(a,b){this.init(a,b)};
Spry.Widget.MenuBar.prototype.init=function(a,b){this.element=this.getElement(a);this.currMenu=null;var c=typeof document.all!="undefined"&&typeof window.opera=="undefined"&&navigator.vendor!="KDE";if(!(typeof document.getElementById=="undefined"||navigator.vendor=="Apple Computer, Inc."&&typeof window.XMLHttpRequest=="undefined"||c&&typeof document.uniqueID=="undefined")){if(b)for(var d in b)(new Image).src=b[d];if(this.element){this.currMenu=this.element;var e=this.element.getElementsByTagName("li");
for(d=0;d<e.length;d++){this.initialize(e[d],a,c);if(c){this.addClassName(e[d],"MenuBarItemIE");e[d].style.position="static"}}if(c){if(this.hasClassName(this.element,"MenuBarVertical"))this.element.style.position="relative";c=this.element.getElementsByTagName("a");for(d=0;d<c.length;d++)c[d].style.position="relative"}}}};Spry.Widget.MenuBar.prototype.getElement=function(a){if(a&&typeof a=="string")return document.getElementById(a);return a};
Spry.Widget.MenuBar.prototype.hasClassName=function(a,b){if(!a||!b||!a.className||a.className.search(RegExp("\\b"+b+"\\b"))==-1)return false;return true};Spry.Widget.MenuBar.prototype.addClassName=function(a,b){!a||!b||this.hasClassName(a,b)||(a.className+=(a.className?" ":"")+b)};Spry.Widget.MenuBar.prototype.removeClassName=function(a,b){if(!(!a||!b||!this.hasClassName(a,b)))a.className=a.className.replace(RegExp("\\s*\\b"+b+"\\b","g"),"")};
Spry.Widget.MenuBar.prototype.addEventListener=function(a,b,c,d){try{if(a.addEventListener)a.addEventListener(b,c,d);else a.attachEvent&&a.attachEvent("on"+b,c)}catch(e){}};Spry.Widget.MenuBar.prototype.createIframeLayer=function(a){var b=document.createElement("iframe");b.tabIndex="-1";b.src="javascript:false;";b.style.left=a.offsetLeft+"px";b.style.top=a.offsetTop+"px";b.style.width=a.offsetWidth+"px";b.style.height=a.offsetHeight+"px"};
Spry.Widget.MenuBar.prototype.removeIframeLayer=function(a){for(a=a.parentNode.getElementsByTagName("iframe");a.length>0;)a[0].parentNode.removeChild(a[0])};Spry.Widget.MenuBar.prototype.clearMenus=function(a){a=a.getElementsByTagName("ul");for(var b=0;b<a.length;b++)this.hideSubmenu(a[b]);this.removeClassName(this.element,"MenuBarActive")};
Spry.Widget.MenuBar.prototype.bubbledTextEvent=function(){return navigator.vendor=="Apple Computer, Inc."&&(event.target==event.relatedTarget.parentNode||event.eventPhase==3&&event.target.parentNode==event.relatedTarget)};
Spry.Widget.MenuBar.prototype.showSubmenu=function(a){if(this.currMenu){this.clearMenus(this.currMenu);this.currMenu=null}if(a){this.addClassName(a,"MenuBarSubmenuVisible");if(typeof document.all!="undefined"&&typeof window.opera=="undefined"&&navigator.vendor!="KDE")if(!this.hasClassName(this.element,"MenuBarHorizontal")||a.parentNode.parentNode!=this.element)a.style.top=a.parentNode.offsetTop+"px";typeof document.uniqueID!="undefined"&&this.createIframeLayer(a)}this.addClassName(this.element,"MenuBarActive")};
Spry.Widget.MenuBar.prototype.hideSubmenu=function(a){if(a){this.removeClassName(a,"MenuBarSubmenuVisible");if(typeof document.all!="undefined"&&typeof window.opera=="undefined"&&navigator.vendor!="KDE"){a.style.top="";a.style.left=""}this.removeIframeLayer(a)}};
Spry.Widget.MenuBar.prototype.initialize=function(a,b,c){var d,e,g=a.getElementsByTagName("a")[0];b=a.getElementsByTagName("ul");var f=b.length>0?b[0]:null,j=false;if(f){this.addClassName(g,"MenuBarItemSubmenu");j=true}if(!c)a.contains=function(i){if(i==null)return false;return i==this?true:this.contains(i.parentNode)};var h=this;this.addEventListener(a,"mouseover",function(){if(!h.bubbledTextEvent()){clearTimeout(e);if(h.currMenu==a)h.currMenu=null;h.addClassName(g,j?"MenuBarItemSubmenuHover":"MenuBarItemHover");
if(f&&!h.hasClassName(f,"MenuBarSubmenuVisible"))d=window.setTimeout(function(){h.showSubmenu(f)},250)}},false);this.addEventListener(a,"mouseout",function(i){if(!h.bubbledTextEvent())if(!a.contains(typeof i.relatedTarget!="undefined"?i.relatedTarget:i.toElement)){clearTimeout(d);h.currMenu=a;h.removeClassName(g,j?"MenuBarItemSubmenuHover":"MenuBarItemHover");if(f)e=window.setTimeout(function(){h.hideSubmenu(f)},600)}},false)};function MM_swapImgRestore(){var a,b,c=document.MM_sr;for(a=0;c&&a<c.length&&(b=c[a])&&b.oSrc;a++)b.src=b.oSrc}function MM_preloadImages(){var a=document;if(a.images){if(!a.MM_p)a.MM_p=[];var b,c=a.MM_p.length,d=MM_preloadImages.arguments;for(b=0;b<d.length;b++)if(d[b].indexOf("#")!=0){a.MM_p[c]=new Image;a.MM_p[c++].src=d[b]}}}
function MM_findObj(a,b){var c,d;b||(b=document);if((c=a.indexOf("?"))>0&&parent.frames.length){b=parent.frames[a.substring(c+1)].document;a=a.substring(0,c)}if(!(d=b[a])&&b.all)d=b.all[a];for(c=0;!d&&c<b.forms.length;c++)d=b.forms[c][a];for(c=0;!d&&b.layers&&c<b.layers.length;c++)d=MM_findObj(a,b.layers[c].document);if(!d&&b.getElementById)d=b.getElementById(a);return d}
function MM_swapImage(){var a,b=0,c,d=MM_swapImage.arguments;document.MM_sr=[];for(a=0;a<d.length-2;a+=3)if((c=MM_findObj(d[a]))!=null){document.MM_sr[b++]=c;if(!c.oSrc)c.oSrc=c.src;c.src=d[a+2]}}function swapImage(a,b){document.element.getElementById(a).src=b};function showForm(a){var b=document.getElementsByTagName("body")[0],c=getPageSize(),d=getPageScroll(),e=document.createElement("div");e.setAttribute("id","overlay");e.style.position="absolute";e.style.top="0";e.style.left="0";e.style.zIndex="90";e.style.width="100%";e.style.height=c[1]+"px";b.appendChild(e);d=d[1]+100;var g=document.createElement("div");g.setAttribute("id","keyboardMsg");g.style.height=c[1]+"px";g.style.position="absolute";g.style.top="0";g.style.left="0";g.style.zIndex="100";g.style.width=
"100%";MarginTopTable=d<0?"0px":d+"px";b.appendChild(g);var f;try{f=new XMLHttpRequest}catch(j){try{f=new ActiveXObject("Msxml2.XMLHTTP")}catch(h){try{f=new ActiveXObject("Microsoft.XMLHTTP")}catch(i){alert("Your browser does not support AJAX!");return false}}}f.onreadystatechange=function(){if(f.readyState==4)g.innerHTML='<div style="text-align: center; width: 100%;">'+f.responseText+"</div>"};f.open("GET","include/chat.php?id="+a,true);f.send(null)}
function getPageScroll(){var a;if(self.pageYOffset)a=self.pageYOffset;else if(document.documentElement&&document.documentElement.scrollTop)a=document.documentElement.scrollTop;else if(document.body)a=document.body.scrollTop;return arrayPageScroll=["",a]}
function getPageSize(){var a,b;if(window.innerHeight&&window.scrollMaxY){a=document.body.scrollWidth;b=window.innerHeight+window.scrollMaxY}else if(document.body.scrollHeight>document.body.offsetHeight){a=document.body.scrollWidth;b=document.body.scrollHeight}else{a=document.body.offsetWidth;b=document.body.offsetHeight}var c,d;if(self.innerHeight){c=self.innerWidth;d=self.innerHeight}else if(document.documentElement&&document.documentElement.clientHeight){c=document.documentElement.clientWidth;d=
document.documentElement.clientHeight}else if(document.body){c=document.body.clientWidth;d=document.body.clientHeight}pageHeight=b<d?d:b;pageWidth=a<c?c:a;return arrayPageSize=[pageWidth,pageHeight,c,d]}
function hideLightbox(){ObjForm=document.getElementById("overlay");objKeyboardMsg=document.getElementById("keyboardMsg");ObjForm.style.display="none";objKeyboardMsg.style.display="none";var a=document.getElementsByTagName("body")[0];a.removeChild(ObjForm);a.removeChild(objKeyboardMsg);document.onkeypress=""};
