function getvideo(link)
{
var activevids = getElementsByClassName(document, 'a', 'videolink activevideo');
	for (var i in activevids){
		activevids[i].className = 'videolink';
	}

var num = link.id;
var newHTML = '<object width="652" height="395"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="wmode" value="transparent" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=' + num + '&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1&amp;autoplay=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=' + num + '&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1&amp;autoplay=1" wmode="transparent" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="652" height="395"></embed></object>';
document.getElementById('movie').innerHTML = newHTML;
var newClass = document.getElementById(num.toString());
newClass.className = 'videolink activevideo';
}

function getElementsByClassName(oElm, strTagName, strClassName){
  var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName);
	 var arrReturnElements = new Array();
	 strClassName = strClassName.replace(/\-/g, "\\-");
	 var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
	 var oElement;
	 for(var i=0; i<arrElements.length; i++){
	   oElement = arrElements[i];
	   if(oRegExp.test(oElement.className)){
	     arrReturnElements.push(oElement);
	   }
	 }
	 return (arrReturnElements)
}
