function lbMovie(movieName) {
    if( document.getElementById(movieName) )
        return document.getElementById(movieName);
    else
        return false;
/*
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    }
    else {
        return document[movieName]
    }
*/
}
function LbVideoPlace(id){

    var options = {
		// default options
		id            : ( typeof(arguments[1].id)             != 'undefined' ) ? arguments[1].id            : 'movie',
		skin          : ( typeof(arguments[1].skin)           != 'undefined' ) ? arguments[1].skin          : root + 'swf/blip.swf',
		volume        : ( typeof(arguments[1].volume)         != 'undefined' ) ? arguments[1].volume        : 100,
		height        : ( typeof(arguments[1].height)         != 'undefined' ) ? arguments[1].height        : 288,
		width         : ( typeof(arguments[1].width)          != 'undefined' ) ? arguments[1].width         : 512,
		autoplay      : ( typeof(arguments[1].autoplay)       != 'undefined' ) ? arguments[1].autoplay      : true,
		hoverControls : ( typeof(arguments[1].hoverControls)  != 'undefined' ) ? arguments[1].hoverControls : true,
		initialPic    : ( typeof(arguments[1].initialPic)     != 'undefined' ) ? arguments[1].initialPic    : false,
		finalPic      : ( typeof(arguments[1].finalPic)       != 'undefined' ) ? arguments[1].finalPic      : false,
		continuousPlay: ( typeof(arguments[1].continuousPlay) != 'undefined' ) ? arguments[1].continuousPlay: true,
		xmlFile       : ( typeof(arguments[1].xmlFile)        != 'undefined' ) ? arguments[1].xmlFile       : false,
		videoFile     : ( typeof(arguments[1].videoFile)      != 'undefined' ) ? arguments[1].videoFile     : false,
		flashFile	  : ( typeof(arguments[1].flashFile)      != 'undefined' ) ? arguments[1].flashFile     : root + 'swf/video.swf',
		playAdvert    : ( typeof(arguments[1].playAdvert)     != 'undefined' ) ? arguments[1].playAdvert    : false,
		clickableAd   : ( typeof(arguments[1].clickableAd)    != 'undefined' ) ? arguments[1].clickableAd   : false,
		controlsDisabled : ( typeof(arguments[1].controlsDisabled) != 'undefined' ) ? arguments[1].controlsDisabled : false,
		wmode         : ( typeof(arguments[1].wmode)          != 'undefined' ) ? arguments[1].wmode         : 'opaque',
        startFull     : ( typeof(arguments[1].startFull)      != 'undefined' ) ? arguments[1].startFull		: 'false'
	};

    if( options.videoFile.substring(options.videoFile.length - 3) != 'flv' ) {
    	 // if main video is not flv
    	
		var filename = options.videoFile.substring(0, options.videoFile.length - 3) + 'flv';

    	 $.ajax({ url		: filename,
    	 		  type		: 'HEAD',
    	 		  async		: false,
    	 		  success	: function(){
    	 		  				options.videoFile = this.url;    	 		  				
    	 		  			}
    	 		});
    }

	var flash_version = swfobject.getFlashPlayerVersion();

	if ( ( // if the flash player can play anything
			(flash_version.major == 9 && (flash_version.minor > 0 || flash_version.release >= 115) ) ||
			( flash_version.major > 9 )
		 ) || (
		 	// or the video file is an flv
		 	flash_version.major >= 8 &&
		 	options.videoFile.substring(options.videoFile.length - 3) == 'flv'
		 )
		){

		// we can embed the flash movie
		    var flashvars = {
		        Volume          : options.volume,
		        hoverControls   : options.hoverControls,
		        initialPic      : options.initialPic,
		        finalPic        : options.finalPic,
		        autoplay        : options.autoplay,
		        continuousPlay  : options.continuousPlay,
		        playAdvert      : options.playAdvert,
		        clickableAd     : options.clickableAd,
		        controlsDisabled: options.controlsDisabled,
				startFull		: options.startFull
		    };

		if( options.skin )
			flashvars['c_skin']     = options.skin;
		
		if( options.xmlFile )
			flashvars['xmlFile']    =	options.xmlFile;
		
		if( options.videoFile )
			flashvars['videoFile']  = options.videoFile;
	    
	    var params = {
	        quality         : 'autohigh',
	        wmode           : options.wmode,
	        allowfullscreen : true,
	        bgcolor         : '#000000',
	        allowScriptAccess   : 'sameDomain'
	    };

	    var attributes = {
	        id    : options.id,
	        name  : options.id
	    };
	    
	    swfobject.embedSWF( options.flashFile, id, options.width, options.height, "8",null, flashvars, params, attributes);

	} else if( jQuery.browser.qtime && (
										options.videoFile.substr(-3) == 'mov' ||
										options.videoFile.substr(-3) == 'm4v' ||
										options.videoFile.substr(-3) == 'mp4'
									   )
			 ) {
		// if it's a quicktime embedable file
		$('#'+ id).html('<embed width="' + options.width + '" height="' + options.height + '" targetcache="true" autostart="true" scale="aspect" bgcolor="000000" \
	        			src="' + options.videoFile + '" type="video/quicktime"/>');
	} else {
		//alert(options.videoFile.substr(-3))
	}

}

function lbGetUrl(){
  return window.location.href;
}