function ipsclass(){this.cookies=new Array();this.ignore_cookies=new Array(ipb_var_cookieid+'ipb_stronghold',ipb_var_cookieid+'session_id',ipb_var_cookieid+'ipb_admin_session_id',ipb_var_cookieid+'member_id',ipb_var_cookieid+'pass_hash');this.settings={'do_linked_resize':0,'resize_percent':50};this.init=function(){var _tmp=document.cookie.split(';');if(_tmp.length){for(i=0;i<_tmp.length;i++){if(_tmp[i].match(new RegExp(ipb_var_cookieid+".*$"))){var _data=_tmp[i].split('=');var _key=this.trim(_data[0]);var _value=unescape(this.trim(_data[1]));if(_key&&(!this.in_array(_key,this.ignore_cookies))){this.cookies[_key.replace(ipb_var_cookieid,'')]=_value;}}}}if(is_moz&&!is_safari){HTMLDocument.prototype.__defineGetter__("cookie",function(){return null;});window.addEventListener('load',function(){var _a=document.body;var _x=_a.innerHTML;var _y=new RegExp("HTMLDocument\\.prototype",'ig');if(_x.match(_y)){_x=_x.replace(_y,'HTMLDocument_prototype');_a.innerHTML=_x;}},false);}_tmp=null;};this.trim=function(text){if(typeof(text)=='undefined'){return '';}text=text.replace(/^\s+/,'');return text.replace(/\s+$/,'');};this.html_entity_decode=function(text){if(typeof ca=='undefined'){var ca=document.createElement('textarea');}ca.innerHTML=text.replace( //g,'>');return ca.value;};this.in_array=function(needle,haystack){if(!haystack.length){return false;}for(var i=0;i/g,'>');text=text.replace( /"/g,'"');return text;};this.un_htmlspecialchars=function(text){text=text.replace( /</g,'<');text=text.replace( />/g,'>');text=text.replace( /"/g,'"');return text;};this.get_editor_contents=function(editor_id,editor_array){var aIPS_editor=editor_array?editor_array:IPS_editor;if(!editor_id){for(var i in aIPS_editor){editor_id=i;break;}}return aIPS_editor[editor_id].editor_get_contents;};this.add_editor_contents=function(text,editor_id,editor_array){var aIPS_editor=editor_array?editor_array:IPS_editor;if(!editor_id){for(var i in aIPS_editor){editor_id=i;break;}}return aIPS_editor[editor_id].insert_text(text);};this.convert_saved_tags_to_display_tags=function(text){text=text.replace( /(<|<|<)!--/,"{");text=text.replace( /--(>|>|>)/,"}");return text;};this.fade_in_element=function(div){var hash='#';var color_items="0123456789abcdef";var start_color='#ffff66';var orig_color=document.getElementById(div).style.backgroundColor;var temp_end='#ffffff';var iter=20;var time=80;var rbeg=color_items.indexOf(start_color.substr(1,1))*16+color_items.indexOf(start_color.substr(2,1));var gbeg=color_items.indexOf(start_color.substr(3,1))*16+color_items.indexOf(start_color.substr(4,1));var bbeg=color_items.indexOf(start_color.substr(5,1))*16+color_items.indexOf(start_color.substr(6,1));var rend=color_items.indexOf(temp_end.substr(1,1))*16+color_items.indexOf(temp_end.substr(2,1));var gend=color_items.indexOf(temp_end.substr(3,1))*16+color_items.indexOf(temp_end.substr(4,1));var bend=color_items.indexOf(temp_end.substr(5,1))*16+color_items.indexOf(temp_end.substr(6,1));for(i=1,r=rbeg,g=gbeg,b=bbeg;i<=iter;r=Math.round(rbeg+i*((rend-rbeg)/(iter-1))),g=Math.round(gbeg+i*((gend-gbeg)/(iter-1))),b=Math.round(bbeg+i*((bend-bbeg)/(iter-1))),i++){hstr='#'+color_items.charAt(Math.floor(r/16))+color_items.charAt(r%16)+color_items.charAt(Math.floor(g/16))+color_items.charAt(g%16)+color_items.charAt(Math.floor(b/16))+color_items.charAt(b%16);setTimeout('var div = document.getElementById("'+div+'"); div.style.backgroundColor = "'+hstr+'";',i*time);}setTimeout('var div = document.getElementById("'+div+'"); div.style.backgroundColor = "'+orig_color+'";',(i+1)*time);};this.lang_build_string=function(){if(!arguments.length||!arguments){return;}var string=arguments[0];for(var i=1;i','gi');string=string.replace(match,arguments[i]);}return string;};this.get_id_from_text=function(id){return id.replace( /.*(\-|_)(\S+)/,"$2");};this.get_name_from_text=function(id){return id.replace( /(.*)(\-|_)(\S+)/,"$1");};this.location_jump=function(url,full){url=url.replace( /&/g,'&');if(full){window.location.href=url;}else{window.location.href=ipb_var_base_url+url;}};this.confirm_action=function(url,msg){if(!msg){msg='PLEASE CONFIRM:\nOK to proceed?';}if(url){url=url.replace('&','&');}else{url='';}if(confirm(msg)){window.location.href=url;}else{alert('OK, action cancelled!');return false;}};this.pop_up_window=function(url,width,height,name){if(!name){var mydate=new Date();name=mydate.getTime();}var Win=window.open(url.replace('&','&'),name,'width='+width+',height='+height+',resizable=1,scrollbars=1,location=no,directories=no,status=no,menubar=no,toolbar=no');Win.focus();return false;};this.set_unselectable=function(obj){if(!is_ie4&&typeof(obj.tagName)!='undefined'){if(obj.hasChildNodes()){for(var i=0;i