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 D=document.cookie.split(";");if(D.length){for(i=0;i<D.length;i++){if(D[i].match(new RegExp(ipb_var_cookieid+".*$"))){var C=D[i].split("=");var B=this.trim(C[0]);var A=unescape(this.trim(C[1]));if(B&&(!this.in_array(B,this.ignore_cookies))){this.cookies[B.replace(ipb_var_cookieid,"")]=A}}}}D=null};this.trim=function(A){if(typeof (A)=="undefined"){return""}A=A.replace(/^\s+/,"");return A.replace(/\s+$/,"")};this.html_entity_decode=function(B){if(typeof A=="undefined"){var A=document.createElement("textarea")}A.innerHTML=B.replace(/</g,"&lt;").replace(/>/g,"&gt;");return A.value};this.in_array=function(C,B){if(!B.length){return false}for(var A=0;A<B.length;A++){if(B[A]===C){return true}}return false};this.htmlspecialchars=function(A){A=A.replace(/</g,"&lt;");A=A.replace(/>/g,"&gt;");A=A.replace(/"/g,"&quot;");return A};this.un_htmlspecialchars=function(A){A=A.replace(/&lt;/g,"<");A=A.replace(/&gt;/g,">");A=A.replace(/&quot;/g,'"');return A};this.get_editor_contents=function(D,B){var C=B?B:IPS_editor;if(!D){for(var A in C){if(typeof (C[A])!="object"){continue}D=A;break}}return C[D].editor_get_contents};this.add_editor_contents=function(E,D,B){var C=B?B:IPS_editor;if(!D){for(var A in C){if(typeof (C[A])!="object"){continue}D=A;break}}return C[D].insert_text(E)};this.convert_saved_tags_to_display_tags=function(A){A=A.replace(/(<|&lt;|&#60;)!--/,"{");A=A.replace(/--(>|&gt;|&#62;)/,"}");return A};this.include_javascript=function(B,C){var D=(C)?document.getElementById(C):document.getElementsByTagName("head").item(0);var A=document.createElement("script");A.setAttribute("language","javascript");A.setAttribute("type","text/javascript");A.setAttribute("src",B);D.appendChild(A);return false};this.fade_in_element=function(A){var G="#";var B="0123456789abcdef";var I="#ffff66";var F=document.getElementById(A).style.backgroundColor;var E="#ffffff";var K=20;var D=80;var N=B.indexOf(I.substr(1,1))*16+B.indexOf(I.substr(2,1));var M=B.indexOf(I.substr(3,1))*16+B.indexOf(I.substr(4,1));var C=B.indexOf(I.substr(5,1))*16+B.indexOf(I.substr(6,1));var J=B.indexOf(E.substr(1,1))*16+B.indexOf(E.substr(2,1));var H=B.indexOf(E.substr(3,1))*16+B.indexOf(E.substr(4,1));var L=B.indexOf(E.substr(5,1))*16+B.indexOf(E.substr(6,1));for(i=1,r=N,g=M,b=C;i<=K;r=Math.round(N+i*((J-N)/(K-1))),g=Math.round(M+i*((H-M)/(K-1))),b=Math.round(C+i*((L-C)/(K-1))),i++){hstr="#"+B.charAt(Math.floor(r/16))+B.charAt(r%16)+B.charAt(Math.floor(g/16))+B.charAt(g%16)+B.charAt(Math.floor(b/16))+B.charAt(b%16);setTimeout('var div = document.getElementById("'+A+'"); div.style.backgroundColor = "'+hstr+'";',i*D)}setTimeout('var div = document.getElementById("'+A+'"); div.style.backgroundColor = "'+F+'";',(i+1)*D)};this.lang_build_string=function(){if(!arguments.length||!arguments){return }var B=arguments[0];for(var C=1;C<arguments.length;C++){var A=new RegExp("<%"+C+">","gi");B=B.replace(A,arguments[C])}return B};this.get_id_from_text=function(A){return A.replace(/.*(\-|_)(\S+)/,"$2")};this.get_name_from_text=function(A){return A.replace(/(.*)(\-|_)(\S+)/,"$1")};this.location_jump=function(A,B){A=A.replace(/&amp;/g,"&");if(B){window.location.href=A}else{window.location.href=ipb_var_base_url+A}};this.confirm_action=function(A,B){if(!B){B="PLEASE CONFIRM:\nOK to proceed?"}if(A){A=A.replace("&amp;","&")}else{A=""}if(confirm(B)){window.location.href=A}else{alert(ipb_global_lang.action_cancelled);return false}};this.pop_up_window=function(C,E,A,B){if(!B){var F=new Date();B=F.getTime()}var D=window.open(C.replace("&amp;","&"),B,"width="+E+",height="+A+",resizable=1,scrollbars=1,location=no,directories=no,status=no,menubar=no,toolbar=no");D.focus();return false};this.set_unselectable=function(B){if(!is_ie4&&typeof (B.tagName)!="undefined"){if(B.hasChildNodes()){for(var A=0;A<B.childNodes.length;A++){this.set_unselectable(B.childNodes[A])}}B.unselectable="on"}};this.get_obj_leftpos=function(A){var B=0;if(A.offsetParent){while(A.offsetParent){B+=A.offsetLeft;A=A.offsetParent}}else{if(A.x){B+=A.x}}return B};this.get_obj_toppos=function(B){var A=0;if(B.offsetParent){while(B.offsetParent){A+=B.offsetTop;B=B.offsetParent}}else{if(B.y){A+=B.y}}return A};this.cancel_bubble=function(B,A){if(A!==false){A=true}if(!B||is_ie){if(A){window.event.returnValue=false}window.event.cancelBubble=true;return window.event}else{B.stopPropagation();if(A){B.preventDefault()}return B}};this.cancel_bubble_all=function(A){return ipsclass.cancel_bubble(A,true)};this.cancel_bubble_low=function(A){return ipsclass.cancel_bubble(A,false)};this.my_getcookie=function(A){return this.cookies[A]};this.my_setcookie=function(A,B,C){expire="";domain="";path="/";if(C){expire="; expires=Wed, 1 Jan 2020 00:00:00 GMT"}if(ipb_var_cookie_domain!=""){domain="; domain="+ipb_var_cookie_domain}if(ipb_var_cookie_path!=""){path=ipb_var_cookie_path}document.cookie=ipb_var_cookieid+A+"="+B+"; path="+path+expire+domain+";";this.cookies[A]=B};this.array_stacksize=function(A){for(i=0;i<A.length;i++){if((A[i]=="")||(A[i]==null)||(A=="undefined")){return i}}return A.length};this.array_pushstack=function(C,B){var A=this.array_stacksize(C);C[A]=B};this.array_popstack=function(C){var A=this.array_stacksize(C);var B=C[A-1];delete C[A-1];return B}};