var iBox=function(){var _pub={close_label:"Close",padding:100,inherit_frames:false,fade_in_speed:0,attribute_name:"rel",tags_to_hide:["select","embed","object"],default_width:450,is_opera:navigator.userAgent.indexOf("Opera/9")!=-1,is_ie:navigator.userAgent.indexOf("MSIE ")!=-1,is_ie6:false /*@cc_on || @_jscript_version < 5.7 @*/ ,is_firefox:navigator.appName=="Netscape"&&navigator.userAgent.indexOf("Gecko")!=-1&&navigator.userAgent.indexOf("Netscape")==-1,is_mac:navigator.userAgent.indexOf("Macintosh")!=-1,base_url:"",setPath:function(path){_pub.base_url=path},bind:function(fn){var args=[];for(var n=1;nx){if(constrain){height=height*(x/width)}width=x}if(height>y){if(constrain){width=width*(y/height)}height=y}obj.style.width=width+"px";obj.style.height=height+"px"},reposition:function(e){_pub.center(els.loading);_pub.center(els.wrapper);var pageSize=_pub.getPageSize();var scrollPos=_pub.getScrollPos();if(_pub.is_ie6){els.overlay.style.width=document.documentElement.clientWidth+"px"}var height=Math.max(document.documentElement.clientHeight,document.body.clientHeight);els.overlay.style.height=height+"px"},center:function(obj){var pageSize=_pub.getPageSize();var scrollPos=_pub.getScrollPos();var emSize=_pub.getElementSize(obj);var x=Math.round((pageSize.width-emSize.width)/2+scrollPos.scrollX);var y=Math.round((pageSize.height-emSize.height)/2+scrollPos.scrollY);obj.style.left=x+"px";obj.style.top=y+"px"},getStyle:function(obj,styleProp){if(obj.currentStyle){return obj.currentStyle[styleProp]}else{if(window.getComputedStyle){return document.defaultView.getComputedStyle(obj,null).getPropertyValue(styleProp)}}},getScrollPos:function(){var docElem=document.documentElement;return{scrollX:document.body.scrollLeft||window.pageXOffset||(docElem&&docElem.scrollLeft),scrollY:document.body.scrollTop||window.pageYOffset||(docElem&&docElem.scrollTop)}},getPageSize:function(){return{width:window.innerWidth||(document.documentElement&&document.documentElement.clientWidth)||document.body.clientWidth,height:window.innerHeight||(document.documentElement&&document.documentElement.clientHeight)||document.body.clientHeight}},getElementSize:function(obj){return{width:obj.offsetWidth||obj.style.pixelWidth,height:obj.offsetHeight||obj.style.pixelHeight}},fadeIn:function(obj,level,speed,callback){if(level===undefined){var level=100}if(speed===undefined){var speed=70}if(!speed){_pub.setOpacity(null,obj,level*10);if(callback){callback()}return }_pub.setOpacity(null,obj,0);for(var i=0;i<=level;i++){setTimeout(_pub.bind(_pub.setOpacity,obj,i*10),speed*i)}if(callback){setTimeout(callback,speed*(i+1))}},setOpacity:function(e,obj,value){obj.style.opacity=value/100;obj.style.filter="alpha(opacity="+value+")"},createXMLHttpRequest:function(){var http;if(window.XMLHttpRequest){http=new XMLHttpRequest();if(http.overrideMimeType){http.overrideMimeType("text/html")}}else{if(window.ActiveXObject){try{http=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{http=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}}}if(!http){alert("Cannot create XMLHTTP instance");return false}return http},addEvent:function(obj,evType,fn){if(obj.addEventListener){obj.addEventListener(evType,fn,false);return true}else{if(obj.attachEvent){var r=obj.attachEvent("on"+evType,fn);return r}else{return false}}},addEventListener:function(name,callback){if(!events[name]){events[name]=new Array()}events[name].push(callback)},fireEvent:function(name){if(events[name]&&events[name].length){for(var i=0;ix

";head.insertBefore(htmDiv.childNodes[1],head.firstChild);htmDiv.innerHTML='

x

";head.insertBefore(htmDiv.childNodes[1],head.firstChild)};var initialize=function(){drawCSS();var els=document.getElementsByTagName("a");for(var i=0;i';_pub.html(html,params)}}}();_pub.plugins.register(iBoxPlugin_YouTube);var iBoxPlugin_Document=function(){return{match:function(url){return true},render:function(url,params){_pub.http.open("get",url,true);_pub.http.onreadystatechange=function(){if(_pub.http.readyState==4){if(_pub.http.status==200||_pub.http.status==0){_pub.html(_pub.http.responseText,params)}else{_pub.html(document.createTextNode("There was an error loading the document."),params)}}};_pub.http.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");_pub.http.send(null)}}}();_pub.plugins.register(iBoxPlugin_Document);return _pub}();