	
	function createMovieText(movieName,pathAndQuery)
	{
		/* 
		this function creates html for embedded flash player, if you change 
		the video player or it's path, make sure to change the 
		value of pathAndQuery variable
		*/
				
		var movieText='<div id="loader">'+
		'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '+
		'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#'+
		'version=8,0,0,0" id="AZROCVideo" align="middle">'+
		'<param name="allowScriptAccess" value="sameDomain" />'+
		'<param name="movie" value="'+pathAndQuery+movieName+'" />'+
		'<param name="quality" value="high" />'+
		'<param name="wmode" value="transparent" />'+
		'<embed src="'+pathAndQuery+movieName+'" name="AZROCVideo" '+
		'allowScriptAccess="sameDomain" wmode="transparent" '+
		'type="application/x-shockwave-flash" '+
		'pluginspage="http://www.macromedia.com/go/getflashplayer" />'+
		'</object></div>';
		
		return movieText;	
	}
	function insertMovie(movieName,movieTitle,divId,largeLink)
	{

		var	pathAndQuery='';
		var showLarger='';
		
		if(divId=="video_object")
		{
			pathAndQuery="/media/largeviewer.swf";
		}
		else
		{
			pathAndQuery="/small_media/small_player.swf";
		}
		pathAndQuery=pathAndQuery+"?video=";
		
		var s=document.getElementById ? 
		document.getElementById(divId) : document.all[divId];
		
		/* run function to create html code for embedded flass player */
		var movieText=createMovieText(movieName,pathAndQuery);
			
		if(movieTitle !="")
		{
			/*
			Insert html code into div tag with specified divId.  Create link (see below) 
			with larger	movie version option.  The link, when clicked reinserts the small
			movie code, so that both movies are not playing simultaneously
			*/
			if(largeLink)
			{
				showLarger=''+
				' <a class="nowrap" href="'+largeLink+'" title="'+movieTitle+'"'+
				'onclick="insertMovie(\''+movieName+'\',this.title,\''+
				divId+'\',this.href); '+
				'popup(this.href,this.title); return false">'+
				'larger</a>';
			}
			else
			{
				showLarger='';
			}
			
			movieTitle="<div id='movieinfo'><span>"+movieTitle+"</span>"+showLarger+"</div>";
			
		}

		s.innerHTML=movieTitle+movieText;
	}
	

	function videoBackground()		
	{
		/*
			size video background image to fit in 31% space.  This is so 
			that video player appears to fill the space but the aspect ratio
			of the movie is correct.
		*/
		var bImage=document.getElementById ? 
			document.getElementById('videoboximg') : document.all['videoboximg'];
		
		if(!bImage)
		{
			return false;
		}
		else
		{
			newWidth=bImage.parentNode.offsetWidth;
			bImage.style.width=newWidth+"px";
			return true;
		}
	}

	
	function adjustMovieLinks()
	{
		var movieLinks=document.getElementById ? 
			document.getElementById('movielinks') : document.all['movielinks'];
		if(!movieLinks)
		{
			return;
		}
		else
		{
			movieLinks.className="box60";
			movieLinks.style.clear="left";
		}
	}
