
var programHtmlCopy = "";

/**
* The trailerplayer has a "close"-button. When that is pressed, the player
* calls this function.
* DO NOT MODIFY!
*/
function closePlayer(){
	//Replace the player with the original html
	$j("#programInfoWindow").html(programHtmlCopy);
	
	//Add click-handler to close-button.
	$j("a#closeWindow").click(function() {
		if(jQuery.browser.msie){
			$j("html").css("overflow","auto");
		}
		smoke.close();
		return false;
	});
}


/**
* When the user clicks one of the flash-buttons on the page, the button calls this function.
*/
function showTrailer(trailer){
	//Url to the folder containing the trailers and the player
	var trailerFolder = "http://www.tv24.com:8080/hobbyhall/";
	//player file
	var playerFlash = "hobbyhall_player_700x440.swf";
	var trailerFile = "";
	
	//Numbers here mean the buttons on the page(from top to bottom)
	//this if-else -structure maps the button to a trailer that needs to be shown
	if(trailer == 1){
		trailerFile = "crossari.flv";
	}else if(trailer == 2){
		trailerFile = "kuntopyora.flv";
	}else if(trailer == 3){
		trailerFile = "juoksumatto.flv";
	}
	
	//Make backup of the info html and clear the window for the player
	programHtmlCopy = $j("#programInfoWindow").html();
	$j("#programInfoWindow").html("");
	
	//Show the flash player
	//Adjust width and height if needed.
	/*$j("#programInfoWindow").flash({
		src: trailerFolder + playerFlash,
		width: 700,
		height: 440,
		wmode: 'transparent',
		allowScriptAccess: 'always',
		flashvars: {
			playMovie: trailerFolder + trailerFile
		}
	});*/
}


/**
* If global variable 'showDominance' is set to true, the SmokeScreen library calls this function.
* Customize as needed.
*/
function addDominance(){}
function hideDominance(){}


