87,921
社区成员
发帖
与我相关
我的任务
分享
){Iframe=document.createElement("iframe");Iframe.className="divIframe";l.appendChild(Iframe)};Bar=document.createElement("div");Bar.className="divBar";if(b){Bar.innerText=this.title}else{Bar.textContent=this.title};Bar.onmousedown=w;Bar.onmousemove=x;Bar.onmouseup=y;Bar.ondblclick=z;Bar.onselectstart=function(){return false};l.appendChild(Bar);Change=document.createElement("img");Change.className="divChange";Change.onclick=u;l.appendChild(Change);Close=document.createElement("img");Close.className="divClose";Close.onclick=function(){l.style.display='none'};l.appendChild(Close);Content=document.createElement("div");Content.className="divContent";Content.innerHTML=this.content;l.appendChild(Content);ReSize=document.createElement("div");ReSize.className="divReSize";ReSize.onmousedown=w;ReSize.onmousemove=x;ReSize.onmouseup=y;ReSize.style.fontSize='12px';ReSize.style.color='#FFFFFF';ReSize.innerHTML="by:guodong828 <a href='http://hi.baidu.com/guodong828/' style='color:#FFFFFF;text-decoration:None;'>http://hi.baidu.com/guodong828 </a>";l.appendChild(ReSize);Grip=document.createElement("div");Grip.className="divGrip";Grip.onmousedown=function(){NewSize=document.createElement("div");NewSize.className="divNewSize";NewSize.style.zIndex=zindex+1;NewSize.style.left=l.style.left;NewSize.style.top=l.style.top;NewSize.style.width=l.style.width;NewSize.style.height=l.style.height;NewSize.onmouseup=function(a){l.style.width=NewSize.style.width;l.style.height=NewSize.style.height;Content.style.height=A();if(b){NewSize.releaseCapture()}else{document.removeEventListener("mousemove",NewSize.onmousemove,true)};document.body.removeChild(NewSize)};NewSize.onmousemove=function(a){if(!b){q=parseInt(a.pageX)-parseInt(l.style.left);height=parseInt(a.pageY)-parseInt(l.style.top)}else{q=parseInt(event.clientX)-parseInt(l.style.left);height=parseInt(event.clientY)-parseInt(l.style.top)};if(q>o){NewSize.style.width=q+'px'}else{q=o};if(height>p){NewSize.style.height=height+'px'}else{height=p}};document.body.appendChild(NewSize);if(b){NewSize.setCapture()}else{document.addEventListener("mousemove",NewSize.onmousemove,true)}};l.appendChild(Grip);document.body.appendChild(l);this.Window=l;Content.style.height=A();B()};var t=function(){if(parseInt(l.style.zIndex) <zindex){zindex++;l.style.zIndex=zindex}};var u=function(){if(!e){i=l.style.height;l.style.height=n;Change.src=r+"max.gif";e=true}else{l.style.height=i;Change.src=r+"min.gif";e=false};t();v()};var v=function(){if(e){Content.style.display='none';ReSize.style.display='none';Grip.style.display='none';if(b){Iframe.style.display='none'}}else{Content.style.display='';ReSize.style.display='';if(!d){Grip.style.display=''};if(b){Iframe.style.display=''}}};var w=function(a){if(!d){if(!b){f=parseInt(a.pageX)-parseInt(l.style.left);g=parseInt(a.pageY)-parseInt(l.style.top);document.addEventListener("mousemove",x,true)}else{Bar.setCapture();f=parseInt(event.clientX)-parseInt(l.style.left);g=parseInt(event.clientY)-parseInt(l.style.top)};c=true}};var x=function(a){if(c){Bar.style.cursor='move';ReSize.style.cursor='move';if(!b){l.style.left=(a.pageX-f)+'px';l.style.top=(a.pageY-g)+'px'}else{l.style.left=(event.clientX-f)+'px';l.style.top=(event.clientY-g)+'px'};if(!b&&parseInt(l.style.top) <0){l.style.top='0px';c=false;Bar.style.cursor='pointer'}}};var y=function(){if(!b){document.removeEventListener("mousemove",x,true)}else{Bar.releaseCapture()};Bar.style.cursor='pointer';ReSize.style.cursor='pointer';if(parseInt(l.style.top) <0){l.style.top='0px'};if(parseInt(l.style.left) <0){l.style.left='0px'};c=false};var z=function(){if(d){document.body.style.overflowY='auto';if(b){document.body.onmousewheel=function(){return true};document.body.onselectstart=function(){return true}};l.style.width=h;l.style.height=i;l.style.left=j;l.style.top=k;Grip.style.display='';Change.style.display='';d=false;Content.style.height=A();if(maxWins.length>0){maxWins.splice(0,1)}}else{if(!e){document.body.style.overflowY='hidden';if(b){document.body.onmousewheel=function(){return false};document.body.onselectstart=function(){return false}};maxWidth=b?document.body.clientWidth:(document.body.clientWidth-2);maxHeight=b?document.body.clientHeight:(document.body.clientHeight-2);h=l.style.width;i=l.style.height;j=l.style.left;k=l.style.top;l.style.width=maxWidth+'px';l.style.height=maxHeight+'px';l.style.left=document.body.scrollLeft+'px';l.style.top=document.body.scrollTop+'px';Grip.style.display='none';Change.style.display='none';d=true;Content.style.height=A();maxWins.push(s)}}};var A=function(){return parseInt(l.style.height)-m+'px'};var B=function(){switch(skin){case"blue":r="skin/"+skin+"/";border_color="#0171BB";break;case"red":r="skin/"+skin+"/";border_color="#E31A20";break;case"green":r="skin/"+skin+"/";border_color="#50B849";break;case"gray":r="skin/"+skin+"/";border_color="#AAAAAA";break;default:r="skin/blue/";border_color="#0171BB";break};if(!b)l.style.border=border_color+" 1px solid";Content.style.borderLeft=border_color+" 1px solid";Content.style.borderRight=border_color+" 1px solid";Bar.style.backgroundImage="url("+r+"title.gif)";ReSize.style.backgroundImage="url("+r+"bottom.gif)";Grip.style.backgroundImage="url("+r+"grip.gif)";Change.src=r+"min.gif";Close.src=r+"close.gif"};this.changeMaxWinSize=function(){document.body.style.overflowY='hidden';maxWidth=b?document.body.clientWidth:(document.body.clientWidth-2);maxHeight=b?document.body.clientHeight:(document.body.clientHeight-2);l.style.width=maxWidth+'px';l.style.height=maxHeight+'px';Content.style.height=A()}}
document.writeln(' <style type="text/css">');document.writeln('body {margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;overflow-x:hidden;}');document.writeln('.divWindow{position:absolute;background-color:#FFFFFF;overflow:hidden;}');document.writeln('.divBar{position:absolute;top:0px;left:0px;width:100%;height:17px;line-height:17px;color:#FFFFFF;letter-spacing:2px;');document.writeln('font-size:12px;overflow:hidden;cursor:pointer;text-indent:10px;-moz-user-select:none}');document.writeln('.divChange{position:absolute;right:17px;cursor:pointer;-moz-user-select:none}');document.writeln('.divClose{position:absolute;right:0px;cursor:pointer;-moz-user-select:none}');document.writeln('.divContent{position:absolute;width:100%;top:17px;left:0px;background-color:#FFFFFF;border-width:0px!important;font-size:12px;');document.writeln('border-width:1px;overflow: auto;');document.writeln('SCROLLBAR-BASE-COLOR: #FFFFFF;SCROLLBAR-ARROW-COLOR: #999999;SCROLLBAR-FACE-COLOR: #EEEEEE;SCROLLBAR-HIGHLIGHT-COLOR: #EEEEEE;');document.writeln('SCROLLBAR-SHADOW-COLOR: #EEEEEE;SCROLLBAR-3DLIGHT-COLOR: #FFFFFF;SCROLLBAR-TRACK-COLOR: #FFFFFF;SCROLLBAR-DARKSHADOW-COLOR: #CCCCCC;}');document.writeln('.divReSize{position:absolute;left:0px;bottom:0px;height:13px;width:100%;overflow:hidden;cursor:pointer;text-indent:15px;}');document.writeln('.divGrip{position:absolute;right:0px;bottom:0px;width:17px;height:13px;cursor:nw-resize;overflow:hidden;}');document.writeln('.divIframe{height:100%;width:100%;}');document.writeln('.divNewSize{ position:absolute;border: #006600 1px solid;cursor:nw-resize; background-color:#0066FF;filter:alpha(opacity=10);-moz-opacity:.10;}');document.writeln(' </style>');var zindex;var maxWidth,maxHeight;var maxWins=new Array();window.onresize=function(){if(maxWins.length>0){maxWins[0].changeMaxWinSize()}};function dragClass(){var b=document.all?true:false;var c;var d;var e;var f;var g;var h;var i;var j;var k;var l,Bar,Title,Change,Close,Content,ReSize,Grip,Iframe,NewSize;var m=17+13;var n=17+'px';var o=100;var p=100;var q,height;var r,border_color,skin;var s;this.create=function(){zindex=(zindex==undefined)?1:zindex+1;c=false;d=false;e=false;skin=this.skin;s=this;l=document.createElement("div");l.className="divWindow";l.style.zIndex=zindex;l.style.left=this.left+'px';l.style.top=this.top+'px';l.style.width=this.width+'px';l.style.height=this.height+'px';l.onmousedown=t;if(b