Index: branches/2.2/jabberit_messenger/java_source/src/nu/fw/jeti/applet/Jeti.java
===================================================================
--- branches/2.2/jabberit_messenger/java_source/src/nu/fw/jeti/applet/Jeti.java	(revision 3102)
+++ branches/2.2/jabberit_messenger/java_source/src/nu/fw/jeti/applet/Jeti.java	(revision 3155)
@@ -110,18 +110,56 @@
 		String keyCrypt = "DefaultJava1234@";		
 		
-		String server = new String(Crypto.decrypt(applet.getParameter("FIELD12"), keyCrypt));
-		String portText = new String(Crypto.decrypt(applet.getParameter("FIELD10"), keyCrypt));
-		boolean ssl = Boolean.valueOf(Crypto.decrypt(applet.getParameter("FIELD13"), keyCrypt)).booleanValue();
-		String user = new String(Crypto.decrypt(applet.getParameter("FIELD16"), keyCrypt));
-		String password = new String(Crypto.decrypt(applet.getParameter("FIELD09"), keyCrypt));
-		String resource = new String(Crypto.decrypt(applet.getParameter("FIELD11"), keyCrypt));
-		String host = new String(Crypto.decrypt(applet.getParameter("FIELD05"), keyCrypt));
-		String serverExpresso = new String(Crypto.decrypt(applet.getParameter("FIELD03"), keyCrypt));
-		String useHttps = new String(Crypto.decrypt(applet.getParameter("FIELD14"), keyCrypt));
-		String nameCompany = new String(Crypto.decrypt(applet.getParameter("FIELD08"), keyCrypt));
-		String cnName = new String(Crypto.decrypt(applet.getParameter("FIELD01"), keyCrypt));
-		String country = new String(Crypto.decrypt(applet.getParameter("FIELD02"), keyCrypt));
-		String language = new String(Crypto.decrypt(applet.getParameter("FIELD07"), keyCrypt));
-		String javaPlugins = new String(applet.getParameter("FIELD06"));
+		String	_mcrypt = applet.getParameter("FIELD17");
+				_mcrypt = _mcrypt.toLowerCase(); 
+
+		String server;
+		String portText;
+		boolean ssl;
+		String user;
+		String password;
+		String resource;
+		String host;
+		String serverExpresso;
+		String useHttps;
+		String nameCompany;
+		String cnName;
+		String country;
+		String language;
+		String javaPlugins;
+				
+		if ( _mcrypt.equals("true") )
+		{
+			server			= new String( Crypto.decrypt(applet.getParameter("FIELD12"), keyCrypt ) );
+			portText		= new String( Crypto.decrypt(applet.getParameter("FIELD10"), keyCrypt ) );
+			ssl				= Boolean.valueOf( Crypto.decrypt(applet.getParameter("FIELD13"), keyCrypt ) ).booleanValue();
+			user			= new String( Crypto.decrypt(applet.getParameter("FIELD16"), keyCrypt ) );
+			password		= new String( Crypto.decrypt(applet.getParameter("FIELD09"), keyCrypt ) );
+			resource		= new String( Crypto.decrypt(applet.getParameter("FIELD11"), keyCrypt ) );
+			host			= new String( Crypto.decrypt(applet.getParameter("FIELD05"), keyCrypt ) );
+			serverExpresso	= new String( Crypto.decrypt(applet.getParameter("FIELD03"), keyCrypt ) );
+			useHttps		= new String( Crypto.decrypt(applet.getParameter("FIELD14"), keyCrypt ) );
+			nameCompany		= new String( Crypto.decrypt(applet.getParameter("FIELD08"), keyCrypt ) );
+			cnName			= new String( Crypto.decrypt(applet.getParameter("FIELD01"), keyCrypt ) );
+			country			= new String( Crypto.decrypt(applet.getParameter("FIELD02"), keyCrypt ) );
+			language 		= new String( Crypto.decrypt(applet.getParameter("FIELD07"), keyCrypt ) );
+			javaPlugins 	= new String( applet.getParameter("FIELD06") );
+		}
+		else
+		{
+			server			= new String( applet.getParameter("FIELD12") );
+			portText		= new String( applet.getParameter("FIELD10") );
+			ssl				= Boolean.valueOf( applet.getParameter("FIELD13") ).booleanValue();
+			user			= new String( applet.getParameter("FIELD16") );
+			password		= new String( applet.getParameter("FIELD09") );
+			resource		= new String( applet.getParameter("FIELD11") );
+			host			= new String( applet.getParameter("FIELD05") );
+			serverExpresso	= new String( applet.getParameter("FIELD03") );
+			useHttps		= new String( applet.getParameter("FIELD14") );
+			nameCompany		= new String( applet.getParameter("FIELD08") );
+			cnName			= new String( applet.getParameter("FIELD01") );
+			country			= new String( applet.getParameter("FIELD02") );
+			language		= new String( applet.getParameter("FIELD07") );
+			javaPlugins		= new String( applet.getParameter("FIELD06") );
+		}
 		
 		/**
Index: branches/2.2/jabberit_messenger/inc/login.php
===================================================================
--- branches/2.2/jabberit_messenger/inc/login.php	(revision 3102)
+++ branches/2.2/jabberit_messenger/inc/login.php	(revision 3155)
@@ -120,26 +120,53 @@
 		
 		// Crypt Password
-		require_once("crypto.php");
-		$CRYPT_JAVA = "DefaultJava1234@";
-		
-		// Load Template;
-		$template = new Template('templates/default');
-		$template->set_var("path", $path);
-		$template->set_var("java_files", $javaFiles);
-		$template->set_var("value_cnname", encrypt($CnName[0],$CRYPT_JAVA));
-		$template->set_var("value_codeBase", $codeBase);
-		$template->set_var("value_company", encrypt($_SESSION['phpgw_info']['jabberit_messenger']['name_company'],$CRYPT_JAVA));
-		$template->set_var("value_country", encrypt($country,$CRYPT_JAVA));
-		$template->set_var("value_expresso", encrypt($SERVER_EXPRESSO,$CRYPT_JAVA));		
-		$template->set_var("value_host", encrypt($_SESSION['phpgw_info']['jabberit_messenger']['ip_server_jabberit'], $CRYPT_JAVA));
-		$template->set_var("value_javaPlugins", $javaPlugins);
-		$template->set_var("value_language", encrypt($language,$CRYPT_JAVA));			
-		$template->set_var("value_password", encrypt($_SESSION['phpgw_info']['jabberit_messenger']['passwd'],$CRYPT_JAVA));
-		$template->set_var("value_port", encrypt($port_jabber,$CRYPT_JAVA));
-		$template->set_var("value_resource", encrypt($_SESSION['phpgw_info']['jabberit_messenger']['resource_jabberit'],$CRYPT_JAVA));
-		$template->set_var("value_server", encrypt($_SESSION['phpgw_info']['jabberit_messenger']['name_jabberit'],$CRYPT_JAVA));
-		$template->set_var("value_ssl", encrypt($conn_SSL,$CRYPT_JAVA));
-		$template->set_var("value_use_https", encrypt($PROTOCOL,$CRYPT_JAVA));
-		$template->set_var("value_user", encrypt($uid,$CRYPT_JAVA));
+		if( function_exists('mcrypt_module_open') )		
+		{
+			require_once("crypto.php");
+			$CRYPT_JAVA = "DefaultJava1234@";
+
+			// Load Template;
+			$template = new Template('templates/default');
+			$template->set_var("path", $path);
+			$template->set_var("java_files", $javaFiles);
+			$template->set_var("value_cnname", encrypt($CnName[0],$CRYPT_JAVA));
+			$template->set_var("value_codeBase", $codeBase);
+			$template->set_var("value_company", encrypt($_SESSION['phpgw_info']['jabberit_messenger']['name_company'],$CRYPT_JAVA));
+			$template->set_var("value_country", encrypt($country,$CRYPT_JAVA));
+			$template->set_var("value_expresso", encrypt($SERVER_EXPRESSO,$CRYPT_JAVA));		
+			$template->set_var("value_host", encrypt($_SESSION['phpgw_info']['jabberit_messenger']['ip_server_jabberit'], $CRYPT_JAVA));
+			$template->set_var("value_javaPlugins", $javaPlugins);
+			$template->set_var("value_language", encrypt($language,$CRYPT_JAVA));			
+			$template->set_var("value_password", encrypt($_SESSION['phpgw_info']['jabberit_messenger']['passwd'],$CRYPT_JAVA));
+			$template->set_var("value_port", encrypt($port_jabber,$CRYPT_JAVA));
+			$template->set_var("value_resource", encrypt($_SESSION['phpgw_info']['jabberit_messenger']['resource_jabberit'],$CRYPT_JAVA));
+			$template->set_var("value_server", encrypt($_SESSION['phpgw_info']['jabberit_messenger']['name_jabberit'],$CRYPT_JAVA));
+			$template->set_var("value_ssl", encrypt($conn_SSL,$CRYPT_JAVA));
+			$template->set_var("value_use_https", encrypt($PROTOCOL,$CRYPT_JAVA));
+			$template->set_var("value_user", encrypt($uid,$CRYPT_JAVA));
+			$template->set_var("value_mc", "true");
+		}
+		else
+		{
+			// Load Template;
+			$template = new Template('templates/default');
+			$template->set_var("path", $path);
+			$template->set_var("java_files", $javaFiles);
+			$template->set_var("value_cnname", $CnName[0] );
+			$template->set_var("value_codeBase", $codeBase);
+			$template->set_var("value_company", $_SESSION['phpgw_info']['jabberit_messenger']['name_company'] );
+			$template->set_var("value_country", $country );
+			$template->set_var("value_expresso", $SERVER_EXPRESSO );		
+			$template->set_var("value_host", $_SESSION['phpgw_info']['jabberit_messenger']['ip_server_jabberit'] );
+			$template->set_var("value_javaPlugins", $javaPlugins);
+			$template->set_var("value_language", $language );			
+			$template->set_var("value_password", $_SESSION['phpgw_info']['jabberit_messenger']['passwd'] );
+			$template->set_var("value_port", $port_jabber );
+			$template->set_var("value_resource", $_SESSION['phpgw_info']['jabberit_messenger']['resource_jabberit'] );
+			$template->set_var("value_server", $_SESSION['phpgw_info']['jabberit_messenger']['name_jabberit'] );
+			$template->set_var("value_ssl", $conn_SSL );
+			$template->set_var("value_use_https", $PROTOCOL );
+			$template->set_var("value_user", $uid );
+			$template->set_var("value_mc", "false");
+		}
 
 		if( strpos($_SERVER['HTTP_USER_AGENT'], "MSIE") )
@@ -150,5 +177,4 @@
 		$template->set_block('jabberit_messenger','index');
 		$template->pfp('out','index');
-
     }
 ?>
Index: branches/2.2/jabberit_messenger/inc/crypto.php
===================================================================
--- branches/2.2/jabberit_messenger/inc/crypto.php	(revision 3102)
+++ branches/2.2/jabberit_messenger/inc/crypto.php	(revision 3155)
@@ -13,5 +13,6 @@
 *  option) any later version.                                               *
 \***************************************************************************/                
-function encrypt($plain_text , $secret_key) {
+function encrypt($plain_text , $secret_key)
+{
     $cipher     = "rijndael-128";
     $mode       = "cbc";
Index: branches/2.2/jabberit_messenger/templates/default/jabberIM_IE.tpl
===================================================================
--- branches/2.2/jabberit_messenger/templates/default/jabberIM_IE.tpl	(revision 3102)
+++ branches/2.2/jabberit_messenger/templates/default/jabberIM_IE.tpl	(revision 3155)
@@ -56,5 +56,6 @@
 			<param name='FIELD14' value='{value_use_https}'>
 			<param name='FIELD15' value='{value_userproxy}'>
-			<param name='FIELD16' value='{value_user}'>			
+			<param name='FIELD16' value='{value_user}'>
+			<param name='FIELD17' value='{value_mc}'>			
 		</object>
 	</body>
Index: branches/2.2/jabberit_messenger/templates/default/jabberIM.tpl
===================================================================
--- branches/2.2/jabberit_messenger/templates/default/jabberIM.tpl	(revision 3102)
+++ branches/2.2/jabberit_messenger/templates/default/jabberIM.tpl	(revision 3155)
@@ -52,4 +52,5 @@
 			<param name='FIELD15' value='{value_userproxy}'>
 			<param name='FIELD16' value='{value_user}'>
+			<param name='FIELD17' value='{value_mc}'>
 		</applet>
 	</body>
