Index: admin/auth.php
===================================================================
--- admin/auth.php	(revision 1492)
+++ admin/auth.php	(revision 1179)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -14,5 +14,6 @@
 
 # If we have a session cookie, go to index.php
-if (isset($_SESSION['sess_user_id'])) {
+if (isset($_SESSION['sess_user_id']))
+{
 	http::redirect('index.php');
 }
@@ -22,7 +23,18 @@
 $dlang = http::getAcceptLanguage();
 $dlang = ($dlang == '' ? 'en' : $dlang);
-if ($dlang != 'en' && preg_match('/^[a-z]{2}(-[a-z]{2})?$/',$dlang)) {
+if ($dlang != 'en' && preg_match('/^[a-z]{2}(-[a-z]{2})?$/',$dlang))
+{
 	l10n::set(dirname(__FILE__).'/../locales/'.$dlang.'/main');
 }
+
+$page_url = http::getHost().$_SERVER['REQUEST_URI'];
+
+$change_pwd = $core->auth->allowPassChange() && isset($_POST['new_pwd']) && isset($_POST['new_pwd_c']) && isset($_POST['login_data']);
+$login_data = !empty($_POST['login_data']) ? html::escapeHTML($_POST['login_data']) : null;
+$recover = $core->auth->allowPassChange() && !empty($_REQUEST['recover']);
+$safe_mode = !empty($_REQUEST['safe_mode']);
+$akey = $core->auth->allowPassChange() && !empty($_GET['akey']) ? $_GET['akey'] : null;
+$user_id = $user_pwd = $user_key = $user_email = null;
+$err = $msg = null;
 
 # Auto upgrade
@@ -31,307 +43,389 @@
 	try {
 		if (($changes = dotclearUpgrade($core)) !== false) {
-			$_ctx->setAlert(__('Dotclear has been upgraded.').'<!-- '.$changes.' -->');
-		}
-	}
-	catch (Exception $e) {
-		$_ctx->addError($e->getMessage());
-	}
-}
-
-/**
-Actions for authentication on admin pages
-*/
-class adminPageAuth
-{
-	# Send new password from recover email
-	public static function send($akey)
-	{
-		global $core, $_ctx;
-		
-		$_ctx->akey = true;
-		
-		try	{
-			$recover_res = $core->auth->recoverUserPassword($akey);
-			
-			$subject = mb_encode_mimeheader('DotClear '.__('Your new password'),'UTF-8','B');
-			$message =
-			__('Username:').' '.$recover_res['user_id']."\n".
-			__('Password:').' '.$recover_res['new_pass']."\n\n".
-			preg_replace('/\?(.*)$/','',http::getHost().$_SERVER['REQUEST_URI']);
-			
-			$headers[] = 'From: dotclear@'.$_SERVER['HTTP_HOST'];
-			$headers[] = 'Content-Type: text/plain; charset=UTF-8;';
-			
-			mail::sendMail($recover_res['user_email'],$subject,$message,$headers);
-			$_ctx->setAlert(__('Your new password is in your mailbox.'));
-		}
-		catch (Exception $e) {
-			$_ctx->addError($e->getMessage());
-		}
-	}
-	
-	# Authentication process
-	public static function process($form,$user_id,$user_pwd,$user_key=null)
-	{
-		global $core, $_ctx;
-		
-		# We check the user
-		$check_user = $core->auth->checkUser($user_id,$user_pwd,$user_key) === true;
-		
-		$cookie_admin = http::browserUID(DC_MASTER_KEY.$user_id.
-			crypt::hmac(DC_MASTER_KEY,$user_pwd)).bin2hex(pack('a32',$user_id));
-		
-		if ($check_user && $core->auth->mustChangePassword())
-		{
-			$form->login_data = join('/',array(
-				base64_encode($user_id),
-				$cookie_admin,
-				$form->user_remember == '' ? '0' : '1'
-			));
-			
-			if (!$core->auth->allowPassChange()) {
-				$_ctx->addError(__('You have to change your password before you can login.'));
-			} else {
-				$_ctx->addError(__('In order to login, you have to change your password now.'));
-				$_ctx->change_pwd = true;
-			}
-		}
-		elseif ($check_user && $form->safe_mode != '' && !$core->auth->isSuperAdmin()) 
-		{
-			$_ctx->addError(__('Safe Mode can only be used for super administrators.'));
-		}
-		elseif ($check_user)
-		{
-			$core->session->start();
-			$_SESSION['sess_user_id'] = $user_id;
-			$_SESSION['sess_browser_uid'] = http::browserUID(DC_MASTER_KEY);
-			
-			if ($form->blog != '') {
-				$_SESSION['sess_blog_id'] = $form->blog;
-			}
-			
-			if ($form->safe_mode != '' && $core->auth->isSuperAdmin()) {
-				$_SESSION['sess_safe_mode'] = true;
-			}
-			
-			if ($form->user_remember != '') {
-				setcookie('dc_admin',$cookie_admin,strtotime('+15 days'),'','',DC_ADMIN_SSL);
-			}
-			
-			http::redirect('index.php');
-		}
-		else
-		{
-			if (isset($_COOKIE['dc_admin'])) {
-				unset($_COOKIE['dc_admin']);
-				setcookie('dc_admin',false,-600,'','',DC_ADMIN_SSL);
-			}
-			$_ctx->addError(__('Wrong username or password'));
-		}
-	}
-	
-	# Login form action
-	public static function login($form)
-	{
-		global $_ctx;
-		
-		if ($form->user_id != '' && $form->user_pwd != '') {
-			self::process($form,$form->user_id,$form->user_pwd);
-		}
-		
-		# Send post values to form
-		$form->user_id = $form->user_id;
-	}
-
-	# Recover password form action
-	public static function recover($form)
-	{
-		global $core, $_ctx;
-		
-		if ($form->user_id == '' || $form->user_email == '') {
-			return;
-		}
-		
-		$user_id = $form->user_id;
-		$user_email = $form->user_email;
-		$page_url = http::getHost().$_SERVER['REQUEST_URI'];
-		
-		try {
-			$recover_key = $core->auth->setRecoverKey($user_id,$user_email);
-			
-			$subject = mail::B64Header('DotClear '.__('Password reset'));
-			$message =
-			__('Someone has requested to reset the password for the following site and username.')."\n\n".
-			$page_url."\n".__('Username:').' '.$user_id."\n\n".
-			__('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.')."\n".
-			$page_url.'?akey='.$recover_key;
-			
-			$headers[] = 'From: '.(defined('DC_ADMIN_MAILFROM') && DC_ADMIN_MAILFROM ? DC_ADMIN_MAILFROM : 'dotclear@local');
-			$headers[] = 'Content-Type: text/plain; charset=UTF-8;';
-			
-			mail::sendMail($user_email,$subject,$message,$headers);
-			$_ctx->setAlert(sprintf(__('The e-mail was sent successfully to %s.'),$user_email));
-		}
-		catch (Exception $e) {
-			$_ctx->addError($e->getMessage());
-		}
-		
-		# Send post values to form
-		$form->user_id = $form->user_id;
-		$form->user_email = $form->user_email;
-	}
-
-	# Change password form action
-	public static function change($form)
-	{
-		global $core, $_ctx;
-		
-		if ($form->login_data) {
-			return;
-		}
-		$_ctx->change_pwd = true;
-		
-		$new_pwd = (string) $form->new_pwd;
-		$new_pwd_c = (string) $form->new_pwd_c;
-		
-		try {
-			$tmp_data = explode('/',$form->login_data);
-			if (count($tmp_data) != 3) {
-				throw new Exception();
-			}
-			$data = array(
-				'user_id'=>base64_decode($tmp_data[0]),
-				'cookie_admin'=>$tmp_data[1],
-				'user_remember'=>$tmp_data[2]=='1'
-			);
-			if ($data['user_id'] === false) {
-				throw new Exception();
-			}
-			
-			# Check login informations
-			$check_user = false;
-			if (isset($data['cookie_admin']) && strlen($data['cookie_admin']) == 104)
-			{
-				$user_id = substr($data['cookie_admin'],40);
-				$user_id = @unpack('a32',@pack('H*',$user_id));
-				if (is_array($user_id))
-				{
-					$user_id = $user_id[1];
-					$user_key = substr($data['cookie_admin'],0,40);
-					$check_user = $core->auth->checkUser($user_id,null,$user_key) === true;
-				}
-			}
-			
-			if (!$core->auth->allowPassChange() || !$check_user) {
-				$_ctx->change_pwd = false;
-				throw new Exception();
-			}
-			
-			if ($new_pwd != $new_pwd_c) {
-				throw new Exception(__("Passwords don't match"));
-			}
-			
-			if ($core->auth->checkUser($user_id,$new_pwd) === true) {
-				throw new Exception(__("You didn't change your password."));
-			}
-			
-			$cur = $core->con->openCursor($core->prefix.'user');
-			$cur->user_change_pwd = 0;
-			$cur->user_pwd = $new_pwd;
-			$core->updUser($core->auth->userID(),$cur);
-			
-			$core->session->start();
-			$_SESSION['sess_user_id'] = $user_id;
-			$_SESSION['sess_browser_uid'] = http::browserUID(DC_MASTER_KEY);
-			
-			if ($data['user_remember']) {
-				setcookie('dc_admin',$data['cookie_admin'],strtotime('+15 days'),'','',DC_ADMIN_SSL);
-			}
-			
-			http::redirect('index.php');
-		}
-		catch (Exception $e) {
-			$_ctx->addError($e->getMessage());
-		}
-		
-		# Send post values to form
-		$form->login_data = $form->login_data;
-	}
-}
-
-# Form fields
-$form = new dcForm($core,'auth','auth.php');
-$form
-	->addField(
-		new dcFieldText('user_id','',array(
-			"label" => __('Username:'))))
-	->addField(
-		new dcFieldPassword('user_pwd','',array(
-			"label" => __('Password:'))))
-	->addField(
-		new dcFieldText('user_email','',array(
-			"label" => __('Email:'))))
-	->addField(
-		new dcFieldPassword('new_pwd','',array(
-			"label" => __('New password:'))))
-	->addField(
-		new dcFieldPassword('new_pwd_c','',array(
-			"label" => __('Confirm password:'))))
-	->addField(
-		new dcFieldCheckbox ('user_remember',1,array(
-			"label" => __('Remember my ID on this computer'))))
-	->addField(
-		new dcFieldSubmit('auth_login',__('log in'),array(
-			'action' => array('adminPageAuth','login'))))
-	->addField(
-		new dcFieldSubmit('auth_recover',__('recover'),array(
-			'action' => array('adminPageAuth','recover'))))
-	->addField(
-		new dcFieldSubmit('auth_change',__('change'),array(
-			'action' => array('adminPageAuth','change'))))
-	->addField(
-		new dcFieldHidden ('safe_mode','0'))
-	->addField(
-		new dcFieldHidden ('recover','0'))
-	->addField(
-		new dcFieldHidden ('login_data',''))
-	->addField(
-		new dcFieldHidden ('blog',''));
-
-# Context variables
-$_ctx->allow_pass_change = $core->auth->allowPassChange();
-$_ctx->change_pwd = $core->auth->allowPassChange() && $form->new_pwd != '' && $form->new_pwd_c != '' && $form->login_data != '';
-$_ctx->recover = $form->recover = $core->auth->allowPassChange() && !empty($_REQUEST['recover']);
-$_ctx->setSafeMode(!empty($_REQUEST['safe_mode'])); 
-$form->safe_mode = !empty($_REQUEST['safe_mode']);
-$_ctx->akey = false;
-
-# If we have no POST login informations and have COOKIE login informations, go throug auth process
-if ($form->user_id == '' && $form->user_pwd == '' 
- && isset($_COOKIE['dc_admin']) && strlen($_COOKIE['dc_admin']) == 104) {
-
+			$msg = __('Dotclear has been upgraded.').'<!-- '.$changes.' -->';
+		}
+	} catch (Exception $e) {
+		$err = $e->getMessage();
+	}
+}
+
+# If we have POST login informations, go throug auth process
+if (!empty($_POST['user_id']) && !empty($_POST['user_pwd']))
+{
+	$user_id = !empty($_POST['user_id']) ? $_POST['user_id'] : null;
+	$user_pwd = !empty($_POST['user_pwd']) ? $_POST['user_pwd'] : null;
+}
+# If we have COOKIE login informations, go throug auth process
+elseif (isset($_COOKIE['dc_admin']) && strlen($_COOKIE['dc_admin']) == 104)
+{
 	# If we have a remember cookie, go through auth process with user_key
 	$user_id = substr($_COOKIE['dc_admin'],40);
 	$user_id = @unpack('a32',@pack('H*',$user_id));
-	
-	if (is_array($user_id)) {
+	if (is_array($user_id))
+	{
 		$user_id = $user_id[1];
 		$user_key = substr($_COOKIE['dc_admin'],0,40);
-		$user_pwd = '';
-		
-		adminPageAuth::process($form,$user_id,$user_pwd,$user_key);
-	}
-}
-# If we have an akey, go throug send password process
-elseif ($core->auth->allowPassChange() && !empty($_GET['akey'])) {
-	adminPageAuth::send($_GET['akey']);
+		$user_pwd = null;
+	}
+	else
+	{
+		$user_id = null;
+	}
+}
+
+# Recover password
+if ($recover && !empty($_POST['user_id']) && !empty($_POST['user_email']))
+{
+	$user_id = !empty($_POST['user_id']) ? $_POST['user_id'] : null;
+	$user_email = !empty($_POST['user_email']) ? $_POST['user_email'] : '';
+	try
+	{
+		$recover_key = $core->auth->setRecoverKey($user_id,$user_email);
+		
+		$subject = mail::B64Header('DotClear '.__('Password reset'));
+		$message =
+		__('Someone has requested to reset the password for the following site and username.')."\n\n".
+		$page_url."\n".__('Username:').' '.$user_id."\n\n".
+		__('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.')."\n".
+		$page_url.'?akey='.$recover_key;
+		
+		$headers[] = 'From: '.(defined('DC_ADMIN_MAILFROM') && DC_ADMIN_MAILFROM ? DC_ADMIN_MAILFROM : 'dotclear@local');
+		$headers[] = 'Content-Type: text/plain; charset=UTF-8;';
+		
+		mail::sendMail($user_email,$subject,$message,$headers);
+		$msg = sprintf(__('The e-mail was sent successfully to %s.'),$user_email);
+	}
+	catch (Exception $e)
+	{
+		$err = $e->getMessage();
+	}
+}
+# Send new password
+elseif ($akey)
+{
+	try
+	{
+		$recover_res = $core->auth->recoverUserPassword($akey);
+		
+		$subject = mb_encode_mimeheader('DotClear '.__('Your new password'),'UTF-8','B');
+		$message =
+		__('Username:').' '.$recover_res['user_id']."\n".
+		__('Password:').' '.$recover_res['new_pass']."\n\n".
+		preg_replace('/\?(.*)$/','',$page_url);
+		
+		$headers[] = 'From: dotclear@'.$_SERVER['HTTP_HOST'];
+		$headers[] = 'Content-Type: text/plain; charset=UTF-8;';
+		
+		mail::sendMail($recover_res['user_email'],$subject,$message,$headers);
+		$msg = __('Your new password is in your mailbox.');
+	}
+	catch (Exception $e)
+	{
+		$err = $e->getMessage();
+	}
+}
+# Change password and retry to log
+elseif ($change_pwd)
+{
+	try
+	{
+		$tmp_data = explode('/',$_POST['login_data']);
+		if (count($tmp_data) != 3) {
+			throw new Exception();
+		}
+		$data = array(
+			'user_id'=>base64_decode($tmp_data[0]),
+			'cookie_admin'=>$tmp_data[1],
+			'user_remember'=>$tmp_data[2]=='1'
+		);
+		if ($data['user_id'] === false) {
+			throw new Exception();
+		}
+		
+	# Check login informations
+	$check_user = false;
+	if (isset($data['cookie_admin']) && strlen($data['cookie_admin']) == 104)
+	{
+		$user_id = substr($data['cookie_admin'],40);
+		$user_id = @unpack('a32',@pack('H*',$user_id));
+		if (is_array($user_id))
+		{
+			$user_id = $user_id[1];
+			$user_key = substr($data['cookie_admin'],0,40);
+			$check_user = $core->auth->checkUser($user_id,null,$user_key) === true;
+		}
+	}
+	
+		if (!$core->auth->allowPassChange() || !$check_user) {
+			$change_pwd = false;
+			throw new Exception();
+		}
+		
+		if ($_POST['new_pwd'] != $_POST['new_pwd_c']) {
+			throw new Exception(__("Passwords don't match"));
+		}
+		
+		if ($core->auth->checkUser($user_id,$_POST['new_pwd']) === true) {
+			throw new Exception(__("You didn't change your password."));
+		}
+		
+		$cur = $core->con->openCursor($core->prefix.'user');
+		$cur->user_change_pwd = 0;
+		$cur->user_pwd = $_POST['new_pwd'];
+		$core->updUser($core->auth->userID(),$cur);
+		
+		$core->session->start();
+		$_SESSION['sess_user_id'] = $user_id;
+		$_SESSION['sess_browser_uid'] = http::browserUID(DC_MASTER_KEY);
+		
+		if ($data['user_remember'])
+		{
+			setcookie('dc_admin',$data['cookie_admin'],strtotime('+15 days'),'','',DC_ADMIN_SSL);
+		}
+		
+		http::redirect('index.php');
+	}
+	catch (Exception $e)
+	{
+		$err = $e->getMessage();
+	}
+}
+# Try to log
+elseif ($user_id !== null && ($user_pwd !== null || $user_key !== null))
+{
+	# We check the user
+	$check_user = $core->auth->checkUser($user_id,$user_pwd,$user_key) === true;
+	
+	$cookie_admin = http::browserUID(DC_MASTER_KEY.$user_id.
+		crypt::hmac(DC_MASTER_KEY,$user_pwd)).bin2hex(pack('a32',$user_id));
+	
+	if ($check_user && $core->auth->mustChangePassword())
+	{
+		$login_data = join('/',array(
+			base64_encode($user_id),
+			$cookie_admin,
+			empty($_POST['user_remember'])?'0':'1'
+		));
+		
+		if (!$core->auth->allowPassChange()) {
+			$err = __('You have to change your password before you can login.');
+		} else {
+			$err = __('In order to login, you have to change your password now.');
+			$change_pwd = true;
+		}
+	}
+	elseif ($check_user && !empty($_POST['safe_mode']) && !$core->auth->isSuperAdmin()) 
+	{
+		$err = __('Safe Mode can only be used for super administrators.');
+	}
+	elseif ($check_user)
+	{
+		$core->session->start();
+		$_SESSION['sess_user_id'] = $user_id;
+		$_SESSION['sess_browser_uid'] = http::browserUID(DC_MASTER_KEY);
+		
+		if (!empty($_POST['blog'])) {
+			$_SESSION['sess_blog_id'] = $_POST['blog'];
+		}
+		
+		if (!empty($_POST['safe_mode']) && $core->auth->isSuperAdmin()) {
+			$_SESSION['sess_safe_mode'] = true;
+		}
+		
+		if (!empty($_POST['user_remember'])) {
+			setcookie('dc_admin',$cookie_admin,strtotime('+15 days'),'','',DC_ADMIN_SSL);
+		}
+		
+		http::redirect('index.php');
+	}
+	else
+	{
+		if (isset($_COOKIE['dc_admin'])) {
+			unset($_COOKIE['dc_admin']);
+			setcookie('dc_admin',false,-600,'','',DC_ADMIN_SSL);
+		}
+		$err = __('Wrong username or password');
+	}
 }
 
 if (isset($_GET['user'])) {
-	$form->user_id = $_GET['user'];
-}
-
-$form->setup();
-
-$core->tpl->display('auth.html.twig');
+	$user_id = $_GET['user'];
+}
+
+header('Content-Type: text/html; charset=UTF-8');
 ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+xml:lang="<?php echo $dlang; ?>" lang="<?php echo $dlang; ?>">
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+  <meta http-equiv="Content-Script-Type" content="text/javascript" />
+  <meta http-equiv="Content-Style-Type" content="text/css" />
+  <meta http-equiv="Content-Language" content="<?php echo $dlang; ?>" />
+  <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />
+  <meta name="GOOGLEBOT" content="NOSNIPPET" />
+  <title><?php echo html::escapeHTML(DC_VENDOR_NAME); ?></title>
+  
+<?php
+echo dcPage::jsLoadIE7();
+echo dcPage::jsCommon();
+?>
+  
+	<link rel="stylesheet" href="style/default.css" type="text/css" media="screen" />
+	 
+  <?php
+  # --BEHAVIOR-- loginPageHTMLHead
+  $core->callBehavior('loginPageHTMLHead');
+  ?>
+  
+  <script type="text/javascript">
+  //<![CDATA[
+  $(window).load(function() {
+    var uid = $('input[name=user_id]');
+    var upw = $('input[name=user_pwd]');
+    uid.focus();
+    
+    if (upw.length == 0) { return; }
+    
+    if ($.browser.mozilla) {
+      uid.keypress(processKey);
+    } else {
+      uid.keydown(processKey);
+    }
+    function processKey(evt) {
+      if (evt.keyCode == 13 && upw.val() == '') {
+         upw.focus();
+	    return false;
+      }
+	 return true;
+    };
+    $.cookie('dc_admin_test_cookie',true);
+    if ($.cookie('dc_admin_test_cookie')) {
+      $('#cookie_help').hide();
+      $.cookie('dc_admin_test_cookie', '', {'expires': -1});
+    } else {
+      $('#cookie_help').show();
+    }
+    $('#issue #more').toggleWithLegend($('#issue').children().not('#more'));
+  });
+  //]]>
+  </script>
+</head>
+
+<body id="dotclear-admin" class="auth">
+
+<form action="auth.php" method="post" id="login-screen">
+<h1><?php echo html::escapeHTML(DC_VENDOR_NAME); ?></h1>
+
+<?php
+if ($err) {
+	echo '<div class="error">'.$err.'</div>';
+}
+if ($msg) {
+	echo '<p class="message">'.$msg.'</p>';
+}
+
+if ($akey)
+{
+	echo '<p><a href="auth.php">'.__('Back to login screen').'</a></p>';
+}
+elseif ($recover)
+{
+	echo
+	'<fieldset><legend>'.__('Request a new password').'</legend>'.
+	'<p><label for="user_id">'.__('Username:').'</label> '.
+	form::field(array('user_id','user_id'),20,32,html::escapeHTML($user_id)).'</p>'.
+	
+	'<p><label for="user_email">'.__('Email:').'</label> '.
+	form::field(array('user_email','user_email'),20,255,html::escapeHTML($user_email)).'</p>'.
+	
+	'<p><input type="submit" value="'.__('recover').'" />'.
+	form::hidden(array('recover'),1).'</p>'.
+	'</fieldset>'.
+	
+	'<div id="issue">'.
+	'<p><a href="auth.php">'.__('Back to login screen').'</a></p></div>';
+}
+elseif ($change_pwd)
+{
+	echo
+	'<fieldset><legend>'.__('Change your password').'</legend>'.
+	'<p><label for="new_pwd">'.__('New password:').'</label> '.
+	form::password(array('new_pwd','new_pwd'),20,255).'</p>'.
+	
+	'<p><label for="new_pwd_c">'.__('Confirm password:').'</label> '.
+	form::password(array('new_pwd_c','new_pwd_c'),20,255).'</p>'.
+	'</fielset>'.
+	
+	'<p><input type="submit" value="'.__('change').'" />'.
+	form::hidden('login_data',$login_data).'</p>';
+}
+else
+{
+	if (is_callable(array($core->auth,'authForm')))
+	{
+		echo $core->auth->authForm($user_id);
+	}
+	else
+	{
+		if ($safe_mode) {
+			echo '<fieldset>';
+			echo '<legend>'.__('Safe mode login').'</legend>';
+			echo 
+				'<p class="form-note info">'.
+				__('This mode allows you to login without activating any of your plugins. This may be useful to solve compatibility problems').'&nbsp;<br />'.
+				__('Disable or delete any plugin suspected to cause trouble, then log out and log back in normally.').
+				'</p>';
+		}
+		else {
+			echo '<div class="fieldset">';
+		}
+
+		echo
+		'<p><label for="user_id">'.__('Username:').'</label> '.
+		form::field(array('user_id','user_id'),20,32,html::escapeHTML($user_id)).'</p>'.
+		
+		'<p><label for="user_pwd">'.__('Password:').'</label> '.
+		form::password(array('user_pwd','user_pwd'),20,255).'</p>'.
+		
+		'<p>'.
+		form::checkbox(array('user_remember','user_remember'),1).
+		'<label for="user_remember" class="classic">'.
+		__('Remember my ID on this computer').'</label></p>'.
+		
+		'<p><input type="submit" value="'.__('log in').'" /></p>';
+		
+		if (!empty($_REQUEST['blog'])) {
+			echo form::hidden('blog',html::escapeHTML($_REQUEST['blog']));
+		}
+		if($safe_mode) {
+			echo 
+			form::hidden('safe_mode',1).
+			'</fieldset>';
+		}
+		else {
+			echo '</div>';
+		}
+		echo
+		'<p id="cookie_help" class="error">'.__('You must accept cookies in order to use the private area.').'</p>';
+
+		echo '<div id="issue">';
+		
+		if ($safe_mode) {
+			echo
+			'<p><a href="auth.php" id="normal_mode_link">'.__('Get back to normal authentication').'</a></p>';
+		} else {
+			echo '<p id="more"><strong>'.__('Connection issue?').'</strong></p>';
+			if ($core->auth->allowPassChange()) {
+				echo '<p><a href="auth.php?recover=1">'.__('I forgot my password').'</a></p>';
+			}
+			echo '<p><a href="auth.php?safe_mode=1" id="safe_mode_link">'.__('I want to log in in safe mode').'</a></p>';
+		}
+		
+		echo '</div>';
+	}
+}
+?>
+</form>
+</body>
+</html>
Index: admin/blog.php
===================================================================
--- admin/blog.php	(revision 1482)
+++ admin/blog.php	(revision 1277)
@@ -67,32 +67,28 @@
 else
 {
-	dcPage::open(__('New blog'),dcPage::jsConfirmClose('blog-form'),
-		dcPage::breadcrumb(
-			array(
-				__('System') => '',
-				__('Blogs') => 'blogs.php',
-				'<span class="page-title">'.__('New blog').'</span>' => ''
-			))
-	);
+	dcPage::open(__('New blog'),dcPage::jsConfirmClose('blog-form'));
 	
 	echo
-	'<form action="blog.php" method="post" id="blog-form">'.
+	'<h2><a href="blogs.php">'.__('Blogs').'</a> &rsaquo; <span class="page-title">'.__('New blog').'</span></h2>'.
 	
-	'<div>'.$core->formNonce().'</div>'.
-	'<p><label class="required" for="blog_id"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog ID:').'</label> '.
-	form::field('blog_id',30,32,html::escapeHTML($blog_id)).'</p>'.
+	'<form action="blog.php" method="post" id="blog-form" class="fieldset">'.
+	
+	'<p><label class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog ID:').' '.
+	form::field('blog_id',30,32,html::escapeHTML($blog_id)).'</label></p>'.
 	'<p class="form-note">'.__('At least 2 characters using letters, numbers or symbols.').'</p> '.
 	'<p class="form-note warn">'.__('Please note that changing your blog ID may require changes in your public index.php file.').'</p>'.
 	
-	'<p><label class="required" for="blog_name"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog name:').'</label> '.
-	form::field('blog_name',30,255,html::escapeHTML($blog_name)).'</p>'.
+	'<p><label class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog name:').' '.
+	form::field('blog_name',30,255,html::escapeHTML($blog_name)).'</label></p>'.
 	
-	'<p><label class="required" for="blog_url"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog URL:').'</label> '.
-	form::field('blog_url',30,255,html::escapeHTML($blog_url)).'</p>'.
+	'<p><label class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog URL:').' '.
+	form::field('blog_url',30,255,html::escapeHTML($blog_url)).'</label></p>'.
 	
 	'<p class="area"><label for="blog_desc">'.__('Blog description:').'</label> '.
 	form::textarea('blog_desc',60,5,html::escapeHTML($blog_desc)).'</p>'.
 	
-	'<p><input type="submit" accesskey="s" value="'.__('Create').'" /></p>'.
+	'<p><input type="submit" accesskey="s" value="'.__('Create').'" />'.
+	$core->formNonce().
+	'</p>'.
 	'</form>';
 
Index: admin/blog_del.php
===================================================================
--- admin/blog_del.php	(revision 1399)
+++ admin/blog_del.php	(revision 1288)
@@ -49,16 +49,10 @@
 }
 
-dcPage::open(__('Delete a blog'),'',
-	dcPage::breadcrumb(
-		array(
-			__('System') => '',
-			__('Blogs') => 'blogs.php',
-			'<span class="page-title">'.__('Delete a blog').'</span>' => ''
-		))
-);
+dcPage::open(__('Delete a blog'));
 
 if (!$core->error->flag())
 {
 	echo
+	'<h2 class="page-title">'.__('Delete a blog').'</h2>'.
 	'<p class="message">'.__('Warning').'</p>'.
 	'<p>'.sprintf(__('You are about to delete the blog %s. Every entry, comment and category will be deleted.'),
@@ -69,6 +63,6 @@
 	'<form action="blog_del.php" method="post">'.
 	'<div>'.$core->formNonce().'</div>'.
-	'<p><label for="pwd">'.__('Your password:').'</label> '.
-	form::password('pwd',20,255).'</p>'.
+	'<p><label for="pwd">'.__('Your password:').' '.
+	form::password('pwd',20,255).'</label></p>'.
 	'<p><input type="submit" class="delete" name="del" value="'.__('Delete this blog').'" />'.
 	form::hidden('blog_id',$blog_id).'</p>'.
Index: admin/blog_pref.php
===================================================================
--- admin/blog_pref.php	(revision 1474)
+++ admin/blog_pref.php	(revision 1179)
@@ -252,19 +252,4 @@
 }
 
-if ($standalone) {
-	$breadcrumb = dcPage::breadcrumb(
-		array(
-			html::escapeHTML($blog_name) => '',
-			'<span class="page-title">'.__('Blog settings').'</span>' => ''
-		));
-} else {
-	$breadcrumb = dcPage::breadcrumb(
-		array(
-			__('System') => '',
-			__('Blogs') => 'blogs.php',
-			'<span class="page-title">'.__('Blog settings').' : '.html::escapeHTML($blog_name).'</span>' => ''
-		));
-}
-
 dcPage::open(__('Blog settings'),
 	'<script type="text/javascript">'."\n".
@@ -283,10 +268,13 @@
 	$core->callBehavior('adminBlogPreferencesHeaders').
 	
-	dcPage::jsPageTabs(),
-	$breadcrumb
+	dcPage::jsPageTabs()
 );
 
 if ($blog_id)
 {
+	echo '<h2>'.(!$standalone ? '<a href="blogs.php">'.__('Blogs').'</a> &rsaquo; ' : '').
+	html::escapeHTML($blog_name).' &rsaquo; <span class="page-title">'.
+	__('Blog settings').'</span></h2>';
+	
 	if (!empty($_GET['add'])) {
 		dcPage::message(__('Blog has been successfully created.'));
@@ -309,6 +297,6 @@
 	{
 		echo
-		'<p><label for="blog_id" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog ID:').'</label>'.
-		form::field('blog_id',30,32,html::escapeHTML($blog_id)).'</p>'.
+		'<p><label for="blog_id" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog ID:').
+		form::field('blog_id',30,32,html::escapeHTML($blog_id)).'</label></p>'.
 		'<p class="form-note">'.__('At least 2 characters using letters, numbers or symbols.').'</p> '.
 		'<p class="form-note warn">'.__('Please note that changing your blog ID may require changes in your public index.php file.').'</p>';
@@ -316,18 +304,18 @@
 	
 	echo
-	'<p><label for="blog_name" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog name:').'</label>'.
-	form::field('blog_name',30,255,html::escapeHTML($blog_name)).'</p>';
+	'<p><label for="blog_name" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog name:').
+	form::field('blog_name',30,255,html::escapeHTML($blog_name)).'</label></p>';
 	
 	if ($core->auth->isSuperAdmin())
 	{
 		echo
-		'<p><label for="blog_url" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog URL:').'</label>'.
-		form::field('blog_url',30,255,html::escapeHTML($blog_url)).'</p>'.
-		
-		'<p><label for="url_scan">'.__('URL scan method:').'</label>'.
-		form::combo('url_scan',$url_scan_combo,$blog_settings->system->url_scan).'</p>'.
-		
-		'<p><label for="blog_status">'.__('Blog status:').'</label>'.
-		form::combo('blog_status',$status_combo,$blog_status).'</p>';
+		'<p><label for="blog_url" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog URL:').
+		form::field('blog_url',30,255,html::escapeHTML($blog_url)).'</label></p>'.
+		
+		'<p><label for="url_scan">'.__('URL scan method:').
+		form::combo('url_scan',$url_scan_combo,$blog_settings->system->url_scan).'</label></p>'.
+		
+		'<p><label for="blog_status">'.__('Blog status:').
+		form::combo('blog_status',$status_combo,$blog_status).'</label></p>';
 	}
 	
@@ -342,33 +330,33 @@
 	'<div class="two-cols">'.
 	'<div class="col">'.
-	'<p><label for="editor">'.__('Blog editor name:').'</label>'.
+	'<p><label for="editor">'.__('Blog editor name:').
 	form::field('editor',30,255,html::escapeHTML($blog_settings->system->editor)).
-	'</p>'.
-	
-	'<p><label for="lang">'.__('Default language:').'</label>'.
+	'</label></p>'.
+	
+	'<p><label for="lang">'.__('Default language:').
 	form::combo('lang',$lang_combo,$blog_settings->system->lang,'l10n').
-	'</p>'.
-	
-	'<p><label for="blog_timezone">'.__('Blog timezone:').'</label>'.
+	'</label></p>'.
+	
+	'<p><label for="blog_timezone">'.__('Blog timezone:').
 	form::combo('blog_timezone',dt::getZones(true,true),html::escapeHTML($blog_settings->system->blog_timezone)).
-	'</p>'.
-
-	'<p><label for="copyright_notice">'.__('Copyright notice:').'</label>'.
+	'</label></p>'.
+
+	'<p><label for="copyright_notice">'.__('Copyright notice:').
 	form::field('copyright_notice',30,255,html::escapeHTML($blog_settings->system->copyright_notice)).
-	'</p>'.
-	'</div>'.
-	
-	'<div class="col">'.
-	'<p><label for="post_url_format">'.__('New post URL format:').'</label>'.
+	'</label></p>'.
+	'</div>'.
+	
+	'<div class="col">'.
+	'<p><label for="post_url_format">'.__('New post URL format:').
 	form::combo('post_url_format',$post_url_combo,html::escapeHTML($blog_settings->system->post_url_format)).
-	'</p>'.
-
-	'<p><label for="note_title_tag">'.__('Note title HTML tag:').'</label>'.
+	'</label></p>'.
+
+	'<p><label for="note_title_tag">'.__('Note title HTML tag:').
 	form::combo('note_title_tag',$note_title_tag_combo,$blog_settings->system->note_title_tag).
-	'</p>'.
-		
-	'<p><label for="enable_xmlrpc" class="classic">'.'</label>'.
+	'</label></p>'.
+		
+	'<p><label for="enable_xmlrpc" class="classic">'.
 	form::checkbox('enable_xmlrpc','1',$blog_settings->system->enable_xmlrpc).
-	__('Enable XML/RPC interface').'</p>';
+	__('Enable XML/RPC interface').'</label></p>';
 
 	echo
@@ -442,11 +430,11 @@
 	'<div class="two-cols">'.
 	'<div class="col">'.
-	'<p><label for="date_format">'.__('Date format:').'</label>'.
+	'<p><label for="date_format">'.__('Date format:').
 	form::field('date_format',30,255,html::escapeHTML($blog_settings->system->date_format)).
-	'</p>'.
-	
-	'<p><label for="time_format">'.__('Time format:').'</label>'.
+	'</label></p>'.
+	
+	'<p><label for="time_format">'.__('Time format:').
 	form::field('time_format',30,255,html::escapeHTML($blog_settings->system->time_format)).
-	'</p>'.
+	'</label></p>'.
 	
 	'<p><label for="use_smilies" class="classic">'.
@@ -500,11 +488,11 @@
 
 	'<h4>'.__('Default image insertion attributes').'</h4>'.
-	'<p><label for="media_img_default_size">'.__('Image size:').'</label>'.
+	'<p><label for="media_img_default_size">'.__('Image size:').
 	form::combo('media_img_default_size',$img_default_size_combo,
 		(html::escapeHTML($blog_settings->system->media_img_default_size) != '' ? html::escapeHTML($blog_settings->system->media_img_default_size) : 'm')).
-	'</p>'.
-	'<p><label for="media_img_default_alignment">'.__('Image alignment:').'</label>'.
+	'</label></p>'.
+	'<p><label for="media_img_default_alignment">'.__('Image alignment').
 	form::combo('media_img_default_alignment',$img_default_alignment_combo,html::escapeHTML($blog_settings->system->media_img_default_alignment)).
-	'</p>'.
+	'</label></p>'.
 	'<p><label for="media_img_default_link" class="classic">'.
 	form::checkbox('media_img_default_link','1',$blog_settings->system->media_img_default_link).
@@ -548,7 +536,7 @@
 	} else {
 		if ($blog_id == $core->blog->id) {
-			echo '<p class="message">'.__('The current blog cannot be deleted.').'</p>';
+			echo '<p class="message">'.__('The current blog cannot be deleted').'</p>';
 		} else {
-			echo '<p class="message">'.__('Only superadmin can delete a blog.').'</p>';
+			echo '<p class="message">'.__('Only superadmin can delete a blog').'</p>';
 		}
 	}
Index: admin/blog_theme.php
===================================================================
--- admin/blog_theme.php	(revision 1428)
+++ admin/blog_theme.php	(revision 1263)
@@ -173,7 +173,7 @@
 	'<div class="theme-shot"><img src="'.$screenshot.'" alt="" /></div>'.
 	'<div class="theme-info">'.
-		'<h4>'.form::radio(array('theme',$radio_id),html::escapeHTML($id),$current,'','',($has_parent && !$is_parent_present)).' '.
+		'<h3>'.form::radio(array('theme',$radio_id),html::escapeHTML($id),$current,'','',($has_parent && !$is_parent_present)).' '.
 		'<label class="classic" for="'.$radio_id.'">'.
-		html::escapeHTML($details['name']).'</label></h4>'.
+		html::escapeHTML($details['name']).'</label></h3>'.
 		'<p><span class="theme-desc">'.html::escapeHTML($details['desc']).'</span> '.
 		'<span class="theme-author">'.sprintf(__('by %s'),html::escapeHTML($details['author'])).'</span> '.
@@ -187,5 +187,5 @@
 		}
 		if ($has_css) {
-			$res .= '<span class="theme-css"><a href="'.$theme_url.'/style.css">'.__('Stylesheet').'</a></span>';
+			$res .= '<a class="theme-css" href="'.$theme_url.'/style.css">'.__('Stylesheet').'</a>';
 		}
 		$res .= '</p>';
@@ -207,29 +207,15 @@
 }
 
-if (!$theme_conf_mode)
-{
-	$breadcrumb = dcPage::breadcrumb(
-		array(
-			html::escapeHTML($core->blog->name) => '',
-			'<span class="page-title">'.__('Blog appearance').'</span>' => ''
-		));
-} else {
-	$breadcrumb = dcPage::breadcrumb(
-		array(
-			html::escapeHTML($core->blog->name) => '',
-			__('Blog appearance') => 'blog_theme.php',
-			'<span class="page-title">'.__('Theme configuration').'</span>' => ''
-		));
-}
-
 dcPage::open(__('Blog appearance'),
 	(!$theme_conf_mode ? dcPage::jsLoad('js/_blog_theme.js') : '').
 	dcPage::jsPageTabs($default_tab).
-	dcPage::jsColorPicker(),
-	$breadcrumb
+	dcPage::jsColorPicker()
 );
 
 if (!$theme_conf_mode)
 {
+	echo
+	'<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.__('Blog appearance').'</span></h2>';
+	
 	if (!empty($_GET['upd'])) {
 		dcPage::message(__('Theme has been successfully changed.'));
@@ -244,11 +230,18 @@
 	}
 	
+	if ($can_install) {
+		echo
+		'<p><strong>'.sprintf(__('You can find additional themes for your blog on %s.'),
+		'<a href="http://themes.dotaddict.org/galerie-dc2/">Dotaddict</a>').'</strong> '.
+		__('To install or upgrade a theme you generally just need to upload it '.
+		'in "Install or upgrade a theme" section.').'</p>';
+	}
+	
 	# Themes list
-	echo '<div class="multi-part" id="themes-list" title="'.__('Themes').'">'.
-	'<h3>'.__('Available themes in your installation').'</h3>';
+	echo '<div class="multi-part" id="themes-list" title="'.__('Themes').'">';
 	
 	$themes = $core->themes->getModules();
 	if (isset($themes[$core->blog->settings->system->theme])) {
-		echo '<p>'.sprintf(__('You are currently using "%s"'),$themes[$core->blog->settings->system->theme]['name']).'.</p>';
+		echo '<h3>'.sprintf(__('You are currently using "%s"'),$themes[$core->blog->settings->system->theme]['name']).'</h3>';
 	}
 	
@@ -272,12 +265,13 @@
 	
 	echo
-	'<div id="themes-actions">'.
-	
-	'<p>'.$core->formNonce().'<input type="submit" name="select" value="'.__('Use selected theme').'" /> ';	
+	'<div class="two-cols clear" id="themes-actions">'.
+	$core->formNonce().
+	'<p class="col"><input type="submit" name="select" value="'.__('Use selected theme').'" /></p>';
+	
 	if ($can_install) {
-		echo ' <input type="submit" class="delete" name="remove" value="'.__('Delete selected theme').'" />';
-	}
-	echo '</p>'.
-	
+		echo '<p class="col right"><input type="submit" class="delete" name="remove" value="'.__('Delete selected theme').'" /></p>';
+	}
+	
+	echo
 	'</div>'.
 	'</form>'.
@@ -288,12 +282,9 @@
 	{
 		echo
-		'<div class="multi-part clear" id="add-theme" title="'.__('Install or upgrade a theme').'">'.
-		'<h3>'.__('Add themes to your installation').'</h3>'.
-		'<p>'.sprintf(__('You can find additional themes for your blog on %s.'),
-		'<a href="http://themes.dotaddict.org/galerie-dc2/">Dotaddict</a>').'</p>';
+		'<div class="multi-part clear" id="add-theme" title="'.__('Install or upgrade a theme').'">';
 		
 		if ($is_writable)
 		{
-			echo '<p>'.__('You can also install themes by uploading or downloading zip files.').'</p>';
+			echo '<p>'.__('You can install themes by uploading or downloading zip files.').'</p>';
 			
 			# 'Upload theme' form
@@ -302,8 +293,8 @@
 			'<fieldset>'.
 			'<legend>'.__('Upload a zip file').'</legend>'.
-			'<p class="field"><label for="pkg_file" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Theme zip file:').'</label> '.
-			'<input type="file" name="pkg_file" id="pkg_file" /></p>'.
-			'<p class="field"><label for="your_pwd1" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Your password:').'</label> '.
-			form::password(array('your_pwd','your_pwd1'),20,255).'</p>'.
+			'<p class="field"><label for="pkg_file" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Theme zip file:').' '.
+			'<input type="file" name="pkg_file" id="pkg_file" /></label></p>'.
+			'<p class="field"><label for="your_pwd1" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Your password:').' '.
+			form::password(array('your_pwd','your_pwd1'),20,255).'</label></p>'.
 			'<input type="submit" name="upload_pkg" value="'.__('Upload theme').'" />'.
 			$core->formNonce().
@@ -316,8 +307,8 @@
 			'<fieldset>'.
 			'<legend>'.__('Download a zip file').'</legend>'.
-			'<p class="field"><label for="pkg_url" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Theme zip file URL:').'</label> '.
-			form::field(array('pkg_url','pkg_url'),40,255).'</p>'.
-			'<p class="field"><label for="your_pwd2" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Your password:').'</label> '.
-			form::password(array('your_pwd','your_pwd2'),20,255).'</p>'.
+			'<p class="field"><label for="pkg_url" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Theme zip file URL:').' '.
+			form::field(array('pkg_url','pkg_url'),40,255).'</label></p>'.
+			'<p class="field"><label for="your_pwd2" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Your password:').' '.
+			form::password(array('your_pwd','your_pwd2'),20,255).'</label></p>'.
 			'<input type="submit" name="fetch_pkg" value="'.__('Download theme').'" />'.
 			$core->formNonce().
@@ -339,6 +330,7 @@
 	$theme_name = $core->themes->moduleInfo($core->blog->settings->system->theme,'name');
 	$core->themes->loadModuleL10Nresources($core->blog->settings->system->theme,$_lang);
-
-	echo
+	echo
+	'<h2>'.html::escapeHTML($core->blog->name).
+	' &rsaquo; <a href="blog_theme.php">'.__('Blog appearance').'</a> &rsaquo; <span class="page-title">'.__('Theme configuration').'</span></h2>'.
 	'<p><a class="back" href="blog_theme.php">'.__('back').'</a></p>';
 	
Index: admin/blogs.php
===================================================================
--- admin/blogs.php	(revision 1426)
+++ admin/blogs.php	(revision 1179)
@@ -73,15 +73,11 @@
 	$starting_script .= dcPage::jsLoad('js/filter-controls.js');
 }
-dcPage::open(__('List of blogs'),$starting_script,
-	dcPage::breadcrumb(
-		array(
-			__('System') => '',
-			'<span class="page-title">'.__('List of blogs').'</span>' => ''
-		))
-);
+dcPage::open(__('List of blogs'),$starting_script);
 
 if (!empty($_GET['del'])) {
 	dcPage::message(__('Blog has been successfully deleted.'));
 }
+
+echo '<h2 class="page-title">'.__('List of blogs').'</h2>';
 
 if (!$core->error->flag())
@@ -92,29 +88,31 @@
 	
 	if (!$show_filters) {
-		echo '<p><a id="filter-control" class="form-control" href="#">'.__('Filter blogs list').'</a></p>';
+		echo '<p><a id="filter-control" class="form-control" href="#">'.__('Filters').'</a></p>';
 	}
 	
 	echo
 	'<form action="blogs.php" method="get" id="filters-form">'.
-	'<h3>'.__('Filter blogs list').'</h3>'.
+	'<fieldset class="two-cols"><legend>'.__('Filters').'</legend>'.
 	
-	'<div class="table">'.
-	'<div class="cell">'.
-	'<p><label for="q" class="ib">'.__('Search:').'</label> '.
-	form::field('q',20,255,html::escapeHTML($q)).'</p>'.
+	'<div class="col">'.
+	'<p><label for="sortby">'.__('Order by:').' '.
+	form::combo('sortby',$sortby_combo,html::escapeHTML($sortby)).
+	'</label> '.
+	'<label for="order">'.__('Sort:').' '.
+	form::combo('order',$order_combo,html::escapeHTML($order)).
+	'</label></p>'.
 	'</div>'.
 	
-	'<div class="cell filters-options">'.
-	'<p><label for="sortby" class="ib">'.__('Order by:').'</label> '.
-	form::combo('sortby',$sortby_combo,html::escapeHTML($sortby)).'</p>'.
-	'<p><label for="order" class="ib">'.__('Sort:').'</label> '.
-	form::combo('order',$order_combo,html::escapeHTML($order)).'</p>'.
-	'<p><span class="label ib">'.__('Show').'</span> <label for="nb" class="classic">'.	
-	form::field('nb',3,3,$nb_per_page).' '.__('blogs per page').'</label></p>'.
+	'<div class="col">'.
+	'<p><label for="q">'.__('Search:').' '.
+	form::field('q',20,255,html::escapeHTML($q)).
+	'</label></p>'.
+	'<p><label for="nb" class="classic">'.	form::field('nb',3,3,$nb_per_page).' '.
+	__('Blogs per page').'</label> '.
+	'<input type="submit" value="'.__('Apply filters').'" /></p>'.
 	'</div>'.
-	'</div>'.
-
-	'<p><input type="submit" value="'.__('Apply filters').'" />'.
-	'<br class="clear" /></p>'. //Opera sucks
+	
+	'<br class="clear" />'. //Opera sucks
+	'</fieldset>'.
 	'</form>';
 	
@@ -129,5 +127,5 @@
 		$pager->var_page = 'page';
 		
-		echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+		echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
 		
 		echo
@@ -147,5 +145,5 @@
 		echo '</table>';
 		
-		echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+		echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
 	}
 }
Index: admin/categories.php
===================================================================
--- admin/categories.php	(revision 1468)
+++ admin/categories.php	(revision 1421)
@@ -73,10 +73,5 @@
 dcPage::open(__('Categories'),
 	dcPage::jsToolMan()."\n".
-	dcPage::jsLoad('js/_categories.js'),
-	dcPage::breadcrumb(
-		array(
-			html::escapeHTML($core->blog->name) => '',
-			'<span class="page-title">'.__('Categories').'</span>' => ''
-		))
+	dcPage::jsLoad('js/_categories.js')
 );
 
@@ -93,4 +88,6 @@
 	dcPage::message(__('The category has been successfully moved.'));
 }
+
+echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.__('Categories').'</span></h2>';
 
 $rs = $core->blog->getCategories(array('post_type'=>'post'));
@@ -158,13 +155,13 @@
 
 '<form action="category.php" method="post">'.
-'<h3>'.__('Add a new category').'</h3>'.
-'<p><label class="required" for="cat_title"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label> '.
-form::field('cat_title',30,255,'','maximal').'</p>'.
-'<p><label for="new_cat_parent">'.__('Parent:').'</label> '.
+'<fieldset><legend>'.__('Add a new category').'</legend>'.
+'<p><label class="required" for="cat_title"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').' '.
+form::field('cat_title',30,255,'','maximal').'</label></p>'.
+'<p><label for="new_cat_parent">'.__('Parent:').' '.
 form::combo('new_cat_parent',array_merge(array(__('(No cat)') => 0),$categories_combo),'','maximal').
-'</p>'.
-'<p><input type="submit" value="'.__('Create').'" />'.
-$core->formNonce().'</p>'.
-
+'</label></p>'.
+'<p><input type="submit" value="'.__('Create').'" /></p>'.
+$core->formNonce().
+'</fieldset>'.
 '</form>';
 
@@ -173,21 +170,22 @@
 	echo
 	'<form action="categories.php" method="post" id="delete-category">'.
-	'<h3>'.__('Remove a category').'</h3>'.
-	'<p><label for="del_cat">'.__('Choose a category to remove:').'</label> '.
-	form::combo('del_cat',$categories_combo,'','maximal').'</p> '.
-	'<p><label for="mov_cat">'.__('And choose the category which will receive its entries:').'</label> '.
-	form::combo('mov_cat',array_merge(array(__('(No cat)') => ''),$categories_combo),'','maximal').'</p> '.
-	'<p><input type="submit" value="'.__('Delete').'" class="delete" />'.
-	$core->formNonce().'</p>'.
-
+	'<fieldset><legend>'.__('Remove a category').'</legend>'.
+	'<p><label for="del_cat">'.__('Choose a category to remove:').' '.
+	form::combo('del_cat',$categories_combo,'','maximal').'</label></p> '.
+	'<p><label for="mov_cat">'.__('And choose the category which will receive its entries:').' '.
+	form::combo('mov_cat',array_merge(array(__('(No cat)') => ''),$categories_combo),'','maximal').'</label></p> '.
+	'<p><input type="submit" value="'.__('Delete').'" class="delete" /></p>'.
+	$core->formNonce().
+	'</fieldset>'.
 	'</form>';
 	
 	echo
-	'<form action="categories.php" method="post" id="reset-order" class="border-top">'.
-	'<h3>'.__('Reorder categories').'</h3>'.
+	'<form action="categories.php" method="post" id="reset-order">'.
+	'<fieldset><legend>'.__('Reorder categories').'</legend>'.
 	'<p>'.__('This will relocate all categories on the top level').'</p> '.
-	'<p><input type="submit" value="'.__('Reorder').'" />'.
+	'<p><input type="submit" value="'.__('Reorder').'" /></p>'.
 	form::hidden(array('reset'),1).
-	$core->formNonce().'</p>'.
+	$core->formNonce().
+	'</fieldset>'.
 	'</form>';
 }
Index: admin/category.php
===================================================================
--- admin/category.php	(revision 1399)
+++ admin/category.php	(revision 1179)
@@ -157,20 +157,8 @@
 $title = $cat_id ? html::escapeHTML($cat_title) : __('New category');
 
-$elements = array(
-	html::escapeHTML($core->blog->name) => '',
-	__('Categories') => 'categories.php'
-	);
-if ($cat_id) {
-	while($parents->fetch()) {
-		$elements[html::escapeHTML($parents->cat_title)] = 'category.php?id='.$parents->cat_id;
-	}
-}
-$elements['<span class="page-title">'.$title.'</span>'] = '';
-
 dcPage::open($title,
 	dcPage::jsConfirmClose('category-form').
 	dcPage::jsToolBar().
-	dcPage::jsLoad('js/_category.js'),
-	dcPage::breadcrumb($elements)
+	dcPage::jsLoad('js/_category.js')
 );
 
@@ -180,9 +168,23 @@
 
 echo
+'<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <a href="categories.php">'.
+__('Categories').'</a> &rsaquo; ';
+
+if ($cat_id)
+{
+	while($parents->fetch()) {
+		echo '<a href="category.php?id='.$parents->cat_id.'">'.html::escapeHTML($parents->cat_title).'</a>';
+		echo " &rsaquo; ";
+	}
+}
+
+echo '<span class="page-title">'.$title.'</span></h2>';
+
+echo
 '<form action="category.php" method="post" id="category-form">'.
-'<h3>'.__('Category information').'</h3>'.
-'<p><label class="required" for="cat_title"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label> '.
+'<fieldset><legend>'.__('Category information').'</legend>'.
+'<p><label class="required" for="cat_title"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').' '.
 form::field('cat_title',40,255,html::escapeHTML($cat_title)).
-'</p>';
+'</label></p>';
 if (!$cat_id)
 {
@@ -202,7 +204,6 @@
 echo
 '<div class="lockable">'.
-'<p><label for="cat_url">'.__('URL:').'</label> '
-.form::field('cat_url',40,255,html::escapeHTML($cat_url)).
-'</p>'.
+'<p><label for="cat_url">'.__('URL:').' '.form::field('cat_url',40,255,html::escapeHTML($cat_url)).
+'</label></p>'.
 '<p class="form-note warn" id="note-cat-url">'.
 __('Warning: If you set the URL manually, it may conflict with another category.').'</p>'.
@@ -217,4 +218,5 @@
 $core->formNonce().
 '</p>'.
+'</fieldset>'.
 '</form>';
 
@@ -222,5 +224,5 @@
 {
 	echo
-	'<h3 class="border-top">'.__('Move this category').'</h3>'.
+	'<h3>'.__('Move this category').'</h3>'.
 	'<div class="two-cols">'.
 	'<div class="col">'.
@@ -228,6 +230,6 @@
 	'<form action="category.php" method="post">'.
 	'<fieldset><legend>'.__('Category parent').'</legend>'.
-	'<p><label for="cat_parent" class="classic">'.__('Parent:').'</label> '.
-	form::combo('cat_parent',$allowed_parents,$cat_parent).'</p>'.
+	'<p><label for="cat_parent" class="classic">'.__('Parent:').' '.
+	form::combo('cat_parent',$allowed_parents,$cat_parent).'</label></p>'.
 	'<p><input type="submit" accesskey="s" value="'.__('Save').'" />'.
 	form::hidden(array('id'),$cat_id).$core->formNonce().'</p>'.
Index: admin/comment.php
===================================================================
--- admin/comment.php	(revision 1399)
+++ admin/comment.php	(revision 1179)
@@ -160,20 +160,4 @@
 /* DISPLAY
 -------------------------------------------------------- */
-if ($comment_id) {
-	$breadcrumb = dcPage::breadcrumb(
-		array(
-			html::escapeHTML($core->blog->name) => '',
-			html::escapeHTML($post_title) => $core->getPostAdminURL($post_type,$post_id).'&amp;co=1#c'.$comment_id,
-			'<span class="page-title">'.__('Edit comment').'</span>' => ''
-		));
-} else {
-	$breadcrumb = dcPage::breadcrumb(
-		array(
-			html::escapeHTML($core->blog->name) => '',
-			html::escapeHTML($post_title) => $core->getPostAdminURL($post_type,$post_id),
-			'<span class="page-title">'.__('Edit comment').'</span>' => ''
-		));
-}
-
 dcPage::open(__('Edit comment'),
 	dcPage::jsConfirmClose('comment-form').
@@ -181,6 +165,5 @@
 	dcPage::jsLoad('js/_comment.js').
 	# --BEHAVIOR-- adminCommentHeaders
-	$core->callBehavior('adminCommentHeaders'),
-	$breadcrumb
+	$core->callBehavior('adminCommentHeaders')
 );
 
@@ -200,33 +183,33 @@
 		.'">'.__('Send an e-mail').'</a>';
 	}
-
+	
+	echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <a href="'.
+		$core->getPostAdminURL($post_type,$post_id).'&amp;co=1#c'.$comment_id.'"> '.
+		$post_title.'</a> &rsaquo; <span class="page-title">'.__('Edit comment').'</span></h2>';
+		
 	echo
 	'<form action="comment.php" method="post" id="comment-form">'.
-	'<div class="fieldset">'.
-	'<h3>'.__('Information collected').'</h3>'.
-	'<p>'.__('IP address:').' '.
+	'<p>'.__('IP address:').'<br /> '.
 	'<a href="comments.php?ip='.$comment_ip.'">'.$comment_ip.'</a></p>'.
 	
-	'<p>'.__('Date:').' '.
+	'<p>'.__('Date:').'<br /> '.
 	dt::dt2str(__('%Y-%m-%d %H:%M'),$comment_dt).'</p>'.
-	'</div>'.
-
-	'<h3>'.__('Comment submitted').'</h3>'.	
-	'<p><label for="comment_author" class="required"><abbr title="'.__('Required field').'">*</abbr>'.__('Author:').'</label>'.
+	
+	'<p><label for="comment_author" class="required"><abbr title="'.__('Required field').'">*</abbr>'.__('Author:').
 	form::field('comment_author',30,255,html::escapeHTML($comment_author)).
-	'</p>'.
-	
-	'<p><label for="comment_email">'.__('Email:').'</label>'.
+	'</label></p>'.
+	
+	'<p><label for="comment_email">'.__('Email:').
 	form::field('comment_email',30,255,html::escapeHTML($comment_email)).
-	'<span>'.$comment_mailto.'</span>'.
-	'</p>'.
-	
-	'<p><label for="comment_site">'.__('Web site:').'</label>'.
+	$comment_mailto.
+	'</label></p>'.
+	
+	'<p><label for="comment_site">'.__('Web site:').
 	form::field('comment_site',30,255,html::escapeHTML($comment_site)).
-	'</p>'.
-	
-	'<p><label for="comment_status">'.__('Status:').'</label>'.
+	'</label></p>'.
+	
+	'<p><label for="comment_status">'.__('Status:').
 	form::combo('comment_status',$status_combo,$comment_status,'','',!$can_publish).
-	'</p>'.
+	'</label></p>'.
 	
 	# --BEHAVIOR-- adminAfterCommentDesc
Index: admin/comments.php
===================================================================
--- admin/comments.php	(revision 1480)
+++ admin/comments.php	(revision 1179)
@@ -37,6 +37,6 @@
 $type_combo = array(
 '-' => '',
-__('Comment') => 'co',
-__('Trackback') => 'tb'
+__('comment') => 'co',
+__('trackback') => 'tb'
 );
 
@@ -134,8 +134,8 @@
 if ($core->auth->check('publish,contentadmin',$core->blog->id))
 {
-	$combo_action[__('Publish')] = 'publish';
-	$combo_action[__('Unpublish')] = 'unpublish';
-	$combo_action[__('Mark as pending')] = 'pending';
-	$combo_action[__('Mark as junk')] = 'junk';
+	$combo_action[__('publish')] = 'publish';
+	$combo_action[__('unpublish')] = 'unpublish';
+	$combo_action[__('mark as pending')] = 'pending';
+	$combo_action[__('mark as junk')] = 'junk';
 }
 if ($core->auth->check('delete,contentadmin',$core->blog->id))
@@ -169,11 +169,7 @@
 $starting_script .= $core->callBehavior('adminCommentsHeaders');
 
-dcPage::open(__('Comments and trackbacks'),$starting_script,
-	dcPage::breadcrumb(
-		array(
-			html::escapeHTML($core->blog->name) => '',
-			'<span class="page-title">'.__('Comments and trackbacks').'</span>' => ''
-		))
-);
+dcPage::open(__('Comments and trackbacks'),$starting_script);
+
+echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.__('Comments and trackbacks').'</span></h2>';
 
 if (!$core->error->flag())
@@ -183,4 +179,49 @@
 		unset($_SESSION['comments_del_spam']);
 	}
+	
+	# Filters
+	if (!$show_filters) {
+		echo '<p><a id="filter-control" class="form-control" href="#">'.
+		__('Filters').'</a></p>';
+	}
+	
+	echo
+	'<form action="comments.php" method="get" id="filters-form">'.
+	'<fieldset><legend>'.__('Filters').'</legend>'.
+	'<div class="three-cols">'.
+	'<div class="col">'.
+	'<label for="type">'.__('Type:').' '.
+	form::combo('type',$type_combo,$type).
+	'</label> '.
+	'<label for="status">'.__('Status:').' '.
+	form::combo('status',$status_combo,$status).
+	'</label>'.
+	'</div>'.
+	
+	'<div class="col">'.
+	'<p><label for="sortby">'.__('Order by:').' '.
+	form::combo('sortby',$sortby_combo,$sortby).
+	'</label> '.
+	'<label for="order">'.__('Sort:').' '.
+	form::combo('order',$order_combo,$order).
+	'</label></p>'.
+	'<p><label for="nb" class="classic">'.	form::field('nb',3,3,$nb_per_page).' '.
+	__('Comments per page').'</label></p>'.
+	'</div>'.
+	
+	'<div class="col">'.
+	'<p><label for="author">'.__('Comment author:').' '.
+	form::field('author',20,255,html::escapeHTML($author)).
+	'</label>'.
+	'<label for="ip">'.__('IP address:').' '.
+	form::field('ip',20,39,html::escapeHTML($ip)).
+	'</label></p>'.
+	'<p><input type="submit" value="'.__('Apply filters').'" /></p>'.
+	'</div>'.
+	
+	'</div>'.
+	'<br class="clear" />'. //Opera sucks
+	'</fieldset>'.
+	'</form>';
 	
 	$spam_count = $core->blog->getComments(array('comment_status'=>-2),true)->f(0);
@@ -192,5 +233,5 @@
 		if (!$with_spam || ($status != -2)) {
 			if ($spam_count == 1) {
-				echo '<p>'.sprintf(__('You have one spam comment.'),'<strong>'.$spam_count.'</strong>').' '.
+				echo '<p>'.sprintf(__('You have one spam comments.'),'<strong>'.$spam_count.'</strong>').' '.
 				'<a href="comments.php?status=-2">'.__('Show it.').'</a></p>';
 			} elseif ($spam_count > 1) {
@@ -201,5 +242,4 @@
 		
 		echo
-			'<p class="no-margin">'.
 			$core->formNonce().
 			'<input name="delete_all_spam" class="delete" type="submit" value="'.__('Delete all spams').'" /></p>';
@@ -210,44 +250,4 @@
 		echo '</form>';
 	}
-
-	# Filters
-	if (!$show_filters) {
-		echo '<p><a id="filter-control" class="form-control" href="#">'.
-		__('Filter comments and trackbacks list').'</a></p>';
-	}
-	
-	echo
-	'<form action="comments.php" method="get" id="filters-form">'.
-	'<h3>'.__('Filter comments and trackbacks list').'</h3>'.
-	'<div class="table">'.
-
-	'<div class="cell">'.
-	'<p><label for="type" class="ib">'.__('Type:').'</label> '.
-	form::combo('type',$type_combo,$type).'</p> '.
-	'<p><label for="status" class="ib">'.__('Status:').'</label> '.
-	form::combo('status',$status_combo,$status).'</p>'.
-	'</div>'.
-	
-	'<div class="cell">'.
-	'<p><label for="author" class="ib">'.__('Author:').'</label> '.
-	form::field('author',20,255,html::escapeHTML($author)).'</p>'.
-	'<p><label for="ip" class="ib">'.__('IP address:').'</label> '.
-	form::field('ip',20,39,html::escapeHTML($ip)).'</p>'.
-	'</div>'.
-	
-	'<div class="cell filters-options">'.
-	'<p><label for="sortby" class="ib">'.__('Order by:').'</label> '.
-	form::combo('sortby',$sortby_combo,$sortby).'</p>'.
-	'<p><label for="order" class="ib">'.__('Sort:').'</label> '.
-	form::combo('order',$order_combo,$order).'</p>'.
-	'<p><span class="label ib">Afficher</span> <label for="nb" class="classic">'.
-	form::field('nb',3,3,$nb_per_page).' '.
-	__('comments per page').'</label></p>'.
-	'</div>'.
-	
-	'</div>'.
-	'<p><input type="submit" value="'.__('Apply filters').'" />'.
-	'<br class="clear" /></p>'. //Opera sucks
-	'</form>';
 	
 	# Show comments
@@ -261,5 +261,5 @@
 	
 	'<p class="col right"><label for="action" class="classic">'.__('Selected comments action:').'</label> '.
-	form::combo('action',$combo_action,$default,'','','','title="'.__('Actions').'"').
+	form::combo('action',$combo_action,$default,'','','','title="'.__('action: ').'"').
 	$core->formNonce().
 	'<input type="submit" value="'.__('ok').'" /></p>'.
Index: admin/comments_actions.php
===================================================================
--- admin/comments_actions.php	(revision 1474)
+++ admin/comments_actions.php	(revision 1179)
@@ -137,5 +137,5 @@
 $core->callBehavior('adminCommentsActionsContent',$core,$action,$hidden_fields);
 
-echo '<p><a class="back" href="'.str_replace('&','&amp;',$redir).'">'.__('Back to comments list').'</a></p>';
+echo '<p><a class="back" href="'.str_replace('&','&amp;',$redir).'">'.__('back').'</a></p>';
 
 dcPage::close();
Index: admin/index.php
===================================================================
--- admin/index.php	(revision 1492)
+++ admin/index.php	(revision 1488)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -13,9 +13,4 @@
 if (!empty($_GET['pf'])) {
 	require dirname(__FILE__).'/../inc/load_plugin_file.php';
-	exit;
-}
-if (!empty($_GET['tf'])) {
-	define('DC_CONTEXT_ADMIN',true);
-	require dirname(__FILE__).'/../inc/load_theme_file.php';
 	exit;
 }
@@ -48,35 +43,6 @@
 $plugins_install = $core->plugins->installModules();
 
-# Send plugins install messages to templates
-if (!empty($plugins_install['success'])) {
-	$_ctx->addMessagesList(__('Following plugins have been installed:'),$plugins_install['success']);
-}
-if (!empty($plugins_install['failure'])) {
-	$_ctx->addMessagesList(__('Following plugins have not been installed:'),$plugins_install['failure']);
-}
-
-# Send plugins errors messages to templates
-$_ctx->modules_errors = $core->auth->isSuperAdmin() ? $core->plugins->getErrors() : array();
-
-# Send Dotclear updates notifications to tempaltes
-$_ctx->updater = array();
-if ($core->auth->isSuperAdmin() && is_readable(DC_DIGESTS)) {
-
-	$updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions');
-	$new_v = $updater->check(DC_VERSION);
-	$version_info = $new_v ? $updater->getInfoURL() : '';
-	
-	if ($updater->getNotify() && $new_v) {
-		$_ctx->updater = array(
-			'new_version'	=> $new_v,
-			'version_info'	=> $version_info
-		);
-	}
-}
-
 # Check dashboard module prefs
 $ws = $core->auth->user_prefs->addWorkspace('dashboard');
-
-# Doclinks prefs
 if (!$core->auth->user_prefs->dashboard->prefExists('doclinks')) {
 	if (!$core->auth->user_prefs->dashboard->prefExists('doclinks',true)) {
@@ -85,12 +51,4 @@
 	$core->auth->user_prefs->dashboard->put('doclinks',true,'boolean');
 }
-
-# Send doclinks to templates
-$_ctx->dashboard_doclinks = array();
-if ($core->auth->user_prefs->dashboard->doclinks && !empty($__resources['doc'])) {
-	$_ctx->dashboard_doclinks = $__resources['doc'];
-}
-
-# Dcnews prefs
 if (!$core->auth->user_prefs->dashboard->prefExists('dcnews')) {
 	if (!$core->auth->user_prefs->dashboard->prefExists('dcnews',true)) {
@@ -99,91 +57,9 @@
 	$core->auth->user_prefs->dashboard->put('dcnews',true,'boolean');
 }
-
-# Send dcnews to templates
-$_ctx->dashboard_dcnews = array();
-if ($core->auth->user_prefs->dashboard->dcnews && !empty($__resources['rss_news'])) {
-	try
-	{
-		$feed_reader = new feedReader;
-		$feed_reader->setCacheDir(DC_TPL_CACHE);
-		$feed_reader->setTimeout(2);
-		$feed_reader->setUserAgent('Dotclear - http://www.dotclear.org/');
-		$feed = $feed_reader->parse($__resources['rss_news']);
-		if ($feed) {
-			$items = array();
-			$i = 1;
-			foreach ($feed->items as $item) {
-				$items[] = array(
-					'title' => $item->title,
-					'link' => isset($item->link) ? $item->link : '',
-					'date' => dt::dt2str(__('%d %B %Y'),$item->pubdate,'Europe/Paris'),
-					'content' => html::clean($item->content)
-				);
-				$i++;
-				if ($i > 3) { break; }
-			}
-			$_ctx->dashboard_dcnews = $items;
-		}
-	}
-	catch (Exception $e) {}
-}
-
-# Quick entry prefs
 if (!$core->auth->user_prefs->dashboard->prefExists('quickentry')) {
 	if (!$core->auth->user_prefs->dashboard->prefExists('quickentry',true)) {
-		$core->auth->user_prefs->dashboard->put('quickentry',true,'boolean','',null,true);
-	}
-	$core->auth->user_prefs->dashboard->put('quickentry',true,'boolean');
-}
-
-# Send quick entry to templates
-$_ctx->dashboard_quickentry = false;
-if ($core->auth->user_prefs->dashboard->quickentry &&$core->auth->check('usage,contentadmin',$core->blog->id))
-{
-	$categories_combo = array('&nbsp;' => '');
-	try {
-		$categories = $core->blog->getCategories(array('post_type'=>'post'));
-		while ($categories->fetch()) {
-			$categories_combo[$categories->cat_id] = 
-				str_repeat('&nbsp;&nbsp;',$categories->level-1).
-				($categories->level-1 == 0 ? '' : '&bull; ').
-				html::escapeHTML($categories->cat_title);
-		}
-	} catch (Exception $e) { }
-	
-	$form = new dcForm($core,array('quickentry','quick-entry'),'post.php');
-	$form
-		->addField(
-			new dcFieldText('post_title','', array(
-				'size'		=> 20,
-				'required'	=> true,
-				'label'		=> __('Title'))))
-		->addField(
-			new dcFieldTextArea('post_content','', array(
-				'required'	=> true,
-				'label'		=> __("Content:"))))
-		->addField(
-			new dcFieldCombo('cat_id','',$categories_combo,array(
-				"label" => __('Category:'))))
-		->addField(
-			new dcFieldSubmit('save',__('Save'),array(
-				'action' => 'savePost')))
-		->addField(
-			new dcFieldHidden ('post_status',-2))
-		->addField(
-			new dcFieldHidden ('post_format',$core->auth->getOption('post_format')))
-		->addField(
-			new dcFieldHidden ('post_excerpt',''))
-		->addField(
-			new dcFieldHidden ('post_lang',$core->auth->getInfo('user_lang')))
-		->addField(
-			new dcFieldHidden ('post_notes',''))
-	;
-	if ($core->auth->check('publish',$core->blog->id)) {
-		$form->addField(
-			new dcFieldHidden ('save-publish',__('Save and publish')));
-	}
-	
-	$_ctx->dashboard_quickentry = true;
+		$core->auth->user_prefs->dashboard->put('quickentry',false,'boolean','',null,true);
+	}
+	$core->auth->user_prefs->dashboard->put('quickentry',false,'boolean');
 }
 
@@ -242,67 +118,263 @@
 }
 
-# Send dashboard icons to templates
-$icons = array();
-foreach ($__dashboard_icons as $i) {
-	$icons[] = array(
-		'title' 	=> $i[0],
-		'url' 	=> $i[1],
-		'img' 	=> dc_admin_icon_url($i[2])
-	);
-}
-$_ctx->dashboard_icons = $icons;
-
-# Dashboard items
+# Latest news for dashboard
 $__dashboard_items = new ArrayObject(array(new ArrayObject,new ArrayObject));
+
+# Documentation links
+$dashboardItem = 0;
+if ($core->auth->user_prefs->dashboard->doclinks) {
+	if (!empty($__resources['doc']))
+	{
+		$doc_links = '<h3>'.__('Documentation and support').'</h3><ul>';
+	
+		foreach ($__resources['doc'] as $k => $v) {
+			$doc_links .= '<li><a href="'.$v.'" title="'.$k.' '.__('(external link)').'">'.$k.'</a></li>';
+		}
+	
+		$doc_links .= '</ul>';
+		$__dashboard_items[$dashboardItem][] = $doc_links;
+		$dashboardItem++;
+	}
+}
+
+if ($core->auth->user_prefs->dashboard->dcnews) {
+	try
+	{
+		if (empty($__resources['rss_news'])) {
+			throw new Exception();
+		}
+	
+		$feed_reader = new feedReader;
+		$feed_reader->setCacheDir(DC_TPL_CACHE);
+		$feed_reader->setTimeout(2);
+		$feed_reader->setUserAgent('Dotclear - http://www.dotclear.org/');
+		$feed = $feed_reader->parse($__resources['rss_news']);
+		if ($feed)
+		{
+			$latest_news = '<h3>'.__('Latest news').'</h3><dl id="news">';
+			$i = 1;
+			foreach ($feed->items as $item)
+			{
+				$dt = isset($item->link) ? '<a href="'.$item->link.'" title="'.$item->title.' '.__('(external link)').'">'.
+					$item->title.'</a>' : $item->title;
+			
+				if ($i < 3) {
+					$latest_news .=
+					'<dt>'.$dt.'</dt>'.
+					'<dd><p><strong>'.dt::dt2str(__('%d %B %Y:'),$item->pubdate,'Europe/Paris').'</strong> '.
+					'<em>'.text::cutString(html::clean($item->content),120).'...</em></p></dd>';
+				} else {
+					$latest_news .=
+					'<dt>'.$dt.'</dt>'.
+					'<dd>'.dt::dt2str(__('%d %B %Y:'),$item->pubdate,'Europe/Paris').'</dd>';
+				}
+				$i++;
+				if ($i > 3) { break; }
+			}
+			$latest_news .= '</dl>';
+			$__dashboard_items[$dashboardItem][] = $latest_news;
+			$dashboardItem++;
+		}
+	}
+	catch (Exception $e) {}
+}
+
 $core->callBehavior('adminDashboardItems', $core, $__dashboard_items);
 
-# Send dashboard items to templates
-$items = array();
-foreach ($__dashboard_items as $i) {	
-	if ($i->count() > 0) {
-		foreach ($i as $v) {
-			$items[] = $v;
-		}
-	}
-}
-$_ctx->dashboard_items = $items;
-
 # Dashboard content
+$dashboardContents = '';
 $__dashboard_contents = new ArrayObject(array(new ArrayObject,new ArrayObject));
 $core->callBehavior('adminDashboardContents', $core, $__dashboard_contents);
 
-# Send dashboard contents to templates
-$contents = array();
-foreach ($__dashboard_contents as $i) {	
-	if ($i->count() > 0) {
+/* DISPLAY
+-------------------------------------------------------- */
+dcPage::open(__('Dashboard'),
+	dcPage::jsToolBar().
+	dcPage::jsLoad('js/_index.js').
+	# --BEHAVIOR-- adminDashboardHeaders
+	$core->callBehavior('adminDashboardHeaders')
+);
+
+echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.__('Dashboard').'</span></h2>';
+
+if ($core->auth->getInfo('user_default_blog') != $core->blog->id && $core->auth->blog_count > 1) {
+	echo
+	'<p><a href="index.php?default_blog=1" class="button">'.__('Make this blog my default blog').'</a></p>';
+}
+
+if ($core->blog->status == 0) {
+	echo '<p class="static-msg">'.__('This blog is offline').'</p>';
+} elseif ($core->blog->status == -1) {
+	echo '<p class="static-msg">'.__('This blog is removed').'</p>';
+}
+
+if (!defined('DC_ADMIN_URL') || !DC_ADMIN_URL) {
+	echo
+	'<p class="static-msg">'.
+	sprintf(__('%s is not defined, you should edit your configuration file.'),'DC_ADMIN_URL').
+	' '.__('See <a href="http://dotclear.org/documentation/2.0/admin/config">documentation</a> for more information.').
+	'</p>';
+}
+
+if (!defined('DC_ADMIN_MAILFROM') || !DC_ADMIN_MAILFROM) {
+	echo
+	'<p class="static-msg">'.
+	sprintf(__('%s is not defined, you should edit your configuration file.'),'DC_ADMIN_MAILFROM').
+	' '.__('See <a href="http://dotclear.org/documentation/2.0/admin/config">documentation</a> for more information.').
+	'</p>';
+}
+
+# Plugins install messages
+if (!empty($plugins_install['success']))
+{
+	echo '<div class="static-msg">'.__('Following plugins have been installed:').'<ul>';
+	foreach ($plugins_install['success'] as $k => $v) {
+		echo '<li>'.$k.'</li>';
+	}
+	echo '</ul></div>';
+}
+if (!empty($plugins_install['failure']))
+{
+	echo '<div class="error">'.__('Following plugins have not been installed:').'<ul>';
+	foreach ($plugins_install['failure'] as $k => $v) {
+		echo '<li>'.$k.' ('.$v.')</li>';
+	}
+	echo '</ul></div>';
+}
+
+# Dashboard columns (processed first, as we need to know the result before displaying the icons.)
+$dashboardItems = '';
+
+# Dotclear updates notifications
+if ($core->auth->isSuperAdmin() && is_readable(DC_DIGESTS))
+{
+	$updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions');
+	$new_v = $updater->check(DC_VERSION);
+	$version_info = $new_v ? $updater->getInfoURL() : '';
+	
+	if ($updater->getNotify() && $new_v) {
+		$dashboardItems .=
+		'<div id="upg-notify" class="static-msg"><p>'.sprintf(__('Dotclear %s is available!'),$new_v).'</p> '.
+		'<ul><li><strong><a href="update.php">'.sprintf(__('Upgrade now'),$new_v).'</a></strong>'.
+		'</li><li><a href="update.php?hide_msg=1">'.__('Remind me later').'</a>'.
+		($version_info ? ' </li><li><a href="'.$version_info.'">'.__('information about this version').'</a>' : '').
+		'</li></ul></div>';
+	}
+}
+
+# Errors modules notifications
+if ($core->auth->isSuperAdmin())
+{
+	$list = array();
+	foreach ($core->plugins->getErrors() as $k => $error) {
+		$list[] = '<li>'.$error.'</li>';
+	}
+	
+	if (count($list) > 0) {
+		$dashboardItems .=
+		'<div id="module-errors" class="error"><p>'.__('Some plugins are installed twice:').'</p> '.
+		'<ul>'.implode("\n",$list).'</ul></div>';
+	}
+	
+}
+
+foreach ($__dashboard_items as $i)
+{	
+	if ($i->count() > 0)
+	{
+		$dashboardItems .= '<div>';
 		foreach ($i as $v) {
-			$contents[] = $v;
-		}
-	}
-}
-$_ctx->dashboard_contents = $contents;
-
-# Blog status message
-if ($core->blog->status == 0) {
-	$_ctx->addMessageStatic(__('This blog is offline'));
-} elseif ($core->blog->status == -1) {
-	$_ctx->addMessageStatic(__('This blog is removed'));
-}
-
-# Config errors messages
-if (!defined('DC_ADMIN_URL') || !DC_ADMIN_URL) {
-	$_ctx->addMessageStatic(
-		sprintf(__('%s is not defined, you should edit your configuration file.'),'DC_ADMIN_URL').' '.
-		__('See <a href="http://dotclear.org/documentation/2.0/admin/config">documentation</a> for more information.')
-	);
-}
-if (!defined('DC_ADMIN_MAILFROM') || !DC_ADMIN_MAILFROM) {
-	$_ctx->addMessageStatic(
-		sprintf(__('%s is not defined, you should edit your configuration file.'),'DC_ADMIN_MAILFROM').' '.
-		__('See <a href="http://dotclear.org/documentation/2.0/admin/config">documentation</a> for more information.')
-	);
-}
-
-$_ctx->setBreadCrumb(__('Dashboard').' : '.html::escapeHTML($core->blog->name), false);
-$core->tpl->display('index.html.twig');
+			$dashboardItems .= $v;
+		}
+		$dashboardItems .= '</div>';
+	}
+}
+
+# Dashboard icons
+echo '<div id="dashboard-main"'.($dashboardItems ? '' : ' class="fullwidth"').'><div id="icons">';
+foreach ($__dashboard_icons as $i)
+{
+	echo
+	'<p><a href="'.$i[1].'"><img src="'.dc_admin_icon_url($i[2]).'" alt="" />'.
+	'<br /><span>'.$i[0].'</span></a></p>';
+}
+echo '</div>';
+
+if ($core->auth->user_prefs->dashboard->quickentry) {
+	if ($core->auth->check('usage,contentadmin',$core->blog->id))
+	{
+		# Getting categories
+		$categories_combo = array(__('(No cat)') => '');
+		try {
+			$categories = $core->blog->getCategories(array('post_type'=>'post'));
+			if (!$categories->isEmpty()) {
+				while ($categories->fetch()) {
+					$catparents_combo[] = $categories_combo[] = new formSelectOption(
+						str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title),
+						$categories->cat_id
+					);
+				}
+			}
+		} catch (Exception $e) { }
+		
+		echo
+		'<div id="quick">'.
+		'<h3>'.__('Quick entry').'</h3>'.
+		'<form id="quick-entry" action="post.php" method="post">'.
+		'<fieldset><legend>'.__('New entry').'</legend>'.
+		'<p class="col"><label for="post_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').
+		form::field('post_title',20,255,'','maximal').
+		'</label></p>'.
+		'<p class="area"><label class="required" '.
+		'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '.
+		form::textarea('post_content',50,7).
+		'</p>'.
+		'<p><label for="cat_id" class="classic">'.__('Category:').' '.
+		form::combo('cat_id',$categories_combo).'</label></p>'.
+		($core->auth->check('categories', $core->blog->id)
+			? '<div>'.
+			'<p id="new_cat">'.__('Add a new category').'</p>'.
+			'<p class="form-note info clear">'.__('This category will be created when you will save your post.').'</p>'.
+			'<p><label for="new_cat_title">'.__('Title:').' '.
+			form::field('new_cat_title',30,255,'','maximal').'</label></p>'.
+			'<p><label for="new_cat_parent">'.__('Parent:').' '.
+			form::combo('new_cat_parent',$categories_combo,'','maximal').
+			'</label></p>'.
+			'</div>'
+			: '').
+		'<p><input type="submit" value="'.__('Save').'" name="save" /> '.
+		($core->auth->check('publish',$core->blog->id)
+			? '<input type="hidden" value="'.__('Save and publish').'" name="save-publish" />'
+			: '').
+		$core->formNonce().
+		form::hidden('post_status',-2).
+		form::hidden('post_format',$core->auth->getOption('post_format')).
+		form::hidden('post_excerpt','').
+		form::hidden('post_lang',$core->auth->getInfo('user_lang')).
+		form::hidden('post_notes','').
+		'</p>'.
+		'</fieldset>'.
+		'</form>'.
+		'</div>';
+	}
+}
+
+foreach ($__dashboard_contents as $i)
+{	
+	if ($i->count() > 0)
+	{
+		$dashboardContents .= '<div>';
+		foreach ($i as $v) {
+			$dashboardContents .= $v;
+		}
+		$dashboardContents .= '</div>';
+	}
+}
+echo ($dashboardContents ? '<div id="dashboard-contents">'.$dashboardContents.'</div>' : '');
+
+echo '</div>';
+
+echo ($dashboardItems ? '<div id="dashboard-items">'.$dashboardItems.'</div>' : '');
+
+dcPage::close();
 ?>
Index: admin/install/index.php
===================================================================
--- admin/install/index.php	(revision 1399)
+++ admin/install/index.php	(revision 1247)
@@ -190,5 +190,5 @@
 		$core->auth->user_prefs->dashboard->put('doclinks',true,'boolean','',null,true);
 		$core->auth->user_prefs->dashboard->put('dcnews',true,'boolean','',null,true);
-		$core->auth->user_prefs->dashboard->put('quickentry',true,'boolean','',null,true);
+		$core->auth->user_prefs->dashboard->put('quickentry',false,'boolean','',null,true);
 
 		# Add accessibility options
@@ -320,19 +320,19 @@
 	'<form action="index.php" method="post">'.
 	'<fieldset><legend>'.__('User information').'</legend>'.
-	'<p><label for="u_firstname">'.__('First Name:').'</label> '.
-	form::field('u_firstname',30,255,html::escapeHTML($u_firstname)).'</p>'.
-	'<p><label for="u_name">'.__('Last Name:').'</label> '.
-	form::field('u_name',30,255,html::escapeHTML($u_name)).'</p>'.
-	'<p><label for="u_email">'.__('Email:').'</label> '.
-	form::field('u_email',30,255,html::escapeHTML($u_email)).'</p>'.
+	'<p><label for="u_firstname">'.__('First Name:').' '.
+	form::field('u_firstname',30,255,html::escapeHTML($u_firstname)).'</label></p>'.
+	'<p><label for="u_name">'.__('Last Name:').' '.
+	form::field('u_name',30,255,html::escapeHTML($u_name)).'</label></p>'.
+	'<p><label for="u_email">'.__('Email:').' '.
+	form::field('u_email',30,255,html::escapeHTML($u_email)).'</label></p>'.
 	'</fieldset>'.
 	
 	'<fieldset><legend>'.__('Username and password').'</legend>'.
-	'<p><label for="u_login" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Username:').'</label> '.
-	form::field('u_login',30,32,html::escapeHTML($u_login)).'</p>'.
-	'<p><label for="u_pwd" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Password:').'</label> '.
-	form::password('u_pwd',30,255).'</p>'.
-	'<p><label for="u_pwd2" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Confirm password:').'</label> '.
-	form::password('u_pwd2',30,255).'</p>'.
+	'<p><label for="u_login" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Username:').' '.
+	form::field('u_login',30,32,html::escapeHTML($u_login)).'</label></p>'.
+	'<p><label for="u_pwd" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Password:').' '.
+	form::password('u_pwd',30,255).'</label></p>'.
+	'<p><label for="u_pwd2" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Confirm password:').' '.
+	form::password('u_pwd2',30,255).'</label></p>'.
 	'</fieldset>'.
 	
Index: admin/install/wizard.php
===================================================================
--- admin/install/wizard.php	(revision 1399)
+++ admin/install/wizard.php	(revision 1179)
@@ -178,16 +178,16 @@
 
 '<form action="wizard.php" method="post">'.
-'<p><label class="required" for="DBDRIVER"><abbr title="'.__('Required field').'">*</abbr> '.__('Database type:').'</label> '.
-form::combo('DBDRIVER',array('MySQL'=>'mysql','PostgreSQL'=>'pgsql'),$DBDRIVER).'</p>'.
-'<p><label for="DBHOST">'.__('Database Host Name:').'</label> '.
-form::field('DBHOST',30,255,html::escapeHTML($DBHOST)).'</p>'.
-'<p><label for="DBNAME">'.__('Database Name:').'</label> '.
-form::field('DBNAME',30,255,html::escapeHTML($DBNAME)).'</p>'.
-'<p><label for="DBUSER">'.__('Database User Name:').'</label> '.
-form::field('DBUSER',30,255,html::escapeHTML($DBUSER)).'</p>'.
-'<p><label for="DBPASSWORD">'.__('Database Password:').'</label> '.
-form::password('DBPASSWORD',30,255).'</p>'.
-'<p><label for="DBPREFIX" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Database Tables Prefix:').'</label> '.
-form::field('DBPREFIX',30,255,html::escapeHTML($DBPREFIX)).'</p>'.
+'<p><label class="required" for="DBDRIVER"><abbr title="'.__('Required field').'">*</abbr> '.__('Database type:').' '.
+form::combo('DBDRIVER',array('MySQL'=>'mysql','PostgreSQL'=>'pgsql'),$DBDRIVER).'</label></p>'.
+'<p><label for="DBHOST">'.__('Database Host Name:').' '.
+form::field('DBHOST',30,255,html::escapeHTML($DBHOST)).'</label></p>'.
+'<p><label for="DBNAME">'.__('Database Name:').' '.
+form::field('DBNAME',30,255,html::escapeHTML($DBNAME)).'</label></p>'.
+'<p><label for="DBUSER">'.__('Database User Name:').' '.
+form::field('DBUSER',30,255,html::escapeHTML($DBUSER)).'</label></p>'.
+'<p><label for="DBPASSWORD">'.__('Database Password:').' '.
+form::password('DBPASSWORD',30,255).'</label></p>'.
+'<p><label for="DBPREFIX" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Database Tables Prefix:').' '.
+form::field('DBPREFIX',30,255,html::escapeHTML($DBPREFIX)).'</label></p>'.
 
 '<p><input type="submit" value="'.__('Continue').'" /></p>'.
Index: admin/js/_media.js
===================================================================
--- admin/js/_media.js	(revision 1461)
+++ admin/js/_media.js	(revision 1234)
@@ -2,25 +2,4 @@
 	if ($('#fileupload').length==0) {
 		return;
-	}
-
-	function enableButton(button) {
-		button.prop('disabled',false).removeClass('disabled');
-	}
-
-	function disableButton(button) {
-		button.prop('disabled',true).addClass('disabled');
-	}
-
-	function displayMessageInQueue(n) {
-		var msg = '';
-		if (n==1) {
-			msg = dotclear.jsUpload.msg.file_in_queue;
-		} else if (n>1) {
-			msg = dotclear.jsUpload.msg.files_in_queue;
-			msg = msg.replace(/%d/,n);
-		} else {
-			msg = dotclear.jsUpload.msg.no_file_in_queue;
-		}
-		$('.queue-message','#fileupload').html(msg);
 	}
 
@@ -31,16 +10,6 @@
 	});
 
-	$('.button.cancel', '#fileupload .fileupload-buttonbar').click(function(e) {
-		$('.button.cancel','#fileupload .fileupload-buttonbar').hide();
-		disableButton($('.button.start','#fileupload .fileupload-buttonbar'));
-		displayMessageInQueue(0);
-	});
-
-	$('.cancel').live('click', function(e) {
-		if ($('.fileupload-ctrl .files .template-upload', '#fileupload').length==0) {
-			$('.button.cancel','#fileupload .fileupload-buttonbar').hide();
-			disableButton($('.button.start','#fileupload .fileupload-buttonbar'));
-		}
-		displayMessageInQueue($('.files .template-upload','#fileupload').length);
+	$('.button.cancel', '#fileupload').click(function(e) {
+		$('.button.cancel, .button.start','#fileupload .fileupload-buttonbar').hide();
 	});
 
@@ -57,13 +26,7 @@
 		autoUpload: false,
 		sequentialUploads: true,
-		uploadTemplateId: null,
-		downloadTemplateId: null,
-		uploadTemplate: template_upload,
-		downloadTemplate: template_download
+		disabled: true
 	}).bind('fileuploadadd', function(e, data) {
-		$('.button.cancel','#fileupload .fileupload-buttonbar').show();
-		enableButton($('.button.start','#fileupload .fileupload-buttonbar'));
-	}).bind('fileuploadadded', function(e, data) {
-		displayMessageInQueue($('.files .template-upload','#fileupload').length);
+		$('.button.cancel, .button.start', '#fileupload .fileupload-buttonbar').show();
 	}).bind('fileuploaddone', function(e, data) {
 		if (data.result.files[0].html !==undefined) {
@@ -72,12 +35,10 @@
 		$('.button.clean','#fileupload').show();
 	}).bind('fileuploadalways', function(e, data) {
-		displayMessageInQueue($('.files .template-upload','#fileupload').length);
-		if ($('.fileupload-ctrl .files .template-upload','#fileupload').length==0) {
-			$('.button.cancel','#fileupload .fileupload-buttonbar').hide();
-			disableButton($('.button.start','#fileupload .fileupload-buttonbar'));
-		}
+	    if ($('.fileupload-ctrl .files .template-upload', '#fileupload').length==0) {
+		$('.button.start, .button.cancel','#fileupload .fileupload-buttonbar').hide();
+	    }
 	});
 
-	var $container = $('#fileupload').parent().parent();
+	var $container = $('#add-file-f').parent().parent();
 	var $msg,label;
 
@@ -86,6 +47,4 @@
 		label = dotclear.jsUpload.msg.choose_files;
 		$('#fileupload').fileupload({disabled:false});
-		displayMessageInQueue(0);
-		disableButton($('.button.start','#fileupload .fileupload-buttonbar'));
 	} else {
 		$msg = dotclear.msg.enhanced_uploader_activate;
@@ -102,17 +61,13 @@
 			// We must remove files in table
 			$('.files .upload-file', '#fileupload').remove();
-			$('.button.cancel,.button.clean','#fileupload .fileupload-buttonbar').hide();
+			$('.button.cancel, .button.start','#fileupload .fileupload-buttonbar').hide();
+			$('.button.start','#fileupload').show();
 			$('#fileupload').fileupload({disabled:true});
-			$('.queue-message','#fileupload').html('').hide();
 		} else {
 			$msg = dotclear.msg.enhanced_uploader_disable;
 			label = dotclear.jsUpload.msg.choose_files;
 			$('#upfile').attr('multiple', true);
-			var startButton = $('.button.start','#fileupload .fileupload-buttonbar');
-			disableButton(startButton);
-			startButton.show();
+			$('.button.start','#fileupload').hide();
 			$('#fileupload').fileupload({disabled:false});
-			$('.queue-message','#fileupload').show();
-			displayMessageInQueue(0);
 		}
 		$(this).find('a').text($msg);
@@ -120,5 +75,5 @@
 
 		$container.toggleClass('enhanced_uploader');
-	}).appendTo($('#fileupload'));
+	}).appendTo($('#add-file-f'));
 
 	// Replace remove links by a POST on hidden form
Index: admin/js/_post.js
===================================================================
--- admin/js/_post.js	(revision 1492)
+++ admin/js/_post.js	(revision 1417)
@@ -79,7 +79,15 @@
 		// Get document format and prepare toolbars
 		var formatField = $('#post_format').get(0);
+		var last_post_format = $(formatField).val();
 		$(formatField).change(function() {
-			excerptTb.switchMode(this.value);
-			contentTb.switchMode(this.value);
+			// Confirm post format change
+			if(window.confirm(dotclear.msg.confirm_change_post_format_noconvert)){
+				excerptTb.switchMode(this.value);
+				contentTb.switchMode(this.value);
+				last_post_format = $(this).val();
+			}else{
+				// Restore last format if change cancelled
+				$(this).val(last_post_format);
+			}
 		});
 		
@@ -126,19 +134,5 @@
 			hide: $('#post_password').val() == ''
 		});
-		$('#post_status').parent().toggleWithLegend($('#post_status'),{
-			cookie: 'dcx_post_status'
-		});
-		$('#post_dt').parent().toggleWithLegend($('#post_dt').parent().children().not('label'),{
-			cookie: 'dcx_post_dt'
-		});
-		$('#post_format').parent().toggleWithLegend($('#post_format').parent().children().not('label').add($('#post_format').parents('p').next()),{
-			cookie: 'dcx_post_format'
-		});
-		$('#cat_id').parent().toggleWithLegend($('#cat_id'),{
-			cookie: 'cat_id'
-		});
-		$('#post_url').parent().toggleWithLegend($('#post_url').parent().children().not('label'),{
-			cookie: 'post_url'
-		});
+		
 		// We load toolbar on excerpt only when it's ready
 		$('#excerpt-area label').toggleWithLegend($('#excerpt-area').children().not('label'),{
@@ -167,5 +161,4 @@
 		var a = document.createElement('a');
 		a.href = '#';
-		a.className = 'button';
 		$(a).click(function() {
 			var params = {
Index: admin/js/common.js
===================================================================
--- admin/js/common.js	(revision 1395)
+++ admin/js/common.js	(revision 1140)
@@ -153,5 +153,4 @@
 			}
 		}
-		$('p#help-button span').text($('#content').hasClass('with-help') ? dotclear.msg.help_hide : dotclear.msg.help);
 		sizeBox();
 		return false;
@@ -197,5 +196,5 @@
 	sizeBox();
 
-	var img = $('<p id="help-button"><span>'+dotclear.msg.help+'</span></p>');
+	var img = $('<span id="help-button">'+dotclear.msg.help+'</span>');
 	var select = $();
 	img.click(function() { return toggle(); });
@@ -224,5 +223,4 @@
 				imgE.style.top = '1.7em';
 				imgE.style.left = ($(this).width()+4)+'px';
-				imgE.alt=dotclear.msg.click_to_unlock;
 				$(imgE).css('cursor','pointer');
 
Index: admin/js/filters.js
===================================================================
--- admin/js/filters.js	(revision 1152)
+++ 	(revision )
@@ -1,6 +1,0 @@
-$(function() {
-	$('#toggle-filters').click(function(e) {
-		$('#filters').toggleClass('hidden');
-		$('#toggle-filters').toggleClass('opened');
-	});
-});
Index: admin/js/ie7/IE9.js
===================================================================
--- admin/js/ie7/IE9.js	(revision 1456)
+++ 	(revision )
@@ -1,2901 +1,0 @@
-/*
-  IE7/IE8/IE9.js - copyright 2004-2010, Dean Edwards
-  http://code.google.com/p/ie7-js/
-  http://www.opensource.org/licenses/mit-license.php
-*/
-
-/* W3C compliance for Microsoft Internet Explorer */
-
-/* credits/thanks:
-  Shaggy, Martijn Wargers, Jimmy Cerra, Mark D Anderson,
-  Lars Dieckow, Erik Arvidsson, Gellért Gyuris, James Denny,
-  Unknown W Brackets, Benjamin Westfarer, Rob Eberhardt,
-  Bill Edney, Kevin Newman, James Crompton, Matthew Mastracci,
-  Doug Wright, Richard York, Kenneth Kolano, MegaZone,
-  Thomas Verelst, Mark 'Tarquin' Wilton-Jones, Rainer Åhlfors,
-  David Zulaica, Ken Kolano, Kevin Newman, Sjoerd Visscher,
-  Ingo Chao
-*/
-
-// timestamp: Fri, 30 Apr 2010 20:59:18
-
-(function(window, document) {
-
-var IE7 = window.IE7 = {
-  version: "2.1(beta4)",
-  toString: K("[IE7]")
-};
-IE7.compat = 9;
-var appVersion = IE7.appVersion = navigator.appVersion.match(/MSIE (\d\.\d)/)[1] - 0;
-
-if (/ie7_off/.test(top.location.search) || appVersion < 5.5 || appVersion >= IE7.compat) return;
-
-var MSIE5 = appVersion < 6;
-
-var Undefined = K();
-var documentElement = document.documentElement, body, viewport;
-var ANON = "!";
-var HEADER = ":link{ie7-link:link}:visited{ie7-link:visited}";
-
-// -----------------------------------------------------------------------
-// external
-// -----------------------------------------------------------------------
-
-var RELATIVE = /^[\w\.]+[^:]*$/;
-function makePath(href, path) {
-  if (RELATIVE.test(href)) href = (path || "") + href;
-  return href;
-};
-
-function getPath(href, path) {
-  href = makePath(href, path);
-  return href.slice(0, href.lastIndexOf("/") + 1);
-};
-
-// Get the path to this script
-var script = document.scripts[document.scripts.length - 1];
-var path = getPath(script.src);
-
-// Use microsoft's http request object to load external files
-try {
-  var httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
-} catch (ex) {
-  // ActiveX disabled
-}
-
-var fileCache = {};
-function loadFile(href, path) {
-  try {
-    href = makePath(href, path);
-    if (!fileCache[href]) {
-      httpRequest.open("GET", href, false);
-      httpRequest.send();
-      if (httpRequest.status == 0 || httpRequest.status == 200) {
-        fileCache[href] = httpRequest.responseText;
-      }
-    }
-  } catch (ex) {
-    // ignore errors
-  }
-  return fileCache[href] || "";
-};
-
-// -----------------------------------------------------------------------
-// OO support
-// -----------------------------------------------------------------------
-
-
-// This is a cut-down version of base2 (http://code.google.com/p/base2/)
-
-var _slice = Array.prototype.slice;
-
-// private
-var _FORMAT = /%([1-9])/g;
-var _LTRIM = /^\s\s*/;
-var _RTRIM = /\s\s*$/;
-var _RESCAPE = /([\/()[\]{}|*+-.,^$?\\])/g;           // safe regular expressions
-var _BASE = /\bbase\b/;
-var _HIDDEN = ["constructor", "toString"];            // only override these when prototyping
-
-var prototyping;
-
-function Base(){};
-Base.extend = function(_instance, _static) {
-  // Build the prototype.
-  prototyping = true;
-  var _prototype = new this;
-  extend(_prototype, _instance);
-  prototyping = false;
-
-  // Create the wrapper for the constructor function.
-  var _constructor = _prototype.constructor;
-  function klass() {
-    // Don't call the constructor function when prototyping.
-    if (!prototyping) _constructor.apply(this, arguments);
-  };
-  _prototype.constructor = klass;
-
-  // Build the static interface.
-  klass.extend = arguments.callee;
-  extend(klass, _static);
-  klass.prototype = _prototype;
-  return klass;
-};
-Base.prototype.extend = function(source) {
-  return extend(this, source);
-};
-
-
-// A collection of regular expressions and their associated replacement values.
-// A Base class for creating parsers.
-
-var HASH     = "#";
-var ITEMS    = "#";
-var KEYS     = ".";
-var COMPILED = "/";
-
-var REGGRP_BACK_REF        = /\\(\d+)/g,
-    REGGRP_ESCAPE_COUNT    = /\[(\\.|[^\]\\])+\]|\\.|\(\?/g,
-    REGGRP_PAREN           = /\(/g,
-    REGGRP_LOOKUP          = /\$(\d+)/,
-    REGGRP_LOOKUP_SIMPLE   = /^\$\d+$/,
-    REGGRP_LOOKUPS         = /(\[(\\.|[^\]\\])+\]|\\.|\(\?)|\(/g,
-    REGGRP_DICT_ENTRY      = /^<#\w+>$/,
-    REGGRP_DICT_ENTRIES    = /<#(\w+)>/g;
-
-var RegGrp = Base.extend({
-  constructor: function(values) {
-    this[KEYS] = [];
-    this[ITEMS] = {};
-    this.merge(values);
-  },
-
-  //dictionary: null,
-  //ignoreCase: false,
-
-  add: function(expression, replacement) {
-    delete this[COMPILED];
-    if (expression instanceof RegExp) {
-      expression = expression.source;
-    }
-    if (!this[HASH + expression]) this[KEYS].push(String(expression));
-    return this[ITEMS][HASH + expression] = new RegGrp.Item(expression, replacement, this);
-  },
-
-  compile: function(recompile) {
-    if (recompile || !this[COMPILED]) {
-      this[COMPILED] = new RegExp(this, this.ignoreCase ? "gi" : "g");
-    }
-    return this[COMPILED];
-  },
-
-  merge: function(values) {
-    for (var i in values) this.add(i, values[i]);
-  },
-
-  exec: function(string) {
-    var group = this,
-        patterns = group[KEYS],
-        items = group[ITEMS], item;
-    var result = this.compile(true).exec(string);
-    if (result) {
-      // Loop through the RegGrp items.
-      var i = 0, offset = 1;
-      while ((item = items[HASH + patterns[i++]])) {
-        var next = offset + item.length + 1;
-        if (result[offset]) { // do we have a result?
-          if (item.replacement === 0) {
-            return group.exec(string);
-          } else {
-            var args = result.slice(offset, next), j = args.length;
-            while (--j) args[j] = args[j] || ""; // some platforms return null/undefined for non-matching sub-expressions
-            args[0] = {match: args[0], item: item};
-            return args;
-          }
-        }
-        offset = next;
-      }
-    }
-    return null;
-  },
-
-  parse: function(string) {
-    string += ""; // type safe
-    var group = this,
-        patterns = group[KEYS],
-        items = group[ITEMS];
-    return string.replace(this.compile(), function(match) {
-      var args = [], item, offset = 1, i = arguments.length;
-      while (--i) args[i] = arguments[i] || ""; // some platforms return null/undefined for non-matching sub-expressions
-      // Loop through the RegGrp items.
-      while ((item = items[HASH + patterns[i++]])) {
-        var next = offset + item.length + 1;
-        if (args[offset]) { // do we have a result?
-          var replacement = item.replacement;
-          switch (typeof replacement) {
-            case "function":
-              return replacement.apply(group, args.slice(offset, next));
-            case "number":
-              return args[offset + replacement];
-            default:
-              return replacement;
-          }
-        }
-        offset = next;
-      }
-      return match;
-    });
-  },
-
-  toString: function() {
-    var strings = [],
-        keys = this[KEYS],
-        items = this[ITEMS], item;
-    for (var i = 0; item = items[HASH + keys[i]]; i++) {
-      strings[i] = item.source;
-    }
-    return "(" + strings.join(")|(") + ")";
-  }
-}, {
-  IGNORE: null, // a null replacement value means that there is no replacement.
-
-  Item: Base.extend({
-    constructor: function(source, replacement, owner) {
-      var length = source.indexOf("(") === -1 ? 0 : RegGrp.count(source);
-
-      var dictionary = owner.dictionary;
-      if (dictionary && source.indexOf("<#") !== -1) {
-        if (REGGRP_DICT_ENTRY.test(source)) {
-          var entry = dictionary[ITEMS][HASH + source.slice(2, -1)];
-          source = entry.replacement;
-          length = entry._length;
-        } else {
-          source = dictionary.parse(source);
-        }
-      }
-
-      if (typeof replacement == "number") replacement = String(replacement);
-      else if (replacement == null) replacement = 0;
-
-      // Does the expression use sub-expression lookups?
-      if (typeof replacement == "string" && REGGRP_LOOKUP.test(replacement)) {
-        if (REGGRP_LOOKUP_SIMPLE.test(replacement)) { // A simple lookup? (e.g. "$2").
-          // Store the index (used for fast retrieval of matched strings).
-          var index = replacement.slice(1) - 0;
-          if (index && index <= length) replacement = index;
-        } else {
-          // A complicated lookup (e.g. "Hello $2 $1.").
-          var lookup = replacement, regexp;
-          replacement = function(match) {
-            if (!regexp) {
-              regexp = new RegExp(source, "g" + (this.ignoreCase ? "i": ""));
-            }
-            return match.replace(regexp, lookup);
-          };
-        }
-      }
-
-      this.length = length;
-      this.source = String(source);
-      this.replacement = replacement;
-    }
-  }),
-
-  count: function(expression) {
-    return (String(expression).replace(REGGRP_ESCAPE_COUNT, "").match(REGGRP_PAREN) || "").length;
-  }
-});
-
-var Dictionary = RegGrp.extend({
-  parse: function(phrase) {
-    // Prevent sub-expressions in dictionary entries from capturing.
-    var entries = this[ITEMS];
-    return phrase.replace(REGGRP_DICT_ENTRIES, function(match, entry) {
-      entry = entries[HASH + entry];
-      return entry ? entry._nonCapturing : match;
-    });
-  },
-
-  add: function(expression, replacement) {
-    // Get the underlying replacement value.
-    if (replacement instanceof RegExp) {
-      replacement = replacement.source;
-    }
-    // Translate the replacement.
-    // The result is the original replacement recursively parsed by this dictionary.
-    var nonCapturing = replacement.replace(REGGRP_LOOKUPS, _nonCapture);
-    if (replacement.indexOf("(") !== -1) {
-      var realLength = RegGrp.count(replacement);
-    }
-    if (replacement.indexOf("<#") !== -1) {
-      replacement = this.parse(replacement);
-      nonCapturing = this.parse(nonCapturing);
-    }
-    var item = this.base(expression, replacement);
-    item._nonCapturing = nonCapturing;
-    item._length = realLength || item.length; // underlying number of sub-groups
-    return item;
-  },
-
-  toString: function() {
-    return "(<#" + this[PATTERNS].join(">)|(<#") + ">)";
-  }
-});
-
-function _nonCapture(match, escaped) {
-  return escaped || "(?:"; // non-capturing
-};
-
-// =========================================================================
-// lang/extend.js
-// =========================================================================
-
-function extend(object, source) { // or extend(object, key, value)
-  if (object && source) {
-    var proto = (typeof source == "function" ? Function : Object).prototype;
-    // Add constructor, toString etc
-    var i = _HIDDEN.length, key;
-    if (prototyping) while (key = _HIDDEN[--i]) {
-      var value = source[key];
-      if (value != proto[key]) {
-        if (_BASE.test(value)) {
-          _override(object, key, value)
-        } else {
-          object[key] = value;
-        }
-      }
-    }
-    // Copy each of the source object's properties to the target object.
-    for (key in source) if (typeof proto[key] == "undefined") {
-      var value = source[key];
-      // Check for method overriding.
-      if (object[key] && typeof value == "function" && _BASE.test(value)) {
-        _override(object, key, value);
-      } else {
-        object[key] = value;
-      }
-    }
-  }
-  return object;
-};
-
-function _override(object, name, method) {
-  // Override an existing method.
-  var ancestor = object[name];
-  object[name] = function() {
-    var previous = this.base;
-    this.base = ancestor;
-    var returnValue = method.apply(this, arguments);
-    this.base = previous;
-    return returnValue;
-  };
-};
-
-function combine(keys, values) {
-  // Combine two arrays to make a hash.
-  if (!values) values = keys;
-  var hash = {};
-  for (var i in keys) hash[i] = values[i];
-  return hash;
-};
-
-function format(string) {
-  // Replace %n with arguments[n].
-  // e.g. format("%1 %2%3 %2a %1%3", "she", "se", "lls");
-  // ==> "she sells sea shells"
-  // Only %1 - %9 supported.
-  var args = arguments;
-  var _FORMAT = new RegExp("%([1-" + arguments.length + "])", "g");
-  return String(string).replace(_FORMAT, function(match, index) {
-    return index < args.length ? args[index] : match;
-  });
-};
-
-function match(string, expression) {
-  // Same as String.match() except that this function will return an empty
-  // array if there is no match.
-  return String(string).match(expression) || [];
-};
-
-function rescape(string) {
-  // Make a string safe for creating a RegExp.
-  return String(string).replace(_RESCAPE, "\\$1");
-};
-
-// http://blog.stevenlevithan.com/archives/faster-trim-javascript
-function trim(string) {
-  return String(string).replace(_LTRIM, "").replace(_RTRIM, "");
-};
-
-function K(k) {
-  return function() {
-    return k;
-  };
-};
-
-// -----------------------------------------------------------------------
-// parsing
-// -----------------------------------------------------------------------
-
-var Parser = RegGrp.extend({ignoreCase: true});
-
-var SINGLE_QUOTES       = /'/g,
-    ESCAPED             = /'(\d+)'/g,
-    ESCAPE              = /\\/g,
-    UNESCAPE            = /\\([nrtf'"])/g;
-
-var strings = [];
-
-var encoder = new Parser({
-  // comments
-  "<!\\-\\-|\\-\\->": "",
-  "\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\/": "",
-  // get rid
-  "@(namespace|import)[^;\\n]+[;\\n]": "",
-  // strings
-  "'(\\\\.|[^'\\\\])*'": encodeString,
-  '"(\\\\.|[^"\\\\])*"': encodeString,
-  // white space
-  "\\s+": " "
-});
-
-function encode(selector) {
-  return encoder.parse(selector).replace(UNESCAPE, "$1");
-};
-
-function decode(query) {
-  // put string values back
-  return query.replace(ESCAPED, decodeString);
-};
-
-function encodeString(string) {
-  var index = strings.length;
-  strings[index] = string.slice(1, -1)
-    .replace(UNESCAPE, "$1")
-    .replace(SINGLE_QUOTES, "\\'");
-  return "'" + index + "'";
-};
-
-function decodeString(match, index) {
-  var string = strings[index];
-  if (string == null) return match;
-  return "'" + strings[index] + "'";
-};
-
-function getString(value) {
-  return value.indexOf("'") === 0 ? strings[value.slice(1, - 1)] : value;
-};
-
-// clone a "width" function to create a "height" function
-var rotater = new RegGrp({
-  Width: "Height",
-  width: "height",
-  Left:  "Top",
-  left:  "top",
-  Right: "Bottom",
-  right: "bottom",
-  onX:   "onY"
-});
-
-function rotate(fn) {
-  return rotater.parse(fn);
-};
-
-// -----------------------------------------------------------------------
-// event handling
-// -----------------------------------------------------------------------
-
-var eventHandlers = [];
-
-function addResize(handler) {
-  addRecalc(handler);
-  addEventHandler(window, "onresize", handler);
-};
-
-// add an event handler (function) to an element
-function addEventHandler(element, type, handler) {
-  element.attachEvent(type, handler);
-  // store the handler so it can be detached later
-  eventHandlers.push(arguments);
-};
-
-// remove an event handler assigned to an element by IE7
-function removeEventHandler(element, type, handler) {
-  try {
-    element.detachEvent(type, handler);
-  } catch (ex) {
-    // write a letter of complaint to microsoft..
-  }
-};
-
-// remove event handlers (they eat memory)
-addEventHandler(window, "onunload", function() {
-  var handler;
-  while (handler = eventHandlers.pop()) {
-    removeEventHandler(handler[0], handler[1], handler[2]);
-  }
-});
-
-function register(handler, element, condition) { // -@DRE
-  //var set = handler[element.uniqueID];
-  if (!handler.elements) handler.elements = {};
-  if (condition) handler.elements[element.uniqueID] = element;
-  else delete handler.elements[element.uniqueID];
-  //return !set && condition;
-  return condition;
-};
-
-addEventHandler(window, "onbeforeprint", function() {
-  if (!IE7.CSS.print) new StyleSheet("print");
-  IE7.CSS.print.recalc();
-});
-
-// -----------------------------------------------------------------------
-// pixel conversion
-// -----------------------------------------------------------------------
-
-// this is handy because it means that web developers can mix and match
-//  measurement units in their style sheets. it is not uncommon to
-//  express something like padding in "em" units whilst border thickness
-//  is most often expressed in pixels.
-
-var PIXEL = /^\d+(px)?$/i;
-var PERCENT = /^\d+%$/;
-var getPixelValue = function(element, value) {
-  if (PIXEL.test(value)) return parseInt(value);
-  var style = element.style.left;
-  var runtimeStyle = element.runtimeStyle.left;
-  element.runtimeStyle.left = element.currentStyle.left;
-  element.style.left = value || 0;
-  value = element.style.pixelLeft;
-  element.style.left = style;
-  element.runtimeStyle.left = runtimeStyle;
-  return value;
-};
-
-// -----------------------------------------------------------------------
-// generic
-// -----------------------------------------------------------------------
-
-var $IE7 = "ie7-";
-
-var Fix = Base.extend({
-  constructor: function() {
-    this.fixes = [];
-    this.recalcs = [];
-  },
-  init: Undefined
-});
-
-// a store for functions that will be called when refreshing IE7
-var recalcs = [];
-function addRecalc(recalc) {
-  recalcs.push(recalc);
-};
-
-IE7.recalc = function() {
-  IE7.HTML.recalc();
-  // re-apply style sheet rules (re-calculate ie7 classes)
-  IE7.CSS.recalc();
-  // apply global fixes to the document
-  for (var i = 0; i < recalcs.length; i++) recalcs[i]();
-};
-
-function isFixed(element) {
-  return element.currentStyle["ie7-position"] == "fixed";
-};
-
-// original style
-function getDefinedStyle(element, propertyName) {
-  return element.currentStyle[$IE7 + propertyName] || element.currentStyle[propertyName];
-};
-
-function setOverrideStyle(element, propertyName, value) {
-  if (element.currentStyle[$IE7 + propertyName] == null) {
-    element.runtimeStyle[$IE7 + propertyName] = element.currentStyle[propertyName];
-  }
-  element.runtimeStyle[propertyName] = value;
-};
-
-// Create a temporary element which is used to inherit styles
-// from the target element.
-function createTempElement(tagName) {
-  var element = document.createElement(tagName || "object");
-  element.style.cssText = "position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";
-  element.ie7_anon = true;
-  return element;
-};
-
-
-// =========================================================================
-// ie7-css.js
-// =========================================================================
-
-var NEXT_SIBLING        = "(e.nextSibling&&IE7._getElementSibling(e,'next'))",
-    PREVIOUS_SIBLING    = NEXT_SIBLING.replace(/next/g, "previous"),
-    IS_ELEMENT          = "e.nodeName>'@'",
-    IF_ELEMENT          = "if(" + IS_ELEMENT + "){";
-
-var ID_ATTRIBUTE  = "(e.nodeName==='FORM'?IE7._getAttribute(e,'id'):e.id)";
-
-var HYPERLINK = /a(#[\w-]+)?(\.[\w-]+)?:(hover|active)/i;
-var FIRST_LINE_LETTER = /(.*)(:first-(line|letter))/;
-var SPACE = /\s/;
-var RULE = /((?:\\.|[^{\\])+)\{((?:\\.|[^}\\])+)\}/g;
-var SELECTOR = /(?:\\.|[^,\\])+/g;
-
-var styleSheets = document.styleSheets;
-
-var inheritedProperties = [];
-
-IE7.CSS = new (Fix.extend({ // single instance
-  parser: new Parser,
-  screen: "",
-  print: "",
-  styles: [],
-  rules: [],
-  pseudoClasses: appVersion < 7 ? "first\\-child" : "",
-  dynamicPseudoClasses: {
-    toString: function() {
-      var strings = [];
-      for (var pseudoClass in this) strings.push(pseudoClass);
-      return strings.join("|");
-    }
-  },
-  
-  init: function() {
-    var NONE = "^\x01$";
-    var CLASS = "\\[class=?[^\\]]*\\]";
-    var pseudoClasses = [];
-    if (this.pseudoClasses) pseudoClasses.push(this.pseudoClasses);
-    var dynamicPseudoClasses = this.dynamicPseudoClasses.toString(); 
-    if (dynamicPseudoClasses) pseudoClasses.push(dynamicPseudoClasses);
-    pseudoClasses = pseudoClasses.join("|");
-    var unknown = appVersion < 7 ? ["[>+~\\[(]|([:.])[\\w-]+\\1"] : [CLASS];
-    if (pseudoClasses) unknown.push(":(" + pseudoClasses + ")");
-    this.UNKNOWN = new RegExp(unknown.join("|") || NONE, "i");
-    var complex = appVersion < 7 ? ["\\[[^\\]]+\\]|[^\\s(\\[]+\\s*[+~]"] : [CLASS];
-    var complexRule = complex.concat();
-    if (pseudoClasses) complexRule.push(":(" + pseudoClasses + ")");
-    Rule.COMPLEX = new RegExp(complexRule.join("|") || NONE, "ig");
-    if (this.pseudoClasses) complex.push(":(" + this.pseudoClasses + ")");
-    DynamicRule.COMPLEX = new RegExp(complex.join("|") || NONE, "i");
-    dynamicPseudoClasses = "not\\(:" + dynamicPseudoClasses.split("|").join("\\)|not\\(:") + "\\)|" + dynamicPseudoClasses;
-    DynamicRule.MATCH = new RegExp(dynamicPseudoClasses ? "(.*?):(" + dynamicPseudoClasses + ")(.*)" : NONE, "i");
-    
-    this.createStyleSheet();
-    this.refresh();
-  },
-  
-	addEventHandler: function() {
-		addEventHandler.apply(null, arguments);
-	},
-  
-  addFix: function(expression, replacement) {
-    this.parser.add(expression, replacement);
-  },
-  
-  addRecalc: function(propertyName, test, handler, replacement) {
-    // recalcs occur whenever the document is refreshed using document.recalc()
-    propertyName = propertyName.source || propertyName;
-    test = new RegExp("([{;\\s])" + propertyName + "\\s*:\\s*" + test + "[^;}]*");
-    var id = this.recalcs.length;
-    if (typeof replacement == "string") replacement = propertyName + ":" + replacement;
-    this.addFix(test, function(match) {
-      if (typeof replacement == "function") replacement = replacement(match);
-      return (replacement ? replacement : match) + ";ie7-" + match.slice(1) + ";ie7_recalc" + id + ":1";
-    });
-    this.recalcs.push(arguments);
-    return id;
-  },
-  
-  apply: function() {
-    this.getInlineCSS();
-    new StyleSheet("screen");
-    this.trash();
-  },
-  
-  createStyleSheet: function() {
-    // create the IE7 style sheet
-    document.getElementsByTagName("head")[0].appendChild(document.createElement("style"));
-    this.styleSheet = styleSheets[styleSheets.length - 1];
-    // flag it so we can ignore it during parsing
-    this.styleSheet.ie7 = true;
-    this.styleSheet.owningElement.ie7 = true;
-    this.styleSheet.cssText = HEADER;
-  },
-  
-  getInlineCSS: function() {// load inline styles
-    var styleSheets = document.getElementsByTagName("style"), styleSheet;
-    for (var i = styleSheets.length - 1; styleSheet = styleSheets[i]; i--) {
-      if (!styleSheet.disabled && !styleSheet.ie7) {
-        styleSheet._cssText = styleSheet.innerHTML;
-      }
-    }
-  },
-  
-  getText: function(styleSheet, path) {
-    // Internet Explorer will trash unknown selectors (it converts them to "UNKNOWN").
-    // So we must reload external style sheets (internal style sheets can have their text
-    // extracted through the innerHTML property).
-
-    // load the style sheet text from an external file
-    try {
-      var cssText = styleSheet.cssText;
-    } catch (e) {
-      cssText = "";
-    }
-    if (httpRequest) cssText = loadFile(styleSheet.href, path) || cssText;
-    return cssText;
-  },
-  
-  recalc: function() {
-    this.screen.recalc();
-    // we're going to read through all style rules.
-    //  certain rules have had ie7 properties added to them.
-    //   e.g. p{top:0; ie7_recalc2:1; left:0}
-    //  this flags a property in the rule as needing a fix.
-    //  the selector text is then used to query the document.
-    //  we can then loop through the results of the query
-    //  and fix the elements.
-    // we ignore the IE7 rules - so count them in the header
-    var RECALCS = /ie7_recalc\d+/g;
-    var start = HEADER.match(/[{,]/g).length;
-    // only calculate screen fixes. print fixes don't show up anyway
-    var rules = this.styleSheet.rules, rule;
-    var calcs, calc, elements, element, i, j, k, id;
-    // loop through all rules
-    for (i = start; rule = rules[i]; i++) {
-      var cssText = rule.style.cssText;
-      // search for the "ie7_recalc" flag (there may be more than one)
-      if (calcs = cssText.match(RECALCS)) {
-        // use the selector text to query the document
-        elements = cssQuery(rule.selectorText);
-        // if there are matching elements then loop
-        //  through the recalc functions and apply them
-        //  to each element
-        if (elements.length) for (j = 0; j < calcs.length; j++) {
-          // get the matching flag (e.g. ie7_recalc3)
-          id = calcs[j];
-          // extract the numeric id from the end of the flag
-          //  and use it to index the collection of recalc
-          //  functions
-          calc = IE7.CSS.recalcs[id.slice(10)][2];
-          for (k = 0; (element = elements[k]); k++) {
-            // apply the fix
-            if (element.currentStyle[id]) calc(element, cssText);
-          }
-        }
-      }
-    }
-  },
-  
-  refresh: function() {
-    this.styleSheet.cssText = HEADER + this.screen + this.print;
-  },
-  
-  trash: function() {
-    // trash the old style sheets
-    for (var i = 0; i < styleSheets.length; i++) {
-      if (!styleSheets[i].ie7) {
-        try {
-          var cssText = styleSheets[i].cssText;
-        } catch (e) {
-          cssText = "";
-        }
-        if (cssText) styleSheets[i].cssText = "";
-      }
-    }
-  }
-}));
-
-// -----------------------------------------------------------------------
-//  IE7 StyleSheet class
-// -----------------------------------------------------------------------
-
-var StyleSheet = Base.extend({
-  constructor: function(media) {
-    this.media = media;
-    this.load();
-    IE7.CSS[media] = this;
-    IE7.CSS.refresh();
-  },
-  
-  createRule: function(selector, cssText) {
-    var match;
-    if (PseudoElement && (match = selector.match(PseudoElement.MATCH))) {
-      return new PseudoElement(match[1], match[2], cssText);
-    } else if (match = selector.match(DynamicRule.MATCH)) {
-      if (!HYPERLINK.test(match[0]) || DynamicRule.COMPLEX.test(match[0])) {
-        return new DynamicRule(selector, match[1], match[2], match[3], cssText);
-      }
-    } else {
-      return new Rule(selector, cssText);
-    }
-    return selector + " {" + cssText + "}";
-  },
-  
-  getText: function() {
-    // store for style sheet text
-    // parse media decalarations
-    var MEDIA        = /@media\s+([^{]+?)\s*\{([^@]+\})\s*\}/gi;
-    var IMPORTS      = /@import[^;\n]+/gi;
-    var TRIM_IMPORTS = /@import\s+url\s*\(\s*["']?|["']?\s*\)\s*/gi;
-    var URL          = /(url\s*\(\s*['"]?)([\w\.]+[^:\)]*['"]?\))/gi;
-
-    var self = this;
-    
-    // Store loaded cssText URLs
-    var fileCache = {};
-    
-    function getCSSText(styleSheet, path, media, level) {
-      var cssText = "";
-      if (!level) {
-        media = toSimpleMedia(styleSheet.media);
-        level = 0;
-      }
-      if (media === "none") {
-        styleSheet.disabled = true;
-        return "";
-      }
-      if (media === "all" || media === self.media) {
-        // IE only allows importing style sheets three levels deep.
-        // it will crash if you try to access a level below this
-        try {
-          var canAcess = !!styleSheet.cssText;
-        } catch (exe) {}
-        if (level < 3 && canAcess) {
-          var hrefs = styleSheet.cssText.match(IMPORTS);
-          // loop through imported style sheets
-          for (var i = 0, imported; i < styleSheet.imports.length; i++) {
-            var imported = styleSheet.imports[i];
-            var href = styleSheet._href || styleSheet.href;
-            imported._href = hrefs[i].replace(TRIM_IMPORTS, "");
-            // call this function recursively to get all imported style sheets
-            cssText += getCSSText(imported, getPath(href, path), media, level + 1);
-          }
-        }
-        // retrieve inline style or load an external style sheet
-        cssText += encode(styleSheet.href ? loadStyleSheet(styleSheet, path) : styleSheet.owningElement._cssText);
-        cssText = parseMedia(cssText, self.media);
-      }
-      return cssText;
-    };
-
-    // Load all style sheets in the document
-    for (var i = 0; i < styleSheets.length; i++) {
-      var styleSheet = styleSheets[i];
-      if (!styleSheet.disabled && !styleSheet.ie7) this.cssText += getCSSText(styleSheet);
-    }
-    
-    // helper functions
-    function parseMedia(cssText, media) {
-      filterMedia.value = media;
-      return cssText.replace(MEDIA, filterMedia);
-    };
-    
-    function filterMedia(match, media, cssText) {
-      media = toSimpleMedia(media);
-      switch (media) {
-        case "screen":
-        case "print":
-          if (media !== filterMedia.value) return "";
-        case "all":
-          return cssText;
-      }
-      return "";
-    };
-    
-    function toSimpleMedia(media) {
-      if (!media) return "all";
-      var split = media.toLowerCase().split(/\s*,\s*/);
-      media = "none";
-      for (var i = 0; i < split.length; i++) {
-        if (split[i] === "all") return "all";
-        if (split[i] === "screen") {
-          if (media === "print") return "all";
-          media = "screen";
-        } else if (split[i] === "print") {
-          if (media === "screen") return "all";
-          media = "print";
-        }
-      }
-      return media;
-    };
-    
-    // Load an external style sheet
-    function loadStyleSheet(styleSheet, path) {
-      var href = styleSheet._href || styleSheet.href;
-      var url = makePath(href, path);
-      // If the style sheet has already loaded then don't reload it
-      if (fileCache[url]) return "";
-      // Load from source
-      fileCache[url] = styleSheet.disabled ? "" :
-        fixUrls(IE7.CSS.getText(styleSheet, path), getPath(href, path));
-      return fileCache[url];
-    };
-
-    // Fix CSS paths.
-    // We're lumping all css text into one big style sheet so relative
-    // paths have to be fixed. This is necessary anyway because of other
-    // Internet Explorer bugs.
-    function fixUrls(cssText, pathname) {
-      // hack & slash
-      return cssText.replace(URL, "$1" + pathname.slice(0, pathname.lastIndexOf("/") + 1) + "$2");
-    };
-  },
-  
-  load: function() {
-    this.cssText = "";
-    this.getText();
-    this.parse();
-    if (inheritedProperties.length) {
-      this.cssText = parseInherited(this.cssText);
-    }
-    this.cssText = decode(this.cssText);
-    fileCache = {};
-  },
-  
-  parse: function() {
-    var cssText = IE7.CSS.parser.parse(this.cssText);
-    
-    var declarations = "";
-    this.cssText = cssText.replace(/@charset[^;]+;|@font\-face[^\}]+\}/g, function(match) {
-      declarations += match + "\n";
-      return "";
-    });
-    this.declarations = decode(declarations);
-    
-    // Parse the style sheet
-    var offset = IE7.CSS.rules.length;
-    var rules = [], rule;
-    while ((rule = RULE.exec(this.cssText))) {
-      var cssText = rule[2];
-      if (cssText) {
-        var fixDescendants = appVersion < 7 && cssText.indexOf("AlphaImageLoader") !== -1;
-        var selectors = rule[1].match(SELECTOR), selector;
-        for (var i = 0; selector = selectors[i]; i++) {
-          selector = trim(selector);
-          var isUnknown = IE7.CSS.UNKNOWN.test(selector);
-          selectors[i] = isUnknown ? this.createRule(selector, cssText) : selector + "{" + cssText + "}";
-          if (fixDescendants) selectors[i] += this.createRule(selector + ">*", "position:relative");
-        }
-        rules.push(selectors.join("\n"));
-      }
-    }
-    this.cssText = rules.join("\n");
-    this.rules = IE7.CSS.rules.slice(offset);
-  },
-  
-  recalc: function() {
-    var rule, i;
-    for (i = 0; (rule = this.rules[i]); i++) rule.recalc();
-  },
-  
-  toString: function() {
-    return this.declarations + "@media " + this.media + "{" + this.cssText + "}";
-  }
-});
-
-var PseudoElement;
-
-// -----------------------------------------------------------------------
-// IE7 style rules
-// -----------------------------------------------------------------------
-
-var Rule = IE7.Rule = Base.extend({
-  constructor: function(selector, cssText) {
-    this.id = IE7.CSS.rules.length;
-    this.className = Rule.PREFIX + this.id;
-    var pseudoElement = selector.match(FIRST_LINE_LETTER);
-    this.selector = (pseudoElement ? pseudoElement[1] : selector) || "*";
-    this.selectorText = this.parse(this.selector) + (pseudoElement ? pseudoElement[2] : "");
-    this.cssText = cssText;
-    this.MATCH = new RegExp("\\s" + this.className + "(\\s|$)", "g");
-    IE7.CSS.rules.push(this);
-    this.init();
-  },
-  
-  init: Undefined,
-  
-  add: function(element) {
-    // allocate this class
-    element.className += " " + this.className;
-  },
-  
-  recalc: function() {
-    // execute the underlying css query for this class
-    var match = cssQuery(this.selector);
-    // add the class name for all matching elements
-    for (var i = 0; i < match.length; i++) this.add(match[i]);
-  },
-
-  parse: function(selector) {
-    // attempt to preserve specificity for "loose" parsing by
-    //  removing unknown tokens from a css selector but keep as
-    //  much as we can..
-    var simple = selector.replace(Rule.CHILD, " ").replace(Rule.COMPLEX, "");
-    if (appVersion < 7) simple = simple.replace(Rule.MULTI, "");
-    var tags = match(simple, Rule.TAGS).length - match(selector, Rule.TAGS).length;
-    var classes = match(simple, Rule.CLASSES).length - match(selector, Rule.CLASSES).length + 1;
-    while (classes > 0 && Rule.CLASS.test(simple)) {
-      simple = simple.replace(Rule.CLASS, "");
-      classes--;
-    }
-    while (tags > 0 && Rule.TAG.test(simple)) {
-      simple = simple.replace(Rule.TAG, "$1*");
-      tags--;
-    }
-    simple += "." + this.className;
-    classes = Math.min(classes, 2);
-    tags = Math.min(tags, 2);
-    var score = -10 * classes - tags;
-    if (score > 0) {
-      simple = simple + "," + Rule.MAP[score] + " " + simple;
-    }
-    return simple;
-  },
-  
-  remove: function(element) {
-    // deallocate this class
-    element.className = element.className.replace(this.MATCH, "$1");
-  },
-  
-  toString: function() {
-    return format("%1 {%2}", this.selectorText, this.cssText);
-  }
-}, {
-  CHILD: />/g,
-  CLASS: /\.[\w-]+/,
-  CLASSES: /[.:\[]/g,
-  MULTI: /(\.[\w-]+)+/g,
-  PREFIX: "ie7_class",
-  TAG: /^\w+|([\s>+~])\w+/,
-  TAGS: /^\w|[\s>+~]\w/g,
-  MAP: {
-    "1":  "html",
-    "2":  "html body",
-    "10": ".ie7_html",
-    "11": "html.ie7_html",
-    "12": "html.ie7_html body",
-    "20": ".ie7_html .ie7_body",
-    "21": "html.ie7_html .ie7_body",
-    "22": "html.ie7_html body.ie7_body"
-  }
-});
-
-// -----------------------------------------------------------------------
-// IE7 dynamic style
-// -----------------------------------------------------------------------
-
-// object properties:
-// attach: the element that an event handler will be attached to
-// target: the element that will have the IE7 class applied
-
-var DynamicRule = Rule.extend({
-  // properties
-  constructor: function(selector, attach, dynamicPseudoClass, target, cssText) {
-    this.negated = dynamicPseudoClass.indexOf("not") === 0;
-    if (this.negated) dynamicPseudoClass = dynamicPseudoClass.slice(5, -1);
-    // initialise object properties
-    this.attach = attach || "*";
-    this.dynamicPseudoClass = IE7.CSS.dynamicPseudoClasses[dynamicPseudoClass];
-    this.target = target;
-    this.base(selector, cssText);
-  },
-  
-  recalc: function() {
-    // execute the underlying css query for this class
-    var attaches = cssQuery(this.attach), attach;
-    // process results
-    for (var i = 0; attach = attaches[i]; i++) {
-      // retrieve the event handler's target element(s)
-      var target = this.target ? cssQuery(this.target, attach) : [attach];
-      // attach event handlers for dynamic pseudo-classes
-      if (target.length) this.dynamicPseudoClass.apply(attach, target, this);
-    }
-  }
-});
-
-// -----------------------------------------------------------------------
-//  IE7 dynamic pseudo-classes
-// -----------------------------------------------------------------------
-
-var DynamicPseudoClass = Base.extend({
-  constructor: function(name, apply) {
-    this.name = name;
-    this.apply = apply;
-    this.instances = {};
-    IE7.CSS.dynamicPseudoClasses[name] = this;
-  },
-  
-  register: function(instance, negated) {
-    // an "instance" is actually an Arguments object
-    var _class = instance[2];
-    if (!negated && _class.negated) {
-      this.unregister(instance, true);
-    } else {
-      instance.id = _class.id + instance[0].uniqueID;
-      if (!this.instances[instance.id]) {
-        var target = instance[1], j;
-        for (j = 0; j < target.length; j++) _class.add(target[j]);
-        this.instances[instance.id] = instance;
-      }
-    }
-  },
-  
-  unregister: function(instance, negated) {
-    var _class = instance[2];
-    if (!negated && _class.negated) {
-      this.register(instance, true);
-    } else {
-      if (this.instances[instance.id]) {
-        var target = instance[1], j;
-        for (j = 0; j < target.length; j++) _class.remove(target[j]);
-        delete this.instances[instance.id];
-      }
-    }
-  }
-});
-  
-// -----------------------------------------------------------------------
-// dynamic pseudo-classes
-// -----------------------------------------------------------------------
-
-var Hover = new DynamicPseudoClass("hover", function(element) {
-  var instance = arguments;
-  IE7.CSS.addEventHandler(element, "onmouseenter", function() {
-    Hover.register(instance);
-  });
-  IE7.CSS.addEventHandler(element, "onmouseleave", function() {
-    Hover.unregister(instance);
-  });
-});
-
-// globally trap the mouseup event (thanks Martijn!)
-addEventHandler(document, "onmouseup", function() {
-  var instances = Hover.instances;
-  for (var i in instances)
-    if (!instances[i][0].contains(event.srcElement))
-      Hover.unregister(instances[i]);
-});
-
-var ATTR = {
-  "=":  "%1==='%2'",                           // "[@%1='%2']"
-  "~=": "(' '+%1+' ').indexOf(' %2 ')!==-1",   // "[contains(concat(' ',@%1,' '),' %2 ')]",
-  "|=": "%1==='%2'||%1.indexOf('%2-')===0",    // "[@%1='%2' or starts-with(@%1,'%2-')]",
-  "^=": "%1.indexOf('%2')===0",                // "[starts-with(@%1,'%2')]",
-  "$=": "%1.slice(-'%2'.length)==='%2'",       // "[ends-with(@%1,'%2')]",
-  "*=": "%1.indexOf('%2')!==-1"                // "[contains(@%1,'%2')]"
-};
-ATTR[""] = "%1!=null";                         // "[@%1]"
-
-var FILTER = {
-  "<#attr>": function(match, name, operator, value) {
-    var attr = "IE7._getAttribute(e,'" + name + "')";
-    value = getString(value);
-    if (operator.length > 1) {
-      if (!value || operator === "~=" && SPACE.test(value)) {
-        return "false&&";
-      }
-      attr = "(" + attr + "||'')";
-    }
-    return "(" + format(ATTR[operator], attr, value) + ")&&";
-  },
-
-  "<#id>":    ID_ATTRIBUTE + "==='$1'&&",
-
-  "<#class>": "e.className&&(' '+e.className+' ').indexOf(' $1 ')!==-1&&",
-
-  // PSEDUO
-  ":first-child":     "!" + PREVIOUS_SIBLING + "&&",
-  ":link":           "e.currentStyle['ie7-link']=='link'&&",
-  ":visited":        "e.currentStyle['ie7-link']=='visited'&&"
-};
-
-// =========================================================================
-// ie7-html.js
-// =========================================================================
-
-// default font-sizes
-//HEADER += "h1{font-size:2em}h2{font-size:1.5em;}h3{font-size:1.17em;}h4{font-size:1em}h5{font-size:.83em}h6{font-size:.67em}";
-
-IE7.HTML = new (Fix.extend({ // single instance  
-  fixed: {},
-  
-  init: Undefined,
-  
-  addFix: function() {
-    // fixes are a one-off, they are applied when the document is loaded
-    this.fixes.push(arguments);
-  },
-  
-  apply: function() {
-    for (var i = 0; i < this.fixes.length; i++) {
-      var match = cssQuery(this.fixes[i][0]);
-      var fix = this.fixes[i][1];
-      for (var j = 0; j < match.length; j++) fix(match[j]);
-    }
-  },
-  
-  addRecalc: function() {
-    // recalcs occur whenever the document is refreshed using document.recalc()
-    this.recalcs.push(arguments);
-  },
-  
-  recalc: function() {
-    // loop through the fixes
-    for (var i = 0; i < this.recalcs.length; i++) {
-      var match = cssQuery(this.recalcs[i][0]);
-      var recalc = this.recalcs[i][1], element;
-      var key = Math.pow(2, i);
-      for (var j = 0; (element = match[j]); j++) {
-        var uniqueID = element.uniqueID;
-        if ((this.fixed[uniqueID] & key) === 0) {
-          element = recalc(element) || element;
-          this.fixed[uniqueID] |= key;
-        }
-      }
-    }
-  }
-}));
-
-if (appVersion < 7) {  
-  // provide support for the <abbr> tag.
-  document.createElement("abbr");
-  
-  // bind to the first child control
-  IE7.HTML.addRecalc("label", function(label) {
-    if (!label.htmlFor) {
-      var firstChildControl = cssQuery("input,textarea", label, true);
-      if (firstChildControl) {
-        addEventHandler(label, "onclick", function() {
-          firstChildControl.click();
-        });
-      }
-    }
-  });
-}
-
-// =========================================================================
-// ie7-layout.js
-// =========================================================================
-
-var NUMERIC = "[.\\d]";
-
-(function() {
-  var layout = IE7.Layout = {};
-
-  // big, ugly box-model hack + min/max stuff
-
-  // #tantek > #erik > #dean { voice-family: hacker; }
-
-  // -----------------------------------------------------------------------
-  // "layout"
-  // -----------------------------------------------------------------------
-
-  HEADER += "*{boxSizing:content-box}";
-
-  // give an element "layout"
-  layout.boxSizing = function(element) {
-    if (!element.currentStyle.hasLayout) {
-    //#  element.runtimeStyle.fixedHeight =
-      element.style.height = "0cm";
-      if (element.currentStyle.verticalAlign === "auto")
-        element.runtimeStyle.verticalAlign = "top";
-      // when an element acquires "layout", margins no longer collapse correctly
-      collapseMargins(element);
-    }
-  };
-
-  // -----------------------------------------------------------------------
-  // Margin Collapse
-  // -----------------------------------------------------------------------
-
-  function collapseMargins(element) {
-    if (element != viewport && element.currentStyle.position !== "absolute") {
-      collapseMargin(element, "marginTop");
-      collapseMargin(element, "marginBottom");
-    }
-  };
-
-  function collapseMargin(element, type) {
-    if (!element.runtimeStyle[type]) {
-      var parentElement = element.parentElement;
-      var isTopMargin = type === "marginTop";
-      if (parentElement && parentElement.currentStyle.hasLayout && !IE7._getElementSibling(element, isTopMargin ? "previous" : "next")) return;
-      var child = element[isTopMargin ? "firstChild" : "lastChild"];
-      if (child && child.nodeName < "@") child = IE7._getElementSibling(child, isTopMargin ? "next" : "previous");
-      if (child && child.currentStyle.styleFloat === "none" && child.currentStyle.hasLayout) {
-        collapseMargin(child, type);
-        margin = _getMargin(element, element.currentStyle[type]);
-        childMargin = _getMargin(child, child.currentStyle[type]);
-        if (margin < 0 || childMargin < 0) {
-          element.runtimeStyle[type] = margin + childMargin;
-        } else {
-          element.runtimeStyle[type] = Math.max(childMargin, margin);
-        }
-        child.runtimeStyle[type] = "0px";
-      }
-    }
-  };
-
-  function _getMargin(element, value) {
-    return value === "auto" ? 0 : getPixelValue(element, value);
-  };
-
-  // -----------------------------------------------------------------------
-  // box-model
-  // -----------------------------------------------------------------------
-
-  // constants
-  var UNIT = /^[.\d][\w]*$/, AUTO = /^(auto|0cm)$/;
-
-  var apply = {};
-  layout.borderBox = function(element){
-    apply.Width(element);
-    apply.Height(element);
-  };
-
-  var _fixWidth = function(HEIGHT) {
-    apply.Width = function(element) {
-      if (!PERCENT.test(element.currentStyle.width)) _fixWidth(element);
-      if (HEIGHT) collapseMargins(element);
-    };
-
-    function _fixWidth(element, value) {
-      if (!element.runtimeStyle.fixedWidth) {
-        if (!value) value = element.currentStyle.width;
-        element.runtimeStyle.fixedWidth = UNIT.test(value) ? Math.max(0, getFixedWidth(element, value)) + "px" : value;
-        setOverrideStyle(element, "width", element.runtimeStyle.fixedWidth);
-      }
-    };
-
-    function layoutWidth(element) {
-      if (!isFixed(element)) {
-        var layoutParent = element.offsetParent;
-        while (layoutParent && !layoutParent.currentStyle.hasLayout) layoutParent = layoutParent.offsetParent;
-      }
-      return (layoutParent || viewport).clientWidth;
-    };
-
-    function getPixelWidth(element, value) {
-      if (PERCENT.test(value)) return parseInt(parseFloat(value) / 100 * layoutWidth(element));
-      return getPixelValue(element, value);
-    };
-
-    var getFixedWidth = function(element, value) {
-      var borderBox = element.currentStyle["ie7-box-sizing"] === "border-box";
-      var adjustment = 0;
-      if (MSIE5 && !borderBox)
-        adjustment += getBorderWidth(element) + getWidth(element, "padding");
-      else if (!MSIE5 && borderBox)
-        adjustment -= getBorderWidth(element) + getWidth(element, "padding");
-      return getPixelWidth(element, value) + adjustment;
-    };
-
-    // easy way to get border thickness for elements with "layout"
-    function getBorderWidth(element) {
-      return element.offsetWidth - element.clientWidth;
-    };
-
-    // have to do some pixel conversion to get padding/margin thickness :-(
-    function getWidth(element, type) {
-      return getPixelWidth(element, element.currentStyle[type + "Left"]) + getPixelWidth(element, element.currentStyle[type + "Right"]);
-    };
-
-    // -----------------------------------------------------------------------
-    // min/max
-    // -----------------------------------------------------------------------
-
-    HEADER += "*{minWidth:none;maxWidth:none;min-width:none;max-width:none}";
-
-    // handle min-width property
-    layout.minWidth = function(element) {
-      // IE6 supports min-height so we frig it here
-      //#if (element.currentStyle.minHeight === "auto") element.runtimeStyle.minHeight = 0;
-      if (element.currentStyle["min-width"] != null) {
-        element.style.minWidth = element.currentStyle["min-width"];
-      }
-      if (register(arguments.callee, element, element.currentStyle.minWidth !== "none")) {
-        layout.boxSizing(element);
-        _fixWidth(element);
-        resizeWidth(element);
-      }
-    };
-
-    // clone the minWidth function to make a maxWidth function
-    eval("IE7.Layout.maxWidth=" + String(layout.minWidth).replace(/min/g, "max"));
-
-    // apply min/max restrictions
-    function resizeWidth(element) {
-      // check boundaries
-      if (element == document.body) {
-        var width = element.clientWidth;
-      } else {
-        var rect = element.getBoundingClientRect();
-        width = rect.right - rect.left;
-      }
-      if (element.currentStyle.minWidth !== "none" && width < getFixedWidth(element, element.currentStyle.minWidth)) {
-        element.runtimeStyle.width = element.currentStyle.minWidth;
-      } else if (element.currentStyle.maxWidth !== "none" && width >= getFixedWidth(element, element.currentStyle.maxWidth)) {
-        element.runtimeStyle.width = element.currentStyle.maxWidth;
-      } else {
-        element.runtimeStyle.width = element.runtimeStyle.fixedWidth;
-      }
-    };
-
-    // -----------------------------------------------------------------------
-    // right/bottom
-    // -----------------------------------------------------------------------
-
-    function fixRight(element) {
-      if (register(fixRight, element, /^(fixed|absolute)$/.test(element.currentStyle.position) &&
-        getDefinedStyle(element, "left") !== "auto" &&
-        getDefinedStyle(element, "right") !== "auto" &&
-        AUTO.test(getDefinedStyle(element, "width")))) {
-          resizeRight(element);
-          layout.boxSizing(element);
-      }
-    };
-    layout.fixRight = fixRight;
-
-    function resizeRight(element) {
-      var left = getPixelWidth(element, element.runtimeStyle._left || element.currentStyle.left);
-      var width = layoutWidth(element) - getPixelWidth(element, element.currentStyle.right) -  left - getWidth(element, "margin");
-      if (parseInt(element.runtimeStyle.width) === width) return;
-      element.runtimeStyle.width = "";
-      if (isFixed(element) || HEIGHT || element.offsetWidth < width) {
-        if (!MSIE5) width -= getBorderWidth(element) + getWidth(element, "padding");
-        if (width < 0) width = 0;
-        element.runtimeStyle.fixedWidth = width;
-        setOverrideStyle(element, "width", width);
-      }
-    };
-
-  // -----------------------------------------------------------------------
-  // window.onresize
-  // -----------------------------------------------------------------------
-
-    // handle window resize
-    var clientWidth = 0;
-    addResize(function() {
-      if (!viewport) return;
-      var i, wider = (clientWidth < viewport.clientWidth);
-      clientWidth = viewport.clientWidth;
-      // resize elements with "min-width" set
-      var elements = layout.minWidth.elements;
-      for (i in elements) {
-        var element = elements[i];
-        var fixedWidth = (parseInt(element.runtimeStyle.width) === getFixedWidth(element, element.currentStyle.minWidth));
-        if (wider && fixedWidth) element.runtimeStyle.width = "";
-        if (wider == fixedWidth) resizeWidth(element);
-      }
-      // resize elements with "max-width" set
-      var elements = layout.maxWidth.elements;
-      for (i in elements) {
-        var element = elements[i];
-        var fixedWidth = (parseInt(element.runtimeStyle.width) === getFixedWidth(element, element.currentStyle.maxWidth));
-        if (!wider && fixedWidth) element.runtimeStyle.width = "";
-        if (wider !== fixedWidth) resizeWidth(element);
-      }
-      // resize elements with "right" set
-      for (i in fixRight.elements) resizeRight(fixRight.elements[i]);
-    });
-
-  // -----------------------------------------------------------------------
-  // fix CSS
-  // -----------------------------------------------------------------------
-    if (MSIE5) {
-      IE7.CSS.addRecalc("width", NUMERIC, apply.Width);
-    }
-    if (appVersion < 7) {
-      IE7.CSS.addRecalc("max-width", NUMERIC, layout.maxWidth);
-      IE7.CSS.addRecalc("right", NUMERIC, fixRight);
-    } else if (appVersion == 7) {
-      if (HEIGHT) IE7.CSS.addRecalc("height", "[\\d.]+%", function(element) {
-        element.runtimeStyle.pixelHeight = parseInt(layoutWidth(element) * element.currentStyle["ie7-height"].slice(0, -1) / 100);
-      });
-    }
-  };
-
-  eval("var _fixHeight=" + rotate(_fixWidth));
-
-  // apply box-model + min/max fixes
-  _fixWidth();
-  _fixHeight(true);
-  
-  if (appVersion < 7) {
-    IE7.CSS.addRecalc("min-width", NUMERIC, layout.minWidth);
-    IE7.CSS.addFix(/\bmin-height\s*/, "height");
-  }
-})();
-
-// =========================================================================
-// ie7-graphics.js
-// =========================================================================
-
-// a small transparent image used as a placeholder
-var BLANK_GIF = makePath("blank.gif", path);
-
-var ALPHA_IMAGE_LOADER = "DXImageTransform.Microsoft.AlphaImageLoader";
-var PNG_FILTER = "progid:" + ALPHA_IMAGE_LOADER + "(src='%1',sizingMethod='%2')";
-  
-// regular expression version of the above
-var PNG;
-
-var filtered = [];
-
-function fixImage(element) {
-  if (PNG.test(element.src)) {
-    // we have to preserve width and height
-    var image = new Image(element.width, element.height);
-    image.onload = function() {
-      element.width = image.width;
-      element.height = image.height;
-      image = null;
-    };
-    image.src = element.src;
-    // store the original url (we'll put it back when it's printed)
-    element.pngSrc = element.src;
-    // add the AlphaImageLoader thingy
-    addFilter(element);
-  }
-};
-
-if (appVersion < 7) {
-  // ** IE7 VARIABLE
-  // e.g. apply the hack to all files ending in ".png"
-  // IE7_PNG_SUFFIX = ".png";
-  // You can also set it to a RegExp
-  // IE7_PNG_SUFFIX = /\d+\.png$/;
-
-  // replace background(-image): url(..) ..  with background(-image): .. ;filter: ..;
-  IE7.CSS.addFix(/background(-image)?\s*:\s*([^};]*)?url\(([^\)]+)\)([^;}]*)?/, function(match, $1, $2, url, $4) {
-    url = getString(url);
-    return PNG.test(url) ? "filter:" + format(PNG_FILTER, url, $4.indexOf("no-repeat") === -1 ? "scale" : "crop") +
-      ";zoom:1;background" + ($1||"") + ":" + ($2||"") + "none" + ($4||"") : match;
-  });
-
-  // list-style-image
-  IE7.CSS.addRecalc(/list\-style(\-image)?/, "[^};]*url", function(element) {
-    var url = element.currentStyle.listStyleImage.slice(5, -2);
-    if (PNG.test(url)) {
-      if (element.nodeName === "LI") {
-        fixListStyleImage(element, url)
-      } else if (element.nodeName === "UL") {
-        for (var i = 0, li; li = element.childNodes[i]; i++) {
-          if (li.nodeName === "LI") fixListStyleImage(li, url);
-        }
-      }
-    }
-  });
-
-  function fixListStyleImage(element, src) {
-    var style = element.runtimeStyle;
-    var originalHeight = element.offsetHeight;
-    var image = new Image;
-    image.onload = function() {
-      var paddingLeft = element.currentStyle.paddingLeft;
-      paddingLeft = paddingLeft === "0px" ? 0 : getPixelValue(element, paddingLeft);
-      style.paddingLeft = (paddingLeft + this.width) + "px";
-      style.marginLeft = -this.width + "px";
-      style.listStyleType = "none";
-      style.listStyleImage = "none";
-      style.paddingTop = Math.max(originalHeight - element.offsetHeight, 0) + "px";
-      addFilter(element, "crop", src);
-      element.style.zoom = "100%";
-    };
-    image.src = src;
-  };
-  
-  // -----------------------------------------------------------------------
-  //  fix PNG transparency (HTML images)
-  // -----------------------------------------------------------------------
-
-  IE7.HTML.addRecalc("img,input", function(element) {
-    if (element.nodeName === "INPUT" && element.type !== "image") return;
-    fixImage(element);
-    addEventHandler(element, "onpropertychange", function() {
-      if (!printing && event.propertyName === "src" &&
-        element.src.indexOf(BLANK_GIF) === -1) fixImage(element);
-    });
-  });
-
-  // assume that background images should not be printed
-  //  (if they are not transparent then they'll just obscure content)
-  // but we'll put foreground images back...
-  var printing = false;
-  addEventHandler(window, "onbeforeprint", function() {
-    printing = true;
-    for (var i = 0; i < filtered.length; i++) removeFilter(filtered[i]);
-  });
-  addEventHandler(window, "onafterprint", function() {
-    for (var i = 0; i < filtered.length; i++) addFilter(filtered[i]);
-    printing = false;
-  });
-}
-
-// apply a filter
-function addFilter(element, sizingMethod, src) {
-  var filter = element.filters[ALPHA_IMAGE_LOADER];
-  if (filter) {
-    filter.src = src || element.src;
-    filter.enabled = true;
-  } else {
-    element.runtimeStyle.filter = format(PNG_FILTER, src || element.src, sizingMethod || "scale");
-    filtered.push(element);
-  }
-  // remove the real image
-  element.src = BLANK_GIF;
-};
-
-function removeFilter(element) {
-  element.src = element.pngSrc;
-  element.filters[ALPHA_IMAGE_LOADER].enabled = false;
-};
-
-// =========================================================================
-// ie7-fixed.js
-// =========================================================================
-
-(function() {
-  if (appVersion >= 7) return;
-  
-  // some things to consider for this hack.
-  // the document body requires a fixed background. even if
-  //  it is just a blank image.
-  // you have to use setExpression instead of onscroll, this
-  //  together with a fixed body background helps avoid the
-  //  annoying screen flicker of other solutions.
-  
-  IE7.CSS.addRecalc("position", "fixed", _positionFixed, "absolute");
-  IE7.CSS.addRecalc("background(-attachment)?", "[^};]*fixed", _backgroundFixed);
-  
-  // scrolling is relative to the documentElement (HTML tag) when in
-  //  standards mode, otherwise it's relative to the document body
-  var $viewport = MSIE5 ? "body" : "documentElement";
-  
-  function _fixBackground() {
-    // this is required by both position:fixed and background-attachment:fixed.
-    // it is necessary for the document to also have a fixed background image.
-    // we can fake this with a blank image if necessary
-    if (body.currentStyle.backgroundAttachment !== "fixed") {
-      if (body.currentStyle.backgroundImage === "none") {
-        body.runtimeStyle.backgroundRepeat = "no-repeat";
-        body.runtimeStyle.backgroundImage = "url(" + BLANK_GIF + ")"; // dummy
-      }
-      body.runtimeStyle.backgroundAttachment = "fixed";
-    }
-    _fixBackground = Undefined;
-  };
-  
-  var _tmp = createTempElement("img");
-  
-  function _isFixed(element) {
-    return element ? isFixed(element) || _isFixed(element.parentElement) : false;
-  };
-  
-  function _setExpression(element, propertyName, expression) {
-    setTimeout("document.all." + element.uniqueID + ".runtimeStyle.setExpression('" + propertyName + "','" + expression + "')", 0);
-  };
-  
-  // -----------------------------------------------------------------------
-  //  backgroundAttachment: fixed
-  // -----------------------------------------------------------------------
-  
-  function _backgroundFixed(element) {
-    if (register(_backgroundFixed, element, element.currentStyle.backgroundAttachment === "fixed" && !element.contains(body))) {
-      _fixBackground();
-      util.bgLeft(element);
-      util.bgTop(element);
-      _backgroundPosition(element);
-    }
-  };
-  
-  function _backgroundPosition(element) {
-    _tmp.src = element.currentStyle.backgroundImage.slice(5, -2);
-    var parentElement = element.canHaveChildren ? element : element.parentElement;
-    parentElement.appendChild(_tmp);
-    util.setOffsetLeft(element);
-    util.setOffsetTop(element);
-    parentElement.removeChild(_tmp);
-  };
-  
-  // -----------------------------------------------------------------------
-  //  position: fixed
-  // -----------------------------------------------------------------------
-  
-  function _positionFixed(element) {
-    if (register(_positionFixed, element, isFixed(element))) {
-      setOverrideStyle(element, "position",  "absolute");
-      setOverrideStyle(element, "left",  element.currentStyle.left);
-      setOverrideStyle(element, "top",  element.currentStyle.top);
-      _fixBackground();
-      IE7.Layout.fixRight(element);
-      //IE7.Layout.fixBottom(element);
-      _foregroundPosition(element);
-    }
-  };
-  
-  function _foregroundPosition(element, recalc) {
-    document.body.getBoundingClientRect(); // force a reflow
-    util.positionTop(element, recalc);
-    util.positionLeft(element, recalc, true);
-    if (!element.runtimeStyle.autoLeft && element.currentStyle.marginLeft === "auto" &&
-      element.currentStyle.right !== "auto") {
-      var left = viewport.clientWidth - util.getPixelWidth(element, element.currentStyle.right) -
-        util.getPixelWidth(element, element.runtimeStyle._left) - element.clientWidth;
-      if (element.currentStyle.marginRight === "auto") left = parseInt(left / 2);
-      if (_isFixed(element.offsetParent)) element.runtimeStyle.pixelLeft += left;
-      else element.runtimeStyle.shiftLeft = left;
-    }
-    if (!element.runtimeStyle.fixedWidth) util.clipWidth(element);
-    if (!element.runtimeStyle.fixedHeight) util.clipHeight(element);
-  };
-  
-  // -----------------------------------------------------------------------
-  //  capture window resize
-  // -----------------------------------------------------------------------
-  
-  function _resize() {
-    // if the window has been resized then some positions need to be
-    //  recalculated (especially those aligned to "right" or "top"
-    var elements = _backgroundFixed.elements;
-    for (var i in elements) _backgroundPosition(elements[i]);
-    elements = _positionFixed.elements;
-    for (i in elements) {
-      _foregroundPosition(elements[i], true);
-      _foregroundPosition(elements[i], true);
-    }
-    _timer = 0;
-  };
-  
-  // use a timer (sometimes this is a good way to prevent resize loops)
-  var _timer;
-  addResize(function() {
-    if (!_timer) _timer = setTimeout(_resize, 100);
-  });
-
-  // -----------------------------------------------------------------------
-  //  rotated
-  // -----------------------------------------------------------------------
-
-  var util = {};
-  
-  var _horizontal = function(util) {
-    util.bgLeft = function(element) {
-      element.style.backgroundPositionX = element.currentStyle.backgroundPositionX;
-      if (!_isFixed(element)) {
-        _setExpression(element, "backgroundPositionX", "(parseInt(runtimeStyle.offsetLeft)+document." + $viewport + ".scrollLeft)||0");
-      }
-    };
-
-    util.setOffsetLeft = function(element) {
-      var propertyName = _isFixed(element) ? "backgroundPositionX" : "offsetLeft";
-      element.runtimeStyle[propertyName] =
-        util.getOffsetLeft(element, element.style.backgroundPositionX) -
-        element.getBoundingClientRect().left - element.clientLeft + 2;
-    };
-
-    util.getOffsetLeft = function(element, position) {
-      switch (position) {
-        case "left":
-        case "top":
-          return 0;
-        case "right":
-        case "bottom":
-          return viewport.clientWidth - _tmp.offsetWidth;
-        case "center":
-          return (viewport.clientWidth - _tmp.offsetWidth) / 2;
-        default:
-          if (PERCENT.test(position)) {
-            return parseInt((viewport.clientWidth - _tmp.offsetWidth) * parseFloat(position) / 100);
-          }
-          _tmp.style.left = position;
-          return _tmp.offsetLeft;
-      }
-    };
-
-    util.clipWidth = function(element) {
-      var fixWidth = element.runtimeStyle.fixWidth;
-      element.runtimeStyle.borderRightWidth = "";
-      element.runtimeStyle.width = fixWidth ? util.getPixelWidth(element, fixWidth) + "px" : "";
-      if (element.currentStyle.width !== "auto") {
-        var rect = element.getBoundingClientRect();
-        var width = element.offsetWidth - viewport.clientWidth + rect.left - 2;
-        if (width >= 0) {
-          element.runtimeStyle.borderRightWidth = "0px";
-          width = Math.max(getPixelValue(element, element.currentStyle.width) - width, 0);
-          setOverrideStyle(element, "width",  width);
-          return width;
-        }
-      }
-    };
-
-    util.positionLeft = function(element, recalc) {
-      // if the element's width is in % units then it must be recalculated
-      //  with respect to the viewport
-      if (!recalc && PERCENT.test(element.currentStyle.width)) {
-        element.runtimeStyle.fixWidth = element.currentStyle.width;
-      }
-      if (element.runtimeStyle.fixWidth) {
-        element.runtimeStyle.width = util.getPixelWidth(element, element.runtimeStyle.fixWidth);
-      }
-      //if (recalc) {
-      //  // if the element is fixed on the right then no need to recalculate
-      //  if (!element.runtimeStyle.autoLeft) return;
-      //} else {
-        element.runtimeStyle.shiftLeft = 0;
-        element.runtimeStyle._left = element.currentStyle.left;
-        // is the element fixed on the right?
-        element.runtimeStyle.autoLeft = element.currentStyle.right !== "auto" && element.currentStyle.left === "auto";
-      //}
-      // reset the element's "left" value and get it's natural position
-      element.runtimeStyle.left = "";
-      element.runtimeStyle.screenLeft = util.getScreenLeft(element);
-      element.runtimeStyle.pixelLeft = element.runtimeStyle.screenLeft;
-      // if the element is contained by another fixed element then there is no need to
-      //  continually recalculate it's left position
-      if (!recalc && !_isFixed(element.offsetParent)) {
-        // onsrcoll produces jerky movement, so we use an expression
-        _setExpression(element, "pixelLeft", "runtimeStyle.screenLeft+runtimeStyle.shiftLeft+document." + $viewport + ".scrollLeft");
-      }
-    };
-
-    // I've forgotten how this works...
-    util.getScreenLeft = function(element) { // thanks to kevin newman (captainn)
-      var screenLeft = element.offsetLeft, nested = 1;
-      if (element.runtimeStyle.autoLeft) {
-        screenLeft = viewport.clientWidth - element.offsetWidth - util.getPixelWidth(element, element.currentStyle.right);
-      }
-      // accommodate margins
-      if (element.currentStyle.marginLeft !== "auto") {
-        screenLeft -= util.getPixelWidth(element, element.currentStyle.marginLeft);
-      }
-      while (element = element.offsetParent) {
-        if (element.currentStyle.position !== "static") nested = -1;
-        screenLeft += element.offsetLeft * nested;
-      }
-      return screenLeft;
-    };
-
-    util.getPixelWidth = function(element, value) {
-      return PERCENT.test(value) ? parseInt(parseFloat(value) / 100 * viewport.clientWidth) : getPixelValue(element, value);
-    };
-  };
-  eval("var _vertical=" + rotate(_horizontal));
-  _horizontal(util);
-  _vertical(util);
-})();
-
-// =========================================================================
-// ie7-oveflow.js
-// =========================================================================
-
-/* ---------------------------------------------------------------------
-
-  This module alters the structure of the document.
-  It may adversely affect other CSS rules. Be warned.
-
---------------------------------------------------------------------- */
-
-if (appVersion < 7) {
-  var WRAPPER_STYLE = {
-    backgroundColor: "transparent",
-    backgroundImage: "none",
-    backgroundPositionX: null,
-    backgroundPositionY: null,
-    backgroundRepeat: null,
-    borderTopWidth: 0,
-    borderRightWidth: 0,
-    borderBottomWidth: 0,
-    borderLeftStyle: "none",
-    borderTopStyle: "none",
-    borderRightStyle: "none",
-    borderBottomStyle: "none",
-    borderLeftWidth: 0,
-    borderLeftColor: "#000",
-    borderTopColor: "#000",
-    borderRightColor: "#000",
-    borderBottomColor: "#000",
-    height: null,
-    marginTop: 0,
-    marginBottom: 0,
-    marginRight: 0,
-    marginLeft: 0,
-    width: "100%"
-  };
-
-  IE7.CSS.addRecalc("overflow", "visible", function(element) {
-    if (element.currentStyle.position === "absolute") return;
-    
-    // don't do this again
-    if (element.parentNode.ie7_wrapped) return;
-
-    // if max-height is applied, makes sure it gets applied first
-    if (IE7.Layout && element.currentStyle["max-height"] !== "auto") {
-      IE7.Layout.maxHeight(element);
-    }
-
-    if (element.currentStyle.marginLeft === "auto") element.style.marginLeft = 0;
-    if (element.currentStyle.marginRight === "auto") element.style.marginRight = 0;
-
-    var wrapper = document.createElement(ANON);
-    wrapper.ie7_wrapped = element;
-    for (var propertyName in WRAPPER_STYLE) {
-      wrapper.style[propertyName] = element.currentStyle[propertyName];
-      if (WRAPPER_STYLE[propertyName] != null) {
-        element.runtimeStyle[propertyName] = WRAPPER_STYLE[propertyName];
-      }
-    }
-    wrapper.style.display = "block";
-    wrapper.style.position = "relative";
-    element.runtimeStyle.position = "absolute";
-    element.parentNode.insertBefore(wrapper, element);
-    wrapper.appendChild(element);
-  });
-}
-
-// =========================================================================
-// ie7-quirks.js
-// =========================================================================
-
-function ie7Quirks() {
-  var FONT_SIZES = "xx-small,x-small,small,medium,large,x-large,xx-large".split(",");
-  for (var i = 0; i < FONT_SIZES.length; i++) {
-    FONT_SIZES[FONT_SIZES[i]] = FONT_SIZES[i - 1] || "0.67em";
-  }
-  
-  IE7.CSS.addFix(/(font(-size)?\s*:\s*)([\w.-]+)/, function(match, label, size, value) {
-    return label + (FONT_SIZES[value] || value);
-  });
-  
-  var NEGATIVE = /^\-/, LENGTH = /(em|ex)$/i;
-  var EM = /em$/i, EX = /ex$/i;
-
-  getPixelValue = function(element, value) {
-    if (PIXEL.test(value)) return parseInt(value)||0;
-    var scale = NEGATIVE.test(value)? -1 : 1;
-    if (LENGTH.test(value)) scale *= getFontScale(element);
-    temp.style.width = scale < 0 ? value.slice(1) : value;
-    body.appendChild(temp);
-    // retrieve pixel width
-    value = scale * temp.offsetWidth;
-    // remove the temporary element
-    temp.removeNode();
-    return parseInt(value);
-  };
-
-  var temp = createTempElement();
-  function getFontScale(element) {
-    var scale = 1;
-    temp.style.fontFamily = element.currentStyle.fontFamily;
-    temp.style.lineHeight = element.currentStyle.lineHeight;
-    //temp.style.fontSize = "";
-    while (element != body) {
-      var fontSize = element.currentStyle["ie7-font-size"];
-      if (fontSize) {
-        if (EM.test(fontSize)) scale *= parseFloat(fontSize);
-        else if (PERCENT.test(fontSize)) scale *= (parseFloat(fontSize) / 100);
-        else if (EX.test(fontSize)) scale *= (parseFloat(fontSize) / 2);
-        else {
-          temp.style.fontSize = fontSize;
-          return 1;
-        }
-      }
-      element = element.parentElement;
-    }
-    return scale;
-  };
-
-  // cursor:pointer (IE5.x)
-  IE7.CSS.addFix(/cursor\s*:\s*pointer/, "cursor:hand");
-  // display:list-item (IE5.x)
-  IE7.CSS.addFix(/display\s*:\s*list-item/, "display:block");
-  
-  // -----------------------------------------------------------------------
-  //  margin:auto
-  // -----------------------------------------------------------------------
-  
-  function fixMargin(element) {
-    var parent = element.parentElement;
-    var margin = parent.offsetWidth - element.offsetWidth - getPaddingWidth(parent);
-    var autoRight = (element.currentStyle["ie7-margin"] && element.currentStyle.marginRight === "auto") ||
-      element.currentStyle["ie7-margin-right"] === "auto";
-    switch (parent.currentStyle.textAlign) {
-      case "right":
-        margin = autoRight ? parseInt(margin / 2) : 0;
-        element.runtimeStyle.marginRight = margin + "px";
-        break;
-      case "center":
-        if (autoRight) margin = 0;
-      default:
-        if (autoRight) margin /= 2;
-        element.runtimeStyle.marginLeft = parseInt(margin) + "px";
-    }
-  };
-
-  function getPaddingWidth(element) {
-    return getPixelValue(element, element.currentStyle.paddingLeft) +
-      getPixelValue(element, element.currentStyle.paddingRight);
-  };
-  
-  IE7.CSS.addRecalc("margin(-left|-right)?", "[^};]*auto", function(element) {
-    if (register(fixMargin, element,
-      element.parentElement &&
-      element.currentStyle.display === "block" &&
-      element.currentStyle.marginLeft === "auto" &&
-      element.currentStyle.position !== "absolute")) {
-        fixMargin(element);
-    }
-  });
-  
-  addResize(function() {
-    for (var i in fixMargin.elements) {
-      var element = fixMargin.elements[i];
-      element.runtimeStyle.marginLeft =
-      element.runtimeStyle.marginRight = "";
-      fixMargin(element);
-    }
-  });
-};
-
-
-// =========================================================================
-// ie8-css.js
-// =========================================================================
-
-var BRACKETS = "\\([^)]+\\)";
-
-// pseudo-elements can be declared with a double colon
-encoder.add(/::(before|after)/, ":$1");
-
-if (appVersion < 8) {
-
-  if (IE7.CSS.pseudoClasses) IE7.CSS.pseudoClasses += "|";
-  IE7.CSS.pseudoClasses += "before|after|lang" + BRACKETS;
-
-  // -----------------------------------------------------------------------
-  // propertyName: inherit;
-  // -----------------------------------------------------------------------
-  
-  function parseInherited(cssText) {
-    return cssText.replace(new RegExp("([{;\\s])(" + inheritedProperties.join("|") + ")\\s*:\\s*([^;}]+)", "g"), "$1$2:$3;ie7-$2:$3");
-  };
-
-  var INHERITED = /[\w-]+\s*:\s*inherit/g;
-  var STRIP_IE7_FLAGS = /ie7\-|\s*:\s*inherit/g;
-  var DASH_LOWER = /\-([a-z])/g;
-  function toUpper(match, chr) {return chr.toUpperCase()};
-  
-  IE7.CSS.addRecalc("[\\w-]+", "inherit", function(element, cssText) {
-    if (element.parentElement) {
-      var inherited = cssText.match(INHERITED);
-      for (var i = 0; i < inherited.length; i++) {
-        var propertyName = inherited[i].replace(STRIP_IE7_FLAGS, "");
-        if (element.currentStyle["ie7-" + propertyName] === "inherit") {
-          propertyName = propertyName.replace(DASH_LOWER, toUpper);
-          element.runtimeStyle[propertyName] = element.parentElement.currentStyle[propertyName];
-        }
-      }
-    }
-  }, function(match) {
-    inheritedProperties.push(rescape(match.slice(1).split(":")[0]));
-    return match;
-  });
-
-  // -----------------------------------------------------------------------
-  // dynamic pseudo-classes
-  // -----------------------------------------------------------------------
-
-  var Focus = new DynamicPseudoClass("focus", function(element) {
-    var instance = arguments;
-
-    IE7.CSS.addEventHandler(element, "onfocus", function() {
-      Focus.unregister(instance); // in case it starts with focus
-      Focus.register(instance);
-    });
-
-    IE7.CSS.addEventHandler(element, "onblur", function() {
-      Focus.unregister(instance);
-    });
-
-    // check the active element for initial state
-    if (element == document.activeElement) {
-      Focus.register(instance)
-    }
-  });
-
-  var Active = new DynamicPseudoClass("active", function(element) {
-    var instance = arguments;
-    IE7.CSS.addEventHandler(element, "onmousedown", function() {
-      Active.register(instance);
-    });
-  });
-
-  // globally trap the mouseup event (thanks Martijn!)
-  addEventHandler(document, "onmouseup", function() {
-    var instances = Active.instances;
-    for (var i in instances) Active.unregister(instances[i]);
-  });
-
-  // -----------------------------------------------------------------------
-  // IE7 pseudo elements
-  // -----------------------------------------------------------------------
-
-  // constants
-  var URL = /^url\s*\(\s*([^)]*)\)$/;
-  var POSITION_MAP = {
-    before0: "beforeBegin",
-    before1: "afterBegin",
-    after0: "afterEnd",
-    after1: "beforeEnd"
-  };
-
-  var PseudoElement = IE7.PseudoElement = Rule.extend({
-    constructor: function(selector, position, cssText) {
-      // initialise object properties
-      this.position = position;
-      var content = cssText.match(PseudoElement.CONTENT), match, entity;
-      if (content) {
-        content = content[1];
-        match = content.split(/\s+/);
-        for (var i = 0; (entity = match[i]); i++) {
-          match[i] = /^attr/.test(entity) ? {attr: entity.slice(5, -1)} :
-            entity.charAt(0) === "'" ? getString(entity) : decode(entity);
-        }
-        content = match;
-      }
-      this.content = content;
-      // CSS text needs to be decoded immediately
-      this.base(selector, decode(cssText));
-    },
-
-    init: function() {
-      // execute the underlying css query for this class
-      this.match = cssQuery(this.selector);
-      for (var i = 0; i < this.match.length; i++) {
-        var runtimeStyle = this.match[i].runtimeStyle;
-        if (!runtimeStyle[this.position]) runtimeStyle[this.position] = {cssText:""};
-        runtimeStyle[this.position].cssText += ";" + this.cssText;
-        if (this.content != null) runtimeStyle[this.position].content = this.content;
-      }
-    },
-
-    create: function(target) {
-      var generated = target.runtimeStyle[this.position];
-      if (generated) {
-        // copy the array of values
-        var content = [].concat(generated.content || "");
-        for (var j = 0; j < content.length; j++) {
-          if (typeof content[j] == "object") {
-            content[j] = target.getAttribute(content[j].attr);
-          }
-        }
-        content = content.join("");
-        var url = content.match(URL);
-        var cssText = "overflow:hidden;" + generated.cssText.replace(/'/g, '"');
-        var position = POSITION_MAP[this.position + Number(target.canHaveChildren)];
-        var id = 'ie7_pseudo' + PseudoElement.count++;
-        target.insertAdjacentHTML(position, format(PseudoElement.ANON, this.className, id, cssText, url ? "" : content));
-        if (url) {
-          var src = getString(url[1]);
-          var pseudoElement = document.getElementById(id);
-          pseudoElement.src = src;
-          addFilter(pseudoElement, "crop");
-          var targetIsFloated = target.currentStyle.styleFloat !== "none";
-          if (pseudoElement.currentStyle.display === "inline" || targetIsFloated) {
-            if (appVersion < 7 && targetIsFloated && target.canHaveChildren) {
-              target.runtimeStyle.display = "inline";
-              target.runtimeStyle.position = "relative";
-              pseudoElement.runtimeStyle.position = "absolute";
-            }
-            pseudoElement.style.display = "inline-block";
-            if (target.currentStyle.styleFloat !== "none") {
-              pseudoElement.style.pixelWidth = target.offsetWidth;
-            }
-            var image = new Image;
-            image.onload = function() {
-              pseudoElement.style.pixelWidth = this.width;
-              pseudoElement.style.pixelHeight = Math.max(this.height, pseudoElement.offsetHeight);
-            };
-            image.src = src;
-          }
-        }
-        target.runtimeStyle[this.position] = null;
-      }
-    },
-
-    recalc: function() {
-      if (this.content == null) return;
-      for (var i = 0; i < this.match.length; i++) {
-        this.create(this.match[i]);
-      }
-    },
-
-    toString: function() {
-      return "." + this.className + "{display:inline}";
-    }
-  }, {
-    CONTENT: /content\s*:\s*([^;]*)(;|$)/,
-    ANON: "<ie7:! class='ie7_anon %1' id=%2 style='%3'>%4</ie7:!>",
-    MATCH: /(.*):(before|after).*/,
-
-    count: 0
-  });
-
-  IE7._getLang = function(element) {
-    var lang = "";
-    while (element && element.nodeType === 1) {
-      lang = element.lang || element.getAttribute("lang") || "";
-      if (lang) break;
-      element = element.parentNode;
-    }
-    return lang;
-  };
-
-  FILTER = extend(FILTER, {
-    ":lang\\(([^)]+)\\)":    "((ii=IE7._getLang(e))==='$1'||ii.indexOf('$1-')===0)&&"
-  });
-}
-
-// =========================================================================
-// ie8-html.js
-// =========================================================================
-
-var UNSUCCESSFUL = /^(submit|reset|button)$/;
-
-// -----------------------------------------------------------------------
-// <button>
-// -----------------------------------------------------------------------
-
-// IE bug means that innerText is submitted instead of "value"
-IE7.HTML.addRecalc("button,input", function(button) {
-  if (button.nodeName === "BUTTON") {
-    var match = button.outerHTML.match(/ value="([^"]*)"/i);
-    button.runtimeStyle.value = match ? match[1] : "";
-  }
-  // flag the button/input that was used to submit the form
-  if (button.type === "submit") {
-    addEventHandler(button, "onclick", function() {
-      button.runtimeStyle.clicked = true;
-      setTimeout("document.all." + button.uniqueID + ".runtimeStyle.clicked=false", 1);
-    });
-  }
-});
-
-// -----------------------------------------------------------------------
-// <form>
-// -----------------------------------------------------------------------
-
-// only submit "successful controls
-IE7.HTML.addRecalc("form", function(form) {
-  addEventHandler(form, "onsubmit", function() {
-    for (var element, i = 0; element = form[i]; i++) {
-      if (UNSUCCESSFUL.test(element.type) && !element.disabled && !element.runtimeStyle.clicked) {
-        element.disabled = true;
-        setTimeout("document.all." + element.uniqueID + ".disabled=false", 1);
-      } else if (element.nodeName === "BUTTON" && element.type === "submit") {
-        setTimeout("document.all." + element.uniqueID + ".value='" + element.value + "'", 1);
-        element.value = element.runtimeStyle.value;
-      }
-    }
-  });
-});
-
-// -----------------------------------------------------------------------
-// <img>
-// -----------------------------------------------------------------------
-
-// get rid of the spurious tooltip produced by the alt attribute on images
-IE7.HTML.addRecalc("img", function(img) {
-  if (img.alt && !img.title) img.title = "";
-});
-
-// =========================================================================
-// ie8-layout.js
-// =========================================================================
-
-if (appVersion < 8) {
-  IE7.CSS.addRecalc("border-spacing", NUMERIC, function(element) {
-    if (element.currentStyle.borderCollapse !== "collapse") {
-      element.cellSpacing = getPixelValue(element, element.currentStyle["ie7-border-spacing"].split(" ")[0]);
-    }
-  });
-  IE7.CSS.addRecalc("box-sizing", "content-box", IE7.Layout.boxSizing);
-  IE7.CSS.addRecalc("box-sizing", "border-box", IE7.Layout.borderBox);
-}
-
-// =========================================================================
-// ie8-graphics.js
-// =========================================================================
-
-if (appVersion < 8) {
-  // fix object[type=image/*]
-  var IMAGE = /^image/i;
-  IE7.HTML.addRecalc("object", function(element) {
-    if (IMAGE.test(element.type)) {
-      element.body.style.cssText = "margin:0;padding:0;border:none;overflow:hidden";
-      return element;
-    }
-  });
-}
-
-// =========================================================================
-// ie9-css.js
-// =========================================================================
-
-var NOT_NEXT_BY_TYPE     = "!IE7._getElementSiblingByType(e,'next')&&",
-    NOT_PREVIOUS_BY_TYPE = NOT_NEXT_BY_TYPE.replace("next", "previous");
-
-if (IE7.CSS.pseudoClasses) IE7.CSS.pseudoClasses += "|";
-IE7.CSS.pseudoClasses += "(?:first|last|only)\\-(?:child|of\\-type)|empty|root|target|" +
-  ("not|nth\\-child|nth\\-last\\-child|nth\\-of\\-type|nth\\-last\\-of\\-type".split("|").join(BRACKETS + "|") + BRACKETS);
-  
-// :checked
-var Checked = new DynamicPseudoClass("checked", function(element) {
-  if (typeof element.checked !== "boolean") return;
-  var instance = arguments;
-  IE7.CSS.addEventHandler(element, "onpropertychange", function() {
-    if (event.propertyName === "checked") {
-      if (element.checked === true) Checked.register(instance);
-      else Checked.unregister(instance);
-    }
-  });
-  // check current checked state
-  if (element.checked === true) Checked.register(instance);
-});
-
-// :enabled
-var Enabled = new DynamicPseudoClass("enabled", function(element) {
-  if (typeof element.disabled !== "boolean") return;
-  var instance = arguments;
-  IE7.CSS.addEventHandler(element, "onpropertychange", function() {
-    if (event.propertyName === "disabled") {
-      if (element.disabled === false) Enabled.register(instance);
-      else Enabled.unregister(instance);
-    }
-  });
-  // check current disabled state
-  if (element.disabled === false) Enabled.register(instance);
-});
-
-// :disabled
-var Disabled = new DynamicPseudoClass("disabled", function(element) {
-  if (typeof element.disabled !== "boolean") return;
-  var instance = arguments;
-  IE7.CSS.addEventHandler(element, "onpropertychange", function() {
-    if (event.propertyName === "disabled") {
-      if (element.disabled === true) Disabled.register(instance);
-      else Disabled.unregister(instance);
-    }
-  });
-  // check current disabled state
-  if (element.disabled === true) Disabled.register(instance);
-});
-
-// :indeterminate (Kevin Newman)
-var Indeterminate = new DynamicPseudoClass("indeterminate", function(element) {
-  if (typeof element.indeterminate !== "boolean") return;
-  var instance = arguments;
-  IE7.CSS.addEventHandler(element, "onpropertychange", function() {
-    if (event.propertyName === "indeterminate") {
-      if (element.indeterminate === true) Indeterminate.register(instance);
-      else Indeterminate.unregister(instance);
-    }
-  });
-  IE7.CSS.addEventHandler(element, "onclick", function() {
-    Indeterminate.unregister(instance);
-  });
-  // clever Kev says no need to check this up front
-});
-
-// :target
-var Target = new DynamicPseudoClass("target", function(element) {
-  var instance = arguments;
-  // if an element has a tabIndex then it can become "active".
-  //  The default is zero anyway but it works...
-  if (!element.tabIndex) element.tabIndex = 0;
-  // this doesn't detect the back button. I don't know how to do that without adding an iframe :-(
-  IE7.CSS.addEventHandler(document, "onpropertychange", function() {
-    if (event.propertyName === "activeElement") {
-      if (element.id && element.id === location.hash.slice(1)) Target.register(instance);
-      else Target.unregister(instance);
-    }
-  });
-  // check the current location
-  if (element.id && element.id === location.hash.slice(1)) Target.register(instance);
-});
-
-// Register a node and index its siblings.
-var _currentIndex = 1, // -@DRE
-    allIndexes = {_currentIndex: 1};
-
-IE7._indexOf = function(element, last, ofType) {
-  var parent = element.parentNode;
-  if (!parent || parent.nodeType !== 1) return NaN;
-
-  var tagName = ofType ? element.nodeName : "";
-  if (tagName === "TR" && element.sectionRowIndex >= 0) {
-    var index = element.sectionRowIndex;
-    return last ? element.parentNode.rows.length - index + 1 : index;
-  }
-  if ((tagName === "TD" || tagName === "TH") && element.cellIndex >= 0) {
-    index = element.cellIndex;
-    return last ? element.parentNode.cells.length - index + 1 : index;
-  }
-  if (allIndexes._currentIndex !== _currentIndex) {
-    allIndexes = {_currentIndex: _currentIndex};
-  }
-  var id = (parent.uniqueID) + "-" + tagName,
-      indexes = allIndexes[id];
-  if (!indexes) {
-    indexes = {};
-    var index = 0,
-        child = parent.firstChild;
-    while (child) {
-      if (ofType ? child.nodeName === tagName : child.nodeName > "@") {
-        indexes[child.uniqueID] = ++index;
-      }
-      child = child.nextSibling;
-    }
-    indexes.length = index;
-    allIndexes[id] = indexes;
-  }
-  index = indexes[element.uniqueID];
-  return last ? indexes.length - index + 1 : index;
-};
-
-IE7._isEmpty = function(node) {
-  node = node.firstChild;
-  while (node) {
-    if (node.nodeType === 3 || node.nodeName > "@") return false;
-    node = node.nextSibling;
-  }
-  return true;
-};
-
-IE7._getElementSiblingByType = function(node, direction) {
-  var tagName = node.nodeName;
-  direction += "Sibling";
-  do {
-    node = node[direction];
-    if (node && node.nodeName === tagName) break;
-  } while (node);
-  return node;
-};
-
-var ONE = {"+": 1, "-": -1}, SPACES = / /g;
-
-FILTER = extend(extend({
-  ":nth(-last)?-(?:child|(of-type))\\((<#nth_arg>)\\)(<#filter>)?": function(match, last, ofType, args, filters) { // :nth- pseudo classes
-    args = args.replace(SPACES, "");
-
-    var index = "IE7._indexOf(e," + !!last + "," + !!ofType + ")";
-
-    if (args === "even") args = "2n";
-    else if (args === "odd") args = "2n+1";
-    else if (!isNaN(args)) args = "0n" + ~~args;
-
-    args = args.split("n");
-    var a = ~~(ONE[args[0]] || args[0] || 1),
-        b = ~~args[1];
-    if (a === 0) {
-      var expr = index + "===" + b;
-    } else {
-      expr = "((ii=" + index + ")-(" + b + "))%" + a + "===0&&ii" + (a < 0 ? "<" : ">") + "=" + b;
-    }
-    return this.parse(filters) + expr + "&&";
-  },
-
-  "<#negation>": function(match, simple) {
-    if (/:not/i.test(simple)) throwSelectorError();
-
-    if (/^[#.:\[]/.test(simple)) {
-      simple = "*" + simple;
-    }
-    return "!(" + MATCHER.parse(simple).slice(3, -2) + ")&&";
-  }
-}, FILTER), {
-  ":checked":         "e.checked===true&&",
-  ":disabled":        "e.disabled===true&&",
-  ":enabled":         "e.disabled===false&&",
-  ":last-child":      "!" + NEXT_SIBLING + "&&",
-  ":only-child":      "!" + PREVIOUS_SIBLING + "&&!" + NEXT_SIBLING + "&&",
-  ":first-of-type":   NOT_PREVIOUS_BY_TYPE,
-  ":last-of-type":    NOT_NEXT_BY_TYPE,
-  ":only-of-type":    NOT_PREVIOUS_BY_TYPE + NOT_NEXT_BY_TYPE,
-
-  ":empty":          "IE7._isEmpty(e)&&",
-  ":root":           "e==R&&",
-  ":target":         "H&&" + ID_ATTRIBUTE + "===H&&"
-});
-
-var HTML5 = "article,aside,audio,canvas,details,figcaption,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,summary,time,video".split(",");
-for (var i = 0, tagName; tagName = HTML5[i]; i++) document.createElement(tagName);
-
-HEADER += "datalist{display:none}\
-details{padding-left:40px;display:block;margin:1em 0}\
-meter,progress{vertical-align:-0.2em;width:5em;height:1em;display:inline-block}\
-progress{width:10em;}\
-article,aside,figcaption,footer,header,hgroup,summary,section,nav{display:block;margin:1em 0}\
-figure{margin:1em 40px;display:block}\
-mark{background:yellow}";
-
-// =========================================================================
-// ie9-layout.js
-// =========================================================================
-
-// =========================================================================
-// ie9-graphics.js
-// =========================================================================
-
-IE7.CSS.addFix(/\bopacity\s*:\s*([\d.]+)/, function(match, value) {
-  return "zoom:1;filter:Alpha(opacity=" + ((value * 100) || 1) + ")";
-});
-
-var MATCHER;
-
-var cssQuery = (function() {
-  var CONTEXT = /^[>+~]/;
-  
-  var useContext = false;
-  
-  // This is not a selector engine in the strictest sense. So it's best to silently error.
-  function cssQuery(selector, context, single) {
-    selector = trim(selector);
-    if (!context) context = document;
-    var ref = context;
-    useContext = CONTEXT.test(selector);
-    if (useContext) {
-      context = context.parentNode;
-      selector = "*" + selector;
-    }
-    try {
-      return selectQuery.create(selector, useContext)(context, single ? null : [], ref);
-    } catch (ex) {
-      return single ? null : [];
-    }
-  };
-
-  var VALID_SELECTOR = /^(\\.|[' >+~#.\[\]:*(),\w-\^|$=]|[^\x00-\xa0])+$/;
-
-  var _EVALUATED = /^(href|src)$/;
-  var _ATTRIBUTES = {
-    "class": "className",
-    "for": "htmlFor"
-  };
-
-  var IE7_CLASS_NAMES = /\sie7_\w+/g;
-
-  var USE_IFLAG = /^(action|cite|codebase|data|dynsrc|href|longdesc|lowsrc|src|usemap|url)$/i;
-
-  IE7._getAttribute = function(element, name) {
-    if (element.getAttributeNode) {
-      var attribute = element.getAttributeNode(name);
-    }
-    name = _ATTRIBUTES[name.toLowerCase()] || name;
-    if (!attribute) attribute = element.attributes[name];
-    var specified = attribute && attribute.specified;
-
-    if (element[name] && typeof element[name] == "boolean") return name.toLowerCase();
-    if ((specified && USE_IFLAG.test(name)) || (!attribute && MSIE5) || name === "value" || name === "type") {
-      return element.getAttribute(name, 2);
-    }
-    if (name === "style") return element.style.cssText.toLowerCase() || null;
-
-    return specified ? String(attribute.nodeValue) : null;
-  };
-
-  var names = "colSpan,rowSpan,vAlign,dateTime,accessKey,tabIndex,encType,maxLength,readOnly,longDesc";
-  // Convert the list of strings to a hash, mapping the lowercase name to the camelCase name.
-  extend(_ATTRIBUTES, combine(names.toLowerCase().split(","), names.split(",")));
-
-  IE7._getElementSibling = function(node, direction) {
-    direction += "Sibling";
-    do {
-      node = node[direction];
-      if (node && node.nodeName > "@") break;
-    } while (node);
-    return node;
-  };
-
-  var IMPLIED_ASTERISK    = /(^|[, >+~])([#.:\[])/g,
-      BLOCKS              = /\)\{/g,
-      COMMA               = /,/,
-      QUOTED              = /^['"]/,
-      HEX_ESCAPE          = /\\([\da-f]{2,2})/gi,
-      LAST_CHILD          = /last/i;
-
-  IE7._byId = function(document, id) {
-    var result = document.all[id] || null;
-    // Returns a single element or a collection.
-    if (!result || (result.nodeType && IE7._getAttribute(result, "id") === id)) return result;
-    // document.all has returned a collection of elements with name/id
-    for (var i = 0; i < result.length; i++) {
-      if (IE7._getAttribute(result[i], "id") === id) return result[i];
-    }
-    return null;
-  };
-
-  // =========================================================================
-  // dom/selectors-api/CSSSelectorParser.js
-  // =========================================================================
-
-  // http://www.w3.org/TR/css3-selectors/#w3cselgrammar (kinda)
-  var CSSSelectorParser = RegGrp.extend({
-    dictionary: new Dictionary({
-      ident:           /\-?(\\.|[_a-z]|[^\x00-\xa0])(\\.|[\w-]|[^\x00-\xa0])*/,
-      combinator:      /[\s>+~]/,
-      operator:        /[\^~|$*]?=/,
-      nth_arg:         /[+-]?\d+|[+-]?\d*n(?:\s*[+-]\s*\d+)?|even|odd/,
-      tag:             /\*|<#ident>/,
-      id:              /#(<#ident>)/,
-      'class':         /\.(<#ident>)/,
-      pseudo:          /\:([\w-]+)(?:\(([^)]+)\))?/,
-      attr:            /\[(<#ident>)(?:(<#operator>)((?:\\.|[^\[\]#.:])+))?\]/,
-      negation:        /:not\((<#tag>|<#id>|<#class>|<#attr>|<#pseudo>)\)/,
-      sequence:        /(\\.|[~*]=|\+\d|\+?\d*n\s*\+\s*\d|[^\s>+~,\*])+/,
-      filter:          /[#.:\[]<#sequence>/,
-      selector:        /[^>+~](\\.|[^,])*?/,
-      grammar:         /^(<#selector>)((,<#selector>)*)$/
-    }),
-
-    ignoreCase: true
-  });
-
-  var normalizer = new CSSSelectorParser({
-    "\\\\.|[~*]\\s+=|\\+\\s+\\d": RegGrp.IGNORE,
-    "\\[\\s+": "[",
-    "\\(\\s+": "(",
-    "\\s+\\)": ")",
-    "\\s+\\]": "]",
-    "\\s*([,>+~]|<#operator>)\\s*": "$1",
-    "\\s+$": "",
-    "\\s+": " "
-  });
-
-  function normalize(selector) {
-    selector = normalizer.parse(selector.replace(HEX_ESCAPE, "\\x$1"))
-      .replace(UNESCAPE, "$1")
-      .replace(IMPLIED_ASTERISK, "$1*$2");
-    if (!VALID_SELECTOR.test(selector)) throwSelectorError();
-    return selector;
-  };
-
-  function unescape(query) {
-    // put string values back
-    return query.replace(ESCAPED, unescapeString);
-  };
-
-  function unescapeString(match, index) {
-    return strings[index];
-  };
-
-  var BRACES = /\{/g, BRACES_ESCAPED = /\\{/g;
-
-  function closeBlock(group) {
-    return Array((group.replace(BRACES_ESCAPED, "").match(BRACES) || "").length + 1).join("}");
-  };
-
-  FILTER = new CSSSelectorParser(FILTER);
-
-  var TARGET = /:target/i, ROOT = /:root/i;
-
-  function getConstants(selector) {
-    var constants = "";
-    if (ROOT.test(selector)) constants += ",R=d.documentElement";
-    if (TARGET.test(selector)) constants += ",H=d.location;H=H&&H.hash.replace('#','')";
-    if (constants || selector.indexOf("#") !== -1) {
-      constants = ",t=c.nodeType,d=t===9?c:c.ownerDocument||(c.document||c).parentWindow.document" + constants;
-    }
-    return "var ii" + constants + ";";
-  };
-
-  var COMBINATOR = {
-    " ":   ";while(e!=s&&(e=e.parentNode)&&e.nodeType===1){",
-    ">":   ".parentElement;if(e){",
-    "+":   ";while((e=e.previousSibling)&&!(" + IS_ELEMENT + "))continue;if(e){",
-    "~":   ";while((e=e.previousSibling)){" + IF_ELEMENT
-  };
-
-  var TOKEN = /\be\b/g;
-
-  MATCHER = new CSSSelectorParser({
-    "(?:(<#selector>)(<#combinator>))?(<#tag>)(<#filter>)?$": function(match, before, combinator, tag, filters) {
-      var group = "";
-      if (tag !== "*") {
-        var TAG = tag.toUpperCase();
-        group += "if(e.nodeName==='" + TAG + (TAG === tag ? "" : "'||e.nodeName==='" + tag) + "'){";
-      }
-      if (filters) {
-        group += "if(" + FILTER.parse(filters).slice(0, -2) + "){";
-      }
-      group = group.replace(TOKEN, "e" + this.index);
-      if (combinator) {
-        group += "var e=e" + (this.index++) + COMBINATOR[combinator];
-        group = group.replace(TOKEN, "e" + this.index);
-      }
-      if (before) {
-        group += this.parse(before);
-      }
-      return group;
-    }
-  });
-  
-  var BY_ID       = "e0=IE7._byId(d,'%1');if(e0){",
-      BY_TAG_NAME = "var n=c.getElementsByTagName('%1');",
-      STORE       = "if(r==null)return e0;r[k++]=e0;";
-
-  var TAG_NAME = 1;
-
-  var SELECTOR = new CSSSelectorParser({
-    "^((?:<#selector>)?(?:<#combinator>))(<#tag>)(<#filter>)?$": true
-  });
-
-  var cache = {};
-
-  var selectById = new CSSSelectorParser({
-    "^(<#tag>)#(<#ident>)(<#filter>)?( [^,]*)?$": function(match, tagName, id, filters, after) {
-      var block = format(BY_ID, id), endBlock = "}";
-      if (filters) {
-        block += MATCHER.parse(tagName + filters);
-        endBlock = closeBlock(block);
-      }
-      if (after) {
-        block += "s=c=e0;" + selectQuery.parse("*" + after);
-      } else {
-        block += STORE;
-      }
-      return block + endBlock;
-    },
-
-    "^([^#,]+)#(<#ident>)(<#filter>)?$": function(match, before, id, filters) {
-      var block = format(BY_ID, id);
-      if (before === "*") {
-        block += STORE;
-      } else {
-        block += MATCHER.parse(before + filters) + STORE + "break";
-      }
-      return block + closeBlock(block);
-    },
-
-    "^.*$": ""
-  });
-
-  var selectQuery = new CSSSelectorParser({
-    "<#grammar>": function(match, selector, remainingSelectors) {
-      if (!this.groups) this.groups = [];
-
-      var group = SELECTOR.exec(" " + selector);
-
-      if (!group) throwSelectorError();
-
-      this.groups.push(group.slice(1));
-
-      if (remainingSelectors) {
-        return this.parse(remainingSelectors.replace(COMMA, ""));
-      }
-
-      var groups = this.groups,
-          tagName = groups[0][TAG_NAME]; // first tag name
-
-      for (var i = 1; group = groups[i]; i++) { // search tag names
-        if (tagName !== group[TAG_NAME]) {
-          tagName = "*"; // mixed tag names, so use "*"
-          break;
-        }
-      }
-
-      var matcher = "", store = STORE + "continue filtering;";
-
-      for (var i = 0; group = groups[i]; i++) {
-        MATCHER.index = 0;
-        if (tagName !== "*") group[TAG_NAME] = "*"; // we are already filtering by tagName
-        group = group.join("");
-        if (group === " *") { // select all
-          matcher = store;
-          break;
-        } else {
-          group = MATCHER.parse(group);
-          if (useContext) group += "if(e" + MATCHER.index + "==s){";
-          matcher += group + store + closeBlock(group);
-        }
-      }
-
-      // reduce to a single loop
-      var isWild = tagName === "*";
-      return (isWild ? "var n=c.all;" : format(BY_TAG_NAME, tagName)) +
-        "filtering:while((e0=n[i++]))" +
-        (isWild ? IF_ELEMENT.replace(TOKEN, "e0") : "{") +
-          matcher +
-        "}";
-    },
-
-    "^.*$": throwSelectorError
-  });
-
-  var REDUNDANT_NODETYPE_CHECKS = /\&\&(e\d+)\.nodeType===1(\)\{\s*if\(\1\.nodeName=)/g;
-
-  selectQuery.create = function(selector) {
-    if (!cache[selector]) {
-      selector = normalize(selector);
-      this.groups = null;
-      MATCHER.index = 0;
-      var block = this.parse(selector);
-      this.groups = null;
-      MATCHER.index = 0;
-      if (selector.indexOf("#") !== -1) {
-        var byId  = selectById.parse(selector);
-        if (byId) {
-          block =
-            "if(t===1||t===11|!c.getElementById){" +
-              block +
-            "}else{" +
-              byId +
-            "}";
-        }
-      }
-      // remove redundant nodeType==1 checks
-      block = block.replace(REDUNDANT_NODETYPE_CHECKS, "$2");
-      block = getConstants(selector) + decode(block);
-      cache[selector] = new Function("return function(c,r,s){var i=0,k=0,e0;" + block + "return r}")();
-    }
-    return cache[selector];
-  };
-
-  return cssQuery;
-})();
-
-function throwSelectorError() {
-  throw new SyntaxError("Invalid selector.");
-};
-
-// -----------------------------------------------------------------------
-// initialisation
-// -----------------------------------------------------------------------
-
-IE7.loaded = true;
-
-(function() {
-  try {
-    // http://javascript.nwbox.com/IEContentLoaded/
-    if (!document.body) throw "continue";
-    documentElement.doScroll("left");
-  } catch (ex) {
-    setTimeout(arguments.callee, 1);
-    return;
-  }
-  // execute the inner text of the IE7 script
-  try {
-    eval(script.innerHTML);
-  } catch (ex) {
-    // ignore errors
-  }
-  if (typeof IE7_PNG_SUFFIX == "object") {
-    PNG = IE7_PNG_SUFFIX;
-  } else {
-    PNG = new RegExp(rescape(window.IE7_PNG_SUFFIX || "-trans.png") + "(\\?.*)?$", "i");
-  }
-
-  // frequently used references
-  body = document.body;
-  viewport = MSIE5 ? body : documentElement;
-
-  // classes
-  body.className += " ie7_body";
-  documentElement.className += " ie7_html";
-
-  if (MSIE5) ie7Quirks();
-
-  IE7.CSS.init();
-  IE7.HTML.init();
-
-  IE7.HTML.apply();
-  IE7.CSS.apply();
-
-  IE7.recalc();
-})();
-
-})(this, document);
Index: admin/js/jquery/jquery.pageTabs.js
===================================================================
--- admin/js/jquery/jquery.pageTabs.js	(revision 1280)
+++ admin/js/jquery/jquery.pageTabs.js	(revision 1223)
@@ -39,9 +39,10 @@
 				li = document.createElement('li');
 				a = document.createElement('a');
-				a.appendChild(document.createTextNode(this.title));
+				$(a).html(this.title);
 				this.title = '';
 				a.href = '#';
 				a.fn = This.showDiv;
 				a.index = this.id || i;
+				li.id = "part-tabs-"+a.index;
 				a.obj = This;
 				jQuery(a).click(function() { this.fn.call(this.obj,this.index); return false; });
Index: admin/js/jsUpload/jquery.fileupload-process.js
===================================================================
--- admin/js/jsUpload/jquery.fileupload-process.js	(revision 1320)
+++ admin/js/jsUpload/jquery.fileupload-process.js	(revision 1144)
@@ -1,4 +1,4 @@
 /*
- * jQuery File Upload Processing Plugin 1.2.2
+ * jQuery File Upload Processing Plugin 1.1
  * https://github.com/blueimp/jQuery-File-Upload
  *
@@ -99,18 +99,12 @@
             var processQueue = [];
             $.each(options.processQueue, function () {
-                var settings = {},
-                    action = this.action,
-                    prefix = this.prefix === true ? action : this.prefix;
+                var settings = {};
                 $.each(this, function (key, value) {
                     if ($.type(value) === 'string' &&
                             value.charAt(0) === '@') {
-                        settings[key] = options[
-                            value.slice(1) || (prefix ? prefix +
-                                key.charAt(0).toUpperCase() + key.slice(1) : key)
-                        ];
+                        settings[key] = options[value.slice(1)];
                     } else {
                         settings[key] = value;
                     }
-
                 });
                 processQueue.push(settings);
@@ -134,5 +128,5 @@
                     this._trigger('processstart');
                 }
-                $.each(data.files, function (index) {
+                $.each(data.files, function (index, file) {
                     var opts = index ? $.extend({}, options) : options,
                         func = function () {
Index: admin/js/jsUpload/jquery.fileupload-ui.js
===================================================================
--- admin/js/jsUpload/jquery.fileupload-ui.js	(revision 1320)
+++ admin/js/jsUpload/jquery.fileupload-ui.js	(revision 1206)
@@ -1,4 +1,4 @@
 /*
- * jQuery File Upload User Interface Plugin 8.7.1
+ * jQuery File Upload User Interface Plugin 8.2.1
  * https://github.com/blueimp/jQuery-File-Upload
  *
@@ -20,7 +20,5 @@
             'jquery',
             'tmpl',
-            './jquery.fileupload-image',
-            './jquery.fileupload-audio',
-            './jquery.fileupload-video',
+            './jquery.fileupload-resize',
             './jquery.fileupload-validate'
         ], factory);
@@ -106,7 +104,19 @@
                     );
                 });
+
+            /*
+             *  
+             *  Activation du bouton si un fichier trouvé
+             */
+                var fileUploadButtonBar = that.element.find('.fileupload-buttonbar');
+                fileUploadButtonBar.find('.start').prop('disabled', false);
+                fileUploadButtonBar.find('.start').removeClass('disabled');
+             /*
+             *
+             */
             },
             // Callback for the start of each file upload request:
             send: function (e, data) {
+                $(this).find('.start').hide();
                 var that = $(this).data('blueimp-fileupload') ||
                         $(this).data('fileupload');
@@ -130,4 +140,5 @@
             // Callback for successful uploads:
             done: function (e, data) {
+
                 var that = $(this).data('blueimp-fileupload') ||
                         $(this).data('fileupload'),
@@ -140,6 +151,6 @@
                     data.context.each(function (index) {
                         var file = files[index] ||
-                                {error: 'Empty file upload result'};
-                        deferred = that._addFinishedDeferreds();
+                                {error: 'Empty file upload result'},
+                            deferred = that._addFinishedDeferreds();
                         that._transition($(this)).done(
                             function () {
@@ -160,7 +171,6 @@
                     });
                 } else {
-                    template = that._renderDownload(files)[
-                        that.options.prependFiles ? 'prependTo' : 'appendTo'
-                    ](that.options.filesContainer);
+                    template = that._renderDownload(files)
+                        .appendTo(that.options.filesContainer);
                     that._forceReflow(template);
                     deferred = that._addFinishedDeferreds();
@@ -217,7 +227,6 @@
                     });
                 } else if (data.errorThrown !== 'abort') {
-                    data.context = that._renderUpload(data.files)[
-                        that.options.prependFiles ? 'prependTo' : 'appendTo'
-                    ](that.options.filesContainer)
+                    data.context = that._renderUpload(data.files)
+                        .appendTo(that.options.filesContainer)
                         .data('data', data);
                     that._forceReflow(data.context);
@@ -272,9 +281,12 @@
             // Callback for uploads start, equivalent to the global ajaxStart event:
             start: function (e) {
+                $(this).find('.start').hide();
                 var that = $(this).data('blueimp-fileupload') ||
-                        $(this).data('fileupload');
+                $(this).data('fileupload');
                 that._resetFinishedDeferreds();
                 that._transition($(this).find('.fileupload-progress')).done(
+
                     function () {
+
                         that._trigger('started', e);
                     }
@@ -283,4 +295,5 @@
             // Callback for uploads stop, equivalent to the global ajaxStop event:
             stop: function (e) {
+                $(this).find('.start').show();
                 var that = $(this).data('blueimp-fileupload') ||
                         $(this).data('fileupload'),
@@ -299,4 +312,17 @@
                     }
                 );
+            /*
+             *  Recherche des fichers restants à uploader
+             *  Désactivation du bouton si plus rien
+             */
+             var filesList = that.options.filesContainer;
+             if(filesList.find('.start').size() == 0) {
+                var fileUploadButtonBar = that.element.find('.fileupload-buttonbar');
+                fileUploadButtonBar.find('.start').prop('disabled', true);
+                fileUploadButtonBar.find('.start').addClass('disabled');
+             }
+            /*
+             *
+             */
             },
             processstart: function () {
@@ -309,6 +335,7 @@
             destroy: function (e, data) {
                 var that = $(this).data('blueimp-fileupload') ||
-                        $(this).data('fileupload'),
-                    removeNode = function () {
+                        $(this).data('fileupload');
+                if (data.url) {
+                    $.ajax(data).done(function () {
                         that._transition(data.context).done(
                             function () {
@@ -317,9 +344,5 @@
                             }
                         );
-                    };
-                if (data.url) {
-                    $.ajax(data).done(removeNode);
-                } else {
-                    removeNode();
+                    });
                 }
             }
@@ -614,7 +637,4 @@
             this._super();
             this._resetFinishedDeferreds();
-            if (!$.support.fileInput) {
-                this._disableFileInputButton();
-            }
         },
 
Index: admin/js/jsUpload/jquery.fileupload.js
===================================================================
--- admin/js/jsUpload/jquery.fileupload.js	(revision 1320)
+++ admin/js/jsUpload/jquery.fileupload.js	(revision 1144)
@@ -1,4 +1,4 @@
 /*
- * jQuery File Upload Plugin 5.32.2
+ * jQuery File Upload Plugin 5.31.1
  * https://github.com/blueimp/jQuery-File-Upload
  *
@@ -11,5 +11,5 @@
 
 /*jslint nomen: true, unparam: true, regexp: true */
-/*global define, window, document, location, File, Blob, FormData */
+/*global define, window, document, File, Blob, FormData, location */
 
 (function (factory) {
@@ -28,16 +28,4 @@
     'use strict';
 
-    // Detect file input support, based on
-    // http://viljamis.com/blog/2012/file-upload-support-on-mobile/
-    $.support.fileInput = !(new RegExp(
-        // Handle devices which give false positives for the feature detection:
-        '(Android (1\\.[0156]|2\\.[01]))' +
-            '|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)' +
-            '|(w(eb)?OSBrowser)|(webOS)' +
-            '|(Kindle/(1\\.0|2\\.[05]|3\\.0))'
-    ).test(window.navigator.userAgent) ||
-        // Feature detection for all other devices:
-        $('<input type="file">').prop('disabled'));
-
     // The FileReader API is not actually used, but works as feature detection,
     // as e.g. Safari supports XHR file uploads via the FormData API,
@@ -45,8 +33,4 @@
     $.support.xhrFileUpload = !!(window.XMLHttpRequestUpload && window.FileReader);
     $.support.xhrFormDataFileUpload = !!window.FormData;
-
-    // Detect support for Blob slicing (required for chunked uploads):
-    $.support.blobSlice = window.Blob && (Blob.prototype.slice ||
-        Blob.prototype.webkitSlice || Blob.prototype.mozSlice);
 
     // The fileupload widget listens for change events on file input fields defined
@@ -161,14 +145,11 @@
             // widget (via file input selection, drag & drop, paste or add API call).
             // If the singleFileUploads option is enabled, this callback will be
-            // called once for each file in the selection for XHR file uploads, else
+            // called once for each file in the selection for XHR file uplaods, else
             // once for each file selection.
-            //
             // The upload starts when the submit method is invoked on the data parameter.
             // The data object contains a files property holding the added files
-            // and allows you to override plugin options as well as define ajax settings.
-            //
+            // and allows to override plugin options as well as define ajax settings.
             // Listeners for this callback can also be bound the following way:
             // .bind('fileuploadadd', func);
-            //
             // data.submit() returns a Promise object and allows to attach additional
             // handlers using jQuery's Deferred callbacks:
@@ -252,9 +233,4 @@
             'forceIframeTransport'
         ],
-
-        _blobSlice: $.support.blobSlice && function () {
-            var slice = this.slice || this.webkitSlice || this.mozSlice;
-            return slice.apply(this, arguments);
-        },
 
         _BitrateTimer: function () {
@@ -404,9 +380,7 @@
                 options.headers['Content-Range'] = options.contentRange;
             }
-            if (!multipart || options.blob || !this._isInstanceOf('File', file)) {
+            if (!multipart) {
                 options.headers['Content-Disposition'] = 'attachment; filename="' +
                     encodeURI(file.name) + '"';
-            }
-            if (!multipart) {
                 options.contentType = file.type;
                 options.data = options.blob || file;
@@ -441,4 +415,6 @@
                     }
                     if (options.blob) {
+                        options.headers['Content-Disposition'] = 'attachment; filename="' +
+                            encodeURI(file.name) + '"';
                         formData.append(paramName, options.blob, file.name);
                     } else {
@@ -464,5 +440,4 @@
 
         _initIframeSettings: function (options) {
-            var targetHost = $('<a></a>').prop('href', options.url).prop('host');
             // Setting the dataType to iframe enables the iframe transport:
             options.dataType = 'iframe ' + (options.dataType || '');
@@ -470,5 +445,6 @@
             options.formData = this._getFormData(options);
             // Add redirect url to form data on cross-domain uploads:
-            if (options.redirect && targetHost && targetHost !== location.host) {
+            if (options.redirect && $('<a></a>').prop('href', options.url)
+                    .prop('host') !== location.host) {
                 options.formData.push({
                     name: options.redirectParamName || 'redirect',
@@ -652,11 +628,10 @@
         // upload requests:
         _chunkedUpload: function (options, testOnly) {
-            options.uploadedBytes = options.uploadedBytes || 0;
             var that = this,
                 file = options.files[0],
                 fs = file.size,
-                ub = options.uploadedBytes,
+                ub = options.uploadedBytes = options.uploadedBytes || 0,
                 mcs = options.maxChunkSize || fs,
-                slice = this._blobSlice,
+                slice = file.slice || file.webkitSlice || file.mozSlice,
                 dfd = $.Deferred(),
                 promise = dfd.promise(),
@@ -876,6 +851,5 @@
                     pipe = slot.pipe(send);
                 } else {
-                    this._sequence = this._sequence.pipe(send, send);
-                    pipe = this._sequence;
+                    pipe = (this._sequence = this._sequence.pipe(send, send));
                 }
                 // Return the piped Promise object, enhanced with an abort method,
@@ -1127,7 +1101,7 @@
 
         _onDrop: function (e) {
-            e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
             var that = this,
-                dataTransfer = e.dataTransfer,
+                dataTransfer = e.dataTransfer = e.originalEvent &&
+                    e.originalEvent.dataTransfer,
                 data = {};
             if (dataTransfer && dataTransfer.files && dataTransfer.files.length) {
@@ -1143,6 +1117,6 @@
 
         _onDragOver: function (e) {
-            e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
-            var dataTransfer = e.dataTransfer;
+            var dataTransfer = e.dataTransfer = e.originalEvent &&
+                e.originalEvent.dataTransfer;
             if (dataTransfer) {
                 if (this._trigger('dragover', e) === false) {
@@ -1166,9 +1140,7 @@
                 });
             }
-            if ($.support.fileInput) {
-                this._on(this.options.fileInput, {
-                    change: this._onChange
-                });
-            }
+            this._on(this.options.fileInput, {
+                change: this._onChange
+            });
         },
 
@@ -1304,8 +1276,4 @@
                                 return;
                             }
-                            if (!files.length) {
-                                dfd.reject();
-                                return;
-                            }
                             data.files = files;
                             jqXHR = that._onSend(null, data).then(
Index: admin/js/jsUpload/jquery.iframe-transport.js
===================================================================
--- admin/js/jsUpload/jquery.iframe-transport.js	(revision 1320)
+++ admin/js/jsUpload/jquery.iframe-transport.js	(revision 1144)
@@ -1,4 +1,4 @@
 /*
- * jQuery Iframe Transport Plugin 1.7
+ * jQuery Iframe Transport Plugin 1.6.2
  * https://github.com/blueimp/jQuery-File-Upload
  *
@@ -171,13 +171,5 @@
 
     // The iframe transport returns the iframe content document as response.
-    // The following adds converters from iframe to text, json, html, xml
-    // and script.
-    // Please note that the Content-Type for JSON responses has to be text/plain
-    // or text/html, if the browser doesn't include application/json in the
-    // Accept header, else IE will show a download dialog.
-    // The Content-Type for XML responses on the other hand has to be always
-    // application/xml or text/xml, so IE properly parses the XML response.
-    // See also
-    // https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation
+    // The following adds converters from iframe to text, json, html, and script:
     $.ajaxSetup({
         converters: {
@@ -191,10 +183,4 @@
                 return iframe && $(iframe[0].body).html();
             },
-            'iframe xml': function (iframe) {
-                var xmlDoc = iframe && iframe[0];
-                return xmlDoc && $.isXMLDoc(xmlDoc) ? xmlDoc :
-                        $.parseXML((xmlDoc.XMLDocument && xmlDoc.XMLDocument.xml) ||
-                            $(xmlDoc.body).html());
-            },
             'iframe script': function (iframe) {
                 return iframe && $.globalEval($(iframe[0].body).text());
Index: admin/js/jsUpload/template-download.js
===================================================================
--- admin/js/jsUpload/template-download.js	(revision 1461)
+++ 	(revision )
@@ -1,1 +1,0 @@
-var template_download = tmpl('{% for (var i=0, file; file=o.files[i]; i++) { %}<li class="template-download fade"><div class="upload-file"><div class="upload-fileinfo"><span class="upload-filename">{%=file.name%}</span><span class="upload-filesize">({%=o.formatFileSize(file.size)%})</span><span class="upload-filemsg{% if (file.error) { %} upload-error{% } %}">{% if (file.error) { %}'+dotclear.jsUpload.msg.error+' {%=file.error%}{% } else { %}'+dotclear.jsUpload.msg.file_successfully_uploaded+'{% } %}</span></div><div class="upload-progress">{% if (!file.error) { %}<div class="bar" style="width:100%;">100%</div>{% } %}</div></li>{% } %}');
Index: admin/js/jsUpload/template-upload.js
===================================================================
--- admin/js/jsUpload/template-upload.js	(revision 1461)
+++ 	(revision )
@@ -1,1 +1,0 @@
-var template_upload = tmpl('{% for (var i=0, file; file=o.files[i]; i++) { %}<li class="template-upload fade"><div class="upload-file"><div class="upload-fileinfo"><span class="upload-filename">{%=file.name%}</span><span class="upload-filesize">({%=o.formatFileSize(file.size)%})</span><span class="upload-filecancel cancel">'+dotclear.jsUpload.msg.cancel+'</span>{% if (!o.files.error && !i && !o.options.autoUpload) { %}<input type="submit" class="button start"  value="'+dotclear.jsUpload.msg.send+'"/>{% } %}<span class="upload-filemsg"></span></div>{% if (!o.files.error) { %}<div class="upload-progress progress progress-success progress-striped active"><div class="bar" style="width:0%;"></div></div>{% } %}</li>{% } %}');
Index: admin/js/prelude.js
===================================================================
--- admin/js/prelude.js	(revision 1446)
+++ admin/js/prelude.js	(revision 447)
@@ -6,6 +6,5 @@
 			aElts[i].className="hidden";
 			aElts[i].onfocus=function() {
-				$('#prelude a').removeClass('hidden');
-				$('#main-menu').css('padding-top', '4.5em');
+				this.className="";
 			}
 		}
@@ -20,7 +19,2 @@
 }
 addLoadEvent(aFocus);
-
-// init
-$(function() {
-	$('#main-menu').css('padding-top', '.5em');
-});
Index: admin/langs.php
===================================================================
--- admin/langs.php	(revision 1399)
+++ admin/langs.php	(revision 1179)
@@ -129,11 +129,9 @@
 -------------------------------------------------------- */
 dcPage::open(__('Languages management'),
-	dcPage::jsLoad('js/_langs.js'),
-	dcPage::breadcrumb(
-	array(
-		__('System') => '',
-		'<span class="page-title">'.__('Languages management').'</span>' => ''
-	))
+	dcPage::jsLoad('js/_langs.js')
 );
+
+echo
+'<h2 class="page-title">'.__('Languages management').'</h2>';
 
 if (!empty($_GET['removed'])) {
@@ -227,11 +225,11 @@
 	'<p>'.sprintf(__('You can download and install a additional language directly from Dotclear.net. '.
 	'Proposed languages are based on your version: %s.'),'<strong>'.DC_VERSION.'</strong>').'</p>'.
-	'<p class="field"><label for="pkg_url" class="classic">'.__('Language:').'</label> '.
-	form::combo(array('pkg_url'),$dc_langs_combo).'</p>'.
-	'<p class="field"><label for="your_pwd1" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Your password:').'</label> '.
-	form::password(array('your_pwd','your_pwd1'),20,255).'</p>'.
-	'<p><input type="submit" value="'.__('Install language').'" />'.
+	'<p class="field"><label for="pkg_url" class="classic">'.__('Language:').' '.
+	form::combo(array('pkg_url'),$dc_langs_combo).'</label></p>'.
+	'<p class="field"><label for="your_pwd1" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Your password:').' '.
+	form::password(array('your_pwd','your_pwd1'),20,255).'</label></p>'.
+	'<input type="submit" value="'.__('Install language').'" />'.
 	$core->formNonce().
-	'</p></fieldset>'.
+	'</fieldset>'.
 	'</form>';
 }
@@ -245,11 +243,11 @@
 	'<legend>'.__('Upload a zip file').'</legend>'.
 	'<p>'.__('You can install languages by uploading zip files.').'</p>'.
-	'<p class="field"><label for="pkg_file" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Language zip file:').'</label> '.
-	'<input type="file" id="pkg_file" name="pkg_file" /></p>'.
-	'<p class="field"><label for="your_pwd2" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Your password:').'</label> '.
-	form::password(array('your_pwd','your_pwd2'),20,255).'</p>'.
-	'<p><input type="submit" name="upload_pkg" value="'.__('Upload language').'" />'.
+	'<p class="field"><label for="pkg_file" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Language zip file:').' '.
+	'<input type="file" id="pkg_file" name="pkg_file" /></label></p>'.
+	'<p class="field"><label for="your_pwd2" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Your password:').' '.
+	form::password(array('your_pwd','your_pwd2'),20,255).'</label></p>'.
+	'<input type="submit" name="upload_pkg" value="'.__('Upload language').'" />'.
 	$core->formNonce().
-	'</p></fieldset>'.
+	'</fieldset>'.
 	'</form>';
 }
Index: admin/media.php
===================================================================
--- admin/media.php	(revision 1455)
+++ admin/media.php	(revision 1234)
@@ -203,12 +203,7 @@
 if ($dir && !empty($_GET['remove']) && empty($_GET['noconfirm']))
 {
-	call_user_func($open_f,__('Media manager'),'',
-		dcPage::breadcrumb(
-			array(
-				html::escapeHTML($core->blog->name) => '',
-				__('Media manager') => '',
-				'<span class="page-title">'.__('confirm removal').'</span>' => ''
-			),!$popup)
-	);
+	call_user_func($open_f,__('Media manager'));
+	
+	echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.__('Media manager').' &rsaquo; <span class="page-title">'.__('confirm removal').'</span></h2>';
 	
 	echo
@@ -232,33 +227,7 @@
 $user_ui_enhanceduploader = $core->auth->user_prefs->interface->enhanceduploader;
 
-
-if (!isset($core->media)) {
-	$breadcrumb = dcPage::breadcrumb(
-		array(
-			html::escapeHTML($core->blog->name) => '',
-			'<span class="page-title">'.__('Media manager').'</span>' => ''
-		),!$popup);
-} else {
-	$breadcrumb_media = $core->media->breadCrumb(html::escapeURL($page_url).'&amp;d=%s','<span class="page-title">%s</span>');
-	if ($breadcrumb_media == '') {
-		$breadcrumb = dcPage::breadcrumb(
-			array(
-				html::escapeHTML($core->blog->name) => '',
-				'<span class="page-title">'.__('Media manager').'</span>' => ''
-			),!$popup);
-	} else {
-		$breadcrumb = dcPage::breadcrumb(
-			array(
-				html::escapeHTML($core->blog->name) => '',
-				__('Media manager') => html::escapeURL($page_url.'&d='),
-				$breadcrumb_media => ''
-			),!$popup);
-	}
-}
-
 call_user_func($open_f,__('Media manager'),
 	dcPage::jsLoad('js/_media.js').
-	($core_media_writable ? dcPage::jsUpload(array('d='.$d)) : ''),
-	$breadcrumb
+	($core_media_writable ? dcPage::jsUpload(array('d='.$d)) : '')
 	);
 
@@ -285,4 +254,16 @@
 if (!empty($_GET['unzipok'])) {
 	dcPage::message(__('Zip file has been successfully extracted.'));
+}
+
+echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; ';
+if (!isset($core->media)) {
+	echo '<span class="page-title">'.__('Media manager').'</span></h2>';
+} else {
+	$breadcrumb = $core->media->breadCrumb(html::escapeURL($page_url).'&amp;d=%s','<span class="page-title">%s</span>');
+	if ($breadcrumb == '') {
+		echo '<span class="page-title">'.__('Media manager').'</span></h2>';
+	} else {
+		echo '<a href="'.html::escapeURL($page_url.'&d=').'">'.__('Media manager').'</a>'.' / '.$breadcrumb.'</h2>';
+	}
 }
 
@@ -317,6 +298,6 @@
 	echo
 	'<form action="media.php" method="get">'.
-	'<p><label for="file_sort" class="classic">'.__('Sort files:').'</label> '.
-	form::combo('file_sort',$sort_combo,$file_sort).
+	'<p><label for="file_sort" class="classic">'.__('Sort files:').' '.
+	form::combo('file_sort',$sort_combo,$file_sort).'</label>'.
 	form::hidden(array('popup'),$popup).
 	form::hidden(array('post_id'),$post_id).
@@ -324,5 +305,5 @@
 	'</form>'.
 	
-	'<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+	'<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
 	
 	for ($i=$pager->index_start, $j=0; $i<=$pager->index_end; $i++, $j++)
@@ -332,5 +313,5 @@
 	
 	echo
-	'<p class="clear pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+	'<p class="clear">'.__('Page(s)').' : '.$pager->getLinks().'</p>';
 }
 if (!isset($pager)) {
@@ -354,11 +335,10 @@
 
 	echo
-	'<div class="fieldset">'.
-	'<h3>'.__('Add files').'</h3>'.
+	'<form id="fileupload" action="'.html::escapeURL($page_url).'" method="POST" enctype="multipart/form-data">'.
+	'<fieldset id="add-file-f"><legend>'.__('Add files').'</legend>'.
 	'<p>'.__('Please take care to publish media that you own and that are not protected by copyright.').'</p>'.
-	' <form id="fileupload" action="'.html::escapeURL($page_url).'" method="post" enctype="multipart/form-data" aria-disabled="false">'.
-	'<p>'.form::hidden(array('MAX_FILE_SIZE'),DC_MAX_UPLOAD_SIZE).
-	$core->formNonce().'</p>'.
-	'<div class="fileupload-ctrl"><p class="queue-message"></p><ul class="files"></ul></div>';
+	form::hidden(array('MAX_FILE_SIZE'),DC_MAX_UPLOAD_SIZE).
+	$core->formNonce().
+	'<div class="fileupload-ctrl"><div class="files"></div></div>';
 
 	echo
@@ -367,12 +347,12 @@
 	echo
 	'<p class="max-sier form-note info">&nbsp;'.__('Maximum file size allowed:').' '.files::size(DC_MAX_UPLOAD_SIZE).'</p>'.
-	'<p><label for="upfile">'.'<span class="add-label one-file">'.__('Choose file').'</span>'.'</label>'.
+	'<label for="upfile">'.'<span class="add-label one-file">'.__('Choose file').'</span>'.'</label>'.
 	'<button class="button add">'.__('Choose files').'</button>'.
-	'<input type="file" id="upfile" name="upfile[]"'.($user_ui_enhanceduploader?' multiple="mutiple"':'').' data-url="'.html::escapeURL($page_url).'" /></p>';
-
-	echo
-	'<p class="one-file"><label for="upfiletitle">'.__('Title:').'</label>'.form::field(array('upfiletitle','upfiletitle'),35,255).'</p>'.
-	'<p class="one-file"><label for="upfilepriv" class="classic">'.__('Private').'</label> '.
-	form::checkbox(array('upfilepriv','upfilepriv'),1).'</p>';
+	'<input type="file" id="upfile" name="upfile[]"'.($user_ui_enhanceduploader?' multiple="mutiple"':'').' data-url="'.html::escapeURL($page_url).'" />';
+
+	echo
+	'<p class="one-file"><label for="upfiletitle">'.__('Title:').form::field(array('upfiletitle','upfiletitle'),35,255).'</label></p>'.
+	'<p class="one-file"><label for="upfilepriv" class="classic">'.form::checkbox(array('upfilepriv','upfilepriv'),1).' '.
+	__('Private').'</label></p>';
 
 	if (!$user_ui_enhanceduploader) {
@@ -383,14 +363,15 @@
 
 	echo
-	'<p><button class="button clean">'.__('Refresh').'</button>'.
+	'<button class="button clean">'.__('Refresh').'</button>'.
 	'<input class="button cancel one-file" type="reset" value="'.__('Clear all').'"/>'.
-	'<input class="button start" type="submit" value="'.__('Upload').'"/></p>'.
+	'<input class="button start" type="submit" value="'.__('Upload').'"/>'.
 	'</div>';
 
 	echo
-	'<p>'.form::hidden(array('d'),$d).'</p>'.
+	form::hidden(array('d'),$d).
+	'</fieldset>'.
 	'</form>'.
-	'</div></div>';
-
+	'</div>';
+	
 	echo
 	'<div class="col">'.
@@ -399,6 +380,6 @@
 	'<legend>'.__('New directory').'</legend>'.
 	$core->formNonce().
-	'<p><label for="newdir">'.__('Directory Name:').'</label>'.
-	form::field(array('newdir','newdir'),35,255).'</p>'.
+	'<p><label for="newdir">'.__('Directory Name:').
+	form::field(array('newdir','newdir'),35,255).'</label></p>'.
 	'<p><input type="submit" value="'.__('Create').'" />'.
 	form::hidden(array('d'),html::escapeHTML($d)).'</p>'.
@@ -447,7 +428,9 @@
 	$class = 'media-item media-col-'.($i%2);
 	
+	$alt = (!$f->d ? sprintf(__('Media details of %s'),$fname) : 
+		sprintf(__('Go to %s folder'),($fname == '..' ? __('parent') : $fname)));
 	$res =
 	'<div class="'.$class.'"><a class="media-icon media-link" href="'.$link.'">'.
-	'<img src="'.$f->media_icon.'" alt="" /></a>'.
+	'<img src="'.$f->media_icon.'" alt="'.$alt.'" /></a>'.
 	'<ul>'.
 	'<li><a class="media-link" href="'.$link.'">'.$fname.'</a></li>';
Index: admin/media_item.php
===================================================================
--- admin/media_item.php	(revision 1454)
+++ admin/media_item.php	(revision 1179)
@@ -175,11 +175,5 @@
 	$starting_scripts.
 	dcPage::jsDatePicker().
-	dcPage::jsPageTabs($tab),
-	dcPage::breadcrumb(
-		array(
-			html::escapeHTML($core->blog->name) => '',
-			__('Media manager') => html::escapeURL($media_page_url),
-			$core->media->breadCrumb(html::escapeURL($media_page_url).'&amp;d=%s').'<span class="page-title">'.$file->basename.'</span>' => ''
-		),!$popup)
+	dcPage::jsPageTabs($tab)
 );
 
@@ -195,4 +189,8 @@
 	dcPage::message(__('Thumbnails have been successfully updated.'));
 }
+
+echo '<h2><a href="'.html::escapeURL($media_page_url).'">'.__('Media manager').'</a>'.
+' / '.$core->media->breadCrumb(html::escapeURL($media_page_url).'&amp;d=%s').
+'<span class="page-title">'.$file->basename.'</span></h2>';
 
 # Insertion popup
@@ -348,6 +346,5 @@
 
 echo
-'<div id="media-details">'.
-'<div class="near-icon">';
+'<div id="media-details">';
 
 if ($file->media_image)
@@ -358,4 +355,14 @@
 		$thumb_size = 's';
 	}
+	
+	echo '<p>'.__('Available sizes:').' ';
+	foreach (array_reverse($file->media_thumb) as $s => $v)
+	{
+		$strong_link = ($s == $thumb_size) ? '<strong>%s</strong>' : '%s';
+		printf($strong_link,'<a href="'.html::escapeURL($page_url).
+		'&amp;id='.$id.'&amp;size='.$s.'&amp;tab=media-details-tab">'.$core->media->thumb_sizes[$s][2].'</a> | ');
+	}
+	echo '<a href="'.html::escapeURL($page_url).'&amp;id='.$id.'&amp;size=o&amp;tab=media-details-tab">'.__('original').'</a>';
+	echo '</p>';
 	
 	if (isset($file->media_thumb[$thumb_size])) {
@@ -367,14 +374,4 @@
 		echo '<p id="media-original-image"'.$class.'><img src="'.$file->file_url.'?'.time()*rand().'" alt="" /></p>';
 	}
-	
-	echo '<p>'.__('Available sizes:').' ';
-	foreach (array_reverse($file->media_thumb) as $s => $v)
-	{
-		$strong_link = ($s == $thumb_size) ? '<strong>%s</strong>' : '%s';
-		printf($strong_link,'<a href="'.html::escapeURL($page_url).
-		'&amp;id='.$id.'&amp;size='.$s.'&amp;tab=media-details-tab">'.$core->media->thumb_sizes[$s][2].'</a> | ');
-	}
-	echo '<a href="'.html::escapeURL($page_url).'&amp;id='.$id.'&amp;size=o&amp;tab=media-details-tab">'.__('original').'</a>';
-	echo '</p>';
 }
 
@@ -401,5 +398,5 @@
 {
 	echo
-	'<p><strong><a class="button" href="'.html::escapeHTML($page_url).'&amp;id='.$id.'&amp;find_posts=1&amp;tab=media-details-tab">'.
+	'<p><strong><a href="'.html::escapeHTML($page_url).'&amp;id='.$id.'&amp;find_posts=1&amp;tab=media-details-tab">'.
 	__('Show entries containing this media').'</a></strong></p>';
 }
@@ -487,6 +484,4 @@
 }
 
-echo '</div>';
-
 if ($file->editable && $core_media_writable)
 {
@@ -519,6 +514,6 @@
 		__('This will extract archive in current directory and will overwrite existing files or directory.').'</li>'.
 		'</ul>'.
-		'<p><label for="inflate_mode" class="classic">'.__('Extract mode:').'</label> '.
-		form::combo('inflate_mode',$inflate_combo,'new').
+		'<p><label for="inflate_mode" class="classic">'.__('Extract mode:').' '.
+		form::combo('inflate_mode',$inflate_combo,'new').'</label> '.
 		'<input type="submit" name="unzip" value="'.__('Extract').'" />'.
 		form::hidden(array('id'),$id).
@@ -530,14 +525,14 @@
 	'<form class="clear" action="'.html::escapeURL($page_url).'" method="post">'.
 	'<fieldset><legend>'.__('Change media properties').'</legend>'.
-	'<p><label for="media_file">'.__('File name:').'</label>'.
-	form::field('media_file',30,255,html::escapeHTML($file->basename)).'</p>'.
-	'<p><label for="media_title">'.__('File title:').'</label>'.
-	form::field('media_title',30,255,html::escapeHTML($file->media_title)).'</p>'.
-	'<p><label for="media_dt">'.__('File date:').'</label>'.
-	form::field('media_dt',16,16,html::escapeHTML($file->media_dtstr)).'</p>'.
+	'<p><label for="media_file">'.__('File name:').
+	form::field('media_file',30,255,html::escapeHTML($file->basename)).'</label></p>'.
+	'<p><label for="media_title">'.__('File title:').
+	form::field('media_title',30,255,html::escapeHTML($file->media_title)).'</label></p>'.
+	'<p><label for="media_dt">'.__('File date:').
+	form::field('media_dt',16,16,html::escapeHTML($file->media_dtstr)).'</label></p>'.
 	'<p><label for="media_private" class="classic">'.form::checkbox('media_private',1,$file->media_priv).' '.
 	__('Private').'</label></p>'.
-	'<p><label for="media_path">'.__('New directory:').'</label>'.
-	form::combo('media_path',$dirs_combo,dirname($file->relname)).'</p>'.
+	'<p><label for="media_path">'.__('New directory:').
+	form::combo('media_path',$dirs_combo,dirname($file->relname)).'</label></p>'.
 	'<p><input type="submit" accesskey="s" value="'.__('Save').'" />'.
 	form::hidden(array('id'),$id).
Index: admin/plugin.php
===================================================================
--- admin/plugin.php	(revision 1490)
+++ admin/plugin.php	(revision 1179)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -15,82 +15,77 @@
 dcPage::check('usage,contentadmin');
 
-$has_content = false;
 $p_file = '';
 $p = !empty($_REQUEST['p']) ? $_REQUEST['p'] : null;
-$popup = $_ctx->popup = (integer) !empty($_REQUEST['popup']);
+$popup = (integer) !empty($_REQUEST['popup']);
+
+if ($popup) {
+	$open_f = array('dcPage','openPopup');
+	$close_f = array('dcPage','closePopup');
+} else {
+	$open_f = array('dcPage','open');
+	$close_f = array('dcPage','close');
+}
 
 if ($core->plugins->moduleExists($p)) {
 	$p_file = $core->plugins->moduleRoot($p).'/index.php';
 }
-if (file_exists($p_file)) {
 
-//* Keep this for old style plugins using dcPage
-	if ($popup) {
-		$open_f = array('dcPage','openPopup');
-		$close_f = array('dcPage','closePopup');
-	} else {
-		$open_f = array('dcPage','open');
-		$close_f = array('dcPage','close');
-	}
+if (file_exists($p_file))
+{
+	# Loading plugin
+	$p_info = $core->plugins->getModules($p);
 	
-	$p_info = $core->plugins->getModules($p);
 	$p_url = 'plugin.php?p='.$p;
-	$p_title = $p_head = $p_content = '';
-//*/	
-	# Get page content
+	
+	$p_title = 'no content - plugin';
+	$p_head = '';
+	$p_content = '<p>'.__('No content found on this plugin.').'</p>';
+	
 	ob_start();
 	include $p_file;
 	$res = ob_get_contents();
 	ob_end_clean();
-
-	# Check context and display
-	if ($_ctx->hasPageTitle() && !empty($res)) {
-		$has_content = true;
-		echo $res;
-	}
-//* Keep this for old style plugins using dcPage
-	elseif (!$_ctx->hasPageTitle()) {
+	
+	if (preg_match('|<head>(.*?)</head|ms',$res,$m)) {
+		if (preg_match('|<title>(.*?)</title>|ms',$m[1],$mt)) {
+			$p_title = $mt[1];
+		}
 		
-		if (preg_match('|<head>(.*?)</head|ms',$res,$m)) {
-			if (preg_match('|<title>(.*?)</title>|ms',$m[1],$mt)) {
-				$p_title = $mt[1];
-			}
-			
-			if (preg_match_all('|(<script.*?>.*?</script>)|ms',$m[1],$ms)) {
-				foreach ($ms[1] as $v) {
-					$p_head .= $v."\n";
-				}
-			}
-			
-			if (preg_match_all('|(<style.*?>.*?</style>)|ms',$m[1],$ms)) {
-				foreach ($ms[1] as $v) {
-					$p_head .= $v."\n";
-				}
-			}
-			
-			if (preg_match_all('|(<link.*?/>)|ms',$m[1],$ms)) {
-				foreach ($ms[1] as $v) {
-					$p_head .= $v."\n";
-				}
+		if (preg_match_all('|(<script.*?>.*?</script>)|ms',$m[1],$ms)) {
+			foreach ($ms[1] as $v) {
+				$p_head .= $v."\n";
 			}
 		}
 		
-		if (preg_match('|<body.*?>(.+)</body>|ms',$res,$m)) {
-			$p_content = $m[1];
-			
-			call_user_func($open_f,$p_title,$p_head);
-			echo $p_content;
-			call_user_func($close_f);
-			
-			$has_content = true;
+		if (preg_match_all('|(<style.*?>.*?</style>)|ms',$m[1],$ms)) {
+			foreach ($ms[1] as $v) {
+				$p_head .= $v."\n";
+			}
+		}
+		
+		if (preg_match_all('|(<link.*?/>)|ms',$m[1],$ms)) {
+			foreach ($ms[1] as $v) {
+				$p_head .= $v."\n";
+			}
 		}
 	}
-//*/
+	
+	if (preg_match('|<body.*?>(.+)</body>|ms',$res,$m)) {
+		$p_content = $m[1];
+	}
+	
+	call_user_func($open_f,$p_title,$p_head);
+	echo $p_content;
+	call_user_func($close_f);
 }
-# No plugin or content found
-if (!$has_content) {
-	$_ctx->setBreadcrumb(__('Plugin not found'));
-	$_ctx->addError(__('The plugin you reached does not exist or does not have an admin page.'));
-	$core->tpl->display('plugin.html.twig');
+else
+{
+	call_user_func($open_f,__('Plugin not found'));
+	
+	echo '<h2 class="page-title">'.__('Plugin not found').'</h2>';
+	
+	echo '<p>'.__('The plugin you reached does not exist or does not have an admin page.').'</p>';
+	
+	call_user_func($close_f);
 }
 ?>
Index: admin/plugins.php
===================================================================
--- admin/plugins.php	(revision 1474)
+++ admin/plugins.php	(revision 1271)
@@ -191,11 +191,9 @@
 dcPage::open(__('Plugins management'),
 	dcPage::jsLoad('js/_plugins.js').
-	dcPage::jsPageTabs($default_tab),
-	dcPage::breadcrumb(
-		array(
-			__('System') => '',
-			'<span class="page-title">'.__('Plugins management').'</span>' => ''
-		))
+	dcPage::jsPageTabs($default_tab)
 );
+
+echo
+'<h2 class="page-title">'.__('Plugins management').'</h2>';
 
 if (!empty($_GET['removed'])) {
@@ -235,9 +233,10 @@
 		'<a href="plugin.php?p=daInstaller">'.__('DotAddict.org Installer').'</a>'));
 
+echo '<p>';
 if ($is_writable) {
-	echo '<p>'.__('To install or upgrade a plugin you generally just need to upload it '.
+	echo __('To install or upgrade a plugin you generally just need to upload it '.
 	'in "Install or upgrade a plugin" section.');
 } else {
-	echo '<p>'.__('To install or upgrade a plugin you just need to extract it in your plugins directory.');
+	echo __('To install or upgrade a plugin you just need to extract it in your plugins directory.');
 }
 echo '</p>';
@@ -357,11 +356,11 @@
 	'<fieldset>'.
 	'<legend>'.__('Upload a zip file').'</legend>'.
-	'<p class="field"><label for="pkg_file" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Plugin zip file:').'</label> '.
-	'<input type="file" id="pkg_file" name="pkg_file" /></p>'.
-	'<p class="field"><label for="your_pwd1" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Your password:').'</label> '.
-	form::password(array('your_pwd','your_pwd1'),20,255).'</p>'.
-	'<p><input type="submit" name="upload_pkg" value="'.__('Upload plugin').'" />'.
+	'<p class="field"><label for="pkg_file" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Plugin zip file:').' '.
+	'<input type="file" id="pkg_file" name="pkg_file" /></label></p>'.
+	'<p class="field"><label for="your_pwd1" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Your password:').' '.
+	form::password(array('your_pwd','your_pwd1'),20,255).'</label></p>'.
+	'<input type="submit" name="upload_pkg" value="'.__('Upload plugin').'" />'.
 	$core->formNonce().
-	'</p></fieldset>'.
+	'</fieldset>'.
 	'</form>';
 	
@@ -371,8 +370,8 @@
 	'<fieldset>'.
 	'<legend>'.__('Download a zip file').'</legend>'.
-	'<p class="field"><label for="pkg_url" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Plugin zip file URL:').'</label> '.
-	form::field(array('pkg_url','pkg_url'),40,255).'</p>'.
-	'<p class="field"><label for="your_pwd2" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Your password:').'</label> '.
-	form::password(array('your_pwd','your_pwd2'),20,255).'</p>'.
+	'<p class="field"><label for="pkg_url" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Plugin zip file URL:').' '.
+	form::field(array('pkg_url','pkg_url'),40,255).'</label></p>'.
+	'<p class="field"><label for="your_pwd2" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Your password:').' '.
+	form::password(array('your_pwd','your_pwd2'),20,255).'</label></p>'.
 	'<input type="submit" name="fetch_pkg" value="'.__('Download plugin').'" />'.
 	$core->formNonce().
@@ -389,4 +388,9 @@
 echo '</div>';
 
+if ($core->plugins->moduleExists('daInstaller')) {
+	echo '<p><a href="plugin.php?p=daInstaller" class="multi-part">'.__('DotAddict.org Installer').'</a></p>';
+}
+
+
 # --BEHAVIOR-- pluginsToolsTabs
 $core->callBehavior('pluginsToolsTabs',$core);
Index: admin/popup_link.php
===================================================================
--- admin/popup_link.php	(revision 1399)
+++ admin/popup_link.php	(revision 1179)
@@ -40,11 +40,11 @@
 echo
 '<form id="link-insert-form" action="#" method="get">'.
-'<p><label class="required" for="href"><abbr title="'.__('Required field').'">*</abbr> '.__('Link URL:').'</label> '.
-form::field('href',35,512,html::escapeHTML($href)).'</p>'.
-'<p><label for="title">'.__('Link title:').'</label> '. 
-form::field('title',35,512,html::escapeHTML($title)).'</p>'. 
-'<p><label for="hreflang">'.__('Link language:').'</label> '.
+'<p><label class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Link URL:').' '.
+form::field('href',35,512,html::escapeHTML($href)).'</label></p>'.
+'<p><label>'.__('Link title:').' '. 
+form::field('title',35,512,html::escapeHTML($title)).'</label></p>'. 
+'<p><label>'.__('Link language:').' '.
 form::combo('hreflang',$lang_combo,$hreflang).
-'</p>'.
+'</label></p>'.
 
 '</form>'.
Index: admin/popup_posts.php
===================================================================
--- admin/popup_posts.php	(revision 1399)
+++ admin/popup_posts.php	(revision 1179)
@@ -53,14 +53,14 @@
 
 echo '<form action="popup_posts.php" method="post">'.
-	'<p><label for"type" class="classic">'.__('Entry type:').'</label> '.form::combo('type',$type_combo,$type).''.
-	$core->formNonce().'</p>'.
+	'<p><label for"type" class="classic">'.__('Entry type:').' '.form::combo('type',$type_combo,$type).'</label></p>'.
+	$core->formNonce().
 	'<noscript><div><input type="submit" value="'.__('Ok').'" /></div></noscript>'.
 	'</form>';
 
 echo '<form action="popup_posts.php" method="get">'.
-	'<p><label for="q" class="classic">'.__('Search entry:').'</label> '.form::field('q',30,255,html::escapeHTML($q)).
-	' <input type="submit" value="'.__('Search').'" />'.
+	'<p><label for="q" class="classic">'.__('Search entry:').' '.form::field('q',30,255,html::escapeHTML($q)).'</label> '.
+	' <input type="submit" value="'.__('Search').'" /></p>'.
 	form::hidden('type',html::escapeHTML($type)).
-	'</p></form>';
+	'</form>';
 
 try {
Index: admin/post.php
===================================================================
--- admin/post.php	(revision 1492)
+++ admin/post.php	(revision 1488)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -15,102 +15,24 @@
 dcPage::check('usage,contentadmin');
 
-class PostActions 
-{
-	public static function savePost($form) {
-		global $_ctx, $core;
-		try {
-			$form->check($_ctx);
-			$_ctx->setAlert('save');
-			$form->cat_id = (integer) $form->cat_id;
-	
-			if (!empty($form->post_dt)) {
-				try
-				{
-					$post_dt = strtotime($form->post_dt);
-					if ($post_dt == false || $post_dt == -1) {
-						$bad_dt = true;
-						throw new Exception(__('Invalid publication date'));
-					}
-					$form->post_dt = date('Y-m-d H:i',$post_dt);
-				}
-				catch (Exception $e)
-				{
-					$core->error->add($e->getMessage());
-				}
-			}
-			$post_excerpt = $form->post_excerpt;
-			$post_content = $form->post_content;
-			$post_excerpt_xhtml = '';
-			$post_content_xhtml = '';
-			$core->blog->setPostContent(
-				$form->id,$form->post_format,$form->post_lang,
-				$post_excerpt,$post_excerpt_xhtml,$post_content,$post_content_xhtml
-			);
-			$form->post_excerpt = $post_excerpt;
-			$form->post_content = $post_content;
-			$form->post_excerpt_xhtml = $post_excerpt_xhtml;
-			$form->post_content_xhtml = $post_content_xhtml;
-			
-			$cur = $core->con->openCursor($core->prefix.'post');
-	
-			$cur->post_title = $form->post_title;
-			$cur->cat_id = $form->cat_id ? $form->cat_id : null;
-			$cur->post_dt = $form->post_dt ? date('Y-m-d H:i:00',strtotime($form->post_dt)) : '';
-			$cur->post_format = $form->post_format;
-			$cur->post_password = $form->post_password;
-			$cur->post_lang = $form->post_lang;
-			$cur->post_title = $form->post_title;
-			$cur->post_excerpt = $form->post_excerpt;
-			$cur->post_excerpt_xhtml = $form->post_excerpt_xhtml;
-			$cur->post_content = $form->post_content;
-			$cur->post_content_xhtml = $form->post_content_xhtml;
-			$cur->post_notes = $form->post_notes;
-			$cur->post_status = $form->post_status;
-			$cur->post_selected = (integer) $form->post_selected;
-			$cur->post_open_comment = (integer) $form->post_open_comment;
-			$cur->post_open_tb = (integer) $form->post_open_tb;
-	
-			if (!empty($form->post_url)) {
-				$cur->post_url = $form->post_url;
-			}
-	
-			# Update post
-			if ($form->id)
-			{
-				# --BEHAVIOR-- adminBeforePostUpdate
-				$core->callBehavior('adminBeforePostUpdate',$cur,$form->id);
-				
-				$core->blog->updPost($form->id,$cur);
-				
-				# --BEHAVIOR-- adminAfterPostUpdate
-				$core->callBehavior('adminAfterPostUpdate',$cur,$form->id);
-				
-				http::redirect('post.php?id='.$form->id.'&upd=1');
-			}
-			else
-			{
-				$cur->user_id = $core->auth->userID();
-								# --BEHAVIOR-- adminBeforePostCreate
-				$core->callBehavior('adminBeforePostCreate',$cur);
-				
-				$return_id = $core->blog->addPost($cur);
-				
-				# --BEHAVIOR-- adminAfterPostCreate
-				$core->callBehavior('adminAfterPostCreate',$cur,$return_id);
-				
-				http::redirect('post.php?id='.$return_id.'&crea=1');
-			}
-
-	} catch (Exception $e) {
-		$ctx->setError($e->getMessage());
-	}
-}
-	function deletePost($form) {
-		echo $form->id->getValue(); exit;
-	}
-}
+$post_id = '';
+$cat_id = '';
+$post_dt = '';
+$post_format = $core->auth->getOption('post_format');
+$post_password = '';
+$post_url = '';
+$post_lang = $core->auth->getInfo('user_lang');
+$post_title = '';
+$post_excerpt = '';
+$post_excerpt_xhtml = '';
+$post_content = '';
+$post_content_xhtml = '';
+$post_notes = '';
+$post_status = $core->auth->getInfo('user_post_status');
+$post_selected = false;
+$post_open_comment = $core->blog->settings->system->allow_comments;
+$post_open_tb = $core->blog->settings->system->allow_trackbacks;
 
 $page_title = __('New entry');
-$post_id='';
+
 $can_view_page = true;
 $can_edit_post = $core->auth->check('usage,contentadmin',$core->blog->id);
@@ -125,23 +47,12 @@
 # If user can't publish
 if (!$can_publish) {
-	$form->post_status = -2;
-}
-
-# Getting categories
-$categories_combo = array('&nbsp;' => '');
-try {
-	$categories = $core->blog->getCategories(array('post_type'=>'post'));
-	while ($categories->fetch()) {
-		$categories_combo[$categories->cat_id] = 
-			str_repeat('&nbsp;&nbsp;',$categories->level-1).
-			($categories->level-1 == 0 ? '' : '&bull; ').
-			html::escapeHTML($categories->cat_title);
-	}
-} catch (Exception $e) { }
+	$post_status = -2;
+}
 
 # Status combo
 foreach ($core->blog->getAllPostStatus() as $k => $v) {
-	$status_combo[$k] = $v;
-}
+	$status_combo[$v] = (string) $k;
+}
+$img_status_pattern = '<img class="img_select_option" alt="%1$s" title="%1$s" src="images/%2$s" />';
 
 # Formaters combo
@@ -153,11 +64,11 @@
 $rs = $core->blog->getLangs(array('order'=>'asc'));
 $all_langs = l10n::getISOcodes(0,1);
-$lang_combo = array('' => '', __('Most used') => array(), __('Available') => l10n::getISOcodes(0,1));
+$lang_combo = array('' => '', __('Most used') => array(), __('Available') => l10n::getISOcodes(1,1));
 while ($rs->fetch()) {
 	if (isset($all_langs[$rs->post_lang])) {
-		$lang_combo[__('Most used')][$rs->post_lang] = $all_langs[$rs->post_lang];
-		unset($lang_combo[__('Available')][$rs->post_lang]);
+		$lang_combo[__('Most used')][$all_langs[$rs->post_lang]] = $rs->post_lang;
+		unset($lang_combo[__('Available')][$all_langs[$rs->post_lang]]);
 	} else {
-		$lang_combo[__('Most used')][$rs->post_lang] = $all_langs[$rs->post_lang];
+		$lang_combo[__('Most used')][$rs->post_lang] = $rs->post_lang;
 	}
 }
@@ -165,73 +76,7 @@
 unset($rs);
 
-$form = new dcForm($core,'post','post.php');
-$form
-	->addField(
-		new dcFieldText('post_title','', array(
-			'maxlength'		=> 255,
-			'required'	=> true,
-			'label'		=> __('Title'))))
-	->addField(
-		new dcFieldTextArea('post_excerpt','', array(
-			'cols'		=> 50,
-			'rows'		=> 5,
-			'label'		=> __("Excerpt:"))))
-	->addField(
-		new dcFieldTextArea('post_content','', array(
-			'required'	=> true,
-			'label'		=> __("Content:"))))
-	->addField(
-		new dcFieldTextArea('post_notes','', array(
-			'label'		=> __("Notes"))))
-	->addField(
-		new dcFieldSubmit('save',__('Save'),array(
-			'action' => array('PostActions','savePost'))))
-	->addField(
-		new dcFieldSubmit('delete',__('Delete'),array(
-			'action' => 'deletePost')))
-	->addField(
-		new dcFieldCombo('post_status',$core->auth->getInfo('user_post_status'),$status_combo,array(
-			'disabled' => !$can_publish,
-			'label' => __('Entry status'))))
-	->addField(
-		new dcFieldCombo('cat_id','',$categories_combo,array(
-			"label" => __('Category'))))
-	->addField(
-		new dcFieldCombo('new_cat_parent','',$categories_combo,array(
-			"label" => __('Parent:'))))
-	->addField(
-		new dcFieldText('new_cat_title','', array(
-			'maxlength'		=> 255,
-			'label'		=> __('Title'))))
-		
-	->addField(
-		new dcFieldText('post_dt','',array(
-			"label" => __('Publication date and hour'))))
-	->addField(
-		new dcFieldCombo('post_format',$core->auth->getOption('post_format'),$formaters_combo,array(
-			"label" => __('Text formating'))))
-	->addField(
-		new dcFieldCheckbox ('post_open_comment',$core->blog->settings->system->allow_comments,array(
-			"label" => __('Accept comments'))))
-	->addField(
-		new dcFieldCheckbox ('post_open_tb',$core->blog->settings->system->allow_trackbacks,array(
-			"label" => __('Accept trackbacks'))))
-	->addField(
-		new dcFieldCheckbox ('post_selected',array(1=>false),array(
-			"label" => __('Selected entry'))))
-	->addField(
-		new dcFieldCombo ('post_lang',$core->auth->getInfo('user_lang'),$lang_combo, array(
-			"label" => __('Entry lang:'))))
-	->addField(
-		new dcFieldText('post_password','',array(
-			"maxlength" => 32,
-			"label" => __('Entry password:'))))
-	->addField(
-		new dcFieldText('post_url','',array(
-			"maxlength" => 255,
-			"label" => __('Basename:'))))
-	->addField(
-		new dcFieldHidden ('id',''))
-;
+# Validation flag
+$bad_dt = false;
+
 # Get entry informations
 if (!empty($_REQUEST['id']))
@@ -248,85 +93,214 @@
 	else
 	{
-		$form->id = $post_id = $post->post_id;
-		$form->cat_id = $post->cat_id;
-		$form->post_dt = date('Y-m-d H:i',strtotime($post->post_dt));
-		$form->post_format = $post->post_format;
-		$form->post_password = $post->post_password;
-		$form->post_url = $post->post_url;
-		$form->post_lang = $post->post_lang;
-		$form->post_title = $post->post_title;
-		$form->post_excerpt = $post->post_excerpt;
-		$form->post_excerpt_xhtml = $post->post_excerpt_xhtml;
-		$form->post_content = $post->post_content;
-		$form->post_content_xhtml = $post->post_content_xhtml;
-		$form->post_notes = $post->post_notes;
-		$form->post_status = $post->post_status;
-		$form->post_selected = (boolean) $post->post_selected;
-		$form->post_open_comment = (boolean) $post->post_open_comment;
-		$form->post_open_tb = (boolean) $post->post_open_tb;
-		$form->can_edit_post = $post->isEditable();
-		$form->can_delete= $post->isDeletable();
+		$post_id = $post->post_id;
+		$cat_id = $post->cat_id;
+		$post_dt = date('Y-m-d H:i',strtotime($post->post_dt));
+		$post_format = $post->post_format;
+		$post_password = $post->post_password;
+		$post_url = $post->post_url;
+		$post_lang = $post->post_lang;
+		$post_title = $post->post_title;
+		$post_excerpt = $post->post_excerpt;
+		$post_excerpt_xhtml = $post->post_excerpt_xhtml;
+		$post_content = $post->post_content;
+		$post_content_xhtml = $post->post_content_xhtml;
+		$post_notes = $post->post_notes;
+		$post_status = $post->post_status;
+		$post_selected = (boolean) $post->post_selected;
+		$post_open_comment = (boolean) $post->post_open_comment;
+		$post_open_tb = (boolean) $post->post_open_tb;
+		
 		$page_title = __('Edit entry');
-
-	}
-}
-if ($post_id) {
-	$_ctx->post_id = $post->post_id;
-
-	$_ctx->preview_url =
-		$core->blog->url.$core->url->getURLFor('preview',$core->auth->userID().'/'.
-		http::browserUID(DC_MASTER_KEY.$core->auth->userID().$core->auth->getInfo('user_pwd')).
-		'/'.$post->post_url);
-		
-	
-	$form_comment = new dcForm($core,'add-comment','post.php');
-	$form_comment
-		->addField(
-			new dcFieldText('comment_author','', array(
-				'maxlength'		=> 255,
-				'required'	=> true,
-				'label'		=> __('Name:'))))
-		->addField(
-			new dcFieldText('comment_email','', array(
-				'maxlength'		=> 255,
-				'required'	=> true,
-				'label'		=> __('Email:'))))
-		->addField(
-			new dcFieldText('comment_site','', array(
-				'maxlength'		=> 255,
-				'label'		=> __('Web site:'))))
-		->addField(
-			new dcFieldTextArea('comment_content','', array(
-				'required'	=> true,
-				'label'		=> __('Comment:'))))
-		->addField(
-			new dcFieldSubmit('add',__('Save'),array(
-				'action' => 'addComment')))
-		;
-
-	
-}
-
-$form->setup();
-
-$sidebar_blocks = new ArrayObject(array(
-	'status-box' => array(
-		'title' => __('Status'),
-		'items' => array('post_status','post_dt','post_lang','post_format')),
-	'metas-box' => array(
-		'title' => __('Ordering'),
-		'items' => array('post_selected','cat_id')),
-	'options-box' => array(
-		'title' => __('Options'),
-		'items' => array('post_open_comment','post_open_tb','post_password','post_url'))
-));
-
-$main_blocks = new ArrayObject(array(
-	"post_title","post_excerpt","post_content","post_notes"
-));
-
-
-$_ctx->sidebar_blocks = $sidebar_blocks;
-$_ctx->main_blocks = $main_blocks;
+		
+		$can_edit_post = $post->isEditable();
+		$can_delete= $post->isDeletable();
+		
+		$next_rs = $core->blog->getNextPost($post,1);
+		$prev_rs = $core->blog->getNextPost($post,-1);
+		
+		if ($next_rs !== null) {
+			$next_link = sprintf($post_link,$next_rs->post_id,
+				html::escapeHTML($next_rs->post_title),__('next entry').'&nbsp;&#187;');
+			$next_headlink = sprintf($post_headlink,'next',
+				html::escapeHTML($next_rs->post_title),$next_rs->post_id);
+		}
+		
+		if ($prev_rs !== null) {
+			$prev_link = sprintf($post_link,$prev_rs->post_id,
+				html::escapeHTML($prev_rs->post_title),'&#171;&nbsp;'.__('previous entry'));
+			$prev_headlink = sprintf($post_headlink,'previous',
+				html::escapeHTML($prev_rs->post_title),$prev_rs->post_id);
+		}
+		
+		try {
+			$core->media = new dcMedia($core);
+		} catch (Exception $e) {}
+	}
+}
+
+# Format excerpt and content
+if (!empty($_POST) && $can_edit_post)
+{
+	$post_format = $_POST['post_format'];
+	$post_excerpt = $_POST['post_excerpt'];
+	$post_content = $_POST['post_content'];
+	
+	$post_title = $_POST['post_title'];
+	
+	$cat_id = (integer) $_POST['cat_id'];
+	
+	if (isset($_POST['post_status'])) {
+		$post_status = (integer) $_POST['post_status'];
+	}
+	
+	if (empty($_POST['post_dt'])) {
+		$post_dt = '';
+	} else {
+		try
+		{
+			$post_dt = strtotime($_POST['post_dt']);
+			if ($post_dt == false || $post_dt == -1) {
+				$bad_dt = true;
+				throw new Exception(__('Invalid publication date'));
+			}
+			$post_dt = date('Y-m-d H:i',$post_dt);
+		}
+		catch (Exception $e)
+		{
+			$core->error->add($e->getMessage());
+		}
+	}
+	
+	$post_open_comment = !empty($_POST['post_open_comment']);
+	$post_open_tb = !empty($_POST['post_open_tb']);
+	$post_selected = !empty($_POST['post_selected']);
+	$post_lang = $_POST['post_lang'];
+	$post_password = !empty($_POST['post_password']) ? $_POST['post_password'] : null;
+	
+	$post_notes = $_POST['post_notes'];
+	
+	if (isset($_POST['post_url'])) {
+		$post_url = $_POST['post_url'];
+	}
+	
+	$core->blog->setPostContent(
+		$post_id,$post_format,$post_lang,
+		$post_excerpt,$post_excerpt_xhtml,$post_content,$post_content_xhtml
+	);
+}
+
+# Delete post
+if (!empty($_POST['delete']) && $can_delete)
+{
+	try {
+		# --BEHAVIOR-- adminBeforePostDelete
+		$core->callBehavior('adminBeforePostDelete',$post_id);
+		$core->blog->delPost($post_id);
+		http::redirect('posts.php');
+	} catch (Exception $e) {
+		$core->error->add($e->getMessage());
+	}
+}
+
+# Create or update post
+if (!empty($_POST) && !empty($_POST['save']) && $can_edit_post && !$bad_dt)
+{
+	# Create category
+	if (!empty($_POST['new_cat_title']) && $core->auth->check('categories', $core->blog->id)) {
+	
+		$cur_cat = $core->con->openCursor($core->prefix.'category');
+		$cur_cat->cat_title = $_POST['new_cat_title'];
+		$cur_cat->cat_url = '';
+		
+		$parent_cat = !empty($_POST['new_cat_parent']) ? $_POST['new_cat_parent'] : '';
+		
+		# --BEHAVIOR-- adminBeforeCategoryCreate
+		$core->callBehavior('adminBeforeCategoryCreate', $cur_cat);
+		
+		$cat_id = $core->blog->addCategory($cur_cat, (integer) $parent_cat);
+		
+		# --BEHAVIOR-- adminAfterCategoryCreate
+		$core->callBehavior('adminAfterCategoryCreate', $cur_cat, $cat_id);
+	}
+	
+	$cur = $core->con->openCursor($core->prefix.'post');
+	
+	$cur->post_title = $post_title;
+	$cur->cat_id = ($cat_id ? $cat_id : null);
+	$cur->post_dt = $post_dt ? date('Y-m-d H:i:00',strtotime($post_dt)) : '';
+	$cur->post_format = $post_format;
+	$cur->post_password = $post_password;
+	$cur->post_lang = $post_lang;
+	$cur->post_title = $post_title;
+	$cur->post_excerpt = $post_excerpt;
+	$cur->post_excerpt_xhtml = $post_excerpt_xhtml;
+	$cur->post_content = $post_content;
+	$cur->post_content_xhtml = $post_content_xhtml;
+	$cur->post_notes = $post_notes;
+	$cur->post_status = $post_status;
+	$cur->post_selected = (integer) $post_selected;
+	$cur->post_open_comment = (integer) $post_open_comment;
+	$cur->post_open_tb = (integer) $post_open_tb;
+	
+	if (isset($_POST['post_url'])) {
+		$cur->post_url = $post_url;
+	}
+	
+	# Update post
+	if ($post_id)
+	{
+		try
+		{
+			# --BEHAVIOR-- adminBeforePostUpdate
+			$core->callBehavior('adminBeforePostUpdate',$cur,$post_id);
+			
+			$core->blog->updPost($post_id,$cur);
+			
+			# --BEHAVIOR-- adminAfterPostUpdate
+			$core->callBehavior('adminAfterPostUpdate',$cur,$post_id);
+			
+			http::redirect('post.php?id='.$post_id.'&upd=1');
+		}
+		catch (Exception $e)
+		{
+			$core->error->add($e->getMessage());
+		}
+	}
+	else
+	{
+		$cur->user_id = $core->auth->userID();
+		
+		try
+		{
+			# --BEHAVIOR-- adminBeforePostCreate
+			$core->callBehavior('adminBeforePostCreate',$cur);
+			
+			$return_id = $core->blog->addPost($cur);
+			
+			# --BEHAVIOR-- adminAfterPostCreate
+			$core->callBehavior('adminAfterPostCreate',$cur,$return_id);
+			
+			http::redirect('post.php?id='.$return_id.'&crea=1');
+		}
+		catch (Exception $e)
+		{
+			$core->error->add($e->getMessage());
+		}
+	}
+}
+
+# Getting categories
+$categories_combo = array(__('(No cat)') => '');
+try {
+	$categories = $core->blog->getCategories(array('post_type'=>'post'));
+	if (!$categories->isEmpty()) {
+		while ($categories->fetch()) {
+			$catparents_combo[] = $categories_combo[] = new formSelectOption(
+				str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title),
+				$categories->cat_id
+			);
+		}
+	}
+} catch (Exception $e) { }
 
 /* DISPLAY
@@ -339,16 +313,413 @@
 	$default_tab = 'comments';
 }
-$page_title_edit = __('Edit entry');
-$_ctx
-	->setBreadCrumb(
-		array(
-			html::escapeHTML($core->blog->name) => '',
-			__('Entries') => 'posts.php',
-			($post_id ? $page_title_edit : $page_title) => ''
-	))
-	->default_tab = $default_tab;
-
-	
-	
-$core->tpl->display('post.html.twig');
+
+dcPage::open($page_title.' - '.__('Entries'),
+	dcPage::jsDatePicker().
+	dcPage::jsToolBar().
+	dcPage::jsModal().
+	dcPage::jsMetaEditor().
+	dcPage::jsLoad('js/_post.js').
+	dcPage::jsConfirmClose('entry-form','comment-form').
+	# --BEHAVIOR-- adminPostHeaders
+	$core->callBehavior('adminPostHeaders').
+	dcPage::jsPageTabs($default_tab).
+	$next_headlink."\n".$prev_headlink
+);
+
+if (!empty($_GET['upd'])) {
+	dcPage::message(__('Entry has been successfully updated.'));
+}
+elseif (!empty($_GET['crea'])) {
+	dcPage::message(__('Entry has been successfully created.'));
+}
+elseif (!empty($_GET['attached'])) {
+	dcPage::message(__('File has been successfully attached.'));
+}
+elseif (!empty($_GET['rmattach'])) {
+	dcPage::message(__('Attachment has been successfully removed.'));
+}
+
+if (!empty($_GET['creaco'])) {
+	dcPage::message(__('Comment has been successfully created.'));
+}
+
+# XHTML conversion
+if (!empty($_GET['xconv']))
+{
+	$post_excerpt = $post_excerpt_xhtml;
+	$post_content = $post_content_xhtml;
+	$post_format = 'xhtml';
+	
+	dcPage::message(__('Don\'t forget to validate your XHTML conversion by saving your post.'));
+}
+
+echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.'<a href="posts.php">'.__('Entries').'</a> &rsaquo; <span class="page-title">';
+if ($post_id) {
+	switch ($post_status) {
+		case 1:
+			$img_status = sprintf($img_status_pattern,__('published'),'check-on.png');
+			break;
+		case 0:
+			$img_status = sprintf($img_status_pattern,__('unpublished'),'check-off.png');
+			break;
+		case -1:
+			$img_status = sprintf($img_status_pattern,__('scheduled'),'scheduled.png');
+			break;
+		case -2:
+			$img_status = sprintf($img_status_pattern,__('pending'),'check-wrn.png');
+			break;
+		default:
+			$img_status = '';
+	}
+	$edit_entry_str = __('Edit entry &ldquo;%s&rdquo;');
+	echo sprintf($edit_entry_str, html::escapeHTML($post_title)).' '.$img_status;
+} else {
+	echo $page_title;
+}
+echo	'</span></h2>';
+
+if ($post_id && $post->post_status == 1) {
+	echo '<p><a href="'.$post->getURL().'" onclick="window.open(this.href);return false;" title="'.$post_title.' ('.__('new window').')'.'">'.__('Go to this entry on the site').' <img src="images/outgoing-blue.png" alt="" /></a></p>';
+}
+if ($post_id)
+{
+	echo '<p>';
+	if ($prev_link) { echo $prev_link; }
+	if ($next_link && $prev_link) { echo ' - '; }
+	if ($next_link) { echo $next_link; }
+	
+	# --BEHAVIOR-- adminPostNavLinks
+	$core->callBehavior('adminPostNavLinks',isset($post) ? $post : null);
+	
+	echo '</p>';
+}
+
+# Exit if we cannot view page
+if (!$can_view_page) {
+	dcPage::helpBlock('core_post');
+	dcPage::close();
+	exit;
+}
+
+/* Post form if we can edit post
+-------------------------------------------------------- */
+if ($can_edit_post)
+{
+	echo '<div class="multi-part" title="'.__('Edit entry').'" id="edit-entry">';
+	echo '<form action="post.php" method="post" id="entry-form">';
+	echo '<div id="entry-wrapper">';
+	echo '<div id="entry-content"><div class="constrained">';
+	
+	echo
+	'<p class="col"><label class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').
+	form::field('post_title',20,255,html::escapeHTML($post_title),'maximal').
+	'</label></p>'.
+	
+	'<p class="area" id="excerpt-area"><label for="post_excerpt">'.__('Excerpt:').'</label> '.
+	form::textarea('post_excerpt',50,5,html::escapeHTML($post_excerpt)).
+	'</p>'.
+	
+	'<p class="area"><label class="required" '.
+	'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '.
+	form::textarea('post_content',50,$core->auth->getOption('edit_size'),html::escapeHTML($post_content)).
+	'</p>'.
+	
+	'<p class="area" id="notes-area"><label for="post_notes">'.__('Notes:').'</label>'.
+	form::textarea('post_notes',50,5,html::escapeHTML($post_notes)).
+	'</p>';
+	
+	# --BEHAVIOR-- adminPostForm
+	$core->callBehavior('adminPostForm',isset($post) ? $post : null);
+	
+	echo
+	'<p>'.
+	($post_id ? form::hidden('id',$post_id) : '').
+	'<input type="submit" value="'.__('Save').' (s)" '.
+	'accesskey="s" name="save" /> ';
+	if ($post_id) {
+		$preview_url =
+		$core->blog->url.$core->url->getURLFor('preview',$core->auth->userID().'/'.
+		http::browserUID(DC_MASTER_KEY.$core->auth->userID().$core->auth->getInfo('user_pwd')).
+		'/'.$post->post_url);
+		echo '<a id="post-preview" href="'.$preview_url.'" class="button" accesskey="p">'.__('Preview').' (p)'.'</a> ';
+	} else {
+		echo
+		'<a id="post-cancel" href="index.php" class="button" accesskey="c">'.__('Cancel').' (c)</a>';
+	}
+
+	echo
+	($can_delete ? '<input type="submit" class="delete" value="'.__('Delete').'" name="delete" />' : '').
+	$core->formNonce().
+	'</p>';
+	
+	echo '</div></div>';		// End #entry-content
+	echo '</div>';		// End #entry-wrapper
+
+	echo '<div id="entry-sidebar">';
+	
+	echo
+	'<p><label for="cat_id">'.__('Category:').
+	form::combo('cat_id',$categories_combo,$cat_id,'maximal').
+	'</label></p>'.
+	
+	($core->auth->check('categories', $core->blog->id) ?
+		'<div>'.
+		'<p id="new_cat">'.__('Add a new category').'</p>'.
+		'<p class="form-note info clear">'.__('This category will be created when you will save your post.').'</p>'.
+		'<p><label for="new_cat_title">'.__('Title:').' '.
+		form::field('new_cat_title',30,255,'','maximal').'</label></p>'.
+		'<p><label for="new_cat_parent">'.__('Parent:').' '.
+		form::combo('new_cat_parent',$categories_combo,'','maximal').
+		'</label></p>'.
+		'</div>'
+	: '').
+	
+	'<p><label for="post_status">'.__('Entry status:').
+	form::combo('post_status',$status_combo,$post_status,'','',!$can_publish).
+	'</label></p>'.
+	
+	'<p><label for="post_dt">'.__('Published on:').
+	form::field('post_dt',16,16,$post_dt,($bad_dt ? 'invalid' : '')).
+	'</label></p>'.
+	
+	'<p><label for="post_format">'.__('Text formating:').
+	form::combo('post_format',$formaters_combo,$post_format).
+	'</label>'.
+	'</p>'.
+	'<p>'.($post_id && $post_format != 'xhtml' ? '<a id="convert-xhtml" class="button" href="post.php?id='.$post_id.'&amp;xconv=1">'.__('Convert to XHTML').'</a>' : '').'</p>'.
+	
+	'<p><label for="post_open_comment" class="classic">'.form::checkbox('post_open_comment',1,$post_open_comment).' '.
+	__('Accept comments').'</label></p>'.
+	($core->blog->settings->system->allow_comments ? 
+		(isContributionAllowed($post_id,strtotime($post_dt),true) ? 
+			'' :
+			'<p class="form-note warn">'.__('Warning: Comments are not more accepted for this entry.').'</p>') : 
+		'<p class="form-note warn">'.__('Warning: Comments are not accepted on this blog.').'</p>').
+
+	'<p><label for="post_open_tb" class="classic">'.form::checkbox('post_open_tb',1,$post_open_tb).' '.
+	__('Accept trackbacks').'</label></p>'.
+	($core->blog->settings->system->allow_trackbacks ? 
+		(isContributionAllowed($post_id,strtotime($post_dt),false) ? 
+			'' :
+			'<p class="form-note warn">'.__('Warning: Trackbacks are not more accepted for this entry.').'</p>') : 
+		'<p class="form-note warn">'.__('Warning: Trackbacks are not accepted on this blog.').'</p>').
+
+	'<p><label for="post_selected" class="classic">'.form::checkbox('post_selected',1,$post_selected).' '.
+	__('Selected entry').'</label></p>'.
+	
+	'<p><label for="post_lang">'.__('Entry lang:').
+	form::combo('post_lang',$lang_combo,$post_lang).
+	'</label></p>'.
+	
+	'<p><label for="post_password">'.__('Entry password:').
+	form::field('post_password',10,32,html::escapeHTML($post_password),'maximal').
+	'</label></p>'.
+	
+	'<div class="lockable">'.
+	'<p><label for="post_url">'.__('Basename:').
+	form::field('post_url',10,255,html::escapeHTML($post_url),'maximal').
+	'</label></p>'.
+	'<p class="form-note warn">'.
+	__('Warning: If you set the URL manually, it may conflict with another entry.').
+	'</p>'.
+	'</div>';
+	
+	# --BEHAVIOR-- adminPostFormSidebar
+	$core->callBehavior('adminPostFormSidebar',isset($post) ? $post : null);
+	
+	echo '</div>';		// End #entry-sidebar
+
+	echo '</form>';
+	
+	# --BEHAVIOR-- adminPostForm
+	$core->callBehavior('adminPostAfterForm',isset($post) ? $post : null);
+	
+	echo '</div>';
+	
+	if ($post_id && $post->post_status == 1) {
+		echo '<p><a href="trackbacks.php?id='.$post_id.'" class="multi-part">'.
+		__('Ping blogs').'</a></p>';
+	}
+	
+}
+
+
+/* Comments and trackbacks
+-------------------------------------------------------- */
+if ($post_id)
+{
+	$params = array('post_id' => $post_id, 'order' => 'comment_dt ASC');
+	
+	$comments = $core->blog->getComments(array_merge($params,array('comment_trackback'=>0)));
+	$trackbacks = $core->blog->getComments(array_merge($params,array('comment_trackback'=>1)));
+	
+	# Actions combo box
+	$combo_action = array();
+	if ($can_edit_post && $core->auth->check('publish,contentadmin',$core->blog->id))
+	{
+		$combo_action[__('publish')] = 'publish';
+		$combo_action[__('unpublish')] = 'unpublish';
+		$combo_action[__('mark as pending')] = 'pending';
+		$combo_action[__('mark as junk')] = 'junk';
+	}
+	
+	if ($can_edit_post && $core->auth->check('delete,contentadmin',$core->blog->id))
+	{
+		$combo_action[__('Delete')] = 'delete';
+	}
+	
+	# --BEHAVIOR-- adminCommentsActionsCombo
+	$core->callBehavior('adminCommentsActionsCombo',array(&$combo_action));
+	
+	$has_action = !empty($combo_action) && (!$trackbacks->isEmpty() || !$comments->isEmpty());
+	
+	echo
+	'<div id="comments" class="multi-part" title="'.__('Comments').'">';
+	
+	if ($has_action) {
+		echo '<form action="comments_actions.php" id="form-comments" method="post">';
+	}
+	
+	echo '<h3>'.__('Trackbacks').'</h3>';
+	
+	if (!$trackbacks->isEmpty()) {
+		showComments($trackbacks,$has_action,true);
+	} else {
+		echo '<p>'.__('No trackback').'</p>';
+	}
+	
+	echo '<h3>'.__('Comments').'</h3>';
+	if (!$comments->isEmpty()) {
+		showComments($comments,$has_action);
+	} else {
+		echo '<p>'.__('No comment').'</p>';
+	}
+	
+	if ($has_action) {
+		echo
+		'<div class="two-cols">'.
+		'<p class="col checkboxes-helpers"></p>'.
+		
+		'<p class="col right"><label for="action" class="classic">'.__('Selected comments action:').'</label> '.
+		form::combo('action',$combo_action).
+		form::hidden('redir','post.php?id='.$post_id.'&amp;co=1').
+		$core->formNonce().
+		'<input type="submit" value="'.__('ok').'" /></p>'.
+		'</div>'.
+		'</form>';
+	}
+	
+	echo '</div>';
+}
+
+/* Add a comment
+-------------------------------------------------------- */
+if ($post_id)
+{
+	echo
+	'<div class="multi-part" id="add-comment" title="'.__('Add a comment').'">'.
+	'<h3>'.__('Add a comment').'</h3>'.
+	
+	'<form action="comment.php" method="post" id="comment-form">'.
+	'<div class="constrained">'.
+	'<p><label for="comment_author" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Name:').
+	form::field('comment_author',30,255,html::escapeHTML($core->auth->getInfo('user_cn'))).
+	'</label></p>'.
+	
+	'<p><label for="comment_email">'.__('Email:').
+	form::field('comment_email',30,255,html::escapeHTML($core->auth->getInfo('user_email'))).
+	'</label></p>'.
+	
+	'<p><label for="comment_site">'.__('Web site:').
+	form::field('comment_site',30,255,html::escapeHTML($core->auth->getInfo('user_url'))).
+	'</label></p>'.
+	
+	'<p class="area"><label for="comment_content" class="required"><abbr title="'.__('Required field').'">*</abbr> '.
+	__('Comment:').'</label> '.
+	form::textarea('comment_content',50,8,html::escapeHTML('')).
+	'</p>'.
+	
+	'<p>'.form::hidden('post_id',$post_id).
+	$core->formNonce().
+	'<input type="submit" name="add" value="'.__('Save').'" /></p>'.
+	'</div>'.
+	'</form>'.
+	'</div>';
+}
+
+# Controls comments or trakbacks capabilities
+function isContributionAllowed($id,$dt,$com=true)
+{
+	global $core;
+
+	if (!$id) {
+		return true;
+	}
+	if ($com) {
+		if (($core->blog->settings->system->comments_ttl == 0) || 
+			(time() - $core->blog->settings->system->comments_ttl*86400 < $dt)) {
+			return true;
+		}
+	} else {
+		if (($core->blog->settings->system->trackbacks_ttl == 0) || 
+			(time() - $core->blog->settings->system->trackbacks_ttl*86400 < $dt)) {
+			return true;
+		}
+	}
+	return false;
+}
+
+# Show comments or trackbacks
+function showComments($rs,$has_action,$tb=false)
+{
+	echo
+	'<table class="comments-list"><tr>'.
+	'<th colspan="2">'.__('Author').'</th>'.
+	'<th>'.__('Date').'</th>'.
+	'<th class="nowrap">'.__('IP address').'</th>'.
+	'<th>'.__('Status').'</th>'.
+	'<th>&nbsp;</th>'.
+	'</tr>';
+	
+	while($rs->fetch())
+	{
+		$comment_url = 'comment.php?id='.$rs->comment_id;
+		
+		$img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
+		switch ($rs->comment_status) {
+			case 1:
+				$img_status = sprintf($img,__('published'),'check-on.png');
+				break;
+			case 0:
+				$img_status = sprintf($img,__('unpublished'),'check-off.png');
+				break;
+			case -1:
+				$img_status = sprintf($img,__('pending'),'check-wrn.png');
+				break;
+			case -2:
+				$img_status = sprintf($img,__('junk'),'junk.png');
+				break;
+		}
+		
+		echo
+		'<tr class="line'.($rs->comment_status != 1 ? ' offline' : '').'"'.
+		' id="c'.$rs->comment_id.'">'.
+		
+		'<td class="nowrap">'.
+		($has_action ? form::checkbox(array('comments[]'),$rs->comment_id,'','','',0,'title="'.($tb ? __('select this trackback') : __('select this comment')).'"') : '').'</td>'.
+		'<td class="maximal">'.html::escapeHTML($rs->comment_author).'</td>'.
+		'<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$rs->comment_dt).'</td>'.
+		'<td class="nowrap"><a href="comments.php?ip='.$rs->comment_ip.'">'.$rs->comment_ip.'</a></td>'.
+		'<td class="nowrap status">'.$img_status.'</td>'.
+		'<td class="nowrap status"><a href="'.$comment_url.'">'.
+		'<img src="images/edit-mini.png" alt="" title="'.__('Edit this comment').'" /></a></td>'.
+		
+		'</tr>';
+	}
+	
+	echo '</table>';
+}
+
+dcPage::helpBlock('core_post','core_wiki');
+dcPage::close();
 ?>
Index: admin/posts.php
===================================================================
--- admin/posts.php	(revision 1492)
+++ admin/posts.php	(revision 1179)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -12,5 +12,5 @@
 
 require dirname(__FILE__).'/../inc/admin/prepend.php';
-global $_ctx;
+
 dcPage::check('usage,contentadmin');
 
@@ -48,4 +48,5 @@
 	# Filter form we'll put in html_block
 	$users_combo = $categories_combo = array();
+	$users_combo['-'] = $categories_combo['-'] = '';
 	while ($users->fetch())
 	{
@@ -60,38 +61,49 @@
 	}
 	
-
-# Getting categories
-$categories_combo = array();
-try {
-	$categories = $core->blog->getCategories(array('post_type'=>'post'));
+	$categories_combo[__('None')] = 'NULL';
 	while ($categories->fetch()) {
-		$categories_combo[$categories->cat_id] = 
-			str_repeat('&nbsp;&nbsp;',$categories->level-1).
-			($categories->level-1 == 0 ? '' : '&bull; ').
-			html::escapeHTML($categories->cat_title);
-	}
-} catch (Exception $e) { }
+		$categories_combo[str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').
+			html::escapeHTML($categories->cat_title).
+			' ('.$categories->nb_post.')'] = $categories->cat_id;
+	}
+	
 	$status_combo = array(
+	'-' => ''
 	);
 	foreach ($core->blog->getAllPostStatus() as $k => $v) {
-		$status_combo[(string) $k] = (string)$v;
+		$status_combo[$v] = (string) $k;
 	}
 	
 	$selected_combo = array(
-	'1' => __('is selected'),
-	'0' => __('is not selected')
+	'-' => '',
+	__('selected') => '1',
+	__('not selected') => '0'
 	);
 	
 	# Months array
+	$dt_m_combo['-'] = '';
 	while ($dates->fetch()) {
-		$dt_m_combo[$dates->year().$dates->month()] = dt::str('%B %Y',$dates->ts());
-	}
-	
+		$dt_m_combo[dt::str('%B %Y',$dates->ts())] = $dates->year().$dates->month();
+	}
+	
+	$lang_combo['-'] = '';
 	while ($langs->fetch()) {
 		$lang_combo[$langs->post_lang] = $langs->post_lang;
 	}
-}
-$form = new dcForm($core,'post','post.php');
-
+	
+	$sortby_combo = array(
+	__('Date') => 'post_dt',
+	__('Title') => 'post_title',
+	__('Category') => 'cat_title',
+	__('Author') => 'user_id',
+	__('Status') => 'post_status',
+	__('Selected') => 'post_selected'
+	);
+	
+	$order_combo = array(
+	__('Descending') => 'desc',
+	__('Ascending') => 'asc'
+	);
+}
 
 # Actions combo box
@@ -126,70 +138,189 @@
 $core->callBehavior('adminPostsActionsCombo',array(&$combo_action));
 
-
-
-class monthdcFilterCombo extends dcFilterCombo {
-	public function applyFilter($params) {
-		$month=$this->avalues['values'][0];
-		$params['post_month'] = substr($month,4,2);
-		$params['post_year'] = substr($month,0,4);
-	}
-}
-
-class PostsFetcher extends dcListFetcher {
-
-	public function getEntries($params,$offset,$limit) {
-		$params['limit'] = array($offset,$limit);
-		return $this->core->blog->getPosts($params);
-	}
-
-	public function getEntriesCount($params) {
-		$count = $this->core->blog->getPosts($params,true);
-		return $count->f(0);
-	}
+/* Get posts
+-------------------------------------------------------- */
+$user_id = !empty($_GET['user_id']) ?	$_GET['user_id'] : '';
+$cat_id = !empty($_GET['cat_id']) ?	$_GET['cat_id'] : '';
+$status = isset($_GET['status']) ?	$_GET['status'] : '';
+$selected = isset($_GET['selected']) ?	$_GET['selected'] : '';
+$month = !empty($_GET['month']) ?		$_GET['month'] : '';
+$lang = !empty($_GET['lang']) ?		$_GET['lang'] : '';
+$sortby = !empty($_GET['sortby']) ?	$_GET['sortby'] : 'post_dt';
+$order = !empty($_GET['order']) ?		$_GET['order'] : 'desc';
+
+$show_filters = false;
+
+$page = !empty($_GET['page']) ? (integer) $_GET['page'] : 1;
+$nb_per_page =  30;
+
+if (!empty($_GET['nb']) && (integer) $_GET['nb'] > 0) {
+	if ($nb_per_page != $_GET['nb']) {
+		$show_filters = true;
+	}
+	$nb_per_page = (integer) $_GET['nb'];
+}
+
+$params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page);
+$params['no_content'] = true;
+
+# - User filter
+if ($user_id !== '' && in_array($user_id,$users_combo)) {
+	$params['user_id'] = $user_id;
+	$show_filters = true;
+} else {
+	$user_id='';
+}
+
+# - Categories filter
+if ($cat_id !== '' && in_array($cat_id,$categories_combo)) {
+	$params['cat_id'] = $cat_id;
+	$show_filters = true;
+} else {
+	$cat_id='';
+}
+
+# - Status filter
+if ($status !== '' && in_array($status,$status_combo)) {
+	$params['post_status'] = $status;
+	$show_filters = true;
+} else {
+	$status='';
+}
+
+# - Selected filter
+if ($selected !== '' && in_array($selected,$selected_combo)) {
+	$params['post_selected'] = $selected;
+	$show_filters = true;
+} else {
+	$selected='';
+}
+
+# - Month filter
+if ($month !== '' && in_array($month,$dt_m_combo)) {
+	$params['post_month'] = substr($month,4,2);
+	$params['post_year'] = substr($month,0,4);
+	$show_filters = true;
+} else {
+	$month='';
+}
+
+# - Lang filter
+if ($lang !== '' && in_array($lang,$lang_combo)) {
+	$params['post_lang'] = $lang;
+	$show_filters = true;
+} else {
+	$lang='';
+}
+
+# - Sortby and order filter
+if ($sortby !== '' && in_array($sortby,$sortby_combo)) {
+	if ($order !== '' && in_array($order,$order_combo)) {
+		$params['order'] = $sortby.' '.$order;
+	} else {
+		$order='desc';
+	}
+	
+	if ($sortby != 'post_dt' || $order != 'desc') {
+		$show_filters = true;
+	}
+} else {
+	$sortby='post_dt';
+	$order='desc';
+}
+
+# Get posts
+try {
+	$posts = $core->blog->getPosts($params);
+	$counter = $core->blog->getPosts($params,true);
+	$post_list = new adminPostList($core,$posts,$counter->f(0));
+} catch (Exception $e) {
+	$core->error->add($e->getMessage());
 }
 
 /* DISPLAY
 -------------------------------------------------------- */
-$filterSet = new dcFilterSet($core,'fposts','posts.php');
-
-$filterSet
-	->addFilter(new dcFilterRichCombo(
-		'users',__('Author'), __('Author'), 'user_id', $users_combo,array(
-			'multiple' => true)))
-	->addFilter(new dcFilterRichCombo(
-		'category',__('Category'), __('Category'), 'cat_id', $categories_combo))
-	->addFilter(new dcFilterRichCombo(
-		'post_status',__('Status'), __('Status'), 'post_status', $status_combo))
-	->addFilter(new dcFilterRichCombo(
-		'lang',__('Lang'), __('Lang'), 'post_lang', $lang_combo))
-	->addFilter(new dcFilterCombo(
-		'selected',__('Selected'), __('The post : '),'post_selected', $selected_combo))
-	->addFilter(new monthdcFilterCombo(
-		'month',__('Month'),__('Month'), 'post_month', $dt_m_combo,array('singleval' => 1)))
-	->addFilter(new dcFilterText(
-		'search',__('Contains'),__('The entry contains'), 'search',20,255));
-
-
-$lfetcher = new PostsFetcher($core);
-$lposts = new dcItemList ($core,array('lposts','form-entries'),$filterSet,$lfetcher,'posts_actions.php');
-$lposts->addTemplate('posts_cols.html.twig');
-
-$lposts
-	->addColumn(new dcColumn('title',__('Title'),'post_title'))
-	->addColumn(new dcColumn('cat',__('Category'),'cat_title'))
-	->addColumn(new dcColumn('date',__('Date'),'post_date'))
-	->addColumn(new dcColumn('datetime',__('Date and Time'),'post_dt'))
-	->addColumn(new dcColumn('author',__('Author'),'user_id'))
-	->addColumn(new dcColumn('status',__('Status'),'post_status'));
-
-
-$lposts->setup();
-
-$_ctx
-	->setBreadCrumb(array(__('Entries') => 'posts.php'));
-
-
-$core->tpl->display('posts.html.twig');
-
-
+$starting_script = dcPage::jsLoad('js/_posts_list.js');
+if (!$show_filters) {
+	$starting_script .= dcPage::jsLoad('js/filter-controls.js');
+}
+
+dcPage::open(__('Entries'),$starting_script);
+
+if (!$core->error->flag())
+{
+	echo 
+	'<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.__('Entries').'</span></h2>'.
+	'<p class="top-add"><a class="button add" href="post.php">'.__('New entry').'</a></p>';
+	
+	if (!$show_filters) {
+		echo '<p><a id="filter-control" class="form-control" href="#">'.
+		__('Filters').'</a></p>';
+	}
+	
+	echo
+	'<form action="posts.php" method="get" id="filters-form">'.
+	'<fieldset><legend>'.__('Filters').'</legend>'.
+	'<div class="three-cols">'.
+	'<div class="col">'.
+	'<label for="user_id">'.__('Author:').
+	form::combo('user_id',$users_combo,$user_id).'</label> '.
+	'<label for="cat_id">'.__('Category:').
+	form::combo('cat_id',$categories_combo,$cat_id).'</label> '.
+	'<label for="status">'.__('Status:').
+	form::combo('status',$status_combo,$status).'</label> '.
+	'</div>'.
+	
+	'<div class="col">'.
+	'<label for="selected">'.__('Selected:').
+	form::combo('selected',$selected_combo,$selected).'</label> '.
+	'<label for="month">'.__('Month:').
+	form::combo('month',$dt_m_combo,$month).'</label> '.
+	'<label for="lang">'.__('Lang:').
+	form::combo('lang',$lang_combo,$lang).'</label> '.
+	'</div>'.
+	
+	'<div class="col">'.
+	'<p><label for="sortby">'.__('Order by:').
+	form::combo('sortby',$sortby_combo,$sortby).'</label> '.
+	'<label for="order">'.__('Sort:').
+	form::combo('order',$order_combo,$order).'</label></p>'.
+	'<p><label for="nb" class="classic">'.	form::field('nb',3,3,$nb_per_page).' '.
+	__('Entries per page').'</label></p> '.
+	'<p><input type="submit" value="'.__('Apply filters').'" /></p>'.
+	'</div>'.
+	'</div>'.
+	'<br class="clear" />'. //Opera sucks
+	'</fieldset>'.
+	'</form>';
+	
+	# Show posts
+	$post_list->display($page,$nb_per_page,
+	'<form action="posts_actions.php" method="post" id="form-entries">'.
+	
+	'%s'.
+	
+	'<div class="two-cols">'.
+	'<p class="col checkboxes-helpers"></p>'.
+	
+	'<p class="col right"><label for="action" class="classic">'.__('Selected entries action:').'</label> '.
+	form::combo('action',$combo_action).
+	'<input type="submit" value="'.__('ok').'" /></p>'.
+	form::hidden(array('user_id'),$user_id).
+	form::hidden(array('cat_id'),$cat_id).
+	form::hidden(array('status'),$status).
+	form::hidden(array('selected'),$selected).
+	form::hidden(array('month'),$month).
+	form::hidden(array('lang'),$lang).
+	form::hidden(array('sortby'),$sortby).
+	form::hidden(array('order'),$order).
+	form::hidden(array('page'),$page).
+	form::hidden(array('nb'),$nb_per_page).
+	$core->formNonce().
+	'</div>'.
+	'</form>'
+	);
+}
+
+dcPage::helpBlock('core_posts');
+dcPage::close();
 ?>
Index: admin/posts_actions.php
===================================================================
--- admin/posts_actions.php	(revision 1476)
+++ admin/posts_actions.php	(revision 1421)
@@ -16,121 +16,5 @@
 
 $params = array();
-
-/**
-* FieldsList - Compatibility class for hidden fields & entries[] fields
-*
-*/
-class FieldsList {
-	/** @var array list of hidden fields */
-	protected $hidden;
-	/** @var array list of selected entries */
-	protected $entries;
-
-
-   /**
-     * Class constructor
-	*/
-	public function __construct() {
-		$this->hidden=array();
-		$this->entries =array();
-	}
-
-    /**
-     * addHidden - adds a hidden field
-     * 
-     * @param string $name the field name.
-     * @param mixed $value the field value.
-     *
-     * @access public
-	 * @return the FieldsList instance, enabling to chain requests
-     */	
-	 public function addHidden($name,$value) {
-		$this->hidden[] = form::hidden($name,$value);
-		return $this;
-	}
-
-    /**
-     * addEntry - adds a antry field
-     * 
-     * @param string $id the entry id.
-     * @param mixed $title the entry title.
-     *
-     * @access public
-	 * @return the FieldsList instance, enabling to chain requests
-     */	
-	 public function addEntry($id,$title) {
-		$this->entries[$id]=$title;
-		return $this;
-	}
-
-    /**
-     * getHidden - returns the list of hidden fields, html encoded
-     *
-     * @access public
-	 * @return the list of hidden fields, html encoded
-     */
-	 public function getHidden() {
-		return join('',$this->hidden);
-	}
-	
-    /**
-     * getEntries - returns the list of entry fields, html encoded
-     *
-	 * @param boolean $hidden if set to true, returns entries as a list of hidden field
-	 *                if set to false, returns html code displaying the list of entries
-	 *                with a list of checkboxes to enable to select/deselect entries
-     * @access public
-	 * @return the list of entry fields, html encoded
-     */
-	public function getEntries ($hidden=false) {
-		$ret = '';
-		if ($hidden) {
-			foreach ($this->entries as $id=> $e) {
-				$ret .= form::hidden('entries[]',$id);
-			}
-		} else {
-			$ret = 
-				'<table class="posts-list"><tr>'.
-				'<th colspan="2">'.__('Title').'</th>'.
-				'</tr>';
-			foreach ($this->entries as $id=>$title) {
-				$ret .= 
-					'<tr><td>'.
-					form::checkbox(array('entries[]'),$id,true,'','').'</td>'.
-					'<td>'.	$title.'</td></tr>';
-			}
-			$ret .= '</table>';
-		}
-		return $ret;
-	}
-	
-    /**
-     * getEntriesQS - returns the list of entry fields as query string
-     *
-     * @access public
-	 * @return the list of entry fields, html encoded
-     */
-	public function getEntriesQS() {
-		$ret=array();
-		foreach ($this->entries as $id=>$title) {
-			$ret[] = 'entries[]='.$id;
-		}
-		return join('&',$ret);
-	}
-	
-    /**
-     * __toString - magic method. -- DEPRECATED here
-	 *              This method is only used to preserve compatibility with plugins 
-	 *				relying on previous versions of adminPostsActionsContent behavior, 
-	 *
-     * @access public
-	 * @return the list of hidden fields and entries (as hidden fields too), html encoded
-     */
-	public function __toString() {
-		return join('',$this->hidden).$this->getEntries(true);
-	}
-}
-
-$fields = new FieldsList();
+$action = '';
 
 /* Actions
@@ -179,8 +63,5 @@
 	while ($posts->fetch())	{
 		$posts_ids[] = $posts->post_id;
-		$fields->addEntry($posts->post_id,$posts->post_title);
-	}
-	// Redirection including selected entries
-	$redir_sel = $redir.'&'.$fields->getEntriesQS();
+	}
 	
 	# --BEHAVIOR-- adminPostsActions
@@ -200,5 +81,5 @@
 			$core->blog->updPostsStatus($posts_ids,$status);
 			
-			http::redirect($redir_sel.'&upd=1');
+			http::redirect($redir);
 		}
 		catch (Exception $e)
@@ -213,5 +94,5 @@
 			$core->blog->updPostsSelected($posts_ids,$action == 'selected');
 			
-			http::redirect($redir_sel."&upd=1");
+			http::redirect($redir);
 		}
 		catch (Exception $e)
@@ -236,5 +117,5 @@
 			$core->blog->delPosts($posts_ids);
 			
-			http::redirect($redir."&del=1");
+			http::redirect($redir);
 		}
 		catch (Exception $e)
@@ -269,5 +150,5 @@
 			$core->blog->updPostsCategory($posts_ids, $new_cat_id);
 			
-			http::redirect($redir_sel."&upd=1");
+			http::redirect($redir);
 		}
 		catch (Exception $e)
@@ -291,5 +172,5 @@
 			$cur->update('WHERE post_id '.$core->con->in($posts_ids));
 			
-			http::redirect($redir_sel."&upd=1");
+			http::redirect($redir);
 		}
 		catch (Exception $e)
@@ -307,5 +188,5 @@
 			$cur->update('WHERE post_id '.$core->con->in($posts_ids));
 			
-			http::redirect($redir_sel."&upd=1");
+			http::redirect($redir);
 		}
 		catch (Exception $e)
@@ -314,24 +195,6 @@
 		}
 	}
-} else {
-	if (empty($_POST['entries'])) {
-		$core->error->add(__('At least one entry should be selected'));
-	} else {
-		$core->error->add(__('No action specified.'));
-	}
-	dcPage::open(
-		__('Entries'),'',dcPage::breadcrumb(
-		array(
-			html::escapeHTML($core->blog->name) => '',
-			__('Entries') => 'posts.php',
-			'<span class="page-title">'.__('Entries actions').'</span>' => ''
-		))
-	);
-	
-	echo '<p><a class="back" href="'.html::escapeURL($redir_sel).'">'.__('Back to entries list').'</a></p>';
-
-	dcPage::close();
-	exit;
-}
+}
+
 /* DISPLAY
 -------------------------------------------------------- */
@@ -368,43 +231,39 @@
 }
 
+$hidden_fields = '';
+while ($posts->fetch()) {
+	$hidden_fields .= form::hidden(array('entries[]'),$posts->post_id);
+}
+
 if (isset($_POST['redir']) && strpos($_POST['redir'],'://') === false)
 {
-	$fields->addHidden(array('redir'),html::escapeURL($_POST['redir']));
+	$hidden_fields .= form::hidden(array('redir'),html::escapeURL($_POST['redir']));
 }
 else
 {
-	$fields
-		->addHidden(array('user_id'),$_POST['user_id'])
-		->addHidden(array('cat_id'),$_POST['cat_id'])
-		->addHidden(array('status'),$_POST['status'])
-		->addHidden(array('selected'),$_POST['selected'])
-		->addHidden(array('month'),$_POST['month'])
-		->addHidden(array('lang'),$_POST['lang'])
-		->addHidden(array('sortby'),$_POST['sortby'])
-		->addHidden(array('order'),$_POST['order'])
-		->addHidden(array('page'),$_POST['page'])
-		->addHidden(array('nb'),$_POST['nb'])
-	;
+	$hidden_fields .=
+	form::hidden(array('user_id'),$_POST['user_id']).
+	form::hidden(array('cat_id'),$_POST['cat_id']).
+	form::hidden(array('status'),$_POST['status']).
+	form::hidden(array('selected'),$_POST['selected']).
+	form::hidden(array('month'),$_POST['month']).
+	form::hidden(array('lang'),$_POST['lang']).
+	form::hidden(array('sortby'),$_POST['sortby']).
+	form::hidden(array('order'),$_POST['order']).
+	form::hidden(array('page'),$_POST['page']).
+	form::hidden(array('nb'),$_POST['nb']);
 }
 
 if (isset($_POST['post_type'])) {
-	$fields->addHidden(array('post_type'),$_POST['post_type']);
+	$hidden_fields .= form::hidden(array('post_type'),$_POST['post_type']);
 }
 
 # --BEHAVIOR-- adminPostsActionsContent
-$core->callBehavior('adminPostsActionsContent',$core,$action,$fields);
+$core->callBehavior('adminPostsActionsContent',$core,$action,$hidden_fields);
 
 if ($action == 'category')
 {
-	echo dcPage::breadcrumb(
-		array(
-			html::escapeHTML($core->blog->name) => '',
-			__('Entries') => 'posts.php',
-			__('Change category for entries') => ''
-	));
-	
-	echo '<p><a class="back" href="'.html::escapeURL($redir_sel).'">'.__('Back to entries list').'</a></p>';
-
-	# categories list
+	echo '<h2 class="page-title">'.__('Change category for entries').'</h2>';
+	
 	# Getting categories
 	$categories_combo = array(__('(No cat)') => '');
@@ -412,10 +271,10 @@
 		$categories = $core->blog->getCategories(array('post_type'=>'post'));
 		if (!$categories->isEmpty()) {
-		while ($categories->fetch()) {
+			while ($categories->fetch()) {
 				$catparents_combo[] = $categories_combo[] = new formSelectOption(
 					str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title),
-				$categories->cat_id
-			);
-		}
+					$categories->cat_id
+				);
+			}
 		}
 	} catch (Exception $e) { }
@@ -423,7 +282,7 @@
 	echo
 	'<form action="posts_actions.php" method="post">'.
-	$fields->getEntries().
-	'<p><label for="new_cat_id" class="classic">'.__('Category:').'</label> '.
-	form::combo('new_cat_id',$categories_combo,'');
+	'<p><label for="new_cat_id" class="classic">'.__('Category:').' '.
+	form::combo('new_cat_id',$categories_combo,'').
+	'</label> ';
 	
 	if ($core->auth->check('categories', $core->blog->id)) {
@@ -440,5 +299,5 @@
 	
 	echo
-	$fields->getHidden().
+	$hidden_fields.
 	$core->formNonce().
 	form::hidden(array('action'),'category').
@@ -448,12 +307,6 @@
 elseif ($action == 'lang')
 {
-	echo dcPage::breadcrumb(
-		array(
-			html::escapeHTML($core->blog->name) => '',
-			__('Entries') => 'posts.php',
-			'<span class="page-title">'.__('Change language for entries').'</span>' => ''
-	));
-	echo '<p><a class="back" href="'.html::escapeURL($redir_sel).'">'.__('Back to entries list').'</a></p>';
-
+	echo '<h2 class="page-title">'.__('Change language for entries').'</h2>';
+	
 	# lang list
 	# Languages combo
@@ -474,11 +327,10 @@
 	echo
 	'<form action="posts_actions.php" method="post">'.
-	$fields->getEntries().
-	
-	'<p><label for="new_lang" class="classic">'.__('Entry lang:').'</label> '.
-	form::combo('new_lang',$lang_combo,'');
-	
-	echo
-	$fields->getHidden().
+	'<p><label for="new_lang" class="classic">'.__('Entry lang:').' '.
+	form::combo('new_lang',$lang_combo,'').
+	'</label> ';
+	
+	echo
+	$hidden_fields.
 	$core->formNonce().
 	form::hidden(array('action'),'lang').
@@ -489,20 +341,14 @@
 elseif ($action == 'author' && $core->auth->check('admin',$core->blog->id))
 {
-	echo dcPage::breadcrumb(
-		array(
-			html::escapeHTML($core->blog->name) => '',
-			__('Entries') => 'posts.php',
-			'<span class="page-title">'.__('Change author for entries').'</span>' => ''
-	));
-	echo '<p><a class="back" href="'.html::escapeURL($redir_sel).'">'.__('Back to entries list').'</a></p>';
-
+	echo '<h2 class="page-title">'.__('Change author for entries').'</h2>';
+	
 	echo
 	'<form action="posts_actions.php" method="post">'.
-	$fields->getEntries().
-	'<p><label for="new_auth_id" class="classic">'.__('Author ID:').'</label> '.
-	form::field('new_auth_id',20,255);
-	
-	echo
-	$fields->getHidden().
+	'<p><label for="new_auth_id" class="classic">'.__('Author ID:').' '.
+	form::field('new_auth_id',20,255).
+	'</label> ';
+	
+	echo
+	$hidden_fields.
 	$core->formNonce().
 	form::hidden(array('action'),'author').
@@ -511,4 +357,6 @@
 }
 
+echo '<p><a class="back" href="'.html::escapeURL($redir).'">'.__('back').'</a></p>';
+
 dcPage::close();
 ?>
Index: admin/preferences.php
===================================================================
--- admin/preferences.php	(revision 1474)
+++ admin/preferences.php	(revision 1375)
@@ -361,11 +361,5 @@
 	
 	# --BEHAVIOR-- adminPreferencesHeaders
-	$core->callBehavior('adminPreferencesHeaders'),
-
-	dcPage::breadcrumb(
-	array(
-		html::escapeHTML($core->auth->userID()) => '',
-		'<span class="page-title">'.$page_title.'</span>' => ''
-	))
+	$core->callBehavior('adminPreferencesHeaders')
 );
 
@@ -388,4 +382,6 @@
 	dcPage::message(__('Default favorites have been successfully updated.'));
 }
+
+echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.$page_title.'</span></h2>';
 
 # User profile
@@ -397,18 +393,18 @@
 '<div class="two-cols">'.
 '<div class="col">'.
-'<p><label for="user_name">'.__('Last Name:').'</label>'.
-form::field('user_name',20,255,html::escapeHTML($user_name)).'</p>'.
-
-'<p><label for="user_firstname">'.__('First Name:').'</label>'.
-form::field('user_firstname',20,255,html::escapeHTML($user_firstname)).'</p>'.
-
-'<p><label for="user_displayname">'.__('Display name:').'</label>'.
-form::field('user_displayname',20,255,html::escapeHTML($user_displayname)).'</p>'.
-
-'<p><label for="user_email">'.__('Email:').'</label>'.
-form::field('user_email',20,255,html::escapeHTML($user_email)).'</p>'.
-
-'<p><label for="user_url">'.__('URL:').'</label>'.
-form::field('user_url',30,255,html::escapeHTML($user_url)).'</p>'.
+'<p><label for="user_name">'.__('Last Name:').
+form::field('user_name',20,255,html::escapeHTML($user_name)).'</label></p>'.
+
+'<p><label for="user_firstname">'.__('First Name:').
+form::field('user_firstname',20,255,html::escapeHTML($user_firstname)).'</label></p>'.
+
+'<p><label for="user_displayname">'.__('Display name:').
+form::field('user_displayname',20,255,html::escapeHTML($user_displayname)).'</label></p>'.
+
+'<p><label for="user_email">'.__('Email:').
+form::field('user_email',20,255,html::escapeHTML($user_email)).'</label></p>'.
+
+'<p><label for="user_url">'.__('URL:').
+form::field('user_url',30,255,html::escapeHTML($user_url)).'</label></p>'.
 
 '</div>'.
@@ -416,12 +412,13 @@
 '<div class="col">'.
 
-'<p><label for="user_lang">'.__('User language:').'</label>'.
-form::combo('user_lang',$lang_combo,$user_lang,'l10n').'</p>'.
-
-'<p><label for="user_tz">'.__('User timezone:').'</label>'.
-form::combo('user_tz',dt::getZones(true,true),$user_tz).'</p>'.
+'<p><label for="user_lang">'.__('User language:').
+form::combo('user_lang',$lang_combo,$user_lang,'l10n').'</label></p>'.
+
+'<p><label for="user_tz">'.__('User timezone:').
+form::combo('user_tz',dt::getZones(true,true),$user_tz).'</label></p>'.
 
 '</div>'.
 '</div>'.
+'<br class="clear" />'. //Opera sucks
 '</fieldset>';
 
@@ -435,11 +432,11 @@
 	'<p class="pw-cell"><label for="new_pwd">'.__('New password:').'</label>'.
 	form::password('new_pwd',20,255,'','','',false,' data-indicator="pwindicator" ').'</p>'.
-	'<div id="pwindicator">'.
-	'    <div class="bar"></div>'.
-	'    <p class="label no-margin"></p>'.
-	'</div>'.
-	'</div>'.
+    '<div id="pwindicator">'.
+    '    <div class="bar"></div>'.
+    '    <p class="label no-margin"></p>'.
+    '</div>'.
+    '</div>'.
 	
-	'<p><label for="new_pwd_c">'.__('Confirm new password:').'</label>'.
+	'<p><label for="new_pwd_c">'.__('Confirm password:').'</label>'.
 	form::password('new_pwd_c',20,255).'</p>'.
 	'</fieldset>'.
@@ -465,12 +462,12 @@
 '<fieldset><legend>'.__('My options').'</legend>'.
 
-'<p><label for="user_post_format">'.__('Preferred format:').'</label>'.
-form::combo('user_post_format',$formaters_combo,$user_options['post_format']).'</p>'.
-
-'<p><label for="user_post_status">'.__('Default entry status:').'</label>'.
-form::combo('user_post_status',$status_combo,$user_post_status).'</p>'.
-
-'<p><label for="user_edit_size">'.__('Entry edit field height:').'</label>'.
-form::field('user_edit_size',5,4,(integer) $user_options['edit_size']).'</p>'.
+'<p><label for="user_post_format">'.__('Preferred format:').
+form::combo('user_post_format',$formaters_combo,$user_options['post_format']).'</label></p>'.
+
+'<p><label for="user_post_status">'.__('Default entry status:').
+form::combo('user_post_status',$status_combo,$user_post_status).'</label></p>'.
+
+'<p><label for="user_edit_size">'.__('Entry edit field height:').
+form::field('user_edit_size',5,4,(integer) $user_options['edit_size']).'</label></p>'.
 
 '<p><label for="user_wysiwyg" class="classic">'.
@@ -488,6 +485,6 @@
 if (count($iconsets_combo) > 1) {
 	echo 
-		'<p><label for="user_ui_iconset">'.__('Iconset:').'</label>'.
-		form::combo('user_ui_iconset',$iconsets_combo,$user_ui_iconset).'</p>';
+		'<p><label for="user_ui_iconset">'.__('Iconset:').
+		form::combo('user_ui_iconset',$iconsets_combo,$user_ui_iconset).'</label></p>';
 } else {
 	form::hidden('user_ui_iconset','');
@@ -499,9 +496,9 @@
 	form::checkbox('user_ui_hide_std_favicon',1,$user_ui_hide_std_favicon).' '.
 	__('Do not use standard favicon').'</label></p>'.
-	'<p class="clear form-note info">'.__('This will be applied for all users').
-	'<br class="clear" /></p>';//Opera sucks;
+	'<p class="clear form-note info">'.__('This will be applied for all users').'</p>';
 }
 
 echo 
+'<br class="clear" />'. //Opera sucks
 '</fieldset>';
 
@@ -529,7 +526,7 @@
 '<p><label for="user_dm_quickentry" class="classic">'.
 form::checkbox('user_dm_quickentry',1,$user_dm_quickentry).' '.
-__('Display quick entry form').'</label><br class="clear" />'. //Opera sucks
-'</p>'.
-
+__('Display quick entry form').'</label></p>'.
+
+'<br class="clear" />'. //Opera sucks
 '</fieldset>';
 
Index: admin/search.php
===================================================================
--- admin/search.php	(revision 1358)
+++ admin/search.php	(revision 1276)
@@ -70,18 +70,13 @@
 
 
-dcPage::open(__('Search'),$starting_scripts,
-	dcPage::breadcrumb(
-		array(
-			html::escapeHTML($core->blog->name) => '',
-			'<span class="page-title">'.__('Search').'</span>' => ''
-		))
-);
+dcPage::open(__('Search'),$starting_scripts);
 
 echo
+'<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.__('Search').'</span></h2>'.
 '<form action="search.php" method="get">'.
 '<div class="fieldset"><h3>'.__('Search options').'</h3>'.
 '<p><label for="q">'.__('Query:').' </label>'.form::field('q',30,255,html::escapeHTML($q)).'</p>'.
-'<p><label for="qtype1" class="classic">'.form::radio(array('qtype','qtype1'),'p',$qtype == 'p').' '.__('Search in entries').'</label> '.
-'<label for="qtype2" class="classic">'.form::radio(array('qtype','qtype2'),'c',$qtype == 'c').' '.__('Search in comments').'</label></p>'.
+'<p><label for="qtype1" class="classic">'.form::radio(array('qtype','qtype1'),'p',$qtype == 'p').' '.__('Search entries').'</label> '.
+'<label for="qtype2" class="classic">'.form::radio(array('qtype','qtype2'),'c',$qtype == 'c').' '.__('Search comments').'</label></p>'.
 '<p><input type="submit" value="'.__('Search').'" /></p>'.
 '</div>'.
Index: admin/style/date-picker.css
===================================================================
--- admin/style/date-picker.css	(revision 1330)
+++ admin/style/date-picker.css	(revision 0)
@@ -1,35 +1,35 @@
 .date-picker {
-	border-collapse: collapse;
-	background: #fff;
-	color: #fff;
+	border-collapse : collapse;
+	background : #fff;
+	color : #fff;
 	border: 1px solid #666;
-	border-width: 1px 2px 2px 1px;
+	border-width : 1px 2px 2px 1px;
 }
 .date-picker th {
-	border: none;
-	color: #000;
-	text-align: center;
+	border : none;
+	color : #000;
+	text-align : center;
 }
 .date-picker td {
-	border: 1px solid #666;
-	text-align: center;
+	border : 1px solid #666;
+	text-align : center;
 	padding : 4px 6px;
 }
 th.date-picker-month {
-	text-align: left;
+	text-align : left;
 }
 th.date-picker-year {
-	text-align: right;
+	text-align : right;
 }
 .date-picker-control, th.date-picker-control {
-	color: #06c;
-	cursor: pointer;
+	color : #06c;
+	cursor : pointer;
 }
 .date-picker-day, .date-picker-today {
-	color: #000;
-	background: #eee;
-	cursor: pointer;
+	color : #000;
+	background : #eee;
+	cursor : pointer;
 }
 .date-picker-today {
-	background: #ccc;
+	background : #ccc;
 }
Index: admin/style/default.css
===================================================================
--- admin/style/default.css	(revision 1492)
+++ admin/style/default.css	(revision 1375)
@@ -13,13 +13,13 @@
 
 /* ------------------------------------------------------------------ html */
-html {
-	font-size: 62.5%;
-}
 body {
-	font: 1.2rem/1.5 Arial,Helvetica,sans-serif;
+	font: 75%/1.5em Helvetica,Arial,sans-serif;
 	color: #333;
+	background: #f5f5f5;
+	margin: 0;
+	padding: 0;
+}
+body.auth {
 	background: #fff;
-	margin: 0;
-	padding: 0;
 }
 
@@ -36,49 +36,19 @@
 }
 
-h1, h2, h3, .as_h3, h4, h5, h6, p {
+h1, h2, h3, h4, h5, h6, p {
 	margin-top: 0;
-	margin-bottom: 1rem;
+	margin-bottom: 0.6em;
 }
 h2 {
 	color: #666;
-	font-size: 1.8rem;
-	padding: 0 0 1.8rem;
-	font-weight: normal;
-}
-h2 a:link, h2 a:visited {
-	color: #666;
-	border-color: #000;
+	font-size: 1.4em;
+	padding: 4px 0;
 }
 .page-title {
 	color: #d30e60;
 }
-.page-title img {
-	padding-left: .6rem;
-	vertical-align: middle;
-}
-#content > h2 {
-	padding: 0 1.8rem .6rem;
-	margin: 0 -1.8rem 1rem;
-	background: #fff url(bg_h2.png) repeat-x center bottom;
-}
-h3, .as_h3 {
-	color: #575859;
-	font-size: 1.4rem;
-}
-h4 {
-	font-size: 1.1em;
-	color: #575859;
-}
-h5 {
-	font-size: 1em;
-	color: #575859;
-}
-#entry-sidebar h5 {
-	font-weight: normal;
+h3 {
 	color: #333;
-}
-.entry-status label img {
-	padding-left: .4rem;
-	vertical-align: text-top;
+	font-size: 1.2em;
 }
 p, div.p {
@@ -87,5 +57,5 @@
 hr {
 	height: 1px;
-	border-width: 1px 0 0;
+	border-width: 1px 0 0 0;
 	border-color: #999;
 	border-style: solid;
@@ -113,34 +83,29 @@
 #header {
 	background: #575859;
+	height: 3em;
 	position: relative;
-	border-bottom: 4px solid #A2CBE9;
-	width: 100%;
 }
 #prelude {
-	line-height: 1.9;
-	margin: 0;
-	padding: 0;
+	background: #575859;
+	line-height: 1.5em;
+	margin: 0;
+	padding: 0 1.7em 0 1em;
 	overflow: hidden;
 	position: absolute;
-	top: 3em;
+	top: 1.2em;
 	left: 0;
-	background: #A2CBE9;
-	width: 14.5em;
 	}
 #prelude li {
 	list-style-type: none;
-	margin: 0;
+	margin: 0 1em 0 0;
 	background:transparent;
-}
+	}
 #prelude li a {
-	padding-left: 1.6rem;
-	background: #A2CBE9;
-	color: #000;
-	border-bottom-color: #A2CBE9;
-}
+	color:#fff;
+	}
 #top {
 	margin: 0;
 	padding: 0;
-	width: 14.5em;
+	width: 13em;
 	float: left;
 }
@@ -148,38 +113,38 @@
 	padding: 0;
 	margin: 0;
-	height: 3.6rem;
+	height: 3em;
 	text-indent: -1000px;
+	background: transparent url(dc_logo.png) no-repeat 0 50%;
 }
 #top h1 a {
 	position: absolute;
-	top: 0;
+	top: 3px;
 	left: 0;
-	width: 17.4rem;
-	height: 3.6rem;
+	width: 130px;
+	height: 60px;
 	border: none;
+	outline: none;
 	color: #fff;
 }
-#top h1 a:link {
-	background: transparent url(dc_logos/b-dotclear120.png) no-repeat 0 6px;
-}
-#top h1 a:hover, #top h1 a:focus {
-	background: transparent url(dc_logos/b-dotclear120.png) no-repeat 0 -94px;	
-}
 #info-boxes {
-	font-size: 1em;
-	line-height: 3em;
+	background: #575859;
+	font-size: .95em;
+	height: 3em;
 }
 #info-box1 {
 	margin: 0;
-	padding: 0 3px 0 1.8rem;
+	padding: .5em 3px 4px 0;
 	color: #fff;
-	display: inline-block;
+	float: left;
+	background: #575859;
 }
 #info-box2 {
-	margin: 0;
-	padding: 0 1.3em 0 0;
+	margin: .1em 0 0 0;
+	padding: .5em 1.3em 4px 0;
 	color: #fff;
 	float: right;
 	text-align: right;
+	background: #575859;
+	height: 2em;
 }
 #info-box1 p {
@@ -188,5 +153,5 @@
 }
 #info-box1 select {
-	width: 14.5em;
+	width: 15em;
 }
 #info-box1 a img, #info-box2 a img {
@@ -194,5 +159,6 @@
 	padding-left: .3em;
 	}
-#info-boxes a {
+#info-box1 a, #info-box2 a {
+	background: #575859;
 	font-weight: bold;
 	color: #fff;
@@ -207,15 +173,15 @@
 }
 #info-box2 a.active {
-	border-bottom-color: #fff;
+	border-bottom-color: #f5f5f5;
 	margin: 0;
 	padding: 1.2em .5em;
-	background-color: #fff;
+	background-color: #f5f5f5;
 	color: #333;
 	font-weight: bold;
 }
 #info-box2 span {
-	color: #999;
-}
-/* main blocks */
+	color: #575859;
+}
+/* prelude */
 #wrapper {
 	width: 100%;
@@ -224,12 +190,13 @@
 	width: 100%;
 	float: right;
-	margin-left: -14.5em;
+	margin-left: -13em;
 	margin-top: 0;
-	background: #fff url(bg_menu.png);
 }
 #content {
-	margin: 0 0 0 14.5em;
-	padding: .9rem 1.8rem 1.8rem;
+	margin: 1.5em 1.5em .5em 13em;
+	padding: 1em;
 	background: #fff;
+	border-radius: .5em;
+	border: 1px solid #ddd;
 }
 	/* Micro clearfix thx to Nicolas Gallagher */
@@ -252,32 +219,26 @@
 }
 .two-cols .col {
-	width: 47%;
+	width: 49%;
 	margin-left: 2%;
 	float: left;
 }
+.two-cols .col:first-child {
+	width: 49%;
+	margin-left: 0;
+}
 .two-cols .col70{
-	width: 68%;
+	width: 69%;
 	margin-left: 0;
 	float: left;
 }
-.col30 {
+.two-cols .col30 {
 	width: 28%;
 	margin-left: 2%;
 	float: left;
 }
-.two-cols .col:first-child,
-.two-cols .col30.first-col {
-	margin-left: 0;
-	margin-right: 2%;
-}
-.two-cols .col:last-child,
-.two-cols .col70.last-col {
-	margin-left: 2%;
-	margin-right: 0;
-}
 /* -------------------------------------------------------------- layout - onglets */
 .part-tabs ul {
-	padding: .5em 0 .3em 1.2rem;
-	border-bottom: 1px solid #ddd;
+	padding: .3em 0 1px 1em;
+	border-bottom: 1px solid #999;
 }
 .part-tabs li {
@@ -287,11 +248,16 @@
 }
 .part-tabs li a {
-	padding: .5em 2em;
-	margin-right: -1px;
-	border: 1px solid #aaa;
+	padding: .3em 0.5em;
+	margin-right: .5em;
+	border: 1px solid #999;
 	border-bottom: none;
+	background: #dfdfdf;
 	text-decoration: none;
-	color: #333;
-	background-color:#E4E0EC;
+	border-top-left-radius: .3em;
+	border-top-right-radius: .3em;
+	color: #000;
+}
+.part-tabs li.part-tabs-link a {
+	background: #ffe;
 }
 .part-tabs li a:hover, .part-tabs li a:focus {
@@ -302,29 +268,25 @@
 .part-tabs li.part-tabs-active a {
 	background: #fff;
+	border-bottom: 1px solid #fff;
+	color: #000;
 	font-weight: bold;
-	border-bottom-color: #fff;
-	padding-bottom: .7rem;
 }
 /* ------------------------------------------------------------------ main-menu */
 #main-menu {
-	width: 14.5em;
-	float: left;
-	margin:0;
-	padding-top: 4.5em;
-	padding-bottom: 1em;
-	background: #f7f7f7;
+	width: 13em;
+	float: left;
+	margin-top: 1.2em;
+	margin-bottom: .5em;
 }
 #main-menu h3 {
-	margin: 0;
-	padding: 1.2rem 0 1rem 2.2rem;
-	text-indent: -1.6rem;
+	margin: 0 0 0.5em;
+	padding: .5em 0 0 .5em;
+	text-transform: uppercase;
 	color: #666;
-	font-size: 1.4rem;
-}
-#main-menu h3 img[alt="cacher"] {
-	vertical-align: top;
+	font-size: 1.1em;
 }
 #main-menu ul {
-	margin: 0 0 1.8rem 0;
+	font-size: .95em;
+	margin: 0 0 1em 0;
 	padding: 0;
 	list-style: none;
@@ -333,86 +295,57 @@
 	display: block;
 	margin: 0.5em 0 0;
-	padding: .3rem 0 0 30px;
+	padding: .2em 0 0 32px;
 	background-repeat: no-repeat;
-	background-position: 8px .3em;
-}
-#main-menu li.active {
-	background-color: #fff;
+	background-position: 12px .4em;
 }
 #main-menu a {
-	color: #333;
-	border-bottom-color: #ccc;
+	font-weight: bold;
 }
 #main-menu .active a {
 	border-bottom: none;
-	color: #d30e60;
+	color: #333;
 }
 #main-menu .active {
-	font-weight: bolder;
-}
-#search-menu {
-	padding: .3rem .4rem 0;
-	font-size: 100%
-}
-#search-menu p {
-	display: inline-block;
-	border: 1px solid #999;
-	border-radius: .6em;
-	position: relative;
-	height: 2rem;
-	overflow: hidden;
-}
-#search-menu #q {
-	width: 12rem;
-	border-bottom-left-radius: .6em;
-	border-top-left-radius: .6em;
-	background: transparent url(search.png) no-repeat 4px center;
-	text-indent: 18px;
-	height: 2rem;
-	padding: 0 2px; 
+	background-color: #fff;
+	padding: .4em 0 .1em 32px;
+	background-position: 12px .4em;
+	border-top: 1px solid #ddd;
+	border-bottom: 1px solid #ddd;
+	margin-right: -1px;
+}
+#favorites-menu {
+	margin: 0 0 2em;
+}
+#favorites-menu h3 {
+	color: #333;
+	text-transform: none;
+}
+#favorites-menu a {
+	color: #333;
+}
+#favorites-menu .active {
+	background-color: transparent;
 	border: none;
 }
-#search-menu input[type="submit"] {
-	padding: 0 0.3rem;
-	background: #dfdfdf;
-	border-color: #999;
-	color: #444;
-	border-bottom-right-radius: .6em;
-	border-top-right-radius: .6em;
-	border-top-left-radius: 0;
-	border-bottom-left-radius: 0;
-	text-shadow: none;
-	height: 2rem;
-	border: none;
-	border-left: 1px solid #aaa;
-	font-size: 1rem;
-}
-#search-menu input[type="submit"]:hover,
-#search-menu input[type="submit"]:focus {
-	background: #575859;
-	color: #fff;
-}
-#favorites-menu, #blog-menu, #system-menu, #plugins-menu {
-	border-bottom: 1px dashed #A2CBE9;
-}
-#favorites-menu h3 {
-	color: #000;
-	font-variant: small-caps;
-	padding-top: .6rem;
+#favorites-menu .active a {
+	font-weight: bold;
+	color: #666;
 }
 /* ------------------------------------------------------------------ footer */
 #footer {
 	clear: both;
-	padding: .6rem 1.2rem .6rem 0;
+	padding: .75em .75em 0 0;
 	text-align: right;
-	border-top: .1rem solid #ccc;
 }
 #footer p {
 	margin: 0;
 	padding: 0 1em;
-	font-size: 1em;
+	text-align: center;
+	font-size: 1.1em;
+}
+#footer a {
 }
 #footer p span.credit {
-	font-size: 1rem;
+	font-size: .85em;
 	font-weight: normal;
 }
@@ -420,20 +353,19 @@
 #login-screen {
 	display: block;
-	width: 20em;
+	width: 18em;
 	margin: 1.5em auto 0;
-	font-size: 1.4rem;
+	font-size: 1.1em;
 }
 #login-screen h1 {
 	text-indent: -2000px;
-	background: transparent url(dc_logos/w-dotclear240.png) no-repeat top left;
-	height: 66px;
+	background: transparent url(dotclear-logo2.png) no-repeat top left;
+	height: 50px;
 	margin-bottom: .5em;
-	margin-left: 0;
-}
-#login-screen .fieldset {
-	border: 1px solid #A8DC26;
+	margin-left: .5em;
+}
+#login-screen fieldset, #login-screen .fieldset {
+	border: 1px solid #999;
 	padding: 1em 1em 0 1em;
 	border-radius: 4px;
-	background: #fff;
 }
 #login-screen input[type=text], #login-screen input[type=password], #login-screen input[type=submit] {
@@ -441,12 +373,21 @@
 }
 #login-screen #issue {
-	margin-left: 1.5rem;
-	font-size: 1.2rem;
+	margin-left: 1em;
+	font-size: 1em;
 }
 #login-screen #issue strong {font-weight: normal;}
+
 
 /* ------------------------------------------------------------------ dashboard */
 #dashboard-main {
+	float: left;
+	overflow: hidden;
+	padding: 1em 2% 1em 0;
+	width: 70%;
+}
+#dashboard-main.fullwidth {
+	width: 100%;
 	padding: 1em 0;
+	float: none;
 }
 #icons {
@@ -458,8 +399,6 @@
 	width: 210px;
 	text-align: center;
-	margin: 1em 0 2em;
-	padding: 1em 0;
+	margin: 2em 0 0 0;
 	display:inline-block;
-	vertical-align: top;
 }
 #icons a,
@@ -473,24 +412,4 @@
 #icons a span {
 	border-bottom: 1px dotted #f90;
-	color: #333;
-}
-#icons a img {
-	padding: 2em;
-	margin-bottom: .3em;
-	-moz-box-shadow: 0px 1px 0px 0px #ffffff;
-	-webkit-box-shadow: 0px 1px 0px 0px #ffffff;
-	box-shadow: 0px 1px 0px 0px #ffffff;
-	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f9f9f9), color-stop(1, #e9e9e9) );
-	background:-moz-linear-gradient( center top, #f9f9f9 5%, #e9e9e9 100% );
-	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#e9e9e9');
-	background-color:#f9f9f9;
-	-moz-border-radius:1em;
-	-webkit-border-radius:1em;
-	border-radius:1em;
-	border:1px solid #dcdcdc;
-	display:inline-block;
-}
-#icons a img:hover, #icons a:focus img {
-	background: #BBDB58;
 }
 #icons a:focus span, #icons a:hover span {
@@ -498,4 +417,5 @@
 }
 #quick {
+	clear: left;
 	margin-top: 2em;
 }
@@ -506,5 +426,5 @@
 #quick p.qinfo {
 	margin: -.7em -1em 1em;
-	background: #f3f3ff url(info.png) no-repeat .2em .2em;
+	background: #eef url(info.png) no-repeat .2em .2em;
 	border: 1px solid #99f;
 	padding: .2em 1em .1em 24px;
@@ -512,14 +432,9 @@
 }
 #dashboard-items {
-	margin: 3em auto;
-	display: table;
-	width: 100%;
-	border-collapse: collapse;
-}
-.db-item {
-	display: table-cell;
-	padding: 1em 3em;
-	vertical-align: top;
-	border: 1px solid #ccc;
+	float: left;
+	width: 27%;
+	overflow: hidden;
+	padding-bottom: 1em;
+	padding-top: 3em;
 }
 #dashboard-items img {
@@ -561,26 +476,9 @@
 }
 #entry-content {
-	margin-right: 19em;
-	margin-left: 0;
-}
-.multi-part {
-	padding-left: 1.2rem;
-}
-#entry-content label {
-	text-transform: uppercase;
-	font-weight: bold;
-	margin-top: 2em;
+	margin-right: 18em;
 }
 #entry-sidebar {
 	width: 17em;
 	float: right;
-}
-#entry-sidebar input[type="text"],
-#entry-sidebar select {
-	width: 14em; /* to prevent inline with label */
-}
-.box {
-	border-bottom: 1px solid #ddd;
-	margin-bottom: 1em;
 }
 #comments {
@@ -620,8 +518,5 @@
 }
 #media-details {
-}
-.near-icon {
 	margin-left: 70px;
-	margin-bottom: 3em;
 }
 #media-details ul {
@@ -758,31 +653,26 @@
 /* -------------------------------------------------------------------- Themes */
 #themes {
-	margin: 0;
-	width: 100%;
-	padding: 0;
-}
-#themes h3 {
+	border-bottom: 1px solid #ccc;
+	margin: 1em 0;
 }
 #themes div.theme-details {
+	clear: left;
 	border-top: 1px solid #ccc;
-	padding: 12px;
-	display: inline-block;
-	vertical-align: top;
-	width: 284px;
-}
-.current-theme {
-	background: #eef;
+	padding: 1em 0;
 }
 #themes div.theme-details:hover {
-	background: #f0f0f0;
+	background: #eee;
 }
 #themes div.theme-details div.theme-shot {
+	float: left;
 }
 #themes div.theme-details div.theme-shot img {
 	display: block;
+	width: 57px;
+	height: 50px;
 	border: 1px solid #ccc;
-	margin-bottom: 1.5em;
 }
 #themes div.theme-details div.theme-info {
+	margin-left: 67px;
 }
 #themes div.theme-details div.theme-info span.theme-desc {
@@ -793,34 +683,21 @@
 }
 #themes div.theme-details div.theme-actions {
-}
-#themes-actions {
-	border-bottom: 1px solid #999;
-	margin-bottom: 3em;
-}
-.theme-css {
-	display: block;
-}
-
+	margin-left: 67px;
+}
 /* Themes list, JS version */
 #themes-wrapper {
-	display: table;
-}
-#themes-wrapper #themes {
-	display: table-cell;
-	vertical-align: top;
-	padding-left: 1em;
 }
 #theme-box {
-	display: table-cell;
-	vertical-align: top;
-	padding: 1rem 0; 
-	width: 312px;
-	background: #eef;
-	border: 1px solid #ccc;
-	border-radius: 3px;
+	border: 1px solid #999;
+	border-left: none;
+	padding: 5px;
+	float: right;
+	height: 420px;
+	width: 320px;
+	overflow: auto;
 }
 #theme-box div.theme-shot img {
 	display: block;
-	margin: 0 16px;
+	margin: 0 0 0 10px;
 	width: 280px;
 	height: 245px;
@@ -828,8 +705,11 @@
 }
 #theme-box div.theme-info {
-	margin: 1em 16px;
-}
-#theme-box h4 {
-	color: #000;
+	margin: 1em 0 0 10px;
+}
+#theme-box h3 {
+	margin: 0;
+}
+#theme-box div.theme-info span {
+	display: block;
 }
 #theme-box span.theme-version {
@@ -844,5 +724,12 @@
 }
 #theme-box div.theme-actions {
-	padding: 0 16px;
+	margin-left: 10px;
+}
+#themes-wrapper #themes {
+	border: 1px solid #999;
+	overflow: auto;
+	height: 420px;
+	padding: 5px;
+	margin: 0;
 }
 #themes div.theme-details-js {
@@ -850,9 +737,9 @@
 	width: 120px;
 	height: 150px;
-	margin: 0 12px 24px;
-	padding: 12px 12px 0;
+	margin: 0 10px 20px;
+	padding: 10px 10px 0;
 	text-align: center;
 	background: #f3f3f3;
-	border: 1px solid #ddd;
+	border: 1px solid #f3f3f3;
 	cursor: pointer;
 	border-radius: 4px;
@@ -862,5 +749,5 @@
 }
 #themes div.theme-details-js.theme-selected {
-	background: #ddd;
+	background: #E5E3DA;
 	border: 1px solid #999;
 }
@@ -870,4 +757,10 @@
 	border: 1px solid #fff;
 }
+#themes div.theme-details-js h3 {
+	font-family: inherit;
+	font-weight: normal;
+	margin: 0;
+	padding: 0;
+}
 /* ----------------------------------------------------------  Plugins list */
 #plugins td.action {
@@ -883,21 +776,22 @@
 /* ------------------------------------------------------------------ contextual help */
 #help {
-	margin-top: 4em;
+	margin-top: 2em;
 	background: #f5f5f5;
 	z-index: 100;
 }
 #help-button {
-	background: transparent url(../images/page_help.png) no-repeat 6px center;
-	position: absolute;
-	top: 3.6rem;
+	position: fixed;
+	top: 3.2em;
 	right: 0px;
-	padding: 0 2rem 0 3rem;
 	cursor: pointer;
-	color: #2373A8;
-	line-height: 4.2rem;
-}
-#help-button span {
-	padding: .6rem 0 .1rem 0;
-	border-bottom: 1px solid #2373A8;
+	background: #fc3;
+	border: 1px solid #dde;
+	border-right: none;
+	font-size: 1.1em;
+	font-weight: bold;
+	text-transform: capitalize;
+	padding: .33em .75em .33em 1em;
+	border-radius: 1em 0 0 1em;
+	color: #444;
 }
 .help-box {
@@ -909,21 +803,13 @@
 }
 #content.with-help #help-button {
-	right: 28.2rem;
-	background-color: #f5f5f5;
-	position: fixed;
-	border-top: 2px solid #FFD478;
-	border-left: 2px solid #FFD478;
-	border-bottom: 2px solid #FFD478;
-	border-bottom-left-radius: 1rem;
-	border-top-left-radius: 1rem;
+	right: 282px;
 }
 #content.with-help #help {
 	display: block;
 	position: absolute;
-	top: 3.6rem;
+	top: 40px;
 	right: 0;
-	width: 28rem;
-	border-left: 2px solid #FFD478;
-	border-top: 2px solid #FFD478;
+	width: 280px;
+	border-left: 2px solid #fc3;
 	margin-top: 0;
 	padding: 10px 0 0 0;
@@ -943,33 +829,23 @@
 /* ------------------------------------------------------------------ popups */
 body.popup #wrapper, body.popup #top {
-	width: 100%;
-	padding: 0;
-}
-body.popup #wrapper {
+	margin-top: -1.5em;
 	float: none;
-	margin:0;
-	display: block;
-}
-body.popup h1, body.popup #top {
-	margin: 0;
-	border-bottom: 1px solid;
-	font-weight: normal;
-	color: #fff;
-	background: #575859;
-	font-size: 1.5em;
-	text-indent: .6rem;
-	line-height: 1.3em;
+}
+body.popup #top h1 {
+	background: transparent;
 }
 body.popup #main {
-	margin-bottom: 1em 0;
+	margin-left: -35px;
+	margin-bottom: 1em;
 }
 body.popup #content {
-	margin: 0;
-	padding: .6rem 0 !important;
-}
-body.popup #content h2 {
-	margin: 0 0 1em;
+	margin-left: 35px;
+	margin-left: 2em;  /* 3.2 */
+}
+body.popup #footer {
+	display: none; /* 3.2 */
 }
 body.popup #footer p {
+	margin-left: 35px;
 	border: none;
 }
@@ -983,6 +859,6 @@
 }
 p.error, p.message, p.static-msg {
-	padding-top: 1rem;
-	padding-bottom: 1rem;
+	padding-top: 1em;
+	padding-bottom: 1em;
 }
 div.error, p.error {
@@ -998,32 +874,4 @@
 div.static-msg a, p.static-msg a {
 	color: #fff;
-}
-/* ------------------------------------------------------------------ navigation */
-.anchor-nav {
-	background: #575859;
-	color: #fff;
-	padding: .4rem 1.2rem;
-	float: right;
-}
-.nav_prevnext {
-	margin-bottom: 2em;
-	color: #fff;
-}
-.nav_prevnext a, a.back {
-	border: 1px solid #ddd;
-	padding: .2rem 2rem;
-	border-radius: 1rem;
-	background-color: #f0f0f0;
-}
-a.back:before {
-	content: "\ab\a0";
-}
-a.onblog_link {
-	color: #333;
-	float: right;
-	border: 1px solid #eee;
-	padding: .2rem 2rem;
-	border-radius: 1rem;
-	background-color: #ffe;
 }
 /* ------------------------------------------------------------------ debug */
@@ -1050,23 +898,7 @@
 /* -------------------------------------------------------------------- CLASSES COMMUNES */
 
-.no-margin, #entry-content label.no-margin {
-	margin: 0;
-}
-.border-top {
-	border-top: 1px solid #999;
-	padding-top: 1em;
-	margin-top:	1em;
-}
-.fieldset {
-	background: #fff;
-	border: 1px solid #aaa;
-	border-radius: 6px; 
-	padding: 1em .7em .5em;
-	margin-bottom: 1em;
-}
-.fieldset h3 {
-	color: #333;
-}
-
+.no-margin {
+	margin: 0;
+}
 /* paragraphe pour bouton Nouveau bidule */
 p.top-add {
@@ -1159,13 +991,14 @@
 -------------------------------------------------------- */
 table {
-	font-size: 1.2rem;
+	font-size: 1em;
 	border-collapse: collapse;
 	margin: 0 0 1em 0;
 }
 tr.line:hover {
-	background: #f3f3f3;
+	background: #ddd;
 }
 caption {
 	color: #333;
+	font-size: 1.2em;
 	font-weight: bold;
 	text-align: left;
@@ -1173,28 +1006,17 @@
 }
 
-td {
+th, td {
 	border-width: 0 0 1px 0;
 	border-style: solid;
-	border-color: #e3e3e3;
-	padding: .4rem .5rem;
+	border-color: #ccc;
+	padding: 3px 5px;
 	vertical-align: top;
 }
 th {
-	border-width: 1px 0 1px 0;
-	border-style: solid;
-	border-color: #ccc;
-	background: #f3f3ff;
-	padding: .4rem .5rem;
-	vertical-align: top;
 	text-align: left;
+	border-bottom-color: #666;
 }
 .noborder td, td.noborder, .noborder th, th.noborder {
-	border-width: 0 0 1px 0;
-	border-color: #ddd;
-	line-height: 2.4rem;
-	padding-bottom: 0;
-}
-.noborder p {
-	margin-bottom: 0;
+	border-width: 0;
 }
 table .maximal, table.maximal {
@@ -1210,9 +1032,4 @@
 table.settings, table.prefs {
 	width: 80%;
-	border: 1px solid #999;
-	margin-bottom: 3em; 
-}
-table.settings th, table.prefs th {
-	background: #f3f3ff;
 }
 table.settings th:first-child, table.prefs th:first-child {
@@ -1228,4 +1045,5 @@
 	width: 40%;
 }
+
 td.status {
 	vertical-align: middle;
@@ -1266,4 +1084,5 @@
 	padding-left: 15px;
 }
+
 /* ----------------------------------------------------------------- FORMS */
 form {
@@ -1272,5 +1091,5 @@
 	padding: 0;
 }
-fieldset {
+fieldset, .fieldset {
 	display: block;
 	margin: 0 0 1em 0;
@@ -1286,8 +1105,7 @@
 	border-width: 1px;
 	border-style: solid;
-	border-color: #333;
-	background: #fff;
+	border-color: #ccc;
+	background: #f5f5f5;
 	margin-bottom: 0.5em;
-	border-radius: 3px;
 }
 optgroup {
@@ -1303,5 +1121,5 @@
 	border-width: 1px;
 	border-style: solid;
-	border-color: #666 #ccc #ccc #999;
+	border-color: #000 #ccc #ccc #000;
 }
 input.invalid, textarea.invalid, select.invalid {
@@ -1312,5 +1130,5 @@
 }
 input, textarea, select, option {
-	font: 100% "DejaVu Sans","Lucida Grande","Lucida Sans Unicode",Arial,sans-serif;
+	font: 1em "DejaVu Sans","Lucida Grande","Lucida Sans Unicode",Arial,sans-serif;
 }
 input[type=text], input[type=password], textarea {
@@ -1318,9 +1136,12 @@
 	margin-right: .3em;
 }
+input[type=checkbox], input[type=radio] {
+	border: none;
+}
 textarea {
 	padding: 2px 0;
 }
-input[type=checkbox], input[type=radio], input[type=file] {
-	border: none;
+
+input[type=checkbox], input[type=radio] {
 	margin: 0;
 	padding: 0;
@@ -1341,5 +1162,4 @@
 	font-style:italic;
 	font-weight: normal;
-	text-transform: none;
 	color: #666;
 }
@@ -1353,12 +1173,9 @@
 }
 p.form-note.info {
-	background: #f5eaff url(info.png) no-repeat .3em .3em;
-	border: 1px solid #ddbaff;
-}
-.form-note a {border-bottom: 1px solid #ddbaff;}
-
-label.ib {
-	display: inline-block;
-}
+	background: #eef url(info.png) no-repeat .3em .2em;
+	border: 1px solid #99f;
+}
+.form-note a {border-bottom: 1px solid #99f;}
+
 label.classic {
 	display: inline;
@@ -1397,5 +1214,5 @@
 	display: inline;
 	position: absolute;
-	left: 14.5em;
+	left: 15em;
 	top: 0;
 }
@@ -1409,7 +1226,8 @@
 a.form-control {
 	display: none;
-	background: url(../images/expand.png) no-repeat .4rem center;
+	font-weight: bold;
+	background: url(magnifier.png) no-repeat 0 0;
+	color: green;
 	padding-left: 20px;
-	color: #000;
 }
 .constrained {
@@ -1421,4 +1239,10 @@
 
 /* --------------------------------------------------------------- buttons */
+h2 a.button {
+	color: #333;
+	font-weight: normal;
+	font-size: .75em;
+	vertical-align: middle;
+}
 /* commun */
 input[type=submit],
@@ -1426,16 +1250,16 @@
 input[type=button],
 a.button,
+a.back,
 a.submit {
 	display: inline-block;
+	outline: none;
 	cursor: pointer;
 	text-align: center;
 	text-decoration: none;
-	padding: .1em .5em;
+	padding: .1em .5em 0 .5em;
+	text-shadow: 0 1px 1px rgba(0,0,0,.3);
 	border-radius: .2em;
 	margin-bottom: .1em;
-	font-size: 1.2rem;
- }
-h4 a.button {font-weight: normal;}
-
+}
 /* validation */
 input[type=submit],
@@ -1443,12 +1267,8 @@
 a.submit {
 	color: #fff;
-	text-shadow: 0 -1px 1px #1A87B9;
-	background:#25A6E1;
-	background:-moz-linear-gradient(top,#25A6E1 0%,#188BC0 100%);
-	background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#25A6E1),color-stop(100%,#188BC0));
-	background:linear-gradient(top,#25A6E1 0%,#188BC0 100%);
-	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#25A6E1',endColorstr='#188BC0',GradientType=0);
-	border:1px solid #2C8FD1;
-
+	border: 1px solid #2373A8;
+	background: #2373A8;
+	background: -webkit-gradient(linear, left top, left bottom, from(#2C8FD1), to(#2373A8));
+	background: -moz-linear-gradient(top,  #2C8FD1,  #2373A8);
 }
 input[type=submit]:hover,
@@ -1458,12 +1278,13 @@
 input[type=button]:focus,
 a.submit:focus {
-	background:#188BC0;
-	background:-moz-linear-gradient(top,#188BC0 0%,#25A6E1 100%);
-	background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#188BC0),color-stop(100%,#25A6E1));
-	background:linear-gradient(top,#188BC0 0%,#25A6E1 100%);
-	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#25A6E1',endColorstr='#25A6E1',GradientType=0);
+	background: #2373A8;
+	background: -webkit-gradient(linear, left top, left bottom, from(#2373A8), to(#2C8FD1));
+	background: -moz-linear-gradient(top,  #2373A8,  #2C8FD1);
+	filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#2373A8', endColorstr='#2C8FD1');
+	border: 1px solid #2C8FD1;
 }
 /* suppression et reset */
 a.button,
+a.back,
 input[type=submit].reset,
 input[type=submit].delete {
@@ -1473,18 +1294,20 @@
 	background: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#dfdfdf));
 	background: -moz-linear-gradient(top,  #f5f5f5,  #dfdfdf);
-	text-shadow:1px 1px 0px #fff;
+	text-shadow: none;
 	}
 a.button:hover,
+a.back:hover,
 input[type=reset]:hover,
 input[type=submit].reset:hover,
 input[type=submit].delete:hover,
 a.button:focus,
+a.back:focus,
 input[type=reset]:focus,
 input[type=submit].reset:focus,
 input[type=submit].delete:focus {
-	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #e9e9e9), color-stop(1, #f9f9f9) );
-	background:-moz-linear-gradient( center top, #e9e9e9 5%, #f9f9f9 100% );
-	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e9e9e9', endColorstr='#f9f9f9');
-	background-color:#e9e9e9;
+	background: #dfdfdf;
+	background: -webkit-gradient(linear, left top, left bottom, from(#dfdfdf), to(#f5f5f5));
+	background: -moz-linear-gradient(top,  #dfdfdf,  #f5f5f5);
+	filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#e5e5e5', endColorstr='#f5f5f5');
 	}
 a.delete,
@@ -1492,5 +1315,5 @@
 input[type=submit].delete {
 	color: #c00;
-	padding-bottom: .2rem;
+	padding-bottom: .1em;
 }
 #entry-content .delete {
@@ -1513,25 +1336,17 @@
 	margin-left: 2em;
 }
-.button.add {
-	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #9dce2c), color-stop(1, #8cb82b) );
-	background:-moz-linear-gradient( center top, #9dce2c 5%, #8cb82b 100% );
-	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#9dce2c', endColorstr='#8cb82b');
-	background-color:#9dce2c;
-	border:1px solid #83c41a;
-	padding:.6rem 1.8rem;
-	color: #000;
-	text-shadow: 1px 1px 0 #BBDB58;
-	font-weight: normal;
-	font-size: 1.4rem;
-}
-.button.add:hover, .button.add:active, .button.add:focus {
-	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #8cb82b), color-stop(1, #9dce2c) );
-	background:-moz-linear-gradient( center top, #8cb82b 5%, #9dce2c 100% );
-	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8cb82b', endColorstr='#9dce2c');
-	background-color:#8cb82b;
-	border:1px solid #83c41a;
-}
-.button-add:focus {
-	outline: dotted 1px;
+a.back:before {
+	content: "\ab\a0";
+}
+a.button.add {
+	border-radius: .5em;
+	margin-bottom: .1em;	
+	background: #2C8FD1 url(../images/add.png) no-repeat 6px center;
+	color: #fff;
+	padding: .2em 16px .2em 30px;
+	border: 1px solid #2373A8;
+}
+a.button.add:hover, a.button.add:focus {
+	background-color: #2373A8;
 }
 
@@ -1569,68 +1384,4 @@
 }
 
-/* ------------------------------------------------------- Filters */
-#filters-form {
-	border: 1px dashed #999;
-	border-radius: .6rem;
-	margin-bottom: 2em;
-	padding: .5em 1em 0;
-}
-#filters-form .table {
-	display: table;
-	width: 100%;
-	padding: 0;
-	margin-bottom: 1em;
-	margin-top: 1.5em;
-}
-#filters-form .cell {
-	padding: 0 2em 0 0;
-	display: table-cell;
-	vertical-align: top;
-}
-#filters-form .filters-options {
-	padding-left: 2em;
-	border-left: 1px solid #ccc;
-}
-#filters-form label.ib, span.ib {
-	width:7em;
-	display: inline-block;
-}
-#filters-form label.ibw, span.ibw {
-	width: 9em;
-	display: inline-block;
-}
-#filters-form select {
-	width: 14em;
-}
-
-/* ---------------------------------------------------- Pagination */
-.pagination {
-	height: 22px;
-	margin-top: 1em;
-	line-height: 22px;
-	padding: 0 1rem; 
-	border: 1px solid #ddd;
-	overflow: hidden; 
-	background: #e1e1e1; 
-	background: -moz-linear-gradient(center top , #f2f2f2, #e1e1e1); 
-	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f2f2f2), color-stop(100%,#e1e1e1)); 
-	-moz-border-radius: 4px; 
-	-webkit-border-radius: 4px; 
-	border-radius: 4px; 
-	clear: left;
-}
-.pagination a, .pagination strong {
-	height: 20px;
-	border: none;
-	padding: 2px 6px; 
-	background-color : transparent;
-	background-position : 50% 50%;
-	background-repeat: no-repeat;
-}
-.pagination a:hover, .pagination strong {
-	border-color : #ccc;
-	background-color: #fff;
-}
-
 /* --------------------------------------------------------------- password indcator */
 .pw-table {
@@ -1672,57 +1423,2 @@
 	width: 150px;
 }
-
-/* ---------------------------------------------------------------------------
-	Media queries vite fait en attendant la reprise complète du layout
----------------------------------------------------------------------------- */
-@media screen and (max-width: 920px) {
-	#top, #top h1 a {width: 42px !important; height:100%; overflow: hidden;
-}
-	#top h1 a:link {
-		background: transparent url(dc_logos/b-dotclear120.png) no-repeat -180px 6px; 
-		border-right: 1px solid #ccc;
-	}
-	#top h1 a:hover, #top h1 a:focus {
-		background: url(dc_logos/b-dotclear120.png) no-repeat -180px -94px;
-		border-right: 1px solid #A2CBE9;
-	}
-}
-@media screen and (max-width: 800px) {
-	#top, #info-boxes, #info-box1, #info-box2 {
-		display:inline-block;
-		vertical-align:middle;
-		margin:0;
-		padding:0;
-		line-height: 3.2rem;
-	}
-	#info-box1 {margin-left: 1rem;}
-	#info-box1 select {width: 14rem;}
-	#main-menu, #main, #content, #content h2, #entry-wrapper, #entry-sidebar, #entry-content, .two-cols .col, .two-cols .col:first-child {
-    	display:block;
-    	width: 98%;
-    	margin:0 auto;
-    	padding:0;
-    	float:none;
-    	text-align: left;
-    	clear: both;
-  	}
-  	#content {
-  		width: 100%;
-  		padding-top: .5em;
-  	}
-}
-@media screen and (max-width: 720px) {
-	.smallscreen {display: none;}
-	#help-button {width:20px; overflow: hidden;}
-	#info-box2 {float:none;}
-	#dashboard-items div {display: block;margin-bottom: 1em; padding: 0 1em;}
-}
-@media screen and (max-width: 492px) {
-	#header {height:3.6rem;}
-	#wrapper {font-size: 1.6rem;}
-	.page-title, #info-boxes, .media-item {display: inline-block;}
-	div.media-list .media-item {width: 90%; float: none}
-	#info-box1 select {width: 12rem; margin-right: .6rem;}
-	#info-box1 p.nomobile, label.nomobile {display: none;}
-	#help-button {height:26px; width:26px; background-color: #A2CBE9; padding: 0; margin:0;font-size: 1rem;line-height: 68px}
-}
Index: admin/style/install.css
===================================================================
--- admin/style/install.css	(revision 1330)
+++ admin/style/install.css	(revision 1065)
@@ -6,13 +6,9 @@
 	Please see http://dotclear.net/ for more details.
 */
-html {
-	font-size: 62.5%;
-}
 body.install {
-	font: 1.2rem/1.5 Arial,Helvetica,sans-serif;
-	color: #333;
-	background: #fff;
-	margin: 0;
-	padding: 0;
+	font: 0.875em Helvetica,Arial,sans-serif;
+	color: #000;
+	background-color: #fff;
+	line-height: 1.5em;
 }
 body.install #content {
@@ -26,5 +22,5 @@
 }
 body.install h1,h2 {
-	font-family: arial,Helvetica,sans-serif;
+	font-family: Helvetica,arial,sans-serif;
 }
 body.install h1 {
Index: admin/style/jsToolBar/jsToolBar.css
===================================================================
--- admin/style/jsToolBar/jsToolBar.css	(revision 1475)
+++ admin/style/jsToolBar/jsToolBar.css	(revision 1065)
@@ -2,5 +2,6 @@
 	border-width : 0 1px 1px 1px;
 	border-style : solid;
-	border-color : #ccc;
+	border-color : #000 #ccc #ccc #000;
+	padding-left: 5px;
 	background : #f9f9f9;
 }
@@ -8,10 +9,6 @@
   margin: 0;
   border: 0;
-  padding: 0;
 }
-.jstEditor textarea {
-  width: 99%;
-  padding: 1rem 0 0 1%;
-}
+
 .jstHandle {
 	height: 8px;
@@ -25,17 +22,9 @@
 
 .jstElements {
-	height: 28px;
-	padding: 0 1rem; 
-	border: 1px solid #ccc;
-	overflow: hidden; 
-	background: #e1e1e1; 
-	background: -moz-linear-gradient(center top , #f2f2f2, #e1e1e1); 
-	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f2f2f2), color-stop(100%,#e1e1e1)); 
-	-moz-border-radius: 4px 4px 0 0; 
-	-webkit-border-radius: 4px 4px 0 0; 
-	border-radius: 4px 4px 0 0; 
-	-webkit-box-shadow: 0 1px 0 #FFF inset; 
-	-moz-box-shadow: 0 1px 0 #FFF inset; 
-	box-shadow: 0 1px 0 #FFF inset;
+	padding: 3px 3px;
+	border-width: 1px 1px 0 1px;
+	border-style: solid;
+	border-color: #000 #ccc #ccc #000;
+	background: #dfdfdf;
 }
 
@@ -45,12 +34,13 @@
 .jstElements select {
 	width: 12em;
-	margin-right: .6rem;
 }
 .jstElements button {
-	width : 30px;
-	height: 28px;
-	border-style: groove;
-	border-width:  0 1px 0 0;
-	border-color: #666;
+	margin-right : 2px;
+	width : 20px;
+	height: 20px;
+	padding: 0;
+	border-style: solid;
+	border-width: 1px;
+	border-color: #dfdfdf;
 	background-color : transparent;
 	background-position : 50% 50%;
@@ -65,16 +55,11 @@
 }
 .jstElements span {
-	display : inline-block;
-	vertical-align: top;
-	background: #dfdfdf;
+	display : inline;
 }
 
 .jstSpacer {
-	width : 2px;
-	height: 28px;
-	margin-right: 0;
-	border-style: groove;
-	border-width:  0 1px 0 0;
-	border-color: #666;
+	width : 0px;
+	font-size: 1px;
+	margin-right: 4px;
 }
 
@@ -82,17 +67,19 @@
 	display: block;
 	list-style: none;
-	margin: 0;
+	margin: 0 0 0 -5px;
 	padding: 0 0 5px 0;
 	background: #dfdfdf;
 	border-top: 1px solid #999;
+	font-size: 90%;
+	font-weight: bold;
 }
 .jstSwitcher li {
 	display: inline;
 	margin: 0 0 0 5px;
-	padding: 2px 8px;
+	padding: 2px 4px;
 }
 .jstSwitcher li.jstSwitcherCurrent {
 	color: #fff;
-	background: #575859;
+	background: #999;
 	border-radius: 0 0 2px 2px;
 }
Index: admin/style/jsUpload/style.css
===================================================================
--- admin/style/jsUpload/style.css	(revision 1452)
+++ admin/style/jsUpload/style.css	(revision 1209)
@@ -76,5 +76,5 @@
 }
 
-.button.clean, .button.cancel, .button.add {
+.button.clean, .button.cancel, .button.add, .enhanced_uploader .fileupload-buttonbar .button.start {
 	display: none;
 }
@@ -107,13 +107,4 @@
 
 /* files */
-.files {
-	list-style-type: none;
-	margin-left: 0;
-	padding-left: 0;
-}
-.files li {
-	margin-left: 0;
-	padding-left: 0;
-}
 .upload-msg {
 	font-weight: bold;
@@ -179,7 +170,2 @@
 	clear: both;
 }
-
-.queue-message {
-	font-weight: bold;
-	margin: 0 0 1em 16px;
-}
Index: admin/trackbacks.php
===================================================================
--- admin/trackbacks.php	(revision 1459)
+++ admin/trackbacks.php	(revision 1179)
@@ -83,15 +83,5 @@
 /* DISPLAY
 -------------------------------------------------------- */
-if ($can_view_page) {
-	$breadcrumb = dcPage::breadcrumb(
-	array(
-		html::escapeHTML($core->blog->name) => '',
-		html::escapeHTML($post->post_title) => $core->getPostAdminURL($post->post_type,$id),
-		'<span class="page-title">'.$page_title.'</span>' => ''
-	));
-} else {
-	$breadcrumb = '';
-}
-dcPage::open($page_title,dcPage::jsLoad('js/_trackbacks.js'),$breadcrumb);
+dcPage::open($page_title,dcPage::jsLoad('js/_trackbacks.js'));
 
 # Exit if we cannot view page
@@ -104,4 +94,6 @@
 	dcPage::message(__('All pings sent.'));
 }
+
+echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.$page_title.'</span></h2>';
 
 echo '<p><a class="back" href="'.$core->getPostAdminURL($post->post_type,$id).'">'.
@@ -127,10 +119,10 @@
 '<h3>'.__('Ping blogs').'</h3>'.
 '<form action="trackbacks.php" id="trackback-form" method="post">'.
-'<p><label for="tb_urls" class="area">'.__('URLs to ping:').'</label>'.
+'<p><label for="tb_urls" class="area">'.__('URLs to ping:').
 form::textarea('tb_urls',60,5,$tb_urls).
-'</p>'.
+'</label></p>'.
 
-'<p><label for="tb_excerpt" class="area">'.__('Send excerpt:').'</label>'.
-form::textarea('tb_excerpt',60,3,$tb_excerpt).'</p>'.
+'<p><label for="tb_excerpt" class="area">'.__('Send excerpt:').
+form::textarea('tb_excerpt',60,3,$tb_excerpt).'</label></p>'.
 
 '<p>'.form::hidden('id',$id).
@@ -155,5 +147,4 @@
 }
 
-dcPage::helpBlock('core_trackbacks');
 dcPage::close();
 ?>
Index: admin/update.php
===================================================================
--- admin/update.php	(revision 1474)
+++ admin/update.php	(revision 1479)
@@ -106,5 +106,8 @@
 					throw new Exception(
 						sprintf(__('Downloaded Dotclear archive seems to be corrupted. '.
-						'Try <a %s>download it</a> again.'),'href="'.$p_url.'?step=download"')
+						'Try <a %s>download it</a> again.'),'href="'.$p_url.'?step=download"').
+						' '.
+						__('If this problem persists try to '.
+						'<a href="http://dotclear.org/download">update manually</a>.')
 					);
 				}
@@ -171,13 +174,10 @@
 		dcPage::jsPageTabs($default_tab).
 		dcPage::jsLoad('js/_update.js')
-		: ''),
-	dcPage::breadcrumb(
-		array(
-			__('System') => '',
-			'<span class="page-title">'.__('Dotclear update').'</span>' => ''
-		))
+	: '')
 );
 
 if (!$core->error->flag()) {
+	echo '<h2>'.__('Dotclear update').'</h2>';
+	
 	if (!empty($_GET['nocache'])) {
 		dcPage::message(__('Manual checking of update done successfully.'));
@@ -200,5 +200,5 @@
 		echo
 			'<p class="static-msg">'.sprintf(__('Dotclear %s is available.'),$new_v).
-				($version_info ? ' <a href="'.$version_info.'">('.__('Information about this version').')</a>' : '').
+				($version_info ? ' <a href="'.$version_info.'">('.__('information about this version').')</a>' : '').
 				'</p>'.
 		
@@ -246,5 +246,5 @@
 	'<p class="message">'.
 	__("Congratulations, you're one click away from the end of the update.").
-	' <strong><a href="index.php?logout=1">'.__('Finish the update').'</a>.</strong>'.
+	' <strong><a href="index.php?logout=1">'.__('Finish the update.').'</a></strong>'.
 	'</p>';
 }
Index: admin/user.php
===================================================================
--- admin/user.php	(revision 1474)
+++ admin/user.php	(revision 1179)
@@ -15,5 +15,5 @@
 dcPage::checkSuper();
 
-$page_title = __('New user');
+$page_title = __('new user');
 
 $user_id = '';
@@ -174,12 +174,5 @@
 	
 	# --BEHAVIOR-- adminUserHeaders
-	$core->callBehavior('adminUserHeaders'),
-
-	dcPage::breadcrumb(
-		array(
-			__('System') => '',
-			__('Users') => 'users.php',
-			'<span class="page-title">'.$page_title.'</span>' => ''
-		))
+	$core->callBehavior('adminUserHeaders')
 );
 
@@ -191,4 +184,6 @@
 	dcPage::message(__('User has been successfully created.'));
 }
+
+echo '<h2><a href="users.php">'.__('Users').'</a> &rsaquo; <span class="page-title">'.$page_title.'</span></h2>';
 
 if ($user_id == $core->auth->userID()) {
@@ -203,62 +198,62 @@
 '<div class="two-cols">'.
 '<div class="col">'.
-'<p><label for="user_id" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Username:').'</label> '.
+'<p><label for="user_id" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Username:').' '.
 form::field('user_id',20,255,html::escapeHTML($user_id)).
-'</p>'.
+'</label></p>'.
 '<p class="form-note">'.__('At least 2 characters using letters, numbers or symbols.').'</p>'.
 
 '<p><label for="new_pwd" '.($user_id != '' ? '' : 'class="required"').'>'.
 ($user_id != '' ? '' : '<abbr title="'.__('Required field').'">*</abbr> ').
-($user_id != '' ? __('New password:') : __('Password:')).'</label> '.
+($user_id != '' ? __('New password:') : __('Password:')).' '.
 form::password('new_pwd',20,255).
-'</p>'.
+'</label></p>'.
 '<p class="form-note">'.__('Password must contain at least 6 characters.').'</p>'.
 
 '<p><label for="new_pwd_c" '.($user_id != '' ? '' : 'class="required"').'>'.
-($user_id != '' ? '' : '<abbr title="'.__('Required field').'">*</abbr> ').__('Confirm password:').'</label> '.
+($user_id != '' ? '' : '<abbr title="'.__('Required field').'">*</abbr> ').__('Confirm password:').' '.
 form::password('new_pwd_c',20,255).
-'</p>'.
-
-'<p><label for="user_name">'.__('Last Name:').'</label> '.
+'</label></p>'.
+
+'<p><label for="user_name">'.__('Last Name:').' '.
 form::field('user_name',20,255,html::escapeHTML($user_name)).
-'</p>'.
-
-'<p><label for="user_firstname">'.__('First Name:').'</label> '.
+'</label></p>'.
+
+'<p><label for="user_firstname">'.__('First Name:').' '.
 form::field('user_firstname',20,255,html::escapeHTML($user_firstname)).
-'</p>'.
-
-'<p><label for="user_displayname">'.__('Display name:').'</label> '.
+'</label></p>'.
+
+'<p><label for="user_displayname">'.__('Display name:').' '.
 form::field('user_displayname',20,255,html::escapeHTML($user_displayname)).
-'</p>'.
-
-'<p><label for="user_email">'.__('Email:').'</label> '.
+'</label></p>'.
+
+'<p><label for="user_email">'.__('Email:').' '.
 form::field('user_email',20,255,html::escapeHTML($user_email)).
-'</p>'.
+'</label></p>'.
 '<p class="form-note">'.__('Mandatory for password recovering procedure.').'</p>'.
 '</div>'.
 
 '<div class="col">'.
-'<p><label for="user_url">'.__('URL:').'</label> '.
+'<p><label for="user_url">'.__('URL:').' '.
 form::field('user_url',30,255,html::escapeHTML($user_url)).
-'</p>'.
-'<p><label for="user_post_format">'.__('Preferred format:').'</label> '.
+'</label></p>'.
+'<p><label for="user_post_format">'.__('Preferred format:').' '.
 form::combo('user_post_format',$formaters_combo,$user_options['post_format']).
-'</p>'.
-
-'<p><label for="user_post_status">'.__('Default entry status:').'</label> '.
+'</label></p>'.
+
+'<p><label for="user_post_status">'.__('Default entry status:').' '.
 form::combo('user_post_status',$status_combo,$user_post_status).
-'</p>'.
-
-'<p><label for="user_edit_size">'.__('Entry edit field height:').'</label> '.
+'</label></p>'.
+
+'<p><label for="user_edit_size">'.__('Entry edit field height:').' '.
 form::field('user_edit_size',5,4,(integer) $user_options['edit_size']).
-'</p>'.
-
-'<p><label for="user_lang">'.__('User language:').'</label> '.
+'</label></p>'.
+
+'<p><label for="user_lang">'.__('User language:').' '.
 form::combo('user_lang',$lang_combo,$user_lang,'l10n').
-'</p>'.
-
-'<p><label for="user_tz">'.__('User timezone:').'</label> '.
+'</label></p>'.
+
+'<p><label for="user_tz">'.__('User timezone:').' '.
 form::combo('user_tz',dt::getZones(true,true),$user_tz).
-'</p>';
+'</label></p>';
 
 if ($core->auth->allowPassChange()) {
@@ -283,6 +278,6 @@
 echo
 '<p><label for="your_pwd" '.($user_id != '' ? '' : 'class="required"').'>'.
-($user_id != '' ? '' : '<abbr title="'.__('Required field').'">*</abbr> ').__('Your password:').'</label>'.
-form::password('your_pwd',20,255).'</p>'.
+($user_id != '' ? '' : '<abbr title="'.__('Required field').'">*</abbr> ').__('Your password:').
+form::password('your_pwd',20,255).'</label></p>'.
 '<p class="clear"><input type="submit" name="save" accesskey="s" value="'.__('Save').'" />'.
 ($user_id != '' ? '' : ' <input type="submit" name="saveplus" value="'.__('Save and create another').'" />').
Index: admin/users.php
===================================================================
--- admin/users.php	(revision 1474)
+++ admin/users.php	(revision 1237)
@@ -39,5 +39,5 @@
 
 
-#?Get users
+# Get users
 $page = !empty($_GET['page']) ? $_GET['page'] : 1;
 $nb_per_page =  30;
@@ -94,11 +94,5 @@
 }
 
-dcPage::open(__('Users'),$starting_script,
-	dcPage::breadcrumb(
-		array(
-			__('System') => '',
-			'<span class="page-title">'.__('Users').'</span>' => ''
-		))
-);
+dcPage::open(__('Users'),$starting_script);
 
 if (!$core->error->flag())
@@ -111,33 +105,36 @@
 	}
 	
-	echo
+	echo 
+	'<h2 class="page-title">'.__('Users').'</h2>'.
 	'<p class="top-add"><strong><a class="button add" href="user.php">'.__('Create a new user').'</a></strong></p>';
 	
 	if (!$show_filters) {
-		echo '<p><a id="filter-control" class="form-control" href="#">'.__('Filter users list').'</a></p>';
+		echo '<p><a id="filter-control" class="form-control" href="#">'.__('Filters').'</a></p>';
 	}
 	
 	echo
 	'<form action="users.php" method="get" id="filters-form">'.
-	'<h3>'.__('Filter users list').'</h3>'.
+	'<fieldset class="two-cols"><legend>'.__('Filters').'</legend>'.
 	
-	'<div class="table">'.
-	'<div class="cell">'.
-	'<p><label for="q" class="ib">'.__('Search:').'</label> '.
-	form::field('q',20,255,html::escapeHTML($q)).'</p>'.
+	'<div class="col">'.
+	'<p><label for="sortby">'.__('Order by:').' '.
+	form::combo('sortby',$sortby_combo,$sortby).
+	'</label> '.
+	'<label for="order">'.__('Sort:').' '.
+	form::combo('order',$order_combo,$order).
+	'</label></p>'.
 	'</div>'.
-
-	'<div class="cell filters-options">'.
-	'<p><label for="sortby" class="ib">'.__('Order by:').'</label> '.
-	form::combo('sortby',$sortby_combo,$sortby).'</p> '.
-	'<p><label for="order" class="ib">'.__('Sort:').'</label> '.
-	form::combo('order',$order_combo,$order).'</p>'.
-	'<p><span class="label ib">'.__('Show').'</span> <label for="nb" class="classic">'.	
-	form::field('nb',3,3,$nb_per_page).' '.__('users per page').'</label></p> '.
+	
+	'<div class="col">'.
+	'<p><label for="q">'.__('Search:').' '.
+	form::field('q',20,255,html::escapeHTML($q)).
+	'</label></p>'.
+	'<p><label for="nb" class="classic">'.	form::field('nb',3,3,$nb_per_page).' '.
+	__('Users per page').'</label> '.
+	'<input type="submit" value="'.__('Apply filters').'" /></p>'.
 	'</div>'.
-	'</div>'.
-
-	'<p><input type="submit" value="'.__('Apply filters').'" />'.	
-	'<br class="clear" /></p>'. //Opera sucks
+	
+	'<br class="clear" />'. //Opera sucks
+	'</fieldset>'.
 	'</form>';
 	
Index: admin/users_actions.php
===================================================================
--- admin/users_actions.php	(revision 1477)
+++ admin/users_actions.php	(revision 1179)
@@ -131,26 +131,9 @@
 /* DISPLAY
 -------------------------------------------------------- */
-if (!empty($users) && empty($blogs) && $action == 'blogs') {
-	$breadcrumb = dcPage::breadcrumb(
-		array(
-			__('System') => '',
-			__('Users') => 'users.php',
-			'<span class="page-title">'.__('Permissions').'</span>' => ''
-		));
-} else {
-	$breadcrumb = dcPage::breadcrumb(
-		array(
-			__('System') => '',
-			__('Users') => 'users.php',
-			'<span class="page-title">'.__('Actions').'</span>' => ''
-		));
-}
-
 dcPage::open(
 	__('Users'),
 	dcPage::jsLoad('js/_users_actions.js').
 	# --BEHAVIOR-- adminUsersActionsHeaders
-	$core->callBehavior('adminUsersActionsHeaders'),
-	$breadcrumb
+	$core->callBehavior('adminUsersActionsHeaders')
 );
 
@@ -194,5 +177,6 @@
 	}
 	
-	echo
+	echo 
+	'<h2><a href="users.php">'.__('Users').'</a> &rsaquo; <span class="page-title">'.__('Permissions').'</span></h2>'.
 	'<p>'.sprintf(
 		__('Choose one or more blogs to which you want to give permissions to users %s.'),
@@ -255,4 +239,5 @@
 	
 	echo 
+	'<h2><a href="users.php">'.__('Users').'</a> &rsaquo; <span class="page-title">'.__('Permissions').'</span></h2>'.
 	'<p>'.sprintf(
 		__('You are about to change permissions on the following blogs for users %s.'),
@@ -284,6 +269,6 @@
 	echo
 	'<fieldset><legend>'.__('Validate permissions').'</legend>'.
-	'<p><label for="your_pwd">'.__('Your password:').'</label>'.
-	form::password('your_pwd',20,255).'</p>'.
+	'<p><label for="your_pwd">'.__('Your password:').
+	form::password('your_pwd',20,255).'</label></p>'.
 	'</fieldset>'.
 	'<p><input type="submit" accesskey="s" value="'.__('Save').'" />'.
