var scrip='';
var iLayerMaxNum=10000;
var $a;
var $b="";
var $c="";
document.onmouseup=me;
document.onmousemove=ms;
var $d;
var $e;
var $curid;
function move(Object,event) {
	scrip=Object.id;
	if(document.all) {
		document.getElementById(scrip).setCapture();
		$d=event.x-document.getElementById(scrip).style.pixelLeft;
		$e=event.y-document.getElementById(scrip).style.pixelTop;
	} else if(window.captureEvents) {
		window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);
		$d=event.layerX+20;
		$e=event.layerY-120;
	};
	if(scrip!="scrip"+$a) {
		document.getElementById(scrip).style.zIndex=iLayerMaxNum;
		iLayerMaxNum=iLayerMaxNum+1;
	}
};
function ms($f) {
	if(scrip!='') {
		if(document.all) {
			document.getElementById(scrip).style.left=event.x-$d;document.getElementById(scrip).style.top=event.y-$e;
		} else if(window.captureEvents) {
			document.getElementById(scrip).style.left=($f.clientX-$d)+"px";
			document.getElementById(scrip).style.top=($f.clientY-$e)+"px";
		}
	}
};
function me($f) {
	if(scrip!='') {
		if(document.all) {
			document.getElementById(scrip).releaseCapture();scrip='';
		} else if(window.captureEvents) {
			window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);scrip='';
		}
	}
};
function delMessage(n) {
	var $g='scrip'+n;
	document.getElementById($g).style.display='none';
	//if(n==$a) App.lock(false);
};

function afterCall($k) {
	var $l=$k.responseText;eval($l);
};
function showmessage(n) {
	if(sArray[n]!=undefined) {
		dbrun(n);
	}
};
function dbrun(id,$m,$n) {
	$a=id;
	show(true,id,$n);
};
function init() {
	console.style.display="";
	App.init(console);
	if(initno==0) return;
	if(initno<0) {
		alert("��������ֽ�������ڣ�");
	} else {
		searchmessage(initno);
	}
};
function show(b,id,$n) {
	var $o=document.getElementById("messageflash");
	if(b&&(b^App.isLocked)) {
		var $p=document.getElementById("scrip"+id);
		$p.style.zIndex=200101;
		$p.firstChild.lastChild.previousSibling.innerHTML=" <a href=\"step1.jsp\">��ҲҪ������</a>  "+$p.firstChild.lastChild.previousSibling.innerHTML;
		if(id==initno||$n) {
			$p.style.left=353;
			$p.style.top=150;
		};
		App.lock(true);
	} else {
		var $p=document.getElementById("scrip"+$a);
		if($p.firstChild.lastChild.previousSibling.firstChild && $p.firstChild.lastChild.previousSibling.firstChild.tagName=="A") {
			$p.firstChild.lastChild.previousSibling.removeChild($p.firstChild.lastChild.previousSibling.firstChild);
		}
		$p.style.zIndex=iLayerMaxNum;
		iLayerMaxNum=iLayerMaxNum+1;
		$a=0;
		App.lock(false);
	}
};
function showSingle() {
	var j=sArray.length-1;
	var $l='<div id="scrip'+sArray[''+j+''][0]+'" class="Message" style="position:absolute; left:'+sArray[''+j+''][2]+'px;top:'+sArray[''+j+''][3]+'px;z-index:'+sArray[''+j+''][9]+'" onmousedown="Move(this, event)" ondblclick="dbrun('+sArray[''+j+''][0]+')"><div class="Style'+sArray[''+j+''][1]+'">\<div class="Num">������ţ�'+sArray[''+j+''][0]+'<img src="plugins/lovewall/icon_close.gif" alt="�ر�" onclick="delMessage(\''+sArray[''+j+''][0]+'\')"></div>\<p class="Detail"><img src="plugins/lovewall/icon_'+sArray[j][4]+'.gif" class="Heart"/><span class="Head">'+sArray[''+j+''][5]+'</span><br />'+sArray[''+j+''][6]+'</p>\<p class="Sign">'+sArray[''+j+''][7]+'</p>\<P class="Date">'+sArray[j][8]+'</p></div></div>';
	document.getElementById("d1").innerHTML+=$l;
};
function Tip(ID,Attr) {
	document.getElementById(ID).style.display=Attr;
};
var $q;
function createXMLHttpRequest() {
	if(window.ActiveXObject) {
		$q=new ActiveXObject("Microsoft.XMLHTTP");
	} else if(window.XMLHttpRequest) {
		$q=new XMLHttpRequest();
	}
};
function startRequest($i) {
	createXMLHttpRequest();
	$q.onreadystatechange=afterRequest;
	$q.open("GET",$i,true);$q.send(null);
};
function afterRequest() {
	if($q.readyState==4) {
		if($q.status==200){
			eval($q.responseText);
		}
	}
};

