//Author: Bryan Black 
//Notes: This is the place to put any of your scripts that need to be called when the page loads !! 
//			This will also be used later to handle all events so the javascript will be non-obtrusive 
			

Event.observe(window,'load',function(){
	
	Event.observe('register','click',showForm);
	Event.observe('cancel','click',hideForm); 
	Event.observe('reg_submit','click',submitForm);
	
	initializeVideo('VPlayer'); 
	loadAllVideos(); 
	BrowserDetect.init();
	
	//This is the method that will call the rotate function every 3 seconds 
	interval = setInterval("rotate()", 3000);
	//This will go off every two seconds and check to see if the flash player has loaded yet if so it loads the video and clears the timer 
	lashInterval = setInterval("loadSplash()",2000); 
	
	//This function is used when the user clicks on the ETSUTube logo and it reloads the orginal links 
	Event.observe('logo','click',org_links);
	
	


	
//Fix for Safari Browser's background issue 

	if(BrowserDetect.browser == "Safari" && BrowserDetect.OS == "Mac"){
		document.body.style.background = '#C1C1C1';
	}
	 
	

	
 
})

