﻿
function playVideoNow(videoFile)
{  

	var videoCount = videoFile;




	if (videoCount == 'Video1')
	{
	document.getElementById('Video1').style.color = "#990000"
	document.getElementById('Video2').style.color = "#000099"
	document.getElementById('VideoDescription').innerHTML = '<p><strong>Highlights include:</strong></p><p style="font-style:italic">The Pa. Trolley Museum: Keeping tourism on the right track.</p><ul class="mediumblue" style="margin-left:22px"><li><strong><a href="http://www.pahouse.com/mediacenter/videoplayback.asp?strN=062210_White_Trolly" title="Click Here to View a Full Sized Player!">Click Here to View a Full Sized Player.</a></strong></li></ul>'
	}

	if (videoCount == 'Video2')
	{
	document.getElementById('Video2').style.color = "#990000"
	document.getElementById('Video1').style.color = "#000099"
	document.getElementById('VideoDescription').innerHTML = '<p><strong>Highlights include:</strong></p><p style="font-style:italic">How Washington County is becoming the “Energy Capital of the East”.</p><ul class="mediumblue" style="margin-left:22px"><li><strong><a href="http://www.pahouse.com/mediacenter/videoplayback.asp?strN=062210_White_Banker" title="Click Here to View a Full Sized Player!">Click Here to View a Full Sized Player.</a></strong></li></ul>'
	}



	var xmlHttp;
	  try
	    {     
	    xmlHttp=new XMLHttpRequest();    
	    }
	  catch (e)
	    {    // Internet Explorer    
	    try
	      {      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      }
	    catch (e)
	      {      try
	        {        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        }
	      catch (e)
	        {        alert("Your browser does not support AJAX!");        return false;        }      }    }
	        
	    //===========================================
	    // Function:
	    // If response has been sent to XMLhttp fill the div id'ed as txtResults with the response
	    //===========================================
	     xmlHttp.onreadystatechange=function()
	      {
	      if(xmlHttp.readyState==4)
	        {
	        document.getElementById("divResults").innerHTML=xmlHttp.responseText;
	        }
	      }
	     //==================================
	     var url="documents/" + videoFile + ".asp";
	     //alert(url);
	
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);  

	
}

					function backwardButton()
					{
					count = count - 1;

					if (count == 0)
					{
					count = 1;
					}

					if (count == 1)
					{
					var myimage=document.getElementById("divResults")
					if (myimage.filters && myimage.filters.length>0) //if filters[] collection is defined (only in IE)
				  	myimage.filters[0].apply()
				
					document.getElementById('divResults').innerHTML = '<img onclick="playVideoNow(\'Video1\');" alt="Click here to watch the video!" src="http://www.pahouse.com/white/images/WhiteVideo-action1.jpg" id="VideoImage" style="margin-left:0px; padding-left:0px"/>';
				
					if (myimage.filters && myimage.filters.length>0)
					myimage.filters[0].play(1)
				
					document.getElementById('VideoNav').innerHTML = '<table style="width:360px"><tr><td style="width:72px"><span onclick="backwardButton();" class="VideoLinkArrows" id="BackButton"><span style="color:#E8ECF5; cursor:auto">&#8592;</span></span></td><td style="width:72px"><br style="line-height:9px"/><span onclick="playVideoNow(\'Video1\');" class="VideoLink" id="Video1"><span style="color:#990000">Video1</span></span></td><td style="width:72px"><br style="line-height:9px"/><span onclick="playVideoNow(\'Video2\');" class="VideoLink" id="Video2">Video2</span></td><td style="width:72px"><br style="line-height:9px"/><span onclick="playVideoNow(\'Video3\');" class="VideoLink" id="Video3">Video3</span></td><td style="width:72px"><span onclick="forwardButton();" class="VideoLinkArrows" id="BackButton">&#8594;</span></td></tr></table>';
					document.getElementById('VideoDescription').innerHTML = '<p><strong>Highlights include:</strong></p><p style="font-style:italic">Update on a package of bills to regulate Municipal Authorities.</p><ul class="mediumblue" style="margin-left:22px"><li><strong><a href="http://www.pahouse.com/mediacenter/videoplayback.asp?strN=012910_White_1" title="Click Here to View a Full Sized Player!">Click Here to View a Full Sized Player.</a></strong></li></ul>'
					}
					
					if (count == 2)
					{
					var myimage=document.getElementById("divResults")
					if (myimage.filters && myimage.filters.length>0) //if filters[] collection is defined (only in IE)
				  	myimage.filters[0].apply()
				
					document.getElementById('divResults').innerHTML = '<img onclick="playVideoNow(\'Video2\');" alt="Click here to watch the video!" src="http://www.pahouse.com/white/images/WhiteVideo-action2.jpg" id="VideoImage" style="margin-left:0px; padding-left:0px"/>';
				
					if (myimage.filters && myimage.filters.length>0)
					myimage.filters[0].play(1)
				
					document.getElementById('VideoNav').innerHTML = '<table style="width:360px"><tr><td style="width:72px"><span onclick="backwardButton();" class="VideoLinkArrows" id="BackButton">&#8592;</span></td><td style="width:72px"><br style="line-height:9px"/><span onclick="playVideoNow(\'Video1\');" class="VideoLink" id="Video1">Video1</span></td><td style="width:72px"><br style="line-height:9px"/><span onclick="playVideoNow(\'Video2\');" class="VideoLink" id="Video2"><span style="color:#990000">Video2</span></span></td><td style="width:72px"><br style="line-height:9px"/><span onclick="playVideoNow(\'Video3\');" class="VideoLink" id="Video3">Video3</span></td><td style="width:72px"><span onclick="forwardButton();" class="VideoLinkArrows" id="BackButton">&#8594;</span></td></tr></table>'
					document.getElementById('VideoDescription').innerHTML = '<p><strong>Highlights include:</strong></p><p style="font-style:italic">How table games will impact local homeowners.</p><ul class="mediumblue" style="margin-left:22px"><li><strong><a href="http://www.pahouse.com/mediacenter/videoplayback.asp?strN=012910_White_2" title="Click Here to View a Full Sized Player!">Click Here to View a Full Sized Player.</a></strong></li></ul>'
					}

					if (count == 3)
					{
					var myimage=document.getElementById("divResults")
					if (myimage.filters && myimage.filters.length>0) //if filters[] collection is defined (only in IE)
				  	myimage.filters[0].apply()
				
					document.getElementById('divResults').innerHTML = '<img onclick="playVideoNow(\'Video3\');" alt="Click here to watch the video!" src="http://www.pahouse.com/white/images/WhiteVideo-action3.jpg" id="VideoImage" style="margin-left:0px; padding-left:0px"/>';
				
					if (myimage.filters && myimage.filters.length>0)
					myimage.filters[0].play(1)
				
					document.getElementById('VideoNav').innerHTML = '<table style="width:360px"><tr><td style="width:72px"><span onclick="backwardButton();" class="VideoLinkArrows" id="BackButton">&#8592;</span></td><td style="width:72px"><br style="line-height:9px"/><span onclick="playVideoNow(\'Video1\');" class="VideoLink" id="Video1">Video1</span></td><td style="width:72px"><br style="line-height:9px"/><span onclick="playVideoNow(\'Video2\');" class="VideoLink" id="Video2">Video2</span></td><td style="width:72px"><br style="line-height:9px"/><span onclick="playVideoNow(\'Video3\');" class="VideoLink" id="Video3"><span style="color:#990000">Video3</span></span></td><td style="width:72px"><span onclick="forwardButton();" class="VideoLinkArrows" id="BackButton"><span style="color:#E8ECF5; cursor:auto">&#8594;</span></span></td></tr></table>'
					document.getElementById('VideoDescription').innerHTML = '<p><strong>Highlights include:</strong></p><p style="font-style:italic">Pa.\'s property reassessment system needs fixing.</p><ul class="mediumblue" style="margin-left:22px"><li><strong><a href="http://www.pahouse.com/mediacenter/videoplayback.asp?strN=012910_White_3" title="Click Here to View a Full Sized Player!">Click Here to View a Full Sized Player.</a></strong></li></ul>'
					}

					}
					
					function forwardButton()
					{
					count = count + 1;

					if (count == 4)
					{
					count = 3;
					}

					if (count == 1)
					{
					var myimage=document.getElementById("divResults")
					if (myimage.filters && myimage.filters.length>0) //if filters[] collection is defined (only in IE)
				  	myimage.filters[0].apply()
				
					document.getElementById('divResults').innerHTML = '<img onclick="playVideoNow(\'Video1\');" alt="Click here to watch the video!" src="http://www.pahouse.com/white/images/WhiteVideo-action2.jpg" id="VideoImage" style="margin-left:0px; padding-left:0px"/>';
				
					if (myimage.filters && myimage.filters.length>0)
					myimage.filters[0].play(1)
				
					document.getElementById('VideoNav').innerHTML = '<table style="width:360px"><tr><td style="width:72px"><span onclick="backwardButton();" class="VideoLinkArrows" id="BackButton"><span style="color:#E8ECF5; cursor:auto">&#8592;</span></span></td><td style="width:72px"><br style="line-height:9px"/><span onclick="playVideoNow(\'Video1\');" class="VideoLink" id="Video1"><span style="color:#990000">Video1</span></span></td><td style="width:72px"><br style="line-height:9px"/><span onclick="playVideoNow(\'Video2\');" class="VideoLink" id="Video2">Video2</span></td><td style="width:72px"><br style="line-height:9px"/><span onclick="playVideoNow(\'Video3\');" class="VideoLink" id="Video3">Video3</span></td><td style="width:72px"><span onclick="forwardButton();" class="VideoLinkArrows" id="BackButton">&#8594;</span></td></tr></table>';
					document.getElementById('VideoDescription').innerHTML = '<p><strong>Highlights include:</strong></p><p style="font-style:italic">Update on a package of bills to regulate Municipal Authorities.</p><ul class="mediumblue" style="margin-left:22px"><li><strong><a href="http://www.pahouse.com/mediacenter/videoplayback.asp?strN=012910_White_1" title="Click Here to View a Full Sized Player!">Click Here to View a Full Sized Player.</a></strong></li></ul>'
					}					

					if (count == 2)
					{
					var myimage=document.getElementById("divResults")
					if (myimage.filters && myimage.filters.length>0) //if filters[] collection is defined (only in IE)
				  	myimage.filters[0].apply()
				
					document.getElementById('divResults').innerHTML = '<img onclick="playVideoNow(\'Video2\');" alt="Click here to watch the video!" src="http://www.pahouse.com/white/images/WhiteVideo-action2.jpg" id="VideoImage" style="margin-left:0px; padding-left:0px"/>';
				
					if (myimage.filters && myimage.filters.length>0)
					myimage.filters[0].play(1)
				
					document.getElementById('VideoNav').innerHTML = '<table style="width:360px"><tr><td style="width:72px"><span onclick="backwardButton();" class="VideoLinkArrows" id="BackButton">&#8592;</span></td><td style="width:72px"><br style="line-height:9px"/><span onclick="playVideoNow(\'Video1\');" class="VideoLink" id="Video1">Video1</span></td><td style="width:72px"><br style="line-height:9px"/><span onclick="playVideoNow(\'Video2\');" class="VideoLink" id="Video2"><span style="color:#990000">Video2</span></span></td><td style="width:72px"><br style="line-height:9px"/><span onclick="playVideoNow(\'Video3\');" class="VideoLink" id="Video3">Video3</span></td><td style="width:72px"><span onclick="forwardButton();" class="VideoLinkArrows" id="BackButton">&#8594;</span></td></tr></table>'
					document.getElementById('VideoDescription').innerHTML = '<p><strong>Highlights include:</strong></p><p style="font-style:italic">How table games will impact local homeowners.</p><ul class="mediumblue" style="margin-left:22px"><li><strong><a href="http://www.pahouse.com/mediacenter/videoplayback.asp?strN=012910_White_2" title="Click Here to View a Full Sized Player!">Click Here to View a Full Sized Player.</a></strong></li></ul>'
					}

					if (count == 3)
					{
					var myimage=document.getElementById("divResults")
					if (myimage.filters && myimage.filters.length>0) //if filters[] collection is defined (only in IE)
				  	myimage.filters[0].apply()
				
					document.getElementById('divResults').innerHTML = '<img onclick="playVideoNow(\'Video3\');" alt="Click here to watch the video!" src="http://www.pahouse.com/white/images/WhiteVideo-action3.jpg" id="VideoImage" style="margin-left:0px; padding-left:0px"/>';
				
					if (myimage.filters && myimage.filters.length>0)
					myimage.filters[0].play(1)
				
					document.getElementById('VideoNav').innerHTML = '<table style="width:360px"><tr><td style="width:72px"><span onclick="backwardButton();" class="VideoLinkArrows" id="BackButton">&#8592;</span></td><td style="width:72px"><br style="line-height:9px"/><span onclick="playVideoNow(\'Video1\');" class="VideoLink" id="Video1">Video1</span></td><td style="width:72px"><br style="line-height:9px"/><span onclick="playVideoNow(\'Video2\');" class="VideoLink" id="Video2">Video2</span></td><td style="width:72px"><br style="line-height:9px"/><span onclick="playVideoNow(\'Video3\');" class="VideoLink" id="Video3"><span style="color:#990000">Video3</span></span></td><td style="width:72px"><span onclick="forwardButton();" class="VideoLinkArrows" id="BackButton"><span style="color:#E8ECF5; cursor:auto">&#8594;</span></span></td></tr></table>'
					document.getElementById('VideoDescription').innerHTML = '<p><strong>Highlights include:</strong></p><p style="font-style:italic">Pa.\'s property reassessment system needs fixing.</p><ul class="mediumblue" style="margin-left:22px"><li><strong><a href="http://www.pahouse.com/mediacenter/videoplayback.asp?strN=012910_White_3" title="Click Here to View a Full Sized Player!">Click Here to View a Full Sized Player.</a></strong></li></ul>'
					}
					
					}

