/**
 * @param {int} type
 * @param {String} msg
 * @param {HTMLElement} obj
 */
function showmsg(type,msg,obj){
	if(!isnotnull(type)){
		return clearmsg(gid("msg"));
	}
	if(!isnotnull(obj)){
		obj=gid("msg");
	}
	obj.style.height=50;
	typecss="tipleft1";
	textcss="message1";
	switch(type){
		case true:
			typecss="tipleft2";
			textcss="message2";
		break;
		case false:
			textcss="message1";
			typecss="tipleft1";
		break;
		case 2:
			textcss="message3";
			typecss="tipleft3";
		break;
	}
	str='<div class="'+textcss+'"><a id=msg_focus href="#"></a>';
	str+='<div class="tip">';
	str+='<ul>';
	str+='<li class="'+typecss+'"></li>';
	str+='<li class="tipcon"><div class="topcontent">';
	str+=msg+'</div></li>';
	str+='<li class="tipright"></li>';
	str+='</ul>';
	str+='</div></div>';	
	obj.innerHTML=str;
	//document.body.scrollTop=0;
	gid("msg_focus").focus();
	gid("msg_focus").blur();
	gid("msg_focus").outerText="";
}

/**
 * @param {String} msg
 * @param {String} okevent
 * @param {String} falseevent
 */
function showIfmsg(msg,okevent,falseevent){
	var win="";
	win+='<div class="warn">';
	win+='<div class="warn_con">{msg}';
	win+='</div><div class="warn_bot">';
	win+='<input type="submit" onclick="{okevent}" value=" È·¶¨ ">';
	win+='&nbsp;&nbsp;<input type="submit" onclick="{falseevent}" value=" È¡Ïû ">';
	win+='</div></div>';
	msg=win.replace("{msg}",msg);
	msg=msg.replace("{okevent}",okevent+";hideLoadbox();");
	if(isnotnull(falseevent)){
		msg=msg.replace("{falseevent}",falseevent+";hideLoadbox();");
	}else{
		msg=msg.replace("{falseevent}","hideLoadbox();");
	}
	initDialogBox(msg,500, 100, null, false,"www.renhe.cn");
}

/**
 * @param {HTMLElement} obj
 */
function clearmsg(obj){
	if(obj){
		obj.style.height=0;
		obj.innerHTML="";
	}
}
/**
 * show process bar
 * @return
 */
function showProcess(msg){
	
	var win="";
	win+='<div style="background-color:#FFFFFF;">';
	win+='<div style="height:30px;">&nbsp;</div>';
	win+='<div style="font-size:14px;text-align:center;">www.renhe.cn</div>';
	win+='<div style="font-size:14px;text-align:center;">{msg}<br><img src="/images/process.gif"/></div>';
	win+='<div style="height:30px;">&nbsp;</div>'; 
	win+='</div>';
	msg=win.replace("{msg}",msg);
	initbox(msg,500,300,"",false);
}