function init(){   //Removed Speed connection switch via prompt and cookies - 7/21/10
//var speed=readCookie('speed');
//if(speed){
//connection()
//}
//else{
//document.getElementById('videogroup').style.display='none';
//document.getElementById('choice').style.display='inline'
//}
switch_it('10');
movieload();
}
function setSpeed(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString()}else var expires="";document.cookie=name+"="+value+expires+"; path=/";connection()}function setVideo(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString()}else var expires="";document.cookie=name+"="+value+expires+"; path=/"}function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length)}return null}function connection(){var speed=readCookie('speed');if((speed=='fast')){switch_it('10')}else if((speed=='slow')){switch_it('9')}else{return null}document.getElementById('choice').style.display='none'}function video(){var video=readCookie('video');if((video=='played')){switch_it('11')}else{setVideo('video','played',1)}}
function switch_it(x){switch(x){case'1':audio();show_it('audio');show_it('textonly');show_it('vback');hide_it('videogroup');movie.pauseVideo();break;case'2':show_it('textonly');show_it('vback');hide_it('videogroup');movie.pauseVideo();break;case'3':backb();hide_it('videogroup');show_it('literature');hide_it('textonly');hide_it('audio');hide_it('webinar');movie.pauseVideo();break;case'4':hide_it('videogroup');show_it('webinar');hide_it('literature');hide_it('audio');hide_it('textonly');backb();hide_it('videopic');movie.pauseVideo();break;case'5':show_it('videogroup');hide_it('audio');hide_it('textonly');hide_it('vback');hide_it('literature');hide_it('webinar');hide_it('videopic');movieload();IEaudioStop();break;case'6':show_it('audio');show_it('textonly');show_it('videopic');hide_it('videogroup');show_it('vback');audio();movie.pauseVideo();break;case'7':show_it('textonly');show_it('videopic');hide_it('videogroup');show_it('vback');movie.pauseVideo();break;case'8':hide_it('textonly');hide_it('audio');hide_it('videopic');show_it('videogroup');IEaudioStop();break;case'9':hide_it('videogroup');hide_it('vback');show_it('textonly');show_it('videopic');hide_it('choice');break;case'10':show_it('sidepar');show_it('videogroup');
//hide_it('choice');
hide_it('videopic');break;case'11':hide_it('videogroup');show_it('videopic');break;case'12':hide_it('toback');hide_it('literature');show_it('textonly');hide_it('webinar');break;default:alert("Please contact ACG to report this error!")}}function show_it(itemID){if(document.getElementById(itemID)){if((document.getElementById(itemID).style.display=='none')){document.getElementById(itemID).style.display='inline'}}}function hide_it(itemID){if(document.getElementById(itemID)){if((document.getElementById(itemID).style.display=='inline')){document.getElementById(itemID).style.display='none'}}}function hide(itemID){if(document.getElementById(itemID)){document.getElementById(itemID).style.visibility='hidden'}}function show(itemID){if(document.getElementById(itemID)){document.getElementById(itemID).style.visibility='visible'}}function backb(){var speed=readCookie('speed');if((speed=='fast')){show_it('vback')}else{show_it('toback')}}function browse(){var browser=navigator.appName;if((browser=='Microsoft Internet Explorer')){hide_it('notie');show_it('iemenu');audio()}}function audio(){var browser=navigator.appName;if((browser=='Microsoft Internet Explorer')){hide_it('audiostandard')}}
//Video Controls
var movie = null;
function movieload() {
if (document.getElementById('video')) {
	movie = new ACG(document.ACGvideo);
	}				
}
function ACG(movie) {
this.movie = movie || null;
}
ACG.prototype.playVideo = function() {
	if(this.movie)
		this.movie.Play();
}
ACG.prototype.pauseVideo = function() {
	if(this.movie) 
		this.movie.Stop();
}
ACG.prototype.stopVideo = function() {
	if(this.movie) {
		this.movie.Stop();
		this.movie.Rewind();
	} 
}
function IEaudioStop() {
  	var browser=navigator.appName;
  	if ((browser == 'Microsoft Internet Explorer')) {
        audiostr = '<object id="audioplayer" classid="clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="375" height="26">';
        audiostr += '<param name="src" value="/audio/none.mp3" >';
        audiostr += '<param name="controller" value="true" >';
        audiostr += '<param name="autoplay" value="false" >';
        audiostr += '</object>';
        document.getElementById('music').innerHTML = audiostr;
  	}
}