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

function flashPutHref(href) { location.href = href; }

function embedMovie(fileName, width, height){
	// SWFObject embed
	var flashvars = {
		useExternalInterface: "true",
		file: fileName,
		controlbar: "over",
		autostart: "true",
		skin: "..\swf\stylish_slim.swf"
	};
	var params = { 
		base: ".",
		bgcolor: "#ffffff",
		allowfullscreen: "true",
		allowscriptaccess: "always"
	};                
	var attributes = {
		id: "movie"
	};
	
	if (!width){
		width = 640;
	}
	$("#movie").css("width", width + "px");

	if (!height){
		height=480;
	}
	$("#movie").css("height", height + "px");

	swfobject.embedSWF("../swf/player.swf", "movie", width, height, "9.0.0", false, flashvars, params, attributes);
}

function deleteMovie(){
	swfobject.removeSWF("movie");
	var tmp=document.getElementById("movieWrapper");
	if (tmp) { 
		tmp.innerHTML = "<div id='movie'>This video requires the Flash Player plugin and a web browser with JavaScript enabled.</div>";
	}

}

