// file character encoding: UTF-8 - hungarian example: ö(&#246;) ü(&#252;) ó(&#243;) ő(&#337;) ú(&#250;) é(&#233;) á(&#225;) ű(&#369;) í(&#237;), Ö(&#214;) Ü(&#220;) Ó(&#211;) Ő(&#336;) Ú(&#218;) É(&#201;) Á(&#193;) Ű(&#368;) Í(&#205;)

function my_is_frame() {
	if (parent.frames[0] == null) {
		return 0;
	} else {
		return 1
	}
}

function my_is_player() {
	if (parent.document.getElementById('player') != null) {
		return true;
	} else {
		return null;
	}
}

function my_flash2js ( my_flash2js_variable , my_flash2js_value ) {
	// bebe INFO: try here!
	// alert('my_flash2js'+' '+my_flash2js_variable+' '+my_flash2js_value);
	if (my_flash2js_variable == 'play') {
		// bebe INFO: try here!
		// alert('play');
		if (my_is_frame() == 1) {
			try {
				parent.document.getElementById('player').sendEvent("PLAY","true");
			} catch (err) {
			}
		} else {
			try {
					parent.document.location.href='http://www.luxfunkradio.com/player/en/live-radio-listening.html';
			} catch (err) {
			}
		}
	}
	if (my_flash2js_variable == 'stop') {
		// bebe INFO: try here!
		// alert('stop');
		if (parent.document.getElementById('player') != null) {
			try {
				// bebe INFO: try here!
				// alert('stop');
				parent.document.getElementById('player').sendEvent("STOP");
			} catch (err) {
			}
		}
	}
	if (my_flash2js_variable == 'volume') {
		if (my_is_frame() == 1) {
			try {
				// bebe INFO: try here!
				// alert('volume');
				parent.document.getElementById('player').sendEvent("VOLUME",my_flash2js_value);
			} catch (err) {
			}
		}
	}
	if (my_flash2js_variable == 'start') {
		// bebe INFO: try here!
		// alert('start');
		if (my_is_frame() == 0) {
			try {
				parent.document.location.href='http://www.luxfunkradio.com/player/en/live-radio-listening.html';
			} catch (err) {
			}
		}
	}
}

function create_controller(cc_var, cc_debugstate) {
	// bebe INFO: try here!
	// alert("function create_controller()");
	
	var controller_attributes = {}
	controller_attributes.id = "controller1";
	controller_attributes.name = "controller1";
	
	var controller_params = {};
	controller_params.menu = "false";
	controller_params.scale = "noscale";
	controller_params.salign = "tl";
	controller_params.allowfullscreen = "false";
	controller_params.allowscriptaccess = "always";
	controller_params = "EEEEEE";

	var controller_flashvars = {};
	controller_flashvars.my_debugstate = cc_debugstate;
	controller_flashvars.my_characterset = "utf-8";
	controller_flashvars.my_xmlbase = cc_var+"xml/";

	var jmy_websiteurl = parent.document.location.href;
	
	if (jmy_websiteurl.indexOf("preview") == -1) { // POSSIBLE BUG: Wordpress preview
		controller_flashvars.my_autostart = 1;
	} else {
		controller_flashvars.my_autostart = 0;
	}
	if (parent.frames[0] == null) {
		controller_flashvars.my_frameset = 0;
	} else {
		controller_flashvars.my_frameset = 1;
	}

	// swfobject.embedSWF(cc_var+"controller.swf", "controller1?my_random="+Math.floor(Math.random()*2147483648), "controller1", "960", "230", "9.0.0", false, controller_flashvars, controller_params, controller_attributes);

	swfobject.embedSWF(cc_var+"controller.swf", "controller1", "960", "230", "9.0.0", false, controller_flashvars, controller_params, controller_attributes);

}

function create_controller_iframe(cc_var) {
	// bebe INFO: try here!
	// alert("function create_controller_iframe()");
}

// var player = null;

//function playerReady(obj) {
//	//alert('the videoplayer '+obj['id']+' has been instantiated');
//	player = document.getElementById(obj['id']);
//};
