var iBox=function(){var _pub={close_label:'Close',inherit_frames:false,fade_in_speed:150,fade_out_speed:25,attribute_name:'rel',tags_to_hide:['select','embed','object'],default_width:450,version_number:'2.2',build_number:'1612',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},checkTags:function(container,tag_name){if(!container)var container=document.body;if(!tag_name)var tag_name='a';var els=container.getElementsByTagName(tag_name);for(var i=0;ix){if(active.params.constrain)height=height*(x/width);width=x}if(height>y){if(active.params.constrain)width=width*(y/height);height=y}_pub.updateObject(els.wrapper.style,{width:width+'px',height:height+'px'})}els.content.style.height=height-offset.wrapper[1]+'px';if(active.dimensions!=['100%','100%'])_pub.center(els.wrapper)}els.overlay.style.height=Math.max(document.body.clientHeight,document.documentElement.clientHeight)+'px'},updateObject:function(obj,params){for(var i in params)obj[i]=params[i]},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);if(obj.offsetLeft)x-=obj.offsetLeft;if(obj.offsetTop)y-=obj.offsetTop;if(obj.style.left)x+=parseInt(obj.style.left);if(obj.style.top)y+=parseInt(obj.style.top);x-=10;_pub.updateObject(obj.style,{top:y+'px',left:x+'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}},fade:function(obj,start,end,speed,callback){if(start===undefined||!(start>=0)||!(start<=100))var start=0;if(end===undefined||!(end>=0)||!(end<=100))var end=100;if(speed===undefined)var speed=0;if(obj.fader)clearInterval(obj.fader);if(!speed){_pub.setOpacity(null,obj,end);if(callback)callback()}var opacity_difference=end-start;var time_total=speed;var step_size=25;var steps=time_total/step_size;var increment=Math.ceil(opacity_difference/steps);obj.fader=setInterval(_pub.bind(function(e,obj,increment,end,callback){var opacity=_pub.getOpacity(e,obj)+increment;_pub.setOpacity(e,obj,opacity);if((increment<0&&opacity<=end)||(increment>0&&opacity>=end)){_pub.setOpacity(e,obj,end);clearInterval(obj.fader);if(callback)callback()}},obj,increment,end,callback),step_size)},setOpacity:function(e,obj,value){value=Math.round(value);obj.style.opacity=value/100;obj.style.filter='alpha(opacity='+value+')'},getOpacity:function(e,obj){return _pub.getStyle(obj,'opacity')*100},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 _initialized=false;var initialize=function(){if(_initialized)return;_initialized=true;drawCSS();var els=document.getElementsByTagName('script');var src;for(var i=0,el=null;(el=els[i]);i++){if(!(src=el.getAttribute('src')))continue;src=src.split('?')[0];if(src.substr(src.length-8)=='/ibox.js'){_pub.setPath(src.substr(0,src.length-7));break}}create(document.body);_pub.checkTags(document.body,'a');_pub.http=_pub.createXMLHttpRequest();_pub.fireEvent('load')};_pub.addEvent(window,'keypress',function(e){if(e.keyCode==(window.event?27:e.DOM_VK_ESCAPE)){iBox.hide()}});_pub.addEvent(window,'resize',_pub.reposition);_pub.addEvent(window,'load',initialize);_pub.addEvent(window,'scroll',_pub.reposition);var iBoxPlugin_Container=function(){var was_error=false;var original_wrapper=null;return{match:function(url){return url.indexOf('#')!=-1},unload:function(){if(was_error)return;var elemSrc=_pub.html().firstChild;if(elemSrc){elemSrc.style.display='none';original_wrapper.appendChild(elemSrc)}},render:function(url,params){was_error=false;var elemSrcId=url.substr(url.indexOf("#")+1);var elemSrc=document.getElementById(elemSrcId);if(!elemSrc){was_error=true;_pub.html(document.createTextNode('There was an error loading the document.'),params)}else{original_wrapper=elemSrc.parentNode;elemSrc.style.display='block';_pub.html(elemSrc,params)}}}}();_pub.plugins.register(iBoxPlugin_Container,true);var iBoxPlugin_Image=function(){var image_types=/\.jpg|\.jpeg|\.png|\.gif/gi;return{match:function(url){return url.match(image_types)},render:function(url,params){var img=document.createElement('img');img.onclick=_pub.hide;img.className='ibox_image';img.style.cursor='pointer';img.onload=function(){_pub.html(img,{width:this.width,height:this.height,constrain:true});};img.onerror=function(){_pub.html(document.createTextNode('There was an error loading the document.'),params)};img.src=url}}}();_pub.plugins.register(iBoxPlugin_Image);var iBoxPlugin_immortalxx=function(){var immortalxx_url=/(?:http:\/\/)?(?:www\d*\.)?immortalxx\..*/;return{match:function(url){return url.match(immortalxx_url)},render:function(url,params){var _match=url.match(immortalxx_url);var domain=_match[1];var id=_match[2];var html='';_pub.html(html,params)}}}();_pub.plugins.register(iBoxPlugin_immortalxx);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");try{_pub.http.send(null)}catch(ex){_pub.html(document.createTextNode('There was an error loading the document.'),params)}}}}();_pub.plugins.register(iBoxPlugin_Document,true);return _pub}();