function DDO(){this.items=new Array;this.draggingItem=false;this.mouseY;this.mouseX;this.maxZindex=159;this.mousedown=DDOmousedown;this.mousemove=DDOmousemove;this.mouseup=DDOmouseup;this.selectstart=DDOselectstart;}function DDOmousedown(_1){if(ddo.draggingItem){return false;}var e=(document.all)?event:_1;var _3=(e.button)?e.button:e.which;if(_3==1){var _4=(document.all)?e.srcElement:e.target;for(var i in ddo.items){if(ddo.items[i].id==_4.id){ddo.draggingItem=ddo.items[i];ddo.draggingItem.top=parseInt(ddo.draggingItem.getDOMobj().offsetTop);ddo.draggingItem.left=parseInt(ddo.draggingItem.getDOMobj().offsetLeft);ddo.maxZindex++;ddo.draggingItem.redraw(ddo.maxZindex);break;}}}}function DDOmousemove(_6){var e=(document.all)?event:_6;if(ddo.draggingItem){if(ddo.mouseX||ddo.mouseY){var dx=e.clientX-ddo.mouseX;var dy=e.clientY-ddo.mouseY;ddo.draggingItem.top+=dy;ddo.draggingItem.left+=dx;ddo.draggingItem.redraw(ddo.maxZindex);}ddo.mouseX=e.clientX;ddo.mouseY=e.clientY;}e.cancelBubble=true;}function DDOmouseup(){if(ddo.draggingItem){if(ddo.draggingItem.userReleaseFunction){ddo.draggingItem.userReleaseFunction();}ddo.draggingItem=false;ddo.mouseX=null;ddo.mouseY=null;}}function DDOselectstart(){if(ddo.draggingItem){return false;}}var ddo=new DDO();if(document.all){document.onmousedown=ddo.mousedown;document.onmousemove=ddo.mousemove;document.onmouseup=ddo.mouseup;document.onselectstart=ddo.selectstart;}else{window.captureEvents(Event.MOUSEDOWN|Event.MOUSEMOVE|Event.MOUSEUP|Event.SELECTSTART);window.onmousedown=ddo.mousedown;window.onmousemove=ddo.mousemove;window.onmouseup=ddo.mouseup;window.onselectstart=ddo.selectstart;}function DDOitem(id,_b,_c,_d,_e){this.id=id;this.zIndex=(_c)?_c:null;this.top;this.left;this.userRange=_b;this.range;this.userMoveFunction=(_d)?_d:null;this.userReleaseFunction=(_e)?_e:null;this.getRange=DDOitemGetRange;this.redraw=DDOitemRedraw;this.getDOMobj=new Function("return document.getElementById(this.id)");ddo.items.push(this);this.getDOMobj().ondragstart=new Function("return false");}function DDOitemGetRange(){if(!this.range){if(this.userRange){this.range=this.userRange;}else{this.range="0,0, "+parseInt((window.innerWidth>0)?window.innerWidth:document.body.clientWidth)+","+parseInt((window.innerHeight>0)?window.innerHeight:document.body.clientHeight);}this.range=this.range.replace(/\s/,"");}return this.range;}function DDOitemRedraw(_f){try{var _10=this.getRange().split(";");var _11=true;var _12=true;var _13=parseInt(this.getDOMobj().offsetWidth);var _14=parseInt(this.getDOMobj().offsetHeight);for(var i in _10){if(_10[i]!=""){var _16=_10[i].split(",");_11=!(this.left>=_16[0]&&this.left+_13<=_16[2]);_12=!(this.top>=_16[1]&&this.top+_14<=_16[3]);if(_11&&_12){break;}}}if(!_11){this.getDOMobj().style.left=this.left+"px";}if(!_12){this.getDOMobj().style.top=this.top+"px";}if(!this.zIndex){this.getDOMobj().style.zIndex=_f;}if(this.userMoveFunction){this.userMoveFunction();}}catch(e){window.status="вероятно, область видимости задана неправильно";}}function Slider(){this.width=185;this.from=50;this.to=80;this.variants=12;this.defaultFsize=63;this.defaultOffset=57;this.doMove=SliderDoMove;this.doRelease=SliderDoRelease;this.init=SliderInit;this.init();}function SliderInit(){new DDOitem("slider","12,-1, 197,16",1,this.doMove,this.doRelease);var _1=(getCookie("percent"))?getCookie("percent"):this.defaultFsize;var _2=(getCookie("offset"))?getCookie("offset"):this.defaultOffset;document.getElementById("slider").style.left=(_2-8)+"px";document.body.style.fontSize=_1+"%";}function SliderDoMove(){var _3=slider.width;var _4=slider.from;var to=slider.to;var _6=slider.variants;var _7=8+parseInt(document.getElementById("slider").offsetLeft);var _8=parseInt(document.getElementById("slider").offsetTop);var _9=parseInt(_7*_6/(_3+1))*(to-_4)/(_6-1)+_4;setCookie("percent",_9);setCookie("offset",_7);document.body.style.fontSize=_9+"%";document.body.style.cursor="e-resize";}function SliderDoRelease(){document.body.style.cursor="";}function setCookie(_1,_2,_3){if(_3>0){var _4=new Date();_4.setTime(_4.getTime()+_3*1000*60*60);var _5=_4.toGMTString();document.cookie=_1+"="+escape(_2)+"; path="+escape("/")+"; expires="+_5;}else{document.cookie=_1+"="+escape(_2)+"; path="+escape("/")+"";}}function getCookie(_6){var _7=document.cookie;if(!_7||_7==""){return "";}_7=_7.split(";");var i=0;var _9;while(i<_7.length){_9=_7[i].split("=")[0];if(_9.charAt(0)==" "){_9=_9.substring(1);}if(_9==_6){return unescape(_7[i].split("=")[1]);}i++;}return "";}function getElementbyClass(ro,_2){var _3=new Array();var _4=0;for(i=0;i<ro.length;i++){if(ro[i].className==_2){_3[_4++]=ro[i];}}return _3;}function edit(){var _5="<form method=\"post\" action=\"\" id=\""+this.id+"_form\"><div class=\"gfrm\">\ufffd\ufffd\ufffd\ufffd:<br><input type=\"text\" name=\"subject\" size=\"10\" style=\"width: 220px\" class=\"border\" value=\"\"><br>"+"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd:<br><textarea name=\"message\" rows=\"6\" cols=\"10\" style=\"width: 350px;height:120px\" class=\"border\"></textarea>"+"<P align=\"right\"><a href=\"#\" onclick=\"if(!this.form.author.value){alert('\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd \ufffd\ufffd\ufffd\ufffd &quot;\ufffd\ufffd\ufffd\ufffd\ufffd&quot;');return false;}elseif(!this.form.message.value){alert('\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd \ufffd\ufffd\ufffd\ufffd &quot;\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd&quot;');return false;}else{this.form.submit();}\">\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd</a> <a href=\"#\" onclick=\"cancel('"+this.id+"')\">\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd</a></P></div></form>";var y=document.createElement("span");var z=this.parentNode;y.innerHTML=_5;z.insertBefore(y,this);this.style.display="none";return false;}function cancel(id){var _9=document.getElementById(id+"_form");var z=_9.parentNode;z.removeChild(_9);document.getElementById(id).style.display="";}function eleminit(id){alert(id);var _c=document.getElementById(id);_c.onclick=edit;}