function embedFlv(elem, flvFile, autoPlay)
{
    if(typeof autoPlay == 'undefined') var autoPlay=true;
    var folder="http://www.nicmorris.com/";
    if(document.location.host=="dev") folder="http://dev/nicmorris/";
    flvFile=folder+flvFile;
    flashembed(elem, 
    
        /* 
        	first argument supplies standard Flash parameters. See full list:
        	http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_12701
        */
        {
        	src: folder+'flowplayer/FlowPlayerDark.swf',
            bgcolor: "#000000"
        },
        
        /*
        	second argument is Flowplayer specific configuration. See full list:
        	http://flowplayer.org/player/configuration.html
        */
        {config: {   
        	autoPlay: autoPlay,
        	autoBuffering: true,
        	controlBarBackgroundColor:'0x2e8860',
        	initialScale: 'scale',
        	initialVolumePercentage: '100',
        	videoFile: flvFile,
        	controlBarGloss: 'none',
        	controlsOverVideo: 'ease',
        	menuItems: [ true, true, true, true, true, true ],
        	controlBarBackgroundColor: '-1',
        	showFullScreenButton: false,
        	showMenu: false,
        	showMuteVolumeButton: true,
        	showVolumeSlider: true,
        	loop: false,
        	autoRewind: true
        	
        }} 
    );
}

function verticalCenterVideo(element)
{
    yOffset=Math.round(posTop()+((pageHeight()-parseInt($(element).offsetHeight)-parseInt($("filmdetail").offsetHeight)-parseInt($("header").offsetHeight)-parseInt($("footer").offsetHeight))/2));
    if(yOffset<0) yOffset=0;
    $("videoDisplay").style.marginTop=yOffset-10+"px";
    $("videoDisplay").style.marginBottom=yOffset+10+"px";
}

function navTop(elem)
{   //Toggle the black and white bar
    style=elem.style.borderTop;
    if(elem.className.indexOf("navselected")>-1 && style=="") elem.style.borderTop="solid 8px white";
    style=elem.style.borderTop;
    if(style=="" || style.indexOf("#0b0c1a")>-1 || style.indexOf("11, 12, 26")>-1)
    { elem.style.borderTop="solid 8px white"; }
    else { elem.style.borderTop="solid 8px #0b0c1a";}
}

