function $(str){
	return document.getElementById(str);
}
function _(str){
	return document.getElementsByTagName(str);
}
var msg_images_path = $("msg_url").ipath;
function msg(str1,str2,str3,str4,str5){
	$("msg_div_main").style.width = str3;
	$("msg_div_main").style.left = (_("body")[0].clientWidth - str3) / 2;
	$("msg_div_main").style.top  = (_("body")[0].clientHeight - 520) / 2;
	var msg_div_main_but_tmp = "<br /><br />"
				+ "<button class='msg_div_main_but' id='msg_div_main_but' "
				+ "onclick='msg_close_tmp_biyuan();" + str4 + "'>确 定</button>";
	switch(str2 * 1){
		case 1:
			$("msg_div_main_content").innerHTML =  str1 + msg_div_main_but_tmp;
			//$("msg_div_main_but").focus();
		break;
		case 2:
			$("msg_div_main_content").innerHTML =  str1 + msg_div_main_but_tmp
							 + "&nbsp;&nbsp;<button class='msg_div_main_but' "
							 + "onclick='msg_close_tmp_biyuan();" + str5 + "'>取 消</button>";
			//$("msg_div_main_but").focus();
		break;
		case 3:
			$("msg_div_main_content").innerHTML =  str1;
		break;
		defualt:
			$("msg_div_main_content").innerHTML =  str1;
		break;
	}
	$("msg_div_all").style.zIndex  = 100;
	$("msg_div_main").style.zIndex = 200;
	$("msg_div_all").style.display = "";
	$("msg_div_main").style.display = "";
	$("msg_div_all").oncontextmenu = function(){
		return false;
	}
	$("msg_div_main").oncontextmenu = function(){
		return false;
	}
}
function msg_close_tmp_biyuan(){
	$('msg_div_all').style.display='none';
	$('msg_div_main').style.display='none';
}

//加入对话框移动代码
if(!document.all){
	msg_images_path = "./script/skin_1";
}
var msg_md = false,msg_mobj,msg_ox,msg_oy;
document.onmousedown = function(){
	if(typeof(event.srcElement.msg_canmove) == "undefined"){
		return;
	}
	if(event.srcElement.msg_canmove){
		msg_md = true;
		msg_mobj = $(event.srcElement.msg_forid);
		msg_ox = msg_mobj.offsetLeft - event.x;
		msg_oy = msg_mobj.offsetTop - event.y;
	}
}
document.onmouseup = function(){
	msg_md = false;
}
document.onmousemove = function(){
	if(msg_md){
		msg_mobj.style.left = event.x + msg_ox;
		msg_mobj.style.top  = event.y + msg_oy;
	}
}

document.writeln("<style type='text/css'>"
	+ "#msg_div_all {width:100%;height:100%;position:absolute;filter:Alpha(opacity=70);background:#cccccc;}"
	+ "#msg_div_main {position:absolute;}"
	+ "#msg_div_main_title {font-size:12px;color:#ffffff;font-family:verdana;font-weight:bold;cursor:default;}"
	+ "#msg_div_main_content {font-size:12px;}"
	+ ".msg_div_main_but {background:url(" + msg_images_path + "/buttonbg.gif);width:60px;heigt:20px;border:none;padding-top:3px;font-size:12px;}"
	+ "</style>"
        + "<div id='msg_div_all' style='display:none;'></div>"
	+ "<div id='msg_div_main' style='display:none;'>"
        + "<table width='50%' height='29' border='0' cellspacing='0' cellpadding='0'>"
 	+ "<tr>"
	+ "<td width='25'><img src='" + msg_images_path + "/bg_01.gif' width='25' height='29' alt='' /></td>"
	+ "<td background='" + msg_images_path + "/bg_02.gif' msg_canmove='true' msg_forid='msg_div_main' id='msg_div_main_title' style='width:60px;heigt:20px;border:none;padding-top:3px;'>注册通道</td>"
	+ "<td background='" + msg_images_path + "/bg_02.gif' align='right' style='padding-top:4px'>"
	+ "<img src='" + msg_images_path + "/bg_05.gif' width='21' height='21' alt='关闭' "
	+ "onMouseover=\"this.src='" + msg_images_path + "/bg_13.gif'\" "
	+ "onMouseout=\"this.src='" + msg_images_path + "/bg_05.gif'\" onMouseup='msg_close_tmp_biyuan();' "
	+ "onMousedown=\"this.src='" + msg_images_path + "/bg_18.gif'\"></td>"
	+ "<td width='6'><img src='" + msg_images_path + "/bg_06.gif' width='6' height='29' alt='' /></td>"
	+ "</tr>"
	+ "</table>"
	+ "<table width='50%' border='0' cellspacing='0' cellpadding='0'>"
	+ "<tr>"
	+ "<td width='3' background='" + msg_images_path + "/bg_07.gif'></td>"
	+ "<td bgcolor='#f0efe7' align='center'><br /> <a href='comp/reg.asp' target='_blank'><img src=skin_1/001.gif border=0></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href='pers/reg.asp' target='_blank'><img src=skin_1/002.gif border=0></a><br /><span id='msg_div_main_content'></span><br /><br /></td>"
	+ "<td width='3' background='" + msg_images_path + "/bg_08.gif'></td>"
	+ "</tr>"
	+ "<tr>"
	+ "<td width='3' height='3'><img src='" + msg_images_path + "/bg_09.gif' width='3' height='3' alt='' /></td>"
	+ "<td background='" + msg_images_path + "/bg_11.gif'></td>"
	+ "<td width='3' height='3'><img src='" + msg_images_path + "/bg_10.gif' width='3' height='3' /></td>"
	+ "</tr>"
	+ "</table>"
        + "<script language='javascript'>setTimeout('self.msg_close_tmp_biyuan();',5000)</script>"
        + "</div>");
	