var dragDrop=function(){function e(s,q,r){if(s.addEventListener){s.addEventListener(q,r,false)}else{if(s.attachEvent){s.attachEvent("on"+q,r)}}}function k(s,q,r){if(s.removeEventListener){s.removeEventListener(q,r,false)}else{if(s.detachEvent){s.detachEvent("on"+q,r)}}}var m,p,n,i,g,d,a,o;function b(r,q,s){if(typeof r=="string"){r=document.getElementById(r)}r.onmousedown=h;a=q;o=s}function h(r){f(this);var q=r||window.event;p=q.clientX;n=q.clientY;e(document,"mousemove",c);e(document,"mouseup",j);return false}function f(q){if(d){j()}i=q.offsetLeft;g=q.offsetTop;d=q;q.className+=" dragged";m=q.style.zIndex;q.style.zIndex="2000";sa.my_PickFunc(q)}function c(t){var s=t||window.event,r=s.clientX-p,q=s.clientY-n;l(r,q);return false}function l(r,q){d.style.left=i+r+"px";d.style.top=g+q+"px"}function j(){k(document,"mousemove",c);k(document,"mouseup",j);d.className=d.className.replace(/dragged/,"");d.style.zIndex=m;sa.my_DropFunc(d);d=null}return{initElement:b,addEventSimple:e,removeEventSimple:k,sudokuarena:"(c)sudokuarena.com"}}();
