if (typeof arc == "undefined") {
	// arc JS object did not initialize correctly.  
	document.getElementById('aod_fallback').style.display = 'block';
	document.getElementById('div_LargeVideo').style.display = 'none';
} else { 
	var client = arc.getClient(aod_widget_type); 
	if (client.state == arc.ClientState.FAILED) { 
        // Respond to immediate startup failure, including insufficient Flash.  
        // Detailed failure code available at client.errorData.errorCode 
		        
		document.getElementById('aod_fallback').style.display = 'block';
		document.getElementById('div_LargeVideo').style.display = 'none';
    } else { 
        client.addEventListener(arc.Event.CLIENT_STATE_CHANGE, function(event) { 
            switch (client.state) { 
				case arc.ClientState.PRELOADING: 
					// Optionally respond to start of "loading" display. 
					break; 
				case arc.ClientState.RUNNING: 
					// Optionally respond to start of Flex application.
					break; 
				case arc.ClientState.SHOWING: 
					// Optionally respond to first view of presentation.
					break; 
				case arc.ClientState.FAILED: 
					// Optionally respond to startup failure 
					// Typically, initiate fallback behavior. 
					// Detailed failure code available at client.errorData.errorCode
					document.getElementById('aod_fallback').style.display = 'block';
					document.getElementById('div_LargeVideo').style.display = 'none';
				 	break; 
			}
		});
	}
}