var divSearch = null;


//房间登陆检测***********************************************************
function check()
{
	
if(!validstr(document.Login.user)) return false;
	if(screen.width <= 800 && screen.height <= 600 && document.Login.fullscreen.checked == false)
		document.Login.fullscreen.checked = confirm("系统建议您以全屏方式进入聊天室，您同意吗？") ;

	if(document.Login.fullscreen.checked)
	{
		window.resizeTo(screen.availWidth, screen.availHeight) ;
		window.moveTo(0,0);
	}
//document.Login.pass.value=hex_md5(document.Login.pass.value);
//alert(document.Login.pass.value);
	return true;
}
function validstr(str)
{
  var s,i,j;
	//document.Login.pass=hex_md5(document.Login.pass)
  s=" +=|'#&<>%*`^/\\\";,.";
  str1=str.value.toString();
  if(!str1){alert('请输入您的名字');str.value='';str.focus();return false;}
  for (i=0; i<str1.length; i++)
  {
	for(j=0;j<s.length;j++)
	{
	  if (str1.charAt(i) == s.charAt(j))
      {
		alert("名字中不能包含特殊字符: +=|'#&<>%*`^/\\\";,.空格.");
 		str.focus();
    	return false;
   	  }
	}
  }
  return true;
}
function init(){
	//set_search();
}
//AddEvent(window,'load',init);