function serverProcess(){
	/* (c)2007 by gld */
	this.serverArr = [];
	this.xmlfn = null;
	this.dvLoading = null;
	this.dvServerInfo = null;
	this.dvPlayerInfo = null;
	this.dvtabsArr = [];
	this.dvviewtabArr = [];
	this.selClassName = "";
	this.serverId = null;
	this.onProcess = false;
	this.langArr = [];
	this.serverinfoarr = [];
	this.playerinfoarr = [];
	
	this.prepare = function(servers,dvloading,dvserverinfo,dvplayerinfo,dvtabs,langarr,dvviewtabs){
		this.serverArr = servers;
		this.dvLoading = document.getElementById(dvloading);
		this.dvServerInfo = document.getElementById(dvserverinfo);
		this.dvPlayerInfo = document.getElementById(dvplayerinfo);
		this.dvtabsArr = dvtabs;
		this.langArr = langarr;
		this.dvviewtabArr = dvviewtabs;
		this.dvPlayerInfo.title = this.dvServerInfo.title = "(c)2007 by gld";
	};
	this.getServerInfo = function(sid){
		if(!this.onProcess){
			this.dvLoading.style.display = "";
			/*this.dvServerInfo.style.display = "none";
			this.dvPlayerInfo.style.display = "none";*/
			this.serverId = sid;
			this.onProcess = true;
			//
			var thisn = this;
			posturl = "serverAddr="+this.serverArr[this.serverId][0]+"&serverAddrPort="+this.serverArr[this.serverId][1]+"&serverType="+this.serverArr[this.serverId][3];
			this.xmlfn = new xmlfnc();
			this.xmlfn.sendloadReturnFunc = function(){ thisn.looksAndFeels(); }
			this.xmlfn.sendLoadData(1,posturl);
		}
	}
	this.looksAndFeels = function(){
		this.dvLoading.style.display = "none";
		this.tabA(this.dvtabsArr,this.dvtabsArr[this.serverId]);
		/*this.dvPlayerInfo.style.display = "";
		this.tabA(this.dvviewtabArr,this.dvviewtabArr[0]);*/
		this.onProcess = false;
		//
		this.serverinfoarr = this.xmlfn.returnArray[0];
		this.playerinfoarr = this.xmlfn.returnArray[1];
		if(this.serverinfoarr.length>0){
			strwrite = '<table width="100%" border="0" cellpadding="2" cellspacing="1">';
			strwrite += '<tr><td class="si_sinfo_0">'+this.langArr[2]+'</td><td class="si_sinfo_0_txt">'+this.serverinfoarr[0]+'</td></tr>';
			strwrite += '<tr><td class="si_sinfo">'+this.langArr[10]+'</td><td class="si_sinfo_txt">'+this.serverArr[this.serverId][2]+'</td></tr>';
			strwrite += '<tr><td class="si_sinfo">'+this.langArr[3]+'</td><td class="si_sinfo_txt">'+this.serverinfoarr[1]+'</td></tr>';
			strwrite += '<tr><td class="si_sinfo">'+this.langArr[4]+'</td><td class="si_sinfo_txt">'+this.serverinfoarr[2]+'</td></tr>';
			strwrite += '<tr><td class="si_sinfo">'+this.langArr[5]+'</td><td class="si_sinfo_txt">'+this.serverinfoarr[3]+' / '+this.serverinfoarr[4]+'</td></tr>';
			//strwrite += '<tr><td>'+this.langArr[6]+'</td><td>'+serverinfoarr[4]+'</td></tr>';
			strwrite += '</table>';
			this.dvServerInfo.innerHTML = strwrite;
		}else{
			this.dvServerInfo.innerHTML = '<div align="center" style="padding:10px;">'+this.langArr[0]+'</div>';
		}
		if(this.playerinfoarr.length>0){
			strwrite = '<table width="100%" border="0" cellpadding="2" cellspacing="1">';
			strwrite += '<tr><td class="si_nick">'+this.langArr[7]+'</td><td class="si_frag">'+this.langArr[8]+'</td><td class="si_time">'+this.langArr[9]+'</td></tr>';
			for(i=0;i<this.playerinfoarr.length;i++){
				id = this.playerinfoarr[i][4];
				
				strwrite += '<tr><td class="si_nick">'+(id>0?'<a href=\"/forum/index.php?showuser='+id+'\">':'')+this.playerinfoarr[i][0]+(id>0?'</a>':'')+'</td><td class="si_frag">'+this.playerinfoarr[i][1]+'</td><td class="si_time">'+this.playerinfoarr[i][2]+'</td></tr>';
			}
			strwrite += '</table>';
			this.dvPlayerInfo.innerHTML = strwrite;
		}else{
			this.dvPlayerInfo.innerHTML = '<div align="center" style="padding:10px;">'+this.langArr[1]+'</div>';
		}
	}
	this.tabA = function(arrlist,selobj){
		for(i=0;i<arrlist.length;i++){
			document.getElementById(arrlist[i]).className = "";
		}
		document.getElementById(selobj).className = this.selClassName;
	}
	this.viewA = function(arrlist,selobj){
		for(i=0;i<arrlist.length;i++){
			document.getElementById(arrlist[i]).style.display = "none";
		}
		document.getElementById(selobj).style.display = "";
	}
}

