var $addHandler=null;var $get=null;var $hint=null;var $bandage=null;var lastBandageLeft=null;var lastHoveredElement=null;var __contextMenu=null;var __loaded=false;$tw=jQuery.noConflict();$addHandler=function(a,c,b){if(a.addEventListener){a.addEventListener(c,b,false)}else{if(a.attachEvent){a.attachEvent("on"+c,b)}}};$get=function(a){return document.getElementById(a)};function __attachHint(c,b){function d(e){if(c.getAttribute("hint")!=null&&c.getAttribute("hint")!="untitled"){var f=Geometry.GetElementPosition(c);__showHint(b,c,true,{x:f.x+(f.width/2),y:f.y+f.height},c.getAttribute("hint"))}}function a(e){__showHint(b,c,false)}$addHandler(c,"mouseover",d);$addHandler(c,"mouseout",a)}function setLocation(b,a,c){if(b&&b.style){b.style.left=a+"px"}if(b&&b.style){b.style.top=c+"px"}}function enqueueAction(control,act,sec){control.__ellapsed=0;if(control.__timer_id==null){control.__timer_id=setInterval(function(){if(sec==null||sec=="undefined"){sec=10}if(++control.__ellapsed>sec){clearInterval(control.__timer_id);control.__timer_id=null;control.__ellapsed=0;eval(act)}},100)}}function __showHint(c,b,a,g,f,e,d){if(c==null||c=="undefined"){c="advanced"}if(window.$hint==null||window.$hint[c]==null){window.$hint=new Array();if(window.$hint[c]==null||window.$hint[c]=="undefined"){window.$hint.push(c)}window.$hint[c]=__createHintWindow(c);window.$hint[c].$showing=false}if(a==true){window.$hint[c].style.display="none";setLocation(window.$hint[c],g.x,g.y);window.$hint[c].$content.innerHTML=f;if(e!="undefined"&&e!=null){window.$hint[c].style.maxWidth=e+"px"}if(window.$hint[c].$showing==false){window.$hint[c].style.display="block";window.$hint[c].$showing=true;if(d=="undefined"||d==null||d==true){enqueueAction(window.$hint,"setTimeout('jQuery(\"#hint-wrapper-"+c+'").animate({opacity: "hide"},500);\',1000); ')}else{}}else{window.$hint[c].style.display="block"}}else{enqueueAction(window.$hint,'jQuery("#hint-wrapper-'+c+'").animate({opacity: "hide"},500);window.$hint["'+c+'"].style.display = "none";',9);window.$hint[c].$showing=false}}function __createHintWindow(c){var d=document.createElement("div");d.id="hint-wrapper-"+c;d.className="hint-wrapper";if(c!="simple"){var b=document.createElement("div");b.id="hint-title-"+c;b.className="hint-title";b.innerHTML="Click to expand reading"}var e=document.createElement("div");e.id="hint-content-"+c;e.className="hint-content";e.setAttribute("hintcontainer","1");if(c!="simple"){var a=document.createElement("div");a.id="hint-grad-"+c;a.className="hint-grad"}if(c!="simple"){d.appendChild(b)}d.appendChild(e);if(c!="simple"){d.appendChild(a)}d.$content=e;$get("context-menu-container").appendChild(d);return d}function __setHintContent(a){}function whichButton(b){var a;if(b.which==null){a=(b.button<2)?"LEFT":((b.button==4)?"MIDDLE":"RIGHT")}else{a=(b.which<2)?"LEFT":((b.which==2)?"MIDDLE":"RIGHT")}dont(b);return a}function dont(a){if(a.preventDefault){a.preventDefault()}else{a.returnValue=false}return false}$tw(document).ready(function(){});$addHandler(window,"load",function(){__attachHint($get("headlink1"),"simple");__attachHint($get("headlink2"),"simple");__attachHint($get("headlink3"),"simple");__attachHint($get("headlink4"),"simple");__attachHint($get("headrightrss"),"simple");$bandage=document.getElementById("bandage");setInterval("relocateBandage();",100);__loaded=true;jQuery("#hidden-sidebar").animate({opacity:"show"},2000)});function __scrollY(){var a=document.documentElement;return a.pageYOffset||(a&&a.scrollTop)||document.body.scrollTop}function __scrollX(){var a=document.documentElement;return a.pageXOffset||(a&&a.scrollLeft)||document.body.scrollLeft}function __doEditItem(a){}function __showContextMenu(b,a){if(window.__contextMenu==null){var c=[{caption:"Add/Edit Item...",id:1,handler:__doEditItem},{caption:"Return Item to Pool",id:2,handler:function(d){}},{caption:"Delete Item",id:3,handler:function(d){if(confirm("WARNING: Item will be deleted and lost permanently. Do you wish to proceed?")){}}}];window.__contextMenu=__createMenu(c,"contextMenu")}if(a!=null){__hideMenus();setLocation(__contextMenu,a.x+__scrollX(),a.y+__scrollY());__contextMenu.style.display=b?"block":"none"}else{__hideMenus()}}var $menus=null;function __createMenu(h,b){var k=document.createElement("table");k.id=b;k.className="context-menu";var e=document.createElement("tbody");for(var f=0;f<h.length;f++){var j=document.createElement("tr");var d=null;d=document.createElement("td");d.style.width="auto";d.style.paddingLeft="4px";var c=null;if(h[f].caption=="-"){d.style.borderBottom="1px solid #999";d.style.height="1px";d.style.className="separator"}else{d.style.height="25px";var a=document.createElement("div");a.innerHTML=h[f].caption;c=a;d.appendChild(c)}$addHandler(d,"click",function(i){__hideMenus();if(this.tag.handler!=null&&__loaded==true){this.tag.handler(i)}});d.tag=h[f];d.setAttribute("nowrap","");var g=document.createElement("td");g.style.width="10px";g.style.backgroundColor="#ccc";g.innerHTML="";j.appendChild(d);e.appendChild(j)}k.appendChild(e);$get("context-menu-container").appendChild(k);if(window.$menus==null){window.$menus=new Array()}window.$menus.push(k);return k}function __hideMenus(){if(window.$menus){for(var a=0;a<window.$menus.length;a++){window.$menus[a].style.display="none"}}}function relocateBandage2(a){$bandage.style.display="none";if(a<=Geometry.getDocumentWidth()-212){$bandage.style.left=a+"px"}else{$bandage.style.left=(Geometry.getDocumentWidth()-212)+"px"}jQuery("#bandage").animate({opacity:"show"},2000)}function relocateBandage(){var a=(Geometry.getViewportWidth()+Geometry.getHorizontalScroll()-212);if(lastBandageLeft!=a){relocateBandage2(a)}lastBandageLeft=a};
function showLink(id){jQuery("#link"+id).html('<div align="center"><div class="loading-bar"></div></div>'); jQuery("#link"+id).load("/blog/linkgen.php","id="+id);};