function showVid(year){
//	alert('inside ' + document.getElementById('video').value)
	document.getElementById('videoBox').innerHTML = ""
   var t = document.createElement('INPUT')
   var tid = "temp"
   t.setAttribute('id', tid)
   mytype = 'text'
   t.setAttribute('type', mytype)
   document.getElementById('videoposition').appendChild(t)

   if(year == '0'){
		year=2011;
	   document.getElementById('videoBox').innerHTML = "<iframe width='560' height='315' src='http://www.youtube.com/embed/2jJP2IOx_Ps' frameborder='0' allowfullscreen></iframe>"
   }

   if(year == '1'){
		year=2010;
	   document.getElementById('videoBox').innerHTML = "<object width='480' height='385'><param name='movie' value='http://www.youtube.com/v/-bUqXWtMRfY?fs=1&amp;hl=en_US'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/-bUqXWtMRfY?fs=1&amp;hl=en_US' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='480' height='385'></embed></object>"
   }

   if(year == '2'){
		year=2009;
	   document.getElementById('videoBox').innerHTML = "<object width='425' height='344'><param name='movie' value='http://www.youtube.com/v/UZrEbcRHZCY&hl=en&fs=1'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/UZrEbcRHZCY&hl=en&fs=1' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='425' height='344'></embed></object>"
   }

	if(year == '3'){
		year=2008;
   		  document.getElementById('videoBox').innerHTML = "<object width='425' height='344'><param name='movie' value='http://www.youtube.com/v/AcbCXbLCoks&hl=en&fs=1'></param><param name='allowFullScreen' value='true'></param><embed src='http://www.youtube.com/v/AcbCXbLCoks&hl=en&fs=1' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='344'></embed></object>"

	}
	if(year == '4'){
		year=2007;
   		  document.getElementById('videoBox').innerHTML = "<object width='425' height='344'><param name='movie' value='http://www.youtube.com/v/8Z-jQVGI8XY&hl=en&fs=1'></param><param name='allowFullScreen' value='true'></param><embed src='http://www.youtube.com/v/8Z-jQVGI8XY&hl=en&fs=1' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='344'></embed></object>"
	}
	if(year == '5'){
		year=2006;
   		  document.getElementById('videoBox').innerHTML = "<object width='425' height='344'><param name='movie' value='http://www.youtube.com/v/y4qiM1kaDC0&hl=en&fs=1'></param><param name='allowFullScreen' value='true'></param><embed src='http://www.youtube.com/v/y4qiM1kaDC0&hl=en&fs=1' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='344'></embed></object>"
	}
	if(year == '6'){
		year=2005;
   		  document.getElementById('videoBox').innerHTML = "<object width='425' height='344'><param name='movie' value='http://www.youtube.com/v/kqZ5rfuN1GU&hl=en&fs=1'></param><param name='allowFullScreen' value='true'></param><embed src='http://www.youtube.com/v/kqZ5rfuN1GU&hl=en&fs=1' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='344'></embed></object>"
	}
   document.getElementById('title').innerHTML = "<b>Hopelink's " + year + " Video</b>"
   if(year == 'canstruction'){
	   document.getElementById('videoBox').innerHTML = "<object width='425' height='344'><param name='movie' value='http://www.youtube.com/v/9mdh3H1fUPc&hl=en&fs=1&'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/9mdh3H1fUPc&hl=en&fs=1&' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='425' height='344'></embed></object>"
      document.getElementById('title').innerHTML = "<b>Expedia CANstruction Event, July 2009</b>";
   }
      if(year == 'holiday2010'){
		   document.getElementById('videoBox').innerHTML = "<object width='425' height='344'><param name='movie' value='http://www.youtube.com/v/xK6R0_4-DjE?hl=en&fs=1'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/xK6R0_4-DjE?hl=en&fs=1' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='425' height='344'></embed></object>"
	      document.getElementById('title').innerHTML = "<b>Hopelink's Holiday Message 2010</b>";
   }
   
   document.getElementById('temp').focus();
	document.getElementById('videoposition').removeChild(t);
}

function alternate(id){
 if(document.getElementsByTagName){
   var table = document.getElementById(id);
   var rows = table.getElementsByTagName("tr");
   for(i = 0; i < rows.length; i++){
 //manipulate rows
     if(i % 2 == 0){
       rows[i].className = "evenRow";
     }else{
       rows[i].className = "oddRow";
     }
   }
 }
}

function showCode(widget){
	document.getElementById("video").innerHTML=""    // clear out the video if it has been viewed
   if(widget=="widget_foodhomehelp.gif"){
	   document.getElementById('codeBox').value="<a href='http://youthlink.hope-link.org/holidays.shtml' target='_blank'><img src='http://youthlink.hope-link.org/images/widgets/"+widget+"' border=0></a>"
   }
   if(widget=="widget_holiday.gif"){
	   document.getElementById('codeBox').value="<a href='http://youthlink.hope-link.org/holidays.shtml' target='_blank'><img src='http://youthlink.hope-link.org/images/widgets/"+widget+"' border=0></a>"
   }
   if(widget=="widget_turkeytrot.gif"){
	   document.getElementById('codeBox').value="<a href='http://youthlink.hope-link.org/whatsup.shtml' target='_blank'><img src='http://youthlink.hope-link.org/images/widgets/"+widget+"' border=0></a>"
   }
//		document.getElementById('pic').innerHTML="<img src='images/turkeytrot/"+size+".jpg' border='0'>"

//	document.getElementById('mytext').value="<a href='http://www.youthlink.hope-link.org/images/widgets/' target='_blank'><img src='http://www.youthlink.hope-link.org/images/widgets/"+widget+".jpg' border=0></a>"
document.getElementById('codeBox').focus()
}

function getCode(){
   document.getElementById('codeBox').select()
}

function noScroll(){
  document.getElementById("codeBox").scrolling="no"
}




