function stopVideo()
{
	sendEvent('stop');
	document.getElementById("playertag").innerHTML = "";
}

function playVideo(url, title, image)
{
	var s1 = new SWFObject("mediaplayer.swf","player","620","371","7");
	s1.addParam("allowfullscreen", "true");
	s1.addVariable("file", url);
	s1.addVariable("image", image);
	s1.addVariable("enablejs", "true");
	s1.addVariable("javascriptid", "player");	
	s1.write("playertag");		
}

function addItem(obj,idx) { thisMovie("player").addItem(obj,idx); }
function removeItem(idx) { thisMovie("player").removeItem(idx); }
// these functions are caught by the JavascriptView object of the player.
function sendEvent(typ,prm) { thisMovie("player").sendEvent(typ,prm); };
// This is a javascript handler for the player and is always needed.
function thisMovie(movieName) 
{
	if(navigator.appName.indexOf("Microsoft") != -1)
	{
		return window[movieName];
	}
	else
	{
		return document[movieName];
	}
};

//	audio pre listening
function preListen(folder)
{
  	var s1 = new SWFObject('mediaplayer.swf','player','620','371','7');
	s1.addParam('allowfullscreen','true');//
	s1.addParam('allowscriptaccess','always');//
	s1.addVariable("enablejs", "true");	
    s1.addVariable('height','371');
	s1.addVariable('width','620');
	s1.addVariable('displaywidth','145');
	s1.addVariable("file", "label/" + folder + "/playlist.xml");
	s1.write("playertag");

	showMusicPlayer();	
}


//	switch language
function switchlanguage()
{
	if(window.location.href.indexOf("/en/") > 0)
	{
		var url = window.location.href.replace(/en/, "de");
		window.location = url;
	}
	else if(window.location.href.indexOf("/de/") > 0)
	{
		var url = window.location.href.replace(/de/, "en");
		window.location = url;		

	}
}
function enlargement()
{
	var mmm = document.getElementById("mmm");
	mmm.href = "mai" + "lto" + ":off" + "ice" + "@kr" + "isper.at";
	var text = "off" + "ice";
	text += "@" + "kr" + "isper.at";
	if(mmm.textContent)
	{
		mmm.textContent = text;
	}
	else
	{
		mmm.innerText = text;
	}
}
