// class dialoggetnewmsg
function dialoggetnewmsg(){
	this.show=dialoggetnewmsg_show;
}
function dialoggetnewmsg_show(id){
    $("#dialoggetnewmsg_href").attr("href","myaccount.php?select_id="+id+"#head_message_"+id);

	$("#dialoggetnewmsg_body").show();
    $("#dialoggetnewmsg_dialog").dialog();
    $("#dialoggetnewmsg_dialog").dialog('open');

	if (accountpage == 'Y'){
		if (localBrowser != 'MSIE')
			box_I.build_message_table('I');
		if (localBrowser == 'MSIE'){
			window.location.reload();
		}
	}

}
//end class dialoggetnewmsg

function getnewmsg(){
	$.post("messages.php",{mode:'getnewmsg'}, 
		function(res){
			if (res>0){
				boxgetnewmsg.show(res);
			}
		}
	);
	if (getnewmsg_timeout)
		setTimeout('getnewmsg()', getnewmsg_timeout);
}

boxgetnewmsg=new dialoggetnewmsg();
if (msg_on == 'Y')
	setTimeout('getnewmsg()', 300);
