function ipsclass(){this.cookies=[];this.ignore_cookies=[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 a=document.cookie.split(";");if(a.length)for(i=0;i<a.length;i++)if(a[i].match(RegExp(ipb_var_cookieid+".*$"))){var c=a[i].split("="),d=this.trim(c[0]);c=unescape(this.trim(c[1]));if(d&&!this.in_array(d,this.ignore_cookies))this.cookies[d.replace(ipb_var_cookieid,
"")]=c}};this.trim=function(a){if(typeof a=="undefined")return"";a=a.replace(/^\s+/,"");return a.replace(/\s+$/,"")};this.html_entity_decode=function(a){if(typeof c=="undefined")var c=document.createElement("textarea");c.innerHTML=a.replace(/</g,"&lt;").replace(/>/g,"&gt;");return c.value};this.in_array=function(a,c){if(!c.length)return false;for(var d=0;d<c.length;d++)if(c[d]===a)return true;return false};this.htmlspecialchars=function(a){a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;");return a=
a.replace(/"/g,"&quot;")};this.un_htmlspecialchars=function(a){a=a.replace(/&lt;/g,"<");a=a.replace(/&gt;/g,">");return a=a.replace(/&quot;/g,'"')};this.get_editor_contents=function(a,c){var d=c?c:IPS_editor;if(!a)for(var e in d)if(typeof d[e]=="object"){a=e;break}return d[a].editor_get_contents};this.add_editor_contents=function(a,c,d){d=d?d:IPS_editor;if(!c)for(var e in d)if(typeof d[e]=="object"){c=e;break}return d[c].insert_text(a)};this.convert_saved_tags_to_display_tags=function(a){a=a.replace(/(<|&lt;|&#60;)!--/,
"{");return a=a.replace(/--(>|&gt;|&#62;)/,"}")};this.include_javascript=function(a,c){var d=c?document.getElementById(c):document.getElementsByTagName("head").item(0),e=document.createElement("script");e.setAttribute("language","javascript");e.setAttribute("type","text/javascript");e.setAttribute("src",a);d.appendChild(e);return false};this.fade_in_element=function(a){var c=document.getElementById(a).style.backgroundColor,d="0123456789abcdef".indexOf("#ffff66".substr(1,1))*16+"0123456789abcdef".indexOf("#ffff66".substr(2,
1)),e="0123456789abcdef".indexOf("#ffff66".substr(3,1))*16+"0123456789abcdef".indexOf("#ffff66".substr(4,1)),f="0123456789abcdef".indexOf("#ffff66".substr(5,1))*16+"0123456789abcdef".indexOf("#ffff66".substr(6,1)),h="0123456789abcdef".indexOf("#ffffff".substr(1,1))*16+"0123456789abcdef".indexOf("#ffffff".substr(2,1)),j="0123456789abcdef".indexOf("#ffffff".substr(3,1))*16+"0123456789abcdef".indexOf("#ffffff".substr(4,1)),k="0123456789abcdef".indexOf("#ffffff".substr(5,1))*16+"0123456789abcdef".indexOf("#ffffff".substr(6,
1));i=1;r=d;g=e;for(b=f;i<=20;r=Math.round(d+i*((h-d)/19)),g=Math.round(e+i*((j-e)/19)),b=Math.round(f+i*((k-f)/19)),i++){hstr="#"+"0123456789abcdef".charAt(Math.floor(r/16))+"0123456789abcdef".charAt(r%16)+"0123456789abcdef".charAt(Math.floor(g/16))+"0123456789abcdef".charAt(g%16)+"0123456789abcdef".charAt(Math.floor(b/16))+"0123456789abcdef".charAt(b%16);setTimeout('var div = document.getElementById("'+a+'"); div.style.backgroundColor = "'+hstr+'";',i*80)}setTimeout('var div = document.getElementById("'+
a+'"); div.style.backgroundColor = "'+c+'";',(i+1)*80)};this.lang_build_string=function(){if(arguments.length&&arguments){for(var a=arguments[0],c=1;c<arguments.length;c++)a=a.replace(RegExp("<%"+c+">","gi"),arguments[c]);return a}};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,c){a=a.replace(/&amp;/g,"&");window.location.href=c?a:ipb_var_base_url+a};this.confirm_action=
function(a,c){c||(c="Для подтверждения нажмите ОК");a=a?a.replace("&amp;","&"):"";if(confirm(c))window.location.href=a;else{alert(ipb_global_lang.action_cancelled);return false}};this.pop_up_window=function(a,c,d,e){e||(e=(new Date).getTime());window.open(a.replace("&amp;","&"),e,"width="+c+",height="+d+",resizable=1,scrollbars=1,location=no,directories=no,status=no,menubar=no,toolbar=no").focus();
return false};this.set_unselectable=function(a){if(!is_ie4&&typeof a.tagName!="undefined"){if(a.hasChildNodes())for(var c=0;c<a.childNodes.length;c++)this.set_unselectable(a.childNodes[c]);a.unselectable="on"}};this.get_obj_leftpos=function(a){var c=0;if(a.offsetParent)for(;a.offsetParent;){c+=a.offsetLeft;a=a.offsetParent}else if(a.x)c+=a.x;return c};this.get_obj_toppos=function(a){var c=0;if(a.offsetParent)for(;a.offsetParent;){c+=a.offsetTop;a=a.offsetParent}else if(a.y)c+=a.y;return c};this.cancel_bubble=
function(a,c){if(c!==false)c=true;if(!a||is_ie){if(c)window.event.returnValue=false;window.event.cancelBubble=true;return window.event}else{a.stopPropagation();c&&a.preventDefault();return a}};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,c,d){domain=expire="";path="/";if(d)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+"="+c+"; path="+path+expire+domain+";";this.cookies[a]=c};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(a,c){var d=this.array_stacksize(a);a[d]=c};this.array_popstack=function(a){var c=this.array_stacksize(a),d=a[c-1];delete a[c-1];return d}}
;

