/*
config variables
*/
var resHeightIndent = 1024; //
var smallPage = "smallPage.htm";
var context = "";
var server = "";
var docroot = "";



/**
returns the path for either the server or the webclients docroot
for changes configure the variable above.
@param case: differences server and docroot
*/

function getPath(usage)
{
	var protocol = window.location.protocol;		
	var host = window.location.hostname;
	var port = window.location.port;
	
	var path = protocol + "//" + host;
	path += port == "8080" || port == "8443" ? ":" + port : "";
	path += context;
	path += usage == "docroot" ? docroot : server;
	
	return path;
}

function getBrowserLanguage()
{
	if (navigator.appName == 'Netscape')
	{
		var language = navigator.language;
		
	}
	else
	{
		var language = navigator.browserLanguage;
	}
	return language;
}

/*
fills html layer with swf, using the swfadress.js lib
@param src = path to swf file
@param target id of html layer
*/
function populateFlash(src, target, size)
{
	var flashDiv = document.getElementById(target);
	var so = new SWFObject(src, target, '100%', '100%', '8', '#FFFFFF');
    so.useExpressInstall('swfobject/expressinstall.swf');
    so.addParam('menu', 'false');
	so.addParam('scale', 'noscale');
		/* flashVars for mediaPlayer:
		height:364,
		width:425,
		displayheight:344,
		displaywidth:425,
	*/
	var flashvars = "";
	if(size == "big")
	{
		flashvars += "&mp_width=640";
		flashvars += "&mp_height=460";
		flashvars += "&mp_displaywidth=640";
		flashvars += "&mp_displayheight=360";
		flashvars += "&mp_playlistheight=80";
	}
	else
	{
		flashvars += "&mp_width=533";
		flashvars += "&mp_height=360";
		flashvars += "&mp_displaywidth=533";
		flashvars += "&mp_displayheight=300";
		flashvars += "&mp_playlistheight=100";
	}
	so.addParam('flashvars', flashvars);
    so.write(flashDiv);
}