//DragResize v1.0 //(c) 2005-2006 Angus Turnbull, TwinHelix Designs http://www.twinhelix.com //Licensed under the CC-GNU LGPL, version 2.1 or later: //http://creativecommons.org/licenses/LGPL/2.1/ //This is distributed WITHOUT ANY WARRANTY; without even the implied //warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. thez=50000; if(typeof addEvent!='function'){var addEvent=function(o,t,f,l) {var d='addEventListener',n='on'+t,rO=o,rT=t,rF=f,rL=l; if(o[d]&&!l)return o[d](t,f,false); if(!o._evts)o._evts={}; if(!o._evts[t]){o._evts[t]=o[n]?{b:o[n]}:{};o[n]=new Function('e','var r=true,o=this,a=o._evts["'+t+'"],i;for(i in a){o._f=a[i];r=o._f(e||window.event)!=false&&r;o._f=null}return r'); if(t!='unload')addEvent(window,'unload',function(){removeEvent(rO,rT,rF,rL)})} if(!f._i)f._i=addEvent._i++;o._evts[t][f._i]=f};addEvent._i=1;var removeEvent=function(o,t,f,l){var d='removeEventListener'; if(o[d]&&!l)return o[d](t,f,false); if(o._evts&&o._evts[t]&&f._i)delete o._evts[t][f._i]}} function cancelEvent(e,c){e.returnValue=false; if(e.preventDefault)e.preventDefault(); if(c){e.cancelBubble=true; if(e.stopPropagation)e.stopPropagation()}}; function DragResize(myName,config){var props={myName:myName,enabled:true,handles:['br'],isElement:null,isHandle:null,element:null,handle:null,minWidth:10,minHeight:10,minLeft:0,maxLeft:9999,minTop:0,maxTop:9999,zIndex:thez,mouseX:0,mouseY:0,lastMouseX:0,lastMouseY:0,mOffX:0,mOffY:0,elmX:0,elmY:0,elmW:0,elmH:0,allowBlur:true,ondragfocus:null,ondragstart:null,ondragmove:null,ondragend:null,ondragblur:null}; //'br','bm','bl','mr','ml','tr','tm','tl' these are the handles for(var p in props)this[p]=(typeof config[p]=='undefined')?props[p]:config[p]};DragResize.prototype.apply=function(node){var obj=this;addEvent(node,'mousedown',function(e){obj.mouseDown(e)});addEvent(node,'mousemove',function(e){obj.mouseMove(e)});addEvent(node,'mouseup',function(e){obj.mouseUp(e)})};DragResize.prototype.select=function(newElement){with(this){if(!document.getElementById||!enabled)return;if(newElement&&(newElement!=element)&&enabled){element=newElement;element.style.zIndex=++thez;thez=thez+1; if(this.resizeHandleSet)this.resizeHandleSet(element,true);elmX=parseInt(element.style.left);elmY=parseInt(element.style.top)+10;elmW=element.offsetWidth;elmH=element.offsetHeight; if(ondragfocus)this.ondragfocus()}}};DragResize.prototype.deselect=function(delHandles){with(this){if(!document.getElementById||!enabled)return;if(delHandles){if(ondragblur)this.ondragblur(); if(this.resizeHandleSet)this.resizeHandleSet(element,false);element=null}handle=null;mOffX=0;mOffY=0}};DragResize.prototype.mouseDown=function(e){with(this){if(!document.getElementById||!enabled)return true;var elm=e.target||e.srcElement,newElement=null,newHandle=null,hRE=new RegExp(myName+'-([trmbl]{2})',''); while(elm){if(elm.className){if(!newHandle&&(hRE.test(elm.className)||isHandle(elm)))newHandle=elm;if(isElement(elm)){newElement=elm;break}}elm=elm.parentNode}if(element&&(element!=newElement)&&allowBlur)deselect(true); if(newElement&&(!element||(newElement==element))){if(newHandle)cancelEvent(e);select(newElement,newHandle);handle=newHandle;if(handle&&ondragstart)this.ondragstart(hRE.test(handle.className))}}}; DragResize.prototype.mouseMove=function(e){with(this){if(!document.getElementById||!enabled)return true;mouseX=e.pageX||e.clientX+document.documentElement.scrollLeft;mouseY=e.pageY||e.clientY+document.documentElement.scrollTop;var diffX=mouseX-lastMouseX+mOffX;var diffY=mouseY-lastMouseY+mOffY;mOffX=mOffY=0;lastMouseX=mouseX;lastMouseY=mouseY; if(!handle)return true;var isResize=false; if(this.resizeHandleDrag&&this.resizeHandleDrag(diffX,diffY)){isResize=true}else{var dX=diffX,dY=diffY;if(elmX+dXmaxLeft)mOffX=(dX-(diffX=maxLeft-elmX-elmW)); if(elmY+dYmaxTop)mOffY=(dY-(diffY=maxTop-elmY-elmH));elmX+=diffX;elmY+=diffY} with(element.style){left=elmX+'px';width=elmW+'px';top=elmY+'px';height=elmH+'px'} //added code if(element.id=="sitemessages") { } if(window.opera&&document.documentElement){var oDF=document.getElementById('op-drag-fix'); if(!oDF){var oDF=document.createElement('input');oDF.id='op-drag-fix';oDF.style.display='none';document.body.appendChild(oDF)}oDF.focus()}if(ondragmove)this.ondragmove(isResize);cancelEvent(e)}};DragResize.prototype.mouseUp=function(e){with(this){if(!document.getElementById||!enabled)return;var hRE=new RegExp(myName+'-([trmbl]{2})','');if(handle&&ondragend)this.ondragend(hRE.test(handle.className));deselect(false)}}; DragResize.prototype.resizeHandleSet=function(elm,show){with(this){if(!elm._handle_tr){for(var h=0;h=0){rs=1; if(elmH-dY=0){rs=1;if(elmH+dYmaxTop)mOffY=(dY-(diffY=maxTop-elmY-elmH));elmH+=diffY;processed=true}if(hClass.indexOf('l')>=0){rs=1;if(elmW-dX=0){rs=1;if(elmW+dXmaxLeft)mOffX=(dX-(diffX=maxLeft-elmX-elmW));elmW+=diffX;processed=true}return processed}}; function setdim(t,l,h,w,ch,cd) { var oXMLHttpRequest = new XMLHttpRequest; oXMLHttpRequest.open("GET", "/includes/setpop.php?t=" + t + "&l=" + l + "&h=" + h + "&w=" + w + "&ch=" + ch + "&cd=" + cd + "", true); oXMLHttpRequest.onreadystatechange = function() { if (this.readyState == XMLHttpRequest.DONE) { // alert(oXMLHttpRequest.responseText); } } oXMLHttpRequest.send(null); } function spop() { qt=parseInt(document.getElementById("youtube").style.top); ql=parseInt(document.getElementById("youtube").style.left); qh=parseInt(document.getElementById("youtube").style.height); qw=parseInt(document.getElementById("youtube").style.width); qsmch=parseInt(document.getElementById("youtube").style.height); qsmcd=document.getElementById("youtube").style.display; setdim(qt,ql,qh,qw,qsmch,qsmcd); } var ih=document.getElementById&&!document.all?window.innerHeight:document.documentElement.clientHeight; var iw=document.getElementById&&!document.all?window.innerWidth:document.documentElement.clientWidth; var ih2=ih-0; alert(iw); var dragresize = new DragResize('dragresize', { minWidth: 200, minHeight: 100, minLeft: 4, minTop: 0, maxLeft: iw, maxTop: ih2 }); dragresize.isElement = function(elm) { if (elm.className && elm.className.indexOf('drsElement') > -1) return true; }; dragresize.isHandle = function(elm) { if (elm.className && elm.className.indexOf('drsMoveHandle') > -1) return true; }; var dragonly = new DragResize('dragonly', { minWidth: 200, minHeight: 100, minLeft: 4, minTop: 0, maxLeft: iw, maxTop: ih2}); dragonly.isElement = function(elm) { if (elm.className && elm.className.indexOf('delement') > -1) return true; }; dragonly.isHandle = function(elm) { if (elm.className && elm.className.indexOf('drsMoveHandle') > -1) return true; }; dragonly.resizeHandleSet = null; dragonly.resizeHandleDrag = null; dragonly.ondragstart = function(isResize) {}; dragonly.ondragend = function(isResize) {}; dragonly.apply(document); dragresize.ondragstart = function(isResize) { //showcover(); }; dragresize.ondragmove = function(isResize) { }; dragresize.ondragend = function(isResize) {}; dragresize.apply(document); function killcover() { document.getElementById("cover").style.display="none"; } function showcover() { document.getElementById("cover").style.display="block"; } function resetdragresize() { ih=document.getElementById&&!document.all?window.innerHeight:document.documentElement.clientHeight; iw=document.getElementById&&!document.all?window.innerWidth:document.documentElement.clientWidth; ih2=ih-0; dragresize = new DragResize('dragresize', { minWidth: 200, minHeight: 100, minLeft: 4, minTop: 0, maxLeft: iw, maxTop: ih2 }); dragresize.isElement = function(elm) { if (elm.className && elm.className.indexOf('drsElement') > -1) return true; }; dragresize.isHandle = function(elm) { if (elm.className && elm.className.indexOf('drsMoveHandle') > -1) return true; }; var dragonly = new DragResize('dragonly', { minWidth: 200, minHeight: 100, minLeft: 4, minTop: 0, maxLeft: iw, maxTop: ih2}); dragonly.isElement = function(elm) { if (elm.className && elm.className.indexOf('delement') > -1) return true; }; dragonly.isHandle = function(elm) { if (elm.className && elm.className.indexOf('drsMoveHandle') > -1) return true; }; } function dosizeaaa() { iw=document.getElementById&&!document.all?window.innerWidth:document.documentElement.clientWidth; ih=document.getElementById&&!document.all?window.innerHeight:document.documentElement.clientHeight; document.getElementById("cover").style.height=ih+"px"; } function minmaxopop() { if(document.getElementById("sm-content").style.display=="block" || document.getElementById("sm-content").style.display=="") { document.getElementById("resizesmsg").style.backgroundPosition="0px -19px"; document.getElementById("sm-content").style.display="none"; document.getElementById("sm-footer").style.display="none"; document.getElementById("sitemessages").className="delement"; // document.getElementById("sitemessages").className="drsElement"; document.getElementById("sitemessages").style.height=24+"px"; } else { document.getElementById("resizesmsg").style.backgroundPosition="0px 0px"; document.getElementById("sm-content").style.display="block"; document.getElementById("sm-footer").style.display="block"; document.getElementById("sitemessages").className="drsElement"; cheight=parseInt(document.getElementById("sm-content").style.height); document.getElementById("sitemessages").style.height=cheight+44+"px"; } spop(); } function donot(){null;}