var PopUp_zIndex=0;
var PopUp_Active=null;
var PopUp_IE5=(document.getElementById && document.all)? true : false;
var PopUp_W3C=(document.getElementById)? true: false;

function PopUp_TrackMouse(evt) {
	if(PopUp_Active!=null) {
		var x=(PopUp_IE5)? event.clientX+document.body.scrollLeft : evt.pageX;
		var y=(PopUp_IE5)? event.clientY+document.body.scrollTop : evt.pageY;
		PopUp_Active.style.left=x + PopUp_Active.xOffset + 'px';
		PopUp_Active.style.top=y + PopUp_Active.yOffset + 'px';
		return false;
	}
}

function PopUp_DragStart(evt,Pop) {
	Pop.xOffset=parseInt(Pop.style.left)-((PopUp_IE5)? evt.clientX+document.body.scrollLeft : evt.pageX);
	Pop.yOffset=parseInt(Pop.style.top)-((PopUp_IE5)? evt.clientY+document.body.scrollTop : evt.pageY);
	PopUp_Active=Pop;
}

function PopUp_DragEnd() {
	PopUp_Active=null;
	if(!PopUp_IE5){
		self.resizeBy(0,1);
		self.resizeBy(0,-1);
	}
}


if(PopUp_W3C) document.onmousemove=PopUp_TrackMouse;

