function pgmText(thisClient, pic){
	
	theObj = document.getElementById('pgmText');
	
	theObj.innerHTML = '';
			
	//the actual text here...
	if (thisClient == 'mbc')
	{	
		script = '<span class="boldblue">Meth: Bad Chemistry</span><br>Explore the tragic realities of Meth use through first hand accounts from former addicts, their family members, and law ';
		script += 'enforcement. This powerful program earned numerous international awards and is used by law enforcement, social service, ';
		script += 'and treatment facilities throughout the U.S. Written, directed, and produced by Rucinski & Reetz Communication. Clip ';
		script += 'courtesy of Marathon County Sheriff\'s Department.';
		
	}else if (thisClient == 'ada')
	{
		script = '<span class="boldblue">Spectrum Industries</span><br>Experience the innovations of the ADAptec Lectern. This unique tool, which serves businesses and educational ';
		script += 'institutions, adjusts quickly to bring the work surface to the user and position multimedia presentation tools at the ';
		script += 'fingertips of individual presenters regardless of their physical abilities. The DVD is used in direct mail lead generation. ';
		script += 'Written by Rucinski & Reetz Communication. Clip courtesy of The Post House.';
		
	}else if (thisClient == 'wsd')
	{
		script = '<span class="boldblue">Wausau School District</span><br>Learn how families can reinforce reading skills that children learn in school. This program is targeted to parents and ';
		script += 'guardians, and includes tips for everyday ways to support and enhance a child\'s literacy capabilities. It is used by ';
		script += 'Johns Hopkins University and multiple school districts. Written, directed, and produced by Rucinski & Reetz ';
		script += 'Communication. Clip courtesy of Wausau School District.';
		
	}else if (thisClient == 'icf')
	{
		script = '<span class="boldblue">International Crane Foundation</span><br>Follow a pair of whooping cranes from a non-migratory flock as they leave drought ravaged Florida to take a surprising ';
		script += 'trip north in search of more favorable conditions. Produced for a scientific organization, it documents the flight path ';
		script += 'and behaviors of the birds. Written, directed, and produced by Rucinski & Reetz Communication. Clip courtesy of the '; 
		script += 'International Crane Foundation.';
		
	}else if (thisClient == 'hurd')
	{
		script = '<span class="boldblue">Hurd Total Business</span><br>Envision hand crafted custom windows and doors tough enough to protect people from hurricane force winds and debris. ';
		script += 'This short video was designed for use in sales and marketing applications. Written by Rucinski & Reetz Communication. ';
		script += 'Clip courtesy of Becker Communications.';
	}
	
	//display the text here
	theObj.innerHTML = script;
	
	//display the picture, not the movie if needed
	if (pic == 'yes')
	{
		//set the video off
		if (document.getElementById('video'))
		{
			document.getElementById('video').innerHTML = '';
		}
		pgmImg(thisClient);
	}	
}

function pgmImg(pic)
{
	theObj = document.getElementById('pgmText');
	if (pic == 'icf')
	{
		thisImage = 'IntlCraneFoundation_lg.jpg';
	}else if (pic == 'mbc')
	{
		thisImage = 'MethBadChemistry_lg.jpg';
	}
	else if (pic == 'ada')
	{
		thisImage = 'AdaptecLectern_lg.jpg';
	}
	else if (pic == 'wsd')
	{
		thisImage = 'PartnersInReading_lg.jpg';
	}
	else if (pic == 'hurd')
	{
		thisImage = 'HurdTotalBusiness_lg.jpg';
	}
		
	//thisHtml = '<img src="images/' + thisImage + '" border="0">';
	//thisHtml += '<a href="program.cfm?mov='+pic+'" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'select\',\'\',\'images/frame-selectvid2.jpg\',1)"><img src="images/frame-selectvid1.jpg" alt="Watch this video" onclick="loadVideo(pic);" name="select" width="335" height="75" border="0" id="select" /></a>';
	thisHtml = '<img src="images/' + thisImage + '" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'select\',\'\',\'images/frame-selectvid2.jpg\',1)" border="0">';
	thisHtml += '<img src="images/frame-selectvid1.jpg" alt="Watch this video" onclick="loadVideo(\''+pic+'\');" name="select" width="335" height="75" border="0" id="select" />';
	
	theObj.innerHTML += thisHtml;
}

//this function only runs on pageload
function pageInit(myMov)
{	
	// Create variable is_input to see if there is 'mov=' in the url
	var is_input = document.URL.indexOf('mov=');
	//only run this if there is no movie selected. 
	if (is_input == -1)
	{
		theObj = document.getElementById('pgmText');
		//script = '<br><br>To view a video sample, click a video image to the right then click \'SELECT THE VIDEO\'.<br><br>';
		script = '<img src="images/IntlCraneFoundation_lg.jpg" border="0" alt="international Crane Foundataion">';	
		theObj.innerHTML = script;
	}
	else
	{		
		//don't display the picture but do display the video
		document.getElementById('pgmText').innerHTML = '';
		pgmText(myMov, 'no');
		document.getElementById('video').style.display = 'block';
	}	
}

function loadVideo(vid)
{
	thisMovie = '';
	if (vid == 'icf')thisMovie = 'crane';
	if (vid == 'mbc')thisMovie = 'meth';
	if (vid == 'wsd')thisMovie = 'partners';	
	if (vid == 'ada')thisMovie = 'adaptec';
	if (vid == 'hurd')thisMovie = 'hurd';
	
	document.getElementById('pgmText').innerHTML = '';
	pgmText(vid, 'no');
	document.getElementById('video').style.display = 'block';
	vDiv = document.getElementById('video');
	myHTML = '';
	myHTML += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
	myHTML += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab##version=7,0,19,0" width="320" height="240" title="flash video">';
	myHTML += '<param name="movie" value="media/' + thisMovie + '.swf" />';
	myHTML += '<param name="quality" value="high" />';
	myHTML += '<PARAM NAME="QUALITY" VALUE="best">';
	myHTML += '<PARAM NAME="LOOP" VALUE="false">';
	myHTML += '<embed src="media/' + thisMovie + '.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"';
	myHTML += 'type="application/x-shockwave-flash" width="320" height="240" autostart="false" loop="false"';
	myHTML += 'BASE="http://www.rucinskireetz.com/new06/"></embed>';
	myHTML += '</object>';
	
	vDiv.innerHTML = myHTML;
}