var iTimeOutCHAT = 10000;
var iTimeOutWIO  = 20000;//who is online

function LOADfunctions(usr,account_type,experience,show_banner) {
  clock();
  updateList(); //whoisonline
  readChat();     //read chat
  get_fixbugrequest();//no AJAX function
  get_onmoveList();//used for the live ticker
  document.body.style.cursor = 'default';
  if ( usr == "Guest" ){
	  document.forms['LogIn'].elements['pw'].focus();
  }
  if ( account_type == "standard" & experience == "expert" & show_banner == 2){
	  var bannerMSG = "Hi "+usr+"<br />Please take into coinsideration supporting this website <br />With a small donation via <a href='http://www.domwo-browsergame.com/index.php?selSub=PayPal' style='color:white' title='become a premium account'><b>PayPal</b></a> you become a<br /><a href='http://www.domwo-browsergame.com/index.php?selSub=PayPal' style='color:white' title='become a premium account'>Premium Account</a> and can join up to 20 games at once!<br /><hr /><a href='#' onclick='hideBanner()' style='color:white'> >> close window << </a>";  
	  showBanner(bannerMSG,10,10,330,115)
  }
}
//Check if the user must answer to a fix bug request
function get_onmoveList(){
 xajax_onmoveList();
 setTimeout("init_onMoveTicker()",120000);//who is on move ticker
}

function get_fixbugrequest(){
 xajax_getFixBugRequest();
}
//=========== Chat ===============

function readChat()
{
	document.body.style.cursor = 'default';
	xajax_readChatLines();
	setTimeout("readChat()",iTimeOutCHAT);
}

function addChatText() {
	var line;
	chatText = document.getElementById("line").value;
	if (chatText == "") return;
	xajax_addNewText(chatText);
	//xajax_readChatLines(); doeas not works fine
	document.getElementById("line").value = "";
	return false;
}

//=========== Who is online ===============
function updateList()
{
  xajax_printOnlineUsers();
  setTimeout("updateList()",iTimeOutWIO);
}
