function OnSiteReady()
{
	siteReady = true;
  SelectObject("siteobj");	
	onBeforeRender();
}

function OnCameraMove( x, y, z, view_angle, speed )
{
  onMoveCamera(x, y, z, view_angle, speed);
}

function OnObjectSelected( objectId )
{
  onObjectSelected( objectId );
}

function OnUIAction( control, action, data )
{
	if( action == 1 )
	{
		switch (control)
		{
			case "home" :
			{
				SelectObject( "siteobj" );
				break;
			}
			case "closefs" :
			{
				//switchToWindowed();
				break;
			}
		}
	}
}

function OnError(errorCode, Details)
{
	ERR_UNKNOWN = 0;
	ERR_INIT3DFAILED = 1;
	ERR_DOWNLOADFAILED = 2;
	
	switch (errorCode)
	{	
	  case ERR_INIT3DFAILED   : alert("Init3D Failed..."); break;
		case ERR_DOWNLOADFAILED : alert("Download Failed..."); break
	}
}

function OnInitialized()
{
}

