/*
 * JavaScript template created by UnlimitedFantasy
 */
function message(content,ore) {
	var staticID = 'unicorn_msgbox_';
	var width = 200;
	var height = 100;

	// 创建遮罩层
	var overlay = document.createElement('DIV');
	overlay.id = staticID + 'overlay';
	overlay.style.width = document.body.scrollWidth;
	overlay.style.height = document.body.scrollHeight;
	overlay.style.backgroundColor = '#000000';
	overlay.style.zIndex = 998;

	if (navigator.userAgent.indexOf('MSIE') != -1) {
		overlay.style.filter = 'alpha(opacity=70)';
	}
	else if (navigator.userAgent.indexOf('Mozilla') != -1) {
		overlay.style.opacity = 0.7;
	}

	overlay.style.left = 0;
	overlay.style.top = 0;
	overlay.style.position = 'absolute';
	document.body.appendChild(overlay);

	// 创建信息框容器
	var msgBox = document.createElement('DIV');
	msgBox.id = staticID + 'container';
	msgBox.style.width = width;
	msgBox.style.height = height;
	msgBox.style.position = 'absolute';
	msgBox.style.left = (document.body.scrollWidth - width) / 2;
	msgBox.style.top = (document.body.scrollHeight - height) / 2 - 400;
	msgBox.style.zIndex = overlay.style.zIndex + 1;
	msgBox.style.backgroundColor = '#FFFFCC';

	if(ore.indexOf("1")>= 0)
	{
	msgBox.innerHTML += '<table  width="' + width + '" height="'+height+'"  border="0" cellpadding="0" cellspacing="0"  style="background-image:url(/img/bg_tishi.jpg);"><tr><td><p style="text-align:center; padding-top:30px;">'+ content +'</p><p style="text-align:center;" ><a href="http://service.js.chinamobile.com/reset/resetPwd.jsp" ><img src="/img/button_ok.gif"/></a>&nbsp;&nbsp;&nbsp;&nbsp;<input name="tt" type="image" src="/img/button_no.gif" onclick="closeMessageBox(\'' + staticID + '\');"/></p></td></tr></table>';
	}
	// 标题
//	msgBox.innerHTML += '<table  width="' + width + '" border="0" align="center" cellpadding="0" cellspacing="0" style="background-image:url(img/bg_tishi.gif);"><tr><td align="center"><strong>信息提示</strong></td><td width="20" style="cursor: pointer; " onclick="closeMessageBox(\'' + staticID + '\');">X</td></tr></table>';
	// 内容
//	msgBox.innerHTML += '<table style="table-layout: fixed; border: 2px inset #CCCCCC; " bgcolor="#EEEEEE" height="100%" width="' + width + '" border="0" cellpadding="4" cellspacing="0"><tr><td valign="top">' + content + '</td></tr></table>';
	else
	{
	msgBox.innerHTML += '<table  width="' + width + '" height="'+height+'"  border="0" cellpadding="0" cellspacing="0"  style="background-image:url(/img/bg_tishi.jpg);"><tr><td><p style="text-align:center; padding-top:30px;">'+ content +'</p><p style="text-align:center;" onclick="closeMessageBox(\'' + staticID + '\');"><input name="" type="image" src="/img/button_queding.gif" /></p></td></tr></table>';
	}
	document.body.appendChild(msgBox);

}

function closeMessageBox(staticID) {
	if (document.getElementById(staticID + 'container')) {
		document.body.removeChild(document.getElementById(staticID + 'container'));
	}

	if (document.getElementById(staticID + 'overlay')) {
		document.body.removeChild(document.getElementById(staticID + 'overlay'));
	}
}
