var _r4dio = function (_method) {
	switch (_method) {
		case 'version':
			return '1.01.23';
			break;
		case 'updateInfo':
			var linfo = document.getElementById('locInfo');
			linfo.src = linfo.src;
			_infoTimer = 0;
			break;
		case 'hideMenu':
			_jx('1','visible',false);
			_jx('2','visible',false);
			_jx('3','visible',false);
			_jx('4','visible',false);
			_jx('5','visible',false);
			_jx('6','visible',false);
			_jx('7','visible',false);
			_jx('8','visible',false);
			_jx('9','visible',false);
			_jx('10','visible',false);
			break;
		case 'hideContent':
			_jx('contenido','visible',false);
			break;
		case 'exec':
			if (_infoTimer==30) { _r4dio('updateInfo'); }
			if (_chatTimer>=5 && chatUpdating==0) {
				if (document.getElementById('tab-chat').style.display=='block') {
					if (chatMode==0) { 
						chatUpdating=1;_jx('chat-content','get','includes/chat.php','_chatTimer=0;_chatDelay=0;chatUpdating=0;'); 
					} else { 
						if (document.getElementById('chat-room')) {
							chatUpdating=1;_jx('chat-room','get','includes/chat.php'+chatPars,'_chatTimer=0;_chatDelay=0;chatUpdating=0;');
						} else {
							chatMode=0;
							chatUpdating=0;
							chatPars='';
						}
					}
				} else {
				_chatTimer=0;
				}
			}
	}
};

function interfaceLoaded() {
	_jx('fullpage','visible',false);
	_jx('fullpage','write','');
}
function register() {
	a=arguments[0];
	_r4dio('hideMenu');
	_r4dio('hideContent');
	_jx('menuNone','visible',true);
	_jx('tab-none','write','<div align="center" style="color:#FFF; font-size:14px;">Cargando...</div>');
	_jx('tab-none','visible',true);
	_jx('tab-none','get','includes/registro.php'+(a?'?'+a:''));
}
function iVis(_o) {
	try {rv = document.getElementById(_o).style.display; }
	catch(e) {rv='error';}
	return rv=='block'?true:false;
}


_currentTimer=0;
_chatTimer=0;
_petTimer=0;
_infoTimer=0;

// Debug timers
_chatDelay=0;
_petDelay=0;
_maxChatDelay=0;
_maxPetDelay=0;

r4dioMode=0;
chatMode=0;
chatUpdating=0;
chatPars='';
r4diogLoaded=true;
