var _lc_err_reporter = "http://livecast.sina.com.cn/InfoLive/API/cli_logger.php";
function lc_report_err(m)
{
	var b = navigator.userAgent;
	if(IO.WebPush.Runner.flaver)
	{
		b += "["+IO.WebPush.Runner.flaver+"]";
	}
	var s = _lc_err_reporter+"?browser="+b+"&err_msg="+m+
		"&random=" + (new Date).getTime();
	(new Image).src = s;
	return s;
}

function lc_set_error_reporter(cfg)
{
	cfg.onError = lc_server_error;
	cfg.onClose = lc_server_close;
	cfg.update = lc_flash_update;	
}

function lc_server_error(t)
{
  switch(t)
  {
	  case 1000:
	  	t = 'Flash Load Fail';
	  break;	  
	  case 1001:
	  	t = 'Script Load Fail';
	  break;
	  case 1002:
	  	t = 'Fatal Error';
	  break;	  
	  
	}
	lc_report_err("CONNECT ERROR:"+t);
}

function lc_server_close()
{
  lc_report_err("SERVER CLOSE");
}

function lc_flash_update(v)
{
	lc_report_err("FF FLASH UPDATE:"+v);
}

