
var popvid = null;     
// will store the window reference
function popWin(divId) {   
if (typeof(divId)=='string') { divId=document.getElementById(divId); }   
if (!popvid||popvid.closed) {      
popvid=window.open('','vidplayer','width=330,height=275,status=no');   
}   
popvid.document.body.style.backgroundColor='black';   
popvid.focus();   
popvid.document.body.innerHTML='<BR><center>'+divId.innerHTML+'</center>';   
return false;}window.onunload=function()
{   
// if the user is navigating away from the page, check to see if we   
// opened a video window and if we did, make sure it's closed.   
if (popvid) {      
popvid.close(); 

}
}

