function doClose(e) // note: takes the event as an arg (IE doesn't)
{
    if (!e) e = window.event; // fix IE

    if (e.keyCode) // IE
    {
        if ((e.keyCode == "27")||(e.keyCode == "99")||(e.keyCode == "ESC")) return clicker();
    }
    else if (e.charCode) // Netscape/Firefox/Opera
    {
        if (e.keyCode == "27") return clicker();
    }
}

/* remember when inserting the embedded link to remove the double quotes*/
function clicker(choice, mylink){
var thediv=document.getElementById('displaybox');	
	if(thediv.style.display == "none"){
		thediv.style.display = "";	
		
		document.onkeypress = doClose;

		var myChoice=new Array();
		myChoice[choice]= "<table class='vidborder' width='100%' height='100%'><tr><td valign='middle' width='100%' height='100%'><br><br><center><object width='400' height='200'><param name='allowfullscreen' value='true' /><param name='allowscriptaccess' value='always' /><param name='movie' value='http://vimeo.com/moogaloop.swf?clip_id="+mylink+"&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' /><embed src='http://vimeo.com/moogaloop.swf?clip_id="+mylink+"&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always' width='800' height='600'></embed></object><br><a href= '#' onclick='return clicker();'>CLOSE WINDOW</a></td></tr></table></center>";
		
		thediv.innerHTML = myChoice[choice];
		
	}else{
		thediv.style.display = "none";
		thediv.innerHTML = '';
	}
	return false;
}