// start of JavaScripts that should be integated into the countries' websites.

function openApplet( isDemo, strLanguage, iLogLevel )
{
	version = navigator.appVersion.substr( 0, 1 );
	platform = navigator.platform;

	isNetscape = navigator.appName.indexOf( "Netscape" ) > -1;
	isExplorer = navigator.appName.indexOf( "Microsoft Internet Explorer" ) > -1;

	if ( !navigator.javaEnabled() )
	{
		errorWindow( "Your browser doesn't support Java applets.\n" );
	}
	else if ( isNetscape )
	{
		if ( version == "4" )
		{
			openNetscape4( isDemo, strLanguage, iLogLevel );
		}
		else if ( version > "4" )
		{
			openNetscape6( isDemo, strLanguage, iLogLevel );
		}
		else
		{
			errorWindow( "You have to use: Netscape Communicator 7.00 or higher\n Internet Explorer 4.01 or higher for Online Banking.\n You are currently using: - Navigator: " + navigator.appName + " <" + navigator.varsion + ">\n - Platform: " + platform );
		}
	}
	else if ( isExplorer )
	{
		openExplorer( isDemo, strLanguage, iLogLevel );
	}
	else
	{
		errorWindow( "You have to use: Netscape Communicator 7.00 or higher\n Internet Explorer 4.01 or higher for Online Banking.\n You are currently using: - Navigator: " + navigator.appName + " <" + navigator.varsion + ">\n - Platform: " + platform );
	}
}

function errorWindow( strText )
{
	alert( strText );
}

function openNetscape6( isDemo, strLanguage, iLogLevel )
{
	window.open( "https://ibi.hvb-cee.com/onlinebanking/si/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" );
}

function openNetscape4( isDemo, strLanguage, iLogLevel )
{
	window.open( "https://ibi.hvb-cee.com/onlinebanking/si/old_netscape_start.html?Language=" + strLanguage, "_blank", "width=750,height=550,toolbar=no,status=no,resizeable=no,location=no,directories=no,menubar=no,scrollbars=no,marginheight=0,marginwidth=0" );
}

function openExplorer( isDemo, strLanguage, iLogLevel )
{
	window.open( "https://ibi.hvb-cee.com/onlinebanking/si/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" );
}

// end of JavaScripts that should be integated into the countries' websites.
