function showMsg(type,url) {
	hideWaiting();
	if(url==null)
		showIframe('解放网友情提示','/message/message.jsp?d'+new Date().getTime()+'&type='+type,300,83,false);
	else
		showIframe('解放网友情提示','/message/message.jsp?d'+new Date().getTime()+'&type='+type,300,83,false,url);
}
function showDialog(type,url) {
	hideWaiting();
	if(url==null)
		showIframe('','/message/message.jsp?d'+new Date().getTime()+'&modal=true&type='+type,300,83,true);
	else
		showIframe('','/message/message.jsp?d'+new Date().getTime()+'&modal=true&type='+type,300,83,true,url);
}
function showDialogAcc(type,accountId) {
	hideWaiting();
		showIframe('','/message/message.jsp?modal=true&type='+type+'&id='+accountId,300,83,true);
}
function showCirMessage(circleId) {
		showIframe('解放网提醒您','/message/circle_message.jsp?circleId='+circleId,450,150,true);
}

function showJoinCircleMessage(circleId) {
		showIframe('解放网提醒您','/message/join_circle.jsp?circleId='+circleId,450,150,true);
}

function showExitCircleMessage(circleId) {
		showIframe('解放网提醒您','/message/exit_circle.jsp?circleId='+circleId,450,150,true);
}
function showLogin() {
	showIframe('用户登录','/message/login.jsp?modal=true',480,300,false);
}
function showUpload() {
	showIframe('文件上传','/MainServlet?go=JFDAILY_POSTS_PG_FileUpload',420,100,true);
}
function showConfirm(msg,fun) {
	var str = confirmStr;
	str = str.replace("<caol>",msg);
	str = str.replace("#caol#",fun);
	$("#test").html(str);
	showInline('','test',300,70,true);
}
var confirmStr = "";
confirmStr += '<div class="TB_worning_bg"><img src="images/20070402170016388.gif"><caol></div>';
confirmStr += '<div style="margin-top:10px;text-align:right">';
confirmStr += '<span><a href="#" onClick="self.parent.#caol#;self.parent.tb_remove();return false;">确认</a> <a href="#" onClick="self.parent.tb_remove();return false;">取消</a></span>';
confirmStr += '</div>';

function showWaiting(){
	$("body").append('<iframe id="wait_frame" scrolling="no" frameborder="0" style="background-color:#fff;filter:alpha(opacity=75);-moz-opacity: 0.75;opacity: 0.75;position:absolute; top:0px; left:0px; display:none;"></iframe><div id="divLocation" style="Z-INDEX: 9999; LEFT: 0px; display:none; WIDTH: 32px; POSITION: absolute; TOP: 0px; HEIGHT: 32px; BACKGROUND-COLOR: ; border:0px solid;"><img src="/images/loading.gif" border="0" /></div>');
	$("html").css("overflow","hidden");
	var IfrRef = document.getElementById('wait_frame');
	var height=document.getElementById("divLocation").style.height;
	height=height.substring(0,height.length-2);
	var width=document.getElementById("divLocation").style.width;
	width=width.substring(0,width.length-2);
	IfrRef.style.display="";
	IfrRef.style.width=document.body.clientWidth+"px";
	IfrRef.style.height=document.body.clientHeight+"px";
	IfrRef.style.zIndex = 999;
	document.getElementById("divLocation").style.display="";
	document.getElementById("divLocation").style.left=((window.screen.width-width)/2)+"px";
	document.getElementById("divLocation").style.top=(document.documentElement.scrollTop+(document.body.clientHeight-document.documentElement.scrollTop-height)/2)+"px";
}
function hideWaiting(){
	try {
		$("html").css("overflow","");
		var field = document.getElementById('wait_frame');
		if(field){
			field.style.display="none";
		}
		field = document.getElementById('divLocation');
		if(field){
			field.style.display="none";
		}
	}catch(e) {
	}
}
