function TalkVideos(itemId)
{
	document.getElementById('div_showhide_flv0').style.display='';
	document.getElementById('div_showhide_flv1').style.display='none';
	document.getElementById('div_showhide_flv2').style.display='none';
	document.getElementById('div_showhide_flv3').style.display='none';
	document.getElementById('div_showhide_flv4').style.display='none';
	
	
	if(itemId == "div_showhide_flv0")
	{	
		document.getElementById('div_showhide_flv0').style.display='block';
		
		
	}	
	if(itemId == "div_showhide_flv1")
	{	
		document.getElementById('div_showhide_flv1').style.display='block';
		document.getElementById('div_showhide_flv0').style.display='none';
		
		
	}
	if(itemId == "div_showhide_flv2")
	{	
		document.getElementById('div_showhide_flv2').style.display='block';
		document.getElementById('div_showhide_flv0').style.display='none';
		
	}
	if(itemId == "div_showhide_flv3")
	{	
		document.getElementById('div_showhide_flv3').style.display='block';
		document.getElementById('div_showhide_flv0').style.display='none';
		
	}
	if(itemId == "div_showhide_flv4")
	{	
		document.getElementById('div_showhide_flv4').style.display='block';
		document.getElementById('div_showhide_flv0').style.display='none';
		
	}
	
}

function stopHideVideo(videoname)
{
    videl=	document.getElementById(videoname);
        flvStopPlaying(videoname);
        if(videl)
        videl.parentNode.parentNode.parentNode.style.display='none';
		showhidelinkel=document.getElementById('div_showhide_'+videoname);
        //window_status+='div_showhide_flv'+i+"::"+showhidelinkel+";";
		if(showhidelinkel)
		showhidelinkel.style.display='';

}

function playVideoHideOthers(videoname)
{
cntlimit=6;
        window_status='';
    videl=	document.getElementById(videoname);
for(i=0;i<=cntlimit;i++)
{
    curvidname="flv"+i;
    curel=	document.getElementById(curvidname);
    {
        if(curvidname!=videoname)
        {
    dbgOut("pvho("+videoname+") stopping "+curvidname);
        flvStopPlaying(curvidname);
        if(curel)
		{
		showhidelinkel=document.getElementById('div_showhide_flv'+i);
        dbgOut('hide div_showhide_flv'+i+"::"+showhidelinkel+";");
            if(showhidelinkel)
            showhidelinkel.style.display='none';
		}
        }
        else
        {
        flvStartPlaying(curvidname);
		showhidelinkel=document.getElementById('div_showhide_flv'+i);
        dbgOut('show div_showhide_flv'+i+"::"+videl+"::"+showhidelinkel+";");
		if(showhidelinkel)
		showhidelinkel.style.display='block';
		stopOtherVideos(false,curvidname);

        }
    }
}
//alert(window_status);
//alert("pvho returning");
dbgOut("pvho:"+videoname);
dbgOut(window_status);
dbgOut("/pvho");

}
function getFlashMovieObject2(movieName)
{
if(document.embeds[movieName])
return document.embeds[movieName];
if(window.document[movieName])
return window.document[movieName];
if(window[movieName])
return window[movieName];
if(document[movieName])
return document[movieName];
return false;
}


 function getFlashMovieObject(movieName) {
  var isIE = navigator.appName.indexOf("Microsoft") != -1;
  return (isIE) ? window[movieName] : document[movieName];
 }


function flvStopPlaying(flashmovie)
{
var flash = getFlashMovieObject(flashmovie);
if(flash && flash.stopFLV)
flash.stopFLV();
//else
///alert(flash+":"+flash.stopFLV);
}

function flvStartPlaying(flashmovie)
{
var flash = getFlashMovieObject(flashmovie);

if(flash && flash.playFLV)
flash.playFLV();
}
var visibleVideos={};

var curPlayingVideo="";

function getVidPathFromFLVId(curflvid){
    for(var key in visibleVideos){
		if(visibleVideos[key]===curflvid)
			return key;
	}
return false;
}

function stopOtherVideos(curvideo,curflvid)
{
dbgOut("stopOther:"+curvideo+":"+curPlayingVideo);

if(curvideo===false)
curvideo=getVidPathFromFLVId(curflvid);


if(curvideo !==false && curvideo==curPlayingVideo)
return;

curPlayingVideo=curvideo;


stralert="stopOtherVideos:"+curvideo+"\n\n";

    for(var key in visibleVideos){
    stralert+=key+":"+visibleVideos[key]+"\n";
    if(key!=curvideo)
        flvStopPlaying(visibleVideos[key]);    
    }
//alert(stralert);
dbgOut(stralert);
}


function dbgOut(str)
{
dbgt=document.getElementById("debugOut");

if(dbgt)
dbgt.value+=str+"\n";
/*dbgt.value+="Visiblevideos:\n";
    for(var key in visibleVideos){
        dbgt.value+="["+key+"]"+visibleVideos[key]+"\n";
	}*/
}

function showVideo(falshPath,flashName,flashId)
{
 	var so = new SWFObject(falshPath, flashName, "300", "515", "8", "");
	so.addVariable("myURL", "home");
    so.addParam("wmode", "transparent");
	so.write(flashId);
}