/**
* The following method will open the IBI applet in a new frame. You can specify the following parameters:
*
* isDemo (boolean): indicates whether the applet should run in demo or in production mode.
*
* strLanguage: the selected language code in lower case:
*	en - english
*	sk - slovakian
*	ro - romanian
*	cz - czech
*	hr - croatian
*	si - slovanian
*	hu - hungarian
*
* iLogLevel:
*   in production mode is should be 50, in case of bug reports when more details required on twister log/Java Consol
*	this can be set to higher limit.
*	IT IS STRONGLY RECOMMENDED NOT TO SET TO LOWER VALUE THAN 50.
*
* strDefaultPath:
*	This should contain the URL of the IBI applet. For example:
*		"https://ibi.hvb-cee.com/onlinebanking/cz/" for Czech Republic
*/
function openIBI( isDemo, strLanguage, iLogLevel, strDefaultPath )
{
	//alert( "Demo: "+ isDemo + " Language:" + strLanguage + " Log:" + iLogLevel + " Def.Path:" + strDefaultPath );
	strLanguage = strLanguage.toLowerCase();
	version = navigator.appVersion.substr( 0, 1 );
	platform = navigator.platform;

	isNetscape = navigator.appName.indexOf( "Netscape" ) > -1;
	isExplorer = navigator.appName.indexOf( "Microsoft Internet Explorer" ) > -1;
	strErrorMessage = "";

	if ( !navigator.javaEnabled() )
	{
		strErrorMessage = "<p> Your browser doesn't support Java applets. </p>";
	}
	else if ( isNetscape )
	{
		if ( version == "4" )
		{	
			window.location= strDefaultPath + "old_netscape_start.html?DemoMode=" + ( isDemo ? "1" : "0" ) + "&Language=" + strLanguage + "&LogLevel=" + iLogLevel;
		}
		else if ( version > "4" )
		{
			window.open( strDefaultPath + "netscape_start.html?DemoMode=" + ( isDemo ? "1" : "0" ) + "&Language=" + strLanguage + "&LogLevel=" + iLogLevel, "_blank", "width=750,height=550,toolbar=no,status=no,resizeable=no,location=no,directories=no,menubar=no,scrollbars=no,marginheight=0,marginwidth=0" );
		}
		else
		{
			strErrorMessage =  "<P> You have to use: <BR> Netscape Communicator 4.07 or higher <BR> Internet Explorer 4.01 or higher for Online Banking.\n <p> You are currently using: <BR> - Navigator: " + navigator.appName + " <" + navigator.varsion + ">\n<BR> - Platform: " + platform;
		}
	}
	else if ( isExplorer )
	{
		window.open( strDefaultPath + "explorer_start.html?DemoMode=" + ( isDemo ? "1" : "0" ) + "&Language=" + strLanguage + "&LogLevel=" + iLogLevel, "_blank", "width=750,height=550,toolbar=no,status=no,resizeable=no,location=no,directories=no,menubar=no,scrollbars=no,marginheight=0,marginwidth=0" );
	}
	else
	{
		strErrorMessage =  "<P> You have to use: <BR> Netscape Communicator 4.07 or higher <BR> Internet Explorer 4.01 or higher for Online Banking.\n <p> You are currently using: <BR> - Navigator: " + navigator.appName + " <" + navigator.varsion + ">\n<BR> - Platform: " + platform;
	}


	if (strErrorMessage)
		alter(strErrorMessage);
}



