function getRootFolder() { setTimeout("pages()",500); } function $(id) { return document.getElementById(id) } function pages(){ var oBox = $("content"), oTop = $("content_inner"), oBottom = $("side"), oLine = $("line"); oLine.onmousedown = function(e) { var disX = (e || event).clientX; oLine.left = oLine.offsetLeft; document.onmousemove = function(e) { var iT = oLine.left + ((e || event).clientX - disX); var e=e||window.event,tarnameb=e.target||e.srcElement; var maxT = oBox.clientWight - oLine.offsetWidth; oLine.style.margin = 0; iT < 0 && (iT = 0); iT > maxT && (iT = maxT); oLine.style.left = oTop.style.width = iT -8+ "px"; oBottom.style.width = oBox.clientWidth - iT-8 + "px"; // $("msg").innerText='top.width:'+oLine.style.width+'---bottom.width:'+oBottom.style.width+'---oLine.offsetLeft:'+oLine.offsetLeft+'---disX:'+disX+'---tarnameb:'+tarnameb.tagName; return false }; document.onmouseup = function() { document.onmousemove = null; document.onmouseup = null; oLine.releaseCapture && oLine.releaseCapture() }; oLine.setCapture && oLine.setCapture(); return false }; };