Adding metacafe videos with javascript
Video Gallery


<script type="text/javascript">
var vidtit = new Array();
vidtit[1] = ["1233921","The Truth About Fruit! Health Food or Candy? Nutrition"];
vidtit[2] = ["582806","Alessandra Ambrosio"];
vidtit[3] = ["1447760","Hudson Leick Warrior In Me"];
vidtit[4] = ["sy-1313477311","Toxic Britney Spears"];
vidtit[5] = ["6057246","Rose McGowan"];
vidtit[6] = ["sy-14211016","Alice In Chains Angry Chair"];
vidtit[7] = ["sy-1295329262","The Offspring she got issues"];
vidtit[8] = ["yt-X-77txuiVXs","vamos a la playa"];
vidtit[9] = ["end"];
function goadd(z)
{
document.getElementById("vid").innerHTML='<embed flashVars="playerVars=autoPlay=yes" src="http://www.metacafe.com/fplayer/'+vidtit[z][0]+'/paris_hilton.swf" width="640" height="388" allowNetworking="internal" wmode="transparent"  pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"> </embed>';
document.getElementById("vidtit").innerHTML= vidtit[z][1];
document.title = vidtit[z][1];
}

</script>


<div id="vid">
<embed flashVars="playerVars=autoPlay=no" src="http://www.metacafe.com/fplayer/1233921/paris_hilton.swf" width="640" height="388" allowNetworking="internal" wmode="transparent"  pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"> </embed>
</div>


<div id="vidlist">
<div id="vidlist1">

<script type="text/javascript">

var i=1;
for(i=1;vidtit[i][0]!="end";i++)
{
document.write('<div id="brvid"><div id="brvidimg"><a href="#'+vidtit[i][0]+'"  onClick =" goadd(\''+i+'\');"><img src="http://www.metacafe.com/thumb/'+vidtit[i][0]+'.jpg"></a></div><div id="brvidtit"><a a href="#'+vidtit[i][0]+'"  onClick =" goadd(\''+i+'\');">'+vidtit[i][1]+'</a></div></div>');

}

</script>
</div>
</div>
=========================
If you want to play multiple videos on your page with javascript you can use this code.Just select and copy the code and you can change the title and code in the array and you can add n umber of videos vidtit[1],vidtit[2], you just need to add vidtit[11] = ["end"];at the end of list.This code is only for metacafe.com i'll add for youtube videos soon.copy the whole code in notepad and save as htm or html and open in IE, firefox or google chrome and it works all you need to do is set CSS and changet he videos.