//<![CDATA[
function getMarkups(i, fillThis, showThis, hideThis) {
	focusOnSpirit();
	var xmlHttp;
	try {
		xmlHttp=new XMLHttpRequest();
	} catch (e) {
		try {
			xmlHttp=new ActiveXObject('Msxml2.XMLHTTP');
		} catch (e) {
			try {
				xmlHttp=new ActiveXObject('Microsoft.XMLHTTP');
			} catch (e) {
				alert('Your browser does not support AJAX!');
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function() {
		if(xmlHttp.readyState==4) {
			if(navigator.appName=='Microsoft Internet Explorer') {
				alert(window.clipboardData.setData('Text', xmlHttp.responseText)?'已將HTML語法「複製」到剪貼簿中，請「貼上」至您的個人網頁(如：blog)！':'鑲入失敗！');
			} else {
				document.getElementById(fillThis).value=xmlHttp.responseText;
				if(hideThis){
					for(var i=0;i<5;i++) {
						document.getElementById('ms'+i).style.display='none';
					}
				}
				document.getElementById(showThis).style.display==='none'?document.getElementById(showThis).style.display='inline':document.getElementById(showThis).style.display='none';
			}
		}
	}
	xmlHttp.open('GET', 'ajaxHTML.php?i='+i+'&'+new Date().valueOf(), true);
	xmlHttp.send(null);
} function searchNick() {
	var txtNickname=document.getElementById('txtNickname');
	if(txtNickname.value=='請先點選左邊的類別，再輸入暱稱'||txtNickname.value=='') {
		alert('請先點選左邊的類別，再輸入暱稱');
		txtNickname.focus();
	} else {
		document.getElementById('尋暱').submit();
	}
} function simplePush(i) {
	focusOnSpirit();
	var xmlHttp;
	try {
		xmlHttp=new XMLHttpRequest();
	} catch (e) {
		try {
			xmlHttp=new ActiveXObject('Msxml2.XMLHTTP');
		} catch (e) {
			try {
				xmlHttp=new ActiveXObject('Microsoft.XMLHTTP');
			} catch (e) {
				alert('Your browser does not support AJAX!');
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function() {
		if(xmlHttp.readyState==4) {
			alert('感謝您的加持！');
			window.location.reload();
		}
	}
	xmlHttp.open('GET', 'ajaxPush.php?i='+i+'&'+new Date().valueOf(), true);
	xmlHttp.send(null);
} function swapMinistar(iWhich) {
	focusOnSpirit();
	for(var i=0;i<5;i++) {
		document.getElementById('ms'+i).style.display='none';
	}
	document.getElementById('markupsReminder').style.display='none';
	document.getElementById('ms'+iWhich).style.display='inline';
}
//]]>