function openWindow(url)
{
	var nw = window.open(url, "mp3_speler", "width=350,height=168,scrollbars=0,toolbar=0,location=0,resizable=0,status=0");
	if(!nw)
		return false;
	
	// blank the page
	nw.document.write("");
	
	// load the template
	var template;
	xajax.call("xajax_getHTML", {context: {
		callback: function(html)
		{
			template = html;
			nw.document.write(template);
			nw.document.close();
			
			var el = document.getElementById("pagePlayer");
			el.innerHTML = "";
			el.style.display = "none";
			
			return nw;
		}
	}});
}

function getTranslation(string)
{
	xajax.call("xajax_getTranslation", {parameters: [string], context: {
		callback: function(value)
		{
			alert(value);
		}		
	}});
}

function switchVisible(id, titleLeft, titleRight)
{
	var elLeft = document.getElementById("left_" + id);
	var elRight = document.getElementById("right_" + id);
	var imgOver = document.getElementById("img_" + id + "_over");
	var imgOut = document.getElementById("img_" + id + "_out");
	
	imgOver.style.display == "none" ? imgOver.style.display = "block" : imgOver.style.display = "none";
	imgOut.style.display == "none" ? imgOut.style.display = "block" : imgOut.style.display = "none";
	
	elLeft.innerHTML == "&nbsp;" ? elLeft.innerHTML = titleLeft : elLeft.innerHTML = "&nbsp;";
	elRight.innerHTML == "&nbsp;" ? elRight.innerHTML = titleRight : elRight.innerHTML = "&nbsp;";
}

function onInit()
{
	if (window.g_showMessage != undefined && g_showMessage != "")
	{
		window.showMessage(g_showMessage);
	}
	
	var highlight = _GET("highlight");
	if (highlight)
	{
		x = document.getElementById("content");
		highlightText(highlight, "highlighted", x);
	}
}

function showHide()
{
	document.getElementById('pwShow').style.display = 'block';
	document.loginForm.password.focus();
	document.getElementById('pwHide').style.display = 'none';
}
