ulm_drag=new Object();ulm_drag.floats=new Object();if(window.attachEvent)window.attachEvent("onload",imenus_drag_init);else  if(window.addEventListener)window.addEventListener("load",imenus_drag_init,1);;function imenus_drag_init(){if(ulm_drag.no)return;if(dc=document.cookie){dc=dc.split(";");for(var i=0;i<dc.length;i++){var tval=dc[i].split("=");if((tval.length>1)&&(tval[0].indexOf("imdrag")+1)){tval=tval[1].split(":");for(var j=0;j<tval.length;j++){var vals=tval[j].split("|");if(dobj=document.getElementById(vals[0])){imenus_drag_floatit(dobj,1);dobj.style.left=vals[1];dobj.style.top=vals[2];}ulm_drag.floats[vals[0]]=vals[0]+"|"+vals[1]+"|"+vals[2];}}}}};function imenus_drag_evts(a,dto){if(ulm_drag.no=(ulm_safari||ulm_navigator||ulm_iemac||window.name=="imopenmenu"||window.name=="hta"))return;dto.hide_focus_box=1;a.onmousedown=function(event){event=event||window.event;ulm_drag.go=false;ulm_drag.moved=false;ulm_drag.mdown=1;ulm_drag.prev_x=event.screenX;ulm_drag.prev_y=event.screenY;ulm_drag.orig_x=event.screenX;ulm_drag.orig_y=event.screenY;if(this.style.position!="absolute")ulm_drag.from_menu=1;else ulm_drag.from_menu=false;ulm_drag.obj=this;ulm_drag.container=document.getElementById("imenus"+this.id.substring(6,this.id.indexOf(x43)));if(ulm_drag.container)ulm_drag.container=ulm_drag.container.parentNode;ulm_drag.cxy=x27(ulm_drag.container);ulm_drag.savez=ulm_drag.container.style.zIndex;ulm_drag.container.style.zIndex=9999999;imenus_drag_kille(event);return 1;};a.onmouseup=function(event){event=event||window.event;ulm_drag.mdown=false;if(ulm_ie)ulm_drag.obj.releaseCapture();if(document.removeEventListener)document.removeEventListener("mousemove",imenus_drag_fixcapture,false);var xdif=ulm_drag.orig_x-event.screenX;var ydif=ulm_drag.orig_y-event.screenY;if((ulm_drag.onmain)||(ulm_drag.from_menu&&Math.abs(xdif)<30&&Math.abs(ydif)<30&&ulm_drag.moved)){imenus_drag_record(this,1);if(wd=document.getElementById("impb"+this.id))this.removeChild(wd);if(ulm_ie)this.detachEvent("onmouseover",imenus_drag_kille);else this.removeEventListener("mouseover",imenus_drag_kille,false);this.className=this.className.replace("impbcontainer","");this.className=this.className.replace("ishow","");this.getElementsByTagName("A")[0].className="";this.style.position="";this.style.zIndex="";this.style.visibility="";this.style.width="";this.style.top="";this.style.left="";ulm_drag.onmain=false;}else imenus_drag_record(a);ulm_drag.container.style.zIndex=ulm_drag.container.savez;};a.onmousemove=function(event){event=event||window.event;if(ulm_drag.obj&&(ulm_drag.obj.id==this.id))imenus_drag_mmove(event,this);if(this.style.position=="absolute")imenus_drag_kille(event);};};function imenus_drag_record(obj,remove){if(obj.style.position=="absolute"){if(remove)ulm_drag.floats[obj.id]=null;else ulm_drag.floats[obj.id]=obj.id+"|"+obj.style.left+"|"+obj.style.top;var val="";for(var i in ulm_drag.floats){if(ulm_drag.floats[i])val+=ulm_drag.floats[i]+":";}val=val.substring(0,val.length-1);document.cookie="imdrag="+val+";expires=Fri,3 Aug 2050 20:47:11 UTC;path=/";}};function imenus_drag_mmove(event,x18){if(ulm_drag.mdown){if(ulm_ie)ulm_drag.obj.setCapture(1);var xdif=ulm_drag.prev_x-event.screenX;var ydif=ulm_drag.prev_y-event.screenY;if(!ulm_drag.go&&Math.abs(xdif)<5&&Math.abs(ydif)<10)return;else ulm_drag.go=1;if((x18.style.position!="absolute"))imenus_drag_floatit(x18);x18.style.left=(x18.offsetLeft-xdif)+"px";x18.style.top=(x18.offsetTop-ydif)+"px";ulm_drag.prev_x=event.screenX;ulm_drag.prev_y=event.screenY;ulm_drag.moved=1;var cxy=ulm_drag.cxy;var txy=x27(x18);var ow=ulm_drag.container.offsetWidth;var oh=ulm_drag.container.offsetHeight;if((txy[0]>cxy[0]-x18.offsetWidth)&&(txy[0]<cxy[0]+ow)&&(txy[1]>cxy[1]-x18.offsetHeight)&&(txy[1]<cxy[1]+oh)){ulm_drag.onmain=1;if(wd=document.getElementById("impb"+x18.id))wd.style.visibility="visible";}else {ulm_drag.onmain=false;if(wd=document.getElementById("impb"+x18.id))wd.style.visibility="hidden";}}};function imenus_drag_styles(id,dto){rval="#imenus"+id+" .implusbutton{top:-16px;font-family:Arial;font-size:12px;color:#ff0000;visibility:hidden;position:absolute;top:"+dto.dd_plus_button_offsety+"px;"+dto.dd_plus_button_styles+"}";rval+="#imenus"+id+" .impbcontainer{background-color:#ffffff;padding:1px;border-style:dashed;border-width:1px;"+dto.dd_item_container_styles+"}";return rval;};function imenus_drag_floatit(x18,is_init){ulm_mglobal.floated=1;x18.style.width=x18.parentNode.offsetWidth+"px";x18.style.position="absolute";x18.style.zIndex="9999";x18.style.visibility="visible";x18.className=x18.className+" impbcontainer";pdiv=document.createElement("DIV");pdiv.id="impb"+x18.id;pdiv.innerHTML="+";pdiv.className="implusbutton";pdiv=x18.appendChild(pdiv);at=x18.getElementsByTagName("A")[0];at.onclick=function(event){event=event||window.event;if(ulm_drag.moved){imenus_drag_kille(event);return false;}};if(ulm_ie)x18.attachEvent("onmouseover",imenus_drag_kille);else x18.addEventListener("mouseover",imenus_drag_kille,false);if(!ulm_ie&&document.addEventListener&&!is_init)document.addEventListener("mousemove",imenus_drag_fixcapture,1);};function imenus_drag_fixcapture(event){imenus_drag_mmove(event,ulm_drag.obj);};function imenus_drag_kille(event){event.cancelBubble=1;if(event.preventDefault)event.preventDefault();if(event.stopPropagation)event.stopPropagation();}