<!--

function openWin(url, identifier, width, height)
{
	var win = window.open(url, identifier, 'width=' + width + ', height=' + height + ', scrollbars=1, toolbar=0, menubar=0, status=0, location=0');

	if (!win)
	{
		alert('A popup was blocked. Please disable your popup blocker.');
	}
	win.focus();
	return win;
}

function initPage()
{
	handleScroll();

	if (getQueryParamValue('flasherror') == 1)
	{
		document.getElementById('content').style.display = 'none';
		document.getElementById('content_flasherror').style.display = 'block';
	}
	else
	{
		var flashcontent = new FlashObject('preloader2.swf', "mainfl", 1000, 450, 8, "#000000" , false, 'high', '','index.html?flasherror=1', 'detectflash');

		flashcontent.addParam('quality', 'high');
		flashcontent.addParam('style', 'margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;');
		flashcontent.addParam('menu', 'false');
        flashcontent.addParam('allowscriptaccess', 'always');

		flashcontent.addVariable('lang', lang);
        flashcontent.addVariable('contentPath', contentPath);
        flashcontent.addVariable('customSendEvent', customSendEvent);

		flashcontent.write('flashcontent');
	}
}

function handleScroll()
{
	if (window.innerHeight > 0) 						{ var funcbarPos = window.innerHeight - 14; }
	else if (document.documentElement.clientHeight > 0) { var funcbarPos = document.documentElement.clientHeight - 14; }
	else if (document.body.clientHeight > 0) 			{ var funcbarPos = document.body.clientHeight - 14; }
	else 												{ return; } // noop

	if ( window.pageYOffset > 0) 						{ funcbarPos += window.pageYOffset; }
	else if (document.documentElement.scrollTop > 0)	{ funcbarPos += document.documentElement.scrollTop; }
	else if (document.body.scrollTop > 0)				{ funcbarPos += document.body.scrollTop; }

/*	if (funcbarPos < 550)
	{
		document.getElementById('funcnav').style.display = 'none';
	}
	else
	{
		document.getElementById('funcnav').style.display = 'block';
		document.getElementById('funcnav').style.top = funcbarPos + 'px';
	}         */
}

window.onscroll=handleScroll; // does not work with NS4.x,NS6 and OP
window.onresize=handleScroll;


/**
 * Instadia skeleton functions
 */
function Instadia_sendInfo()
{
}

function Instadia_sendEvent(a, b, c)
{
}

function insertFlash( strSrc, intWidth, intHeight, strWMode, strScale, strPlayMode, strCLSID, strCODEBASE, strBGcolor, strPosition, strFlashVars, strContentDiv, strFlashParameter )
{
	if(strWMode == null || strWMode == "") strWMode = "Opaque";
	if(strScale == null || strScale == "") strScale = "noscale";
	if(strPlayMode == null || strPlayMode == "") strPlayMode = "true";
	if(strContentDiv == null || strContentDiv == "") strContentDiv = "";

	var strFlash	=  '<object classid="' + strCLSID + '" codebase="' + strCODEBASE + '" ';
	var embedFlashParameter = "";
	strFlash += ' width="' + intWidth + '" height="' + intHeight + '">';

	strFlash += '<param name="movie" value="' + strSrc + '" />';
	strFlash += '<param name="quality" value="high" />';
	strFlash += '<param name="play" value="' + strPlayMode + '" />';
	strFlash += '<param name="wmode" value="' + strWMode + '" />';
	strFlash += '<param name="scale" value="' + strScale + '" />';
	strFlash += '<param name="menu" value="false" />';
	
	if(strFlashParameter != null && strFlashParameter != "") {
		var flashParameter = strFlashParameter.split("&");
		for (var i = 0; i < flashParameter.length; i++){
			var flashNameValue = flashParameter[i].split("=");
			if(flashNameValue.length==1) {
				strFlash += '<param name="'+flashNameValue[0]+'" value="" />';
				embedFlashParameter += ' ' + flashNameValue[0]+'="" ';
			} else if(flashNameValue.length==2) {
				strFlash += '<param name="'+flashNameValue[0]+'" value="' + flashNameValue[1] + '" />';
				embedFlashParameter += ' ' + flashNameValue[0]+'="'+flashNameValue[1] + '" ';
			}
		}
	}
	
	if(strFlashVars != null && strFlashVars != "") strFlash += '<param name="FlashVars" value="' + strFlashVars + '" />';
	if(strPosition != null && strPosition != "") strFlash += '<param name="align" value="' + strPosition + '" />';
  	if(strBGcolor != null && strBGcolor != "") strFlash	+= '<param name="bgcolor" value="' + strBGcolor + '" />';

	strFlash += '<embed src="' + strSrc + '" width="' + intWidth + '" height="' + intHeight + '" wmode="' + strWMode + '" play="' + strPlayMode + '" scale="' + strScale  + '" menu="false"';
	if(strBGcolor != null && strBGcolor != "") strFlash	+= ' bgcolor="' + strBGcolor + '"';
	if(embedFlashParameter != null && embedFlashParameter != "") strFlash	+= embedFlashParameter;
	if(strFlashVars != null && strFlashVars != "") strFlash	+= ' FlashVars="' + strFlashVars + '"';
	if(strPosition != null && strPosition != "") strFlash	+= ' align="' + strPosition + '"';
	strFlash += ' quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash">';
	strFlash += '</embed>';
	strFlash += '</object>';

	if(strContentDiv != "" && document.getElementById(strContentDiv)) {
		document.getElementById(strContentDiv).innerHTML = strFlash;
	}
	else {
		document.write( strFlash );
		document.close( );
	}
}

//-->

