//====================================================
//整合部分代码
var issc=true;
var mphelper_x=(screen.width)/2-438/2;
var mphelper_y=220;
var mphelper_width=439;
var mphelper_height=161;
var hcontent="<table width=\"439\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><img src=\"images/msgtop.gif\" width=\"439\" height=\"28\" /></td></tr><tr><td><img src=\"images/msg1.gif\" width=\"439\" height=\"91\" /></td></tr><tr><td><img src=\"images/msg2.gif\" width=\"112\" height=\"25\" /><img src=\"images/msg3.gif\" style=\"cursor:pointer;\" onclick=\"javascript:window.open('DszsGbAddNewArticle.aspx','newwindow','height=600,width=600,top=110,left=220,toolbar=no,menubar=no,scrollbars=yes,resizable=no, location=no,status=no');\" width=\"78\" height=\"25\" /><img src=\"images/msg4.gif\" style=\"cursor:pointer;\" onclick=\"javascript:window.open('DszsGbAddNewTopic.aspx','newwindow','height=435,width=588,top=110,left=220,toolbar=no,menubar=no,scrollbars=no,resizable=no, location=no,status=no');\" width=\"81\" height=\"25\" /><img src=\"images/msg5.gif\" style=\"cursor:pointer;\" onclick=\"showpage('"+url[10]+"')\" width=\"80\" height=\"25\" /><img src=\"images/msg6.gif\" width=\"68\" height=\"25\" style=\"cursor:pointer;\" onclick=\"closehelp()\" /><img src=\"images/msg8.gif\" width=\"20\" height=\"25\" /></td></tr><tr><td><img src=\"images/msg7.gif\" width=\"439\" height=\"15\" /></td></tr></table>";
function setover()
{
	issc=false;
}
function setout()
{
	mphelper_x=document.getElementById("mbhelper").offsetLeft-document.body.scrollLeft;
	mphelper_y=document.getElementById("mbhelper").offsetTop-document.body.scrollTop;
	issc=true;
}
//====================================================
//滚动部分代码
	function floaters()
	{
		document.write('<DIV onmousedown=setover() onmouseup=setout() id=mbhelper style="cursor:move;Z-INDEX: 10; POSITION: absolute;  width:'+mphelper_width+'px; height:'+mphelper_height+'px;left:'+(typeof(mphelper_x)=='string'?eval(mphelper_x):mphelper_x)+';top:'+(typeof(mphelper_y)=='string'?eval(mphelper_y):mphelper_y)+'">'+hcontent+'</DIV>');
	}
//=================================================================================================
//拖动部分代码
//本部分代码来自方正确然视频点播系统
function over(){event.srcElement}
function out(){event.srcElement}
document.onmouseover=over;
document.onmouseout=out;
function showIt(){
		dypopLayer.className=popStyle;
		dypopLayer.innerHTML=sPop;
		popWidth=dypopLayer.clientWidth;
		popHeight=dypopLayer.clientHeight;
		if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
			else popLeftAdjust=0;
		if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
			else popTopAdjust=0;
		dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
		dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
		dypopLayer.style.filter="Alpha(Opacity=0)";
		fadeOut();
}

function fadeOut(){
	if(dypopLayer.filters.Alpha.opacity<popOpacity) {
		dypopLayer.filters.Alpha.opacity+=showPopStep;
		tFadeOut=setTimeout("fadeOut()",1);
		}
		else {
			dypopLayer.filters.Alpha.opacity=popOpacity;
			tFadeWaiting=setTimeout("fadeIn()",tPopShow);
			}
}

function fadeIn(){
	if(dypopLayer.filters.Alpha.opacity>0) {
		dypopLayer.filters.Alpha.opacity-=1;
		tFadeIn=setTimeout("fadeIn()",1);
		}
}
	self.onError=null;
	currentX = currentY = 0;  
	whichIt = null;           
	lastScrollX = 0; lastScrollY = 0;
	NS = (document.layers) ? 1 : 0;
	IE = (document.all) ? 1: 0;
	function heartBeat()
	{
		
	}
	function checkFocus(x,y) { 
	        stalkerx = document.mbhelper.pageX;
	        stalkery = document.mbhelper.pageY;
	        stalkerwidth = document.mbhelper.clip.width;
	        stalkerheight = document.mbhelper.clip.height;
	        if( (x > stalkerx && x < (stalkerx+stalkerwidth)) && (y > stalkery && y < (stalkery+stalkerheight))) return true;
	        else return false;}
	function grabIt(e) {
		if(IE) {
			whichIt = event.srcElement;
			while (whichIt.id.indexOf("mbhelper") == -1) {
				whichIt = whichIt.parentElement;
				if (whichIt == null) { return true; } }
			whichIt.style.pixelLeft = whichIt.offsetLeft;
		    whichIt.style.pixelTop = whichIt.offsetTop;
			currentX = (event.clientX + document.body.scrollLeft);
	   		currentY = (event.clientY + document.body.scrollTop); 	
		} else { 
	        window.captureEvents(Event.MOUSEMOVE);
	        if(checkFocus (e.pageX,e.pageY)) { 
	                whichIt = document.mbhelper;
	                StalkerTouchedX = e.pageX-document.mbhelper.pageX;
	                StalkerTouchedY = e.pageY-document.mbhelper.pageY;} }
	    return true;	}
	function moveIt(e) {
		if (whichIt == null) { return false; }
		if(IE) {
		    newX = (event.clientX + document.body.scrollLeft);
		    newY = (event.clientY + document.body.scrollTop);
		    distanceX = (newX - currentX);    distanceY = (newY - currentY);
		    currentX = newX;    currentY = newY;
		    whichIt.style.pixelLeft += distanceX;
		    whichIt.style.pixelTop += distanceY;
			if(whichIt.style.pixelTop < document.body.scrollTop) whichIt.style.pixelTop = document.body.scrollTop;
			if(whichIt.style.pixelLeft < document.body.scrollLeft) whichIt.style.pixelLeft = document.body.scrollLeft;
			if(whichIt.style.pixelLeft > document.body.offsetWidth - document.body.scrollLeft - whichIt.style.pixelWidth - 24) whichIt.style.pixelLeft = document.body.offsetWidth - whichIt.style.pixelWidth - 24;
			if(whichIt.style.pixelTop > document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5) whichIt.style.pixelTop = document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5;
			event.returnValue = false;
		} else { 
			whichIt.moveTo(e.pageX-StalkerTouchedX,e.pageY-StalkerTouchedY);
	        if(whichIt.left < 0+self.pageXOffset) whichIt.left = 0+self.pageXOffset;
	        if(whichIt.top < 0+self.pageYOffset) whichIt.top = 0+self.pageYOffset;
	        if( (whichIt.left + whichIt.clip.width) >= (window.innerWidth+self.pageXOffset-17)) whichIt.left = ((window.innerWidth+self.pageXOffset)-whichIt.clip.width)-17;
	        if( (whichIt.top + whichIt.clip.height) >= (window.innerHeight+self.pageYOffset-17)) whichIt.top = ((window.innerHeight+self.pageYOffset)-whichIt.clip.height)-17;
	        return false;}
	    return false;	}
	function dropIt() {whichIt = null;
	    if(NS) window.releaseEvents (Event.MOUSEMOVE);
	    return true;	}
	if(NS) {window.captureEvents(Event.MOUSEUP|Event.MOUSEDOWN);
		window.onmousedown = grabIt;
	 	window.onmousemove = moveIt;
		window.onmouseup = dropIt;	}
	if(IE) {
		document.onmousedown = grabIt;
	 	document.onmousemove = moveIt;
		document.onmouseup = dropIt;	}
	if(NS || IE) action = window.setInterval("heartBeat()",1);
function closehelp()
{
	document.body.removeChild(document.getElementById("mbhelper"));
}