var root="../../src/";
function $import(src, type){
  if (type == "css") {
      document.write('<LINK href="../../src/styles/' +src + '.css" type=text/css rel=stylesheet>');
  } else {
	  document.write('<script type="text/javascript" language="javascript" src="' +root+ 'javascript/'+src + '.js"></script>');
  }
}
var bool = true;
var title = window.document.title;
function checkNewMessage(path,uid)
{
	$.post(path,{id:uid},function (txt){
		if(txt == 1)
		{
			flash();
			$("#messagenum").html('?);
		}
		else
		{
			window.document.title = title;
		}
	});
}

$import('class/jquery');
$import('class/win');
$import('public/common');
$import('class/common','css');
$import('index/index','css');


var x = 0;
function flash()
{
	if(x>99)
	{
		window.clearTimeout(t);
	}
	if(bool)
	{
		window.document.title = '[新消息]'+title;
		bool=false;
	}
	else
	{
		window.document.title = '[     ]'+title;
		bool=true;
	}
	x++;
	var t = setTimeout("flash()","600");
}