var cmsSlider;function ScaleIt(_1,_2){$(_1).style.width=(_2*100).toFixed()+"%";}function ContentEditorUpdateRulePosition(_3){if(cmsSlider){last_slider_value=100*cmsSlider.value;last_slider_value=last_slider_value.toFixed();url="update_cms_ruler_position.php?ruler_value="+last_slider_value;new Ajax.Request(url,{method:"get",onSuccess:function(_4){return _4.responseText;}});}}function ContentEditorSetWide(_5){cnt_div="mig_doc_content";rul_div="mig_doc_ruler";sld_div="mig_doc_handle";if(!last_slider_value){last_slider_value=1;}if(_5){Event.stop(_5);}if(!$(cnt_div)){return;}var _6=(last_slider_value/100);$(cnt_div).style.width=last_slider_value.toFixed()+"%";$(rul_div).setStyle({width:"100%",height:"18px",margin:"0 0 6px 0",background:"#FFFFE1 url(./images/ruler.png) no-repeat",border:"1px solid #CCC"});$(rul_div).update("<div id=\""+sld_div+"\" style=\"width: 18px; height: 18px;\"><img src=\"./images/handle.gif\"/></div>");cmsSlider=new Control.Slider(sld_div,rul_div,{axis:"horizontal",alignX:-10,increment:1,sliderValue:_6});cmsSlider.options.onSlide=function(_7){ScaleIt(cnt_div,_7);};cmsSlider.options.onChange=function(_8){ScaleIt(cnt_div,_8);};}function ManageColorPicker(_9){if(fmk_http_path==""){alert("Missing fmk_http_path js var for migeditor.js:ManageColorPicker");return "";}else{[0,4,21,24,27,30].each(function(_a){new Control.ColorPicker(_9+_a,{IMAGE_BASE:fmk_http_path+"Plugins/ScriptAculous/colorimages/"});});}}function GetObjectPosition(_b){var _c={x:0,y:0};if(_b){while(_b!=document.body&&_b!=null){_c.y+=_b.offsetTop;_c.x+=_b.offsetLeft;_b=_b.offsetParent;}}return _c;}function MIG_GetCookie(_d){var _e=document.cookie.indexOf(_d+"=");var _f=_e+_d.length+1;if((!_e)&&(_d!=document.cookie.substring(0,_d.length))){return null;}if(_e==-1){return null;}var end=document.cookie.indexOf(";",_f);if(end==-1){end=document.cookie.length;}return unescape(document.cookie.substring(_f,end));}function MIG_SetCookie(_11,_12,_13,_14,_15,_16){var _17=new Date();_17.setTime(_17.getTime());if(_13){_13=_13*365*60*60*24;}var _18=new Date(_17.getTime()+(_13));document.cookie=_11+"="+escape(_12)+((_13)?";expires="+_18.toGMTString():"")+((_14)?";path="+_14:"")+((_15)?";domain="+_15:"")+((_16)?";secure":"");}function MIG_DeleteCookie(_19,_1a,_1b){if(MIG_GetCookie(_19)){document.cookie=_19+"="+((_1a)?";path="+_1a:"")+((_1b)?";domain="+_1b:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT";}}function SetObjectSizeAndPosition(_1c,_1d,_1e){var _1f={x:0,y:0,w:0,h:0};if((!_1c.style.position)||_1c.style.position!="absolute"){_1f.w=_1c.style.width;_1f.h=_1c.style.height;_1f.x=_1c.style.left;_1f.y=_1c.style.top;_1c.style.position="absolute";_1c.style.width=_1e.w;_1c.style.height=_1e.h;_1c.style.left=_1e.x;_1c.style.top=_1e.y;_1c.style.zIndex=3;_1c.style.backgroundColor="#F0F0F0";}else{_1c.style.position="relative";_1c.style.width=_1f.w;_1c.style.height=_1f.h;_1c.style.left=_1f.x;_1c.style.top=_1f.y;_1c.style.zIndex=3;_1c.style.backgroundColor=transparent;}return _1f;}