	// FAVideo instance(s)

var FLVPlayerReklame = null;
var all_so_objects = new Array();

var image_root = 'img';
var doc_root = '';
var locale = 'nono1';

function showFAV() {

	// initial size of player HAS to stay at this size (320x240) or else the skin bug with smaller sizes apply!
	// defined size from content load will be applied in time delayed function
	FLVPlayerReklame = new FAVideo('FLVPlayerReklame', null, 320, 240, {swfPath:'/maarud/images/nono1/movies/videoplayer/swf/FAVideo', skinPath:'/maarud/images/nono1/movies/videoplayer/skins/ClearOverPlayMute.swf', skinAutoHide:'true'});

	// due to a bug with skins in smaller initial sizes, we have to alter the size a short time after creating the player
	// this has to be supported by appropriate styling (!important height on resulting flash player div) or else a brief initial-sized flash will be seen!
	displayFAV_FLVPlayerReklame = function() {
		FLVPlayerReklame.setSize(500, 376);
		// move player to visible area
		document.getElementById('FLVPlayerReklame').style.left = '0px';

		
			// play initial file if one is present
			FLVPlayerReklame.load('http://www.maarud.no/maarud/downloads/nono1/Video-Delight.FLV');
			FLVPlayerReklame.play();
			// another bug causes videoScaleMode to be interpreted incorrectly when a new movie is being loaded
			FLVPlayerReklame.setVideoScaleMode(FLVPlayerReklame.getVideoScaleMode());
		
	}
	window.setTimeout('displayFAV_FLVPlayerReklame()', 500);


}

// play FLV file in chosen player
function playFlashVideo(playerInstance, videoURL) {
	playerInstance.load(videoURL);
	playerInstance.play();
	playerInstance.setVideoScaleMode(playerInstance.getVideoScaleMode());
	scroll(0,0);
}


function initSOObjects() {
	for (var i = 0; i < all_so_objects.length; i++) {
		all_so_objects[i][1].write(all_so_objects[i][0]);
	}
}

function addSOObject(divId, soObject) {
	var new_elem = new Array(divId, soObject);
	all_so_objects.push(new_elem);
}

// on every page body onload function
function initOnload() {
	initSOObjects();
	showFAV();
}
