Index: admin/auth.php
===================================================================
--- admin/auth.php	(revision 550)
+++ admin/auth.php	(revision 199)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -22,6 +22,5 @@
 # That's a tricky hack but it works ;)
 $dlang = http::getAcceptLanguage();
-$dlang = ($dlang == '' ? 'en' : $dlang);
-if ($dlang != 'en' && preg_match('/^[a-z]{2}(-[a-z]{2})?$/',$dlang))
+if ($dlang != 'en')
 {
 	l10n::set(dirname(__FILE__).'/../locales/'.$dlang.'/main');
@@ -90,5 +89,5 @@
 		$page_url.'?akey='.$recover_key;
 		
-		$headers[] = 'From: '.(defined('DC_ADMIN_MAILFROM') && DC_ADMIN_MAILFROM ? DC_ADMIN_MAILFROM : 'dotclear@local');
+		$headers[] = 'From: dotclear@'.$_SERVER['HTTP_HOST'];
 		$headers[] = 'Content-Type: text/plain; charset=UTF-8;';
 		
@@ -126,21 +125,6 @@
 }
 # 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();
-		}
-		
+elseif ($change_pwd and $data = unserialize(base64_decode($_POST['login_data'])))
+{
 	# Check login informations
 	$check_user = false;
@@ -157,4 +141,6 @@
 	}
 	
+	try
+	{
 		if (!$core->auth->allowPassChange() || !$check_user) {
 			$change_pwd = false;
@@ -179,5 +165,9 @@
 		$_SESSION['sess_browser_uid'] = http::browserUID(DC_MASTER_KEY);
 		
-		if ($data['user_remember'])
+		if (!empty($data['blog_id'])) {
+			$_SESSION['sess_blog_id'] = $data['blog_id'];
+		}
+		
+		if (!empty($data['user_remember']))
 		{
 			setcookie('dc_admin',$data['cookie_admin'],strtotime('+15 days'),'','',DC_ADMIN_SSL);
@@ -202,9 +192,10 @@
 	if ($check_user && $core->auth->mustChangePassword())
 	{
-		$login_data = join('/',array(
-			base64_encode($user_id),
-			$cookie_admin,
-			empty($_POST['user_remember'])?'0':'1'
-		));
+		$login_data = base64_encode(serialize(array(
+			'user_id'=>$user_id,
+			'cookie_admin'=>$cookie_admin,
+			'blog_id'=>(!empty($_POST['blog']) ? $_POST['blog'] : ''),
+			'user_remember'=>!empty($_POST['user_remember'])
+		)));
 		
 		if (!$core->auth->allowPassChange()) {
@@ -257,10 +248,10 @@
 <!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; ?>">
+xml:lang="en" lang="en">
 <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 http-equiv="Content-Language" content="en" />
   <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />
   <meta name="GOOGLEBOT" content="NOSNIPPET" />
@@ -272,6 +263,7 @@
 ?>
   
-	<link rel="stylesheet" href="style/default.css" type="text/css" media="screen" />
-	 
+  <style type="text/css">
+  @import url(style/default.css); 
+  </style>
   <?php
   # --BEHAVIOR-- loginPageHTMLHead
@@ -300,8 +292,7 @@
 	 return true;
     };
-    $.cookie('dc_admin_test_cookie',true);
-    if ($.cookie('dc_admin_test_cookie')) {
+    
+    if (navigator.cookieEnabled) {
       $('#cookie_help').hide();
-      $.cookie('dc_admin_test_cookie', '', {'expires': -1});
     } else {
       $('#cookie_help').show();
@@ -334,16 +325,15 @@
 	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').'" />'.
+	'<p><label for="user_id">'.__('Username:').' '.
+	form::field(array('user_id','user_id'),20,32,html::escapeHTML($user_id),'',1).'</label></p>'.
+	
+	'<p><label for="user_email">'.__('Email:').' '.
+	form::field(array('user_email','user_email'),20,255,html::escapeHTML($user_email),'',2).'</label></p>'.
+	
+	'<p><input type="submit" value="'.__('recover').'" tabindex="3" />'.
 	form::hidden(array('recover'),1).'</p>'.
 	'</fieldset>'.
 	
-	'<div id="issue">'.
-	'<p><a href="auth.php">'.__('Back to login screen').'</a></p></div>';
+	'<p><a href="auth.php">'.__('Back to login screen').'</a></p>';
 }
 elseif ($change_pwd)
@@ -351,9 +341,9 @@
 	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>'.
+	'<p><label for="new_pwd">'.__('New password:').' '.
+	form::password(array('new_pwd','new_pwd'),20,255,'','',1).'</label></p>'.
+	
+	'<p><label for="new_pwd_c">'.__('Confirm password:').' '.
+	form::password(array('new_pwd_c','new_pwd_c'),20,255,'','',2).'</label></p>'.
 	'</fielset>'.
 	
@@ -369,6 +359,7 @@
 	else
 	{
+		echo
+		'<fieldset>';
 		if ($safe_mode) {
-			echo '<fieldset>';
 			echo '<legend>'.__('Safe mode login').'</legend>';
 			echo 
@@ -378,21 +369,16 @@
 				'</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">'.
+		'<p><label for="user_id">'.__('Username:').' '.
+		form::field(array('user_id','user_id'),20,32,html::escapeHTML($user_id),'',1).'</label></p>'.
+		
+		'<p><label for="user_pwd">'.__('Password:').' '.
+		form::password(array('user_pwd','user_pwd'),20,255,'','',2).'</label></p>'.
+		
+		'<p><label for="user_remember" class="classic">'.
+		form::checkbox(array('user_remember','user_remember'),1,'','',3).' '.
 		__('Remember my ID on this computer').'</label></p>'.
 		
-		'<p><input type="submit" value="'.__('log in').'" /></p>';
+		'<p><input type="submit" value="'.__('log in').'" tabindex="4" /></p>';
 		
 		if (!empty($_REQUEST['blog'])) {
@@ -400,13 +386,10 @@
 		}
 		if($safe_mode) {
-			echo 
-			form::hidden('safe_mode',1).
-			'</fieldset>';
-		}
-		else {
-			echo '</div>';
-		}
+			echo form::hidden('safe_mode',1);
+		}
+		
 		echo
-		'<p id="cookie_help" class="error">'.__('You must accept cookies in order to use the private area.').'</p>';
+		'</fieldset>'.
+		'<p id="cookie_help">'.__('You must accept cookies in order to use the private area.').'</p>';
 
 		echo '<div id="issue">';
Index: admin/blog.php
===================================================================
--- admin/blog.php	(revision 565)
+++ admin/blog.php	(revision 217)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -70,8 +70,9 @@
 	
 	echo
-	'<h2><a href="blogs.php">'.__('Blogs').'</a> &rsaquo; <span class="page-title">'.__('New blog').'</span></h2>'.
+	'<h2><a href="blogs.php">'.__('Blogs').'</a> &rsaquo; '.__('New blog').'</h2>'.
 	
-	'<form action="blog.php" method="post" id="blog-form" class="fieldset">'.
+	'<form action="blog.php" method="post" id="blog-form">'.
 	
+	'<fieldset><legend>'.__('Blog details').'</legend>'.
 	$core->formNonce().
 	'<p><label class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog ID:').' '.
@@ -88,6 +89,7 @@
 	'<p class="area"><label for="blog_desc">'.__('Blog description:').'</label> '.
 	form::textarea('blog_desc',60,5,html::escapeHTML($blog_desc)).'</p>'.
+	'</fieldset>'.
 	
-	'<p><input type="submit" accesskey="s" value="'.__('Create').'" /></p>'.
+	'<p><input type="submit" accesskey="s" value="'.__('Save').'" /></p>'.
 	'</form>';
 
Index: admin/blog_del.php
===================================================================
--- admin/blog_del.php	(revision 500)
+++ admin/blog_del.php	(revision 38)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -16,5 +16,4 @@
 
 $blog_id = '';
-$blog_name = '';
 
 if (!empty($_POST['blog_id']))
@@ -30,5 +29,4 @@
 	} else {
 		$blog_id = $rs->blog_id;
-		$blog_name = $rs->blog_name;
 	}
 }
@@ -54,8 +52,8 @@
 {
 	echo
-	'<h2 class="page-title">'.__('Delete a blog').'</h2>'.
+	'<h2>'.__('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.'),
-	'<strong>'.$blog_id.' ('.$blog_name.')</strong>').'</p>'.
+	'<strong>'.$blog_id.'</strong>').'</p>'.
 	'<p>'.__('Please give your password to confirm the blog deletion.').'</p>';
 	
Index: admin/blog_pref.php
===================================================================
--- admin/blog_pref.php	(revision 557)
+++ admin/blog_pref.php	(revision 217)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -243,6 +243,6 @@
 {
 	echo '<h2>'.(!$standalone ? '<a href="blogs.php">'.__('Blogs').'</a> &rsaquo; ' : '').
-	html::escapeHTML($blog_name).' &rsaquo; <span class="page-title">'.
-	__('Blog settings').'</span></h2>';
+	html::escapeHTML($blog_name).' &rsaquo; '.
+	__('Blog settings').'</h2>';
 	
 	if (!empty($_GET['add'])) {
@@ -528,5 +528,5 @@
 					echo
 					' - <a href="permissions.php?blog_id[]='.$blog_id.'&amp;user_id[]='.$k.'">'
-					.__('Change permissions').'</a>';
+					.__('change permissions').'</a>';
 				}
 				
Index: admin/blog_theme.php
===================================================================
--- admin/blog_theme.php	(revision 719)
+++ admin/blog_theme.php	(revision 217)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -156,9 +156,5 @@
 	
 	$radio_id = 'theme_'.html::escapeHTML($id);
-	if (preg_match('#^http(s)?://#',$core->blog->settings->system->themes_url)) {
-		$theme_url = http::concatURL($core->blog->settings->system->themes_url,'/'.$id);
-	} else {
-		$theme_url = http::concatURL($core->blog->url,$core->blog->settings->system->themes_url.'/'.$id);
-	}
+	$theme_url = http::concatURL($core->blog->url,$core->blog->settings->system->themes_url.'/'.$id);
 	$has_conf = file_exists(path::real($core->blog->themes_path.'/'.$id).'/_config.php');
 	$has_css = file_exists(path::real($core->blog->themes_path.'/'.$id).'/style.css');
@@ -194,5 +190,5 @@
 	'<div class="theme-actions">';
 		if ($current && $has_conf) {
-			$res .= '<p><a href="blog_theme.php?conf=1" class="button">'.__('Configure theme').'</a></p>';
+			$res .= '<p><a href="blog_theme.php?conf=1" class="button">'.__('Theme configuration').'</a></p>';
 		}
 		if ($current) {
@@ -207,5 +203,5 @@
 }
 
-dcPage::open(__('Blog appearance'),
+dcPage::open(__('Blog themes'),
 	(!$theme_conf_mode ? dcPage::jsLoad('js/_blog_theme.js') : '').
 	dcPage::jsPageTabs($default_tab).
@@ -216,5 +212,5 @@
 {
 	echo
-	'<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.__('Blog appearance').'</span></h2>';
+	'<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.__('Blog appearance').'</h2>';
 	
 	if (!empty($_GET['upd'])) {
@@ -269,8 +265,8 @@
 	'<div class="two-cols clear" id="themes-actions">'.
 	$core->formNonce().
-	'<p class="col"><input type="submit" name="select" value="'.__('Use selected theme').'" /></p>';
+	'<p class="col"><input type="submit" name="select" value="'.__('use selected theme').'" /></p>';
 	
 	if ($can_install) {
-		echo '<p class="col right"><input type="submit" class="delete" name="remove" value="'.__('Delete selected theme').'" /></p>';
+		echo '<p class="col right"><input type="submit" class="delete" name="remove" value="'.__('delete selected theme').'" /></p>';
 	}
 	
@@ -331,26 +327,19 @@
 {
 	$theme_name = $core->themes->moduleInfo($core->blog->settings->system->theme,'name');
-	$core->themes->loadModuleL10Nresources($core->blog->settings->system->theme,$_lang);
 	echo
 	'<h2>'.html::escapeHTML($core->blog->name).
-	' &rsaquo; <a href="blog_theme.php">'.__('Blog appearance').'</a> &rsaquo; <span class="page-title">'.__('Theme configuration').'<span class="page-title"></h2>'.
+	' &rsaquo; <a href="blog_theme.php">'.__('Blog appearance').'</a> &rsaquo; '.__('Theme configuration').'</h2>'.
 	'<p><a class="back" href="blog_theme.php">'.__('back').'</a></p>';
 	
 	try
 	{
-		# Let theme configuration set their own form(s) if required
-		$standalone_config = (boolean) $core->themes->moduleInfo($core->blog->settings->system->theme,'standalone_config');
-
-		if (!$standalone_config)
-			echo '<form id="theme_config" action="blog_theme.php?conf=1" method="post" enctype="multipart/form-data">';
-
+		echo '<form id="theme_config" action="blog_theme.php?conf=1" method="post" enctype="multipart/form-data">';
+		
 		include $theme_conf_file;
-
-		if (!$standalone_config)
-			echo
-			'<p class="clear"><input type="submit" value="'.__('Save').'" />'.
-			$core->formNonce().'</p>'.
-			'</form>';
-
+		
+		echo
+		'<p class="clear"><input type="submit" value="'.__('Save').'" />'.
+		$core->formNonce().'</p>'.
+		'</form>';
 	}
 	catch (Exception $e)
Index: admin/blogs.php
===================================================================
--- admin/blogs.php	(revision 500)
+++ admin/blogs.php	(revision 520)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -15,26 +15,12 @@
 dcPage::check('usage,contentadmin');
 
-# Filters
-$sortby_combo = array(
-__('Last update') => 'blog_upddt',
-__('Blog name') => 'UPPER(blog_name)',
-__('Blog ID') => 'B.blog_id'
-);
+$q = !empty($_GET['q']) ? $_GET['q'] : '';
 
-$order_combo = array(
-__('Descending') => 'desc',
-__('Ascending') => 'asc'
-);
+$blogs_list = new adminBlogList($core);
 
-$q = !empty($_GET['q']) ? $_GET['q'] : '';
-$sortby = !empty($_GET['sortby']) ? $_GET['sortby'] : 'blog_upddt';
-$order = !empty($_GET['order']) ? $_GET['order'] : 'desc';
+$params = new ArrayObject();
 
-$page = !empty($_GET['page']) ? $_GET['page'] : 1;
-$nb_per_page =  30;
-
-if (!empty($_GET['nb']) && (integer) $_GET['nb'] > 0) {
-	$nb_per_page = $_GET['nb'];
-}
+# - Limit, sortby and order filter
+$params = $blogs_list->applyFilters($params);
 
 $show_filters = false;
@@ -46,21 +32,8 @@
 }
 
-# - Sortby and order filter
-if ($sortby !== '' && in_array($sortby,$sortby_combo)) {
-	if ($order !== '' && in_array($order,$order_combo)) {
-		$params['order'] = $sortby.' '.$order;
-	}
-	
-	if ($sortby != 'blog_upddt' || $order != 'desc') {
-		$show_filters = true;
-	}
-}
-
-$params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page);
-
 try {
 	$counter = $core->getBlogs($params,1);
 	$rs = $core->getBlogs($params);
-	$nb_blog = $counter->f(0);
+	$blogs_list->setItems($rs,$counter->f(0));
 } catch (Exception $e) {
 	$core->error->add($e->getMessage());
@@ -79,5 +52,5 @@
 }
 
-echo '<h2 class="page-title">'.__('List of blogs').'</h2>';
+echo '<h2>'.__('List of blogs').'</h2>';
 
 if (!$core->error->flag())
@@ -93,23 +66,10 @@
 	echo
 	'<form action="blogs.php" method="get" id="filters-form">'.
-	'<fieldset class="two-cols"><legend>'.__('Filters').'</legend>'.
+	'<fieldset><legend>'.__('Filters').'</legend>'.
 	
-	'<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="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>'.
+	'<p><input type="submit" value="'.__('Apply filters').'" /></p>'.
 	
 	'<br class="clear" />'. //Opera sucks
@@ -118,68 +78,8 @@
 	
 	# Show blogs
-	if ($nb_blog == 0)
-	{
-		echo '<p><strong>'.__('No blog').'</strong></p>';
-	}
-	else
-	{
-		$pager = new pager($page,$nb_blog,$nb_per_page,10);
-		$pager->var_page = 'page';
-		
-		echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
-		
-		echo
-		'<table class="clear"><tr>'.
-		'<th>'.__('Blog name').'</th>'.
-		'<th class="nowrap">'.__('Last update').'</th>'.
-		'<th class="nowrap">'.__('Entries').'</th>'.
-		'<th class="nowrap">'.__('Blog ID').'</th>'.
-		'<th>&nbsp;</th>'.
-		'<th class="nowrap">'.__('Status').'</th>'.
-		'</tr>';
-		
-		while ($rs->fetch()) {
-			echo blogLine($rs);
-		}
-		
-		echo '</table>';
-		
-		echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
-	}
+	$blogs_list->display();
 }
 
 dcPage::close();
 
-function blogLine($rs)
-{
-	global $core;
-	
-	$blog_id = html::escapeHTML($rs->blog_id);
-	$edit_link = '';
-	
-	if ($GLOBALS['core']->auth->isSuperAdmin()) {
-		$edit_link = 
-		'<a href="blog.php?id='.$blog_id.'" '.
-		'title="'.sprintf(__('Edit blog %s'),$blog_id).'">'.
-		__('edit').'</a>';
-	}
-	
-	$img_status = $rs->blog_status == 1 ? 'check-on' : 'check-off';
-	$txt_status = $GLOBALS['core']->getBlogStatus($rs->blog_status);
-	$img_status = sprintf('<img src="images/%1$s.png" alt="%2$s" title="%2$s" />',$img_status,$txt_status);
-	$offset = dt::getTimeOffset($core->auth->getInfo('user_tz'));
-	$blog_upddt = dt::str(__('%Y-%m-%d %H:%M'),strtotime($rs->blog_upddt) + $offset);
-	
-	return
-	'<tr class="line">'.
-	'<td class="maximal"><a href="index.php?switchblog='.$rs->blog_id.'" '.
-	'title="'.sprintf(__('Switch to blog %s'),$rs->blog_id).'">'.
-	html::escapeHTML($rs->blog_name).'</a></td>'.
-	'<td class="nowrap">'.$blog_upddt.'</td>'.
-	'<td class="nowrap">'.$core->countBlogPosts($rs->blog_id).'</td>'.
-	'<td class="nowrap">'.$blog_id.'</td>'.
-	'<td>'.$edit_link.'</td>'.
-	'<td class="status">'.$img_status.'</td>'.
-	'</tr>';
-}
 ?>
Index: admin/categories.php
===================================================================
--- admin/categories.php	(revision 560)
+++ admin/categories.php	(revision 82)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -68,5 +68,5 @@
 }
 
-echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.__('Categories').'</span></h2>';
+echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.__('Categories').'</h2>';
 
 $rs = $core->blog->getCategories(array('post_type'=>'post'));
@@ -130,11 +130,9 @@
 '<option value="0">'.__('Top level').'</option>';
 while ($rs->fetch()) {
-	echo '<option value="'.$rs->cat_id.'">'.
-		str_repeat('&nbsp;&nbsp;',$rs->level-1).($rs->level-1 == 0 ? '' : '&bull; ').
-		html::escapeHTML($rs->cat_title).'</option>';
+	echo '<option value="'.$rs->cat_id.'">'.str_repeat('&nbsp;&nbsp;',$rs->level).'&bull; '.html::escapeHTML($rs->cat_title).'</option>';
 }
 echo
 '</select></label></p>'.
-'<p><input type="submit" value="'.__('Create').'" /></p>'.
+'<p><input type="submit" value="'.__('Save').'" /></p>'.
 $core->formNonce().
 '</fieldset>'.
@@ -167,5 +165,5 @@
 		'<p><label for="del_cat">'.__('Choose a category to remove:').' '.
 		form::combo('del_cat',$deletable).'</label></p> '.
-		'<p><input type="submit" value="'.__('Delete').'" class="delete" /></p>'.
+		'<p><input type="submit" value="'.__('ok').'" /></p>'.
 		$core->formNonce().
 		'</fieldset>'.
Index: admin/category.php
===================================================================
--- admin/category.php	(revision 500)
+++ admin/category.php	(revision 38)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -58,5 +58,5 @@
 		if (!isset($p[$rs->cat_id])) {
 			$allowed_parents[] = new formSelectOption(
-				str_repeat('&nbsp;&nbsp;',$rs->level-1).($rs->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($rs->cat_title),
+				str_repeat('&nbsp;&nbsp;',$rs->level-1).'&bull; '.html::escapeHTML($rs->cat_title),
 				$rs->cat_id
 			);
@@ -179,5 +179,5 @@
 }
 
-echo '<span class="page-title">'.$title.'</span></h2>';
+echo $title.'</h2>';
 
 echo
@@ -185,5 +185,5 @@
 '<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)).
+form::field('cat_title',40,255,html::escapeHTML($cat_title),'',2).
 '</label></p>';
 if (!$cat_id)
@@ -192,5 +192,5 @@
 	echo
 	'<p><label for="new_cat_parent">'.__('Parent:').' '.
-	'<select id="new_cat_parent" name="new_cat_parent" >'.
+	'<select id="new_cat_parent" name="new_cat_parent" tabindex="3">'.
 	'<option value="0">'.__('Top level').'</option>';
 	while ($rs->fetch()) {
@@ -204,5 +204,5 @@
 echo
 '<div class="lockable">'.
-'<p><label for="cat_url">'.__('URL:').' '.form::field('cat_url',40,255,html::escapeHTML($cat_url)).
+'<p><label for="cat_url">'.__('URL:').' '.form::field('cat_url',40,255,html::escapeHTML($cat_url),'',4).
 '</label></p>'.
 '<p class="form-note warn" id="note-cat-url">'.
@@ -211,8 +211,8 @@
 
 '<p class="area"><label for="cat_desc">'.__('Description:').'</label> '.
-form::textarea('cat_desc',50,8,html::escapeHTML($cat_desc)).
+form::textarea('cat_desc',50,8,html::escapeHTML($cat_desc),'',5).
 '</p>'.
 
-'<p><input type="submit" accesskey="s" value="'.__('Save').'" />'.
+'<p><input type="submit" accesskey="s" value="'.__('Save').'" tabindex="5" />'.
 ($cat_id ? form::hidden('id',$cat_id) : '').
 $core->formNonce().
@@ -232,5 +232,5 @@
 	'<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').'" />'.
+	'<p><input type="submit" accesskey="s" value="'.__('Save').'" tabindex="5" />'.
 	form::hidden(array('id'),$cat_id).$core->formNonce().'</p>'.
 	'</fieldset>'.
@@ -246,5 +246,5 @@
 		form::combo('cat_move',array(__('before')=>'before',__('after')=>'after'),'','','',false,'title="'.__('position: ').'"').' '.
 		form::combo('cat_sibling',$siblings).'</p>'.
-		'<p><input type="submit" accesskey="s" value="'.__('Save').'" />'.
+		'<p><input type="submit" accesskey="s" value="'.__('Save').'" tabindex="5" />'.
 		form::hidden(array('id'),$cat_id).$core->formNonce().'</p>'.
 		'</fieldset>'.
Index: admin/comment.php
===================================================================
--- admin/comment.php	(revision 500)
+++ admin/comment.php	(revision 217)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -184,8 +184,9 @@
 	}
 	
-	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 '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.__('Edit comment').'</h2>';
+	
+	echo '<p><a class="back" href="'.$core->getPostAdminURL($post_type,$post_id).'&amp;co=1#c'.$comment_id.'"> '.
+		sprintf(__('Back to "%s"'),$post_title).'</a></p>';
+	
 	echo
 	'<form action="comment.php" method="post" id="comment-form">'.
Index: admin/comments.php
===================================================================
--- admin/comments.php	(revision 747)
+++ admin/comments.php	(revision 523)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -17,7 +17,5 @@
 # Creating filter combo boxes
 # Filter form we'll put in html_block
-$status_combo = array(
-'-' => ''
-);
+$status_combo = array();
 foreach ($core->blog->getAllCommentStatus() as $k => $v) {
 	$status_combo[$v] = (string) $k;
@@ -25,88 +23,18 @@
 
 $type_combo = array(
-'-' => '',
-__('comment') => 'co',
-__('trackback') => 'tb'
+__('comment') => '0',
+__('trackback') => '1'
 );
 
-$sortby_combo = array(
-__('Date') => 'comment_dt',
-__('Entry title') => 'post_title',
-__('Author') => 'comment_author',
-__('Status') => 'comment_status'
-);
+$comment_list = new adminCommentList($core);
 
-$order_combo = array(
-__('Descending') => 'desc',
-__('Ascending') => 'asc'
-);
-
-
-/* Get comments
--------------------------------------------------------- */
-$author = isset($_GET['author']) ?	$_GET['author'] : '';
-$status = isset($_GET['status']) ?		$_GET['status'] : '';
-$type = !empty($_GET['type']) ?		$_GET['type'] : '';
-$sortby = !empty($_GET['sortby']) ?	$_GET['sortby'] : 'comment_dt';
-$order = !empty($_GET['order']) ?		$_GET['order'] : 'desc';
-$ip = !empty($_GET['ip']) ?			$_GET['ip'] : '';
-
-$with_spam = $author || $status || $type || $sortby != 'comment_dt' || $order != 'desc' || $ip;
-
-$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 = new ArrayObject();
 $params['no_content'] = true;
 
-# Author filter
-if ($author !== '') {
-	$params['q_author'] = $author;
-	$show_filters = true;
-}
-
-# - Type filter
-if ($type == 'tb' || $type == 'co') {
-	$params['comment_trackback'] = ($type == 'tb');
-	$show_filters = true;
-}
-
-# - Status filter
-if ($status !== '' && in_array($status,$status_combo)) {
-	$params['comment_status'] = $status;
-	$show_filters = true;
-} elseif (!$with_spam) {
-	$params['comment_status_not'] = -2;
-}
-
-# - IP filter
-if ($ip) {
-	$params['comment_ip'] = $ip;
-	$show_filters = true;
-}
-
-# Sortby and order filter
-if ($sortby !== '' && in_array($sortby,$sortby_combo)) {
-	if ($order !== '' && in_array($order,$order_combo)) {
-		$params['order'] = $sortby.' '.$order;
-	}
-	
-	if ($sortby != 'comment_dt' || $order != 'desc') {
-		$show_filters = true;
-	}
-}
+# - Limit, sortby and order filter
+$params = $comment_list->applyFilters($params);
 
 # Actions combo box
 $combo_action = array();
-$default = '';
 if ($core->auth->check('publish,contentadmin',$core->blog->id))
 {
@@ -118,8 +46,5 @@
 if ($core->auth->check('delete,contentadmin',$core->blog->id))
 {
-	$combo_action[__('Delete')] = 'delete';
-	if ($status == -2) {
-		$default = 'delete';
-	}
+	$combo_action[__('delete')] = 'delete';
 }
 
@@ -127,20 +52,49 @@
 $core->callBehavior('adminCommentsActionsCombo',array(&$combo_action));
 
+$filterSet = new dcFilterSet('comments','comments.php');
+
+$authorFilter = new textFilter(
+		'author',__('Author'), __('Author'),'q_author',20,255);
+$filterSet
+	->addFilter(new comboFilter(
+		'status',__('Status'), __('Status'), 'comment_status', $status_combo))
+	->addFilter(new booleanFilter(
+		'type',__('Type'), __('Type'), 'comment_trackback', $type_combo))
+	->addFilter($authorFilter)
+	->addFilter(new textFilter(
+		'ip',__('IP address'), __('IP address'), 'comment_ip',20,39));
+		
+$core->callBehavior('adminCommentsFilters',$filterSet);
+
+$filterSet->setFormValues($_GET);
+if (isset($_GET['author'])) {
+	$authorFilter->add();
+	$authorFilter->setValue($_GET['author']);
+}
 /* Get comments
 -------------------------------------------------------- */
 try {
+	$nfparams = $params->getArrayCopy();
+	$filtered = $filterSet->applyFilters($params);
+	$core->callBehavior('adminCommentsParams',$params);
 	$comments = $core->blog->getComments($params);
 	$counter = $core->blog->getComments($params,true);
-	$comment_list = new adminCommentList($core,$comments,$counter->f(0));
+	if ($filtered) {
+		$totalcounter = $core->blog->getComments($nfparams,true);
+		$page_title = sprintf(__('Comments and Trackacks / %s filtered out of %s'),$counter->f(0),$totalcounter->f(0));
+	} else {
+		$page_title = __('Comments and Trackacks');
+	}
+
+	$comment_list->setItems($comments,$counter->f(0));
 } catch (Exception $e) {
 	$core->error->add($e->getMessage());
 }
+$filterSet->setColumnsForm($comment_list->getColumnsForm());
 
 /* DISPLAY
 -------------------------------------------------------- */
-$starting_script = dcPage::jsLoad('js/_comments.js');
-if (!$show_filters) {
-	$starting_script .= dcPage::jsLoad('js/filter-controls.js');
-}
+$starting_script = dcPage::jsLoad('js/_comments.js').$filterSet->header();;
+
 # --BEHAVIOR-- adminCommentsHeaders
 $starting_script .= $core->callBehavior('adminCommentsHeaders');
@@ -148,52 +102,10 @@
 dcPage::open(__('Comments and trackbacks'),$starting_script);
 
-echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.__('Comments and trackbacks').'</span></h2>';
+echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.$page_title.'</h2>';
 
 if (!$core->error->flag())
 {
 	# 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>';
+	$filterSet->display();
 	
 	if (!$with_spam) {
@@ -209,6 +121,5 @@
 	
 	# Show comments
-	$comment_list->display($page,$nb_per_page,
-	'<form action="comments_actions.php" method="post" id="form-comments">'.
+	$comment_list->display('<form action="comments_actions.php" method="post" id="form-comments">'.
 	
 	'%s'.
@@ -218,15 +129,12 @@
 	
 	'<p class="col right"><label for="action" class="classic">'.__('Selected comments action:').'</label> '.
-	form::combo('action',$combo_action,$default,'','','','title="'.__('action: ').'"').
+	form::combo('action',$combo_action,'','','','','title="'.__('action: ').'"').
 	$core->formNonce().
 	'<input type="submit" value="'.__('ok').'" /></p>'.
 	form::hidden(array('type'),$type).
-	form::hidden(array('sortby'),$sortby).
-	form::hidden(array('order'),$order).
 	form::hidden(array('author'),preg_replace('/%/','%%',$author)).
 	form::hidden(array('status'),$status).
 	form::hidden(array('ip'),preg_replace('/%/','%%',$ip)).
-	form::hidden(array('page'),$page).
-	form::hidden(array('nb'),$nb_per_page).
+	$comment_list->getFormFieldsAsHidden().
 	'</div>'.
 	
Index: admin/comments_actions.php
===================================================================
--- admin/comments_actions.php	(revision 270)
+++ admin/comments_actions.php	(revision 0)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
Index: admin/dispatcher.php
===================================================================
--- admin/dispatcher.php	(revision 270)
+++ admin/dispatcher.php	(revision 0)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
Index: admin/index.php
===================================================================
--- admin/index.php	(revision 691)
+++ admin/index.php	(revision 217)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -84,5 +84,5 @@
 			$title = ($fav['name'] == 'posts' ? sprintf($str_entries,$post_count) : 
 				($fav['name'] == 'comments' ? sprintf($str_comments,$comment_count) : $fav['title']));
-			$__dashboard_icons[$fav['name']] = new ArrayObject(array(__($title),$fav['url'],$fav['large-icon']));
+			$__dashboard_icons[$fav['name']] = new ArrayObject(array($title,$fav['url'],$fav['large-icon']));
 
 			# Let plugins set their own title for favorite on dashboard
@@ -99,5 +99,5 @@
 			$title = ($fav['name'] == 'posts' ? sprintf($str_entries,$post_count) : 
 				($fav['name'] == 'comments' ? sprintf($str_comments,$comment_count) : $fav['title']));
-			$__dashboard_icons[$fav['name']] = new ArrayObject(array(__($title),$fav['url'],$fav['large-icon']));
+			$__dashboard_icons[$fav['name']] = new ArrayObject(array($title,$fav['url'],$fav['large-icon']));
 
 			# Let plugins set their own title for favorite on dashboard
@@ -177,9 +177,4 @@
 $core->callBehavior('adminDashboardItems', $core, $__dashboard_items);
 
-# Dashboard content
-$dashboardContents = '';
-$__dashboard_contents = new ArrayObject(array(new ArrayObject,new ArrayObject));
-$core->callBehavior('adminDashboardContents', $core, $__dashboard_contents);
-
 /* DISPLAY
 -------------------------------------------------------- */
@@ -191,10 +186,12 @@
 );
 
-echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.__('Dashboard').'</span></h2>';
+echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.__('Dashboard');
 
 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>';
-}
+	' - <a href="index.php?default_blog=1" class="button">'.__('Make this blog my default blog').'</a>';
+}
+
+echo '</h2>';
 
 if ($core->blog->status == 0) {
@@ -204,15 +201,8 @@
 }
 
-if (!defined('DC_ADMIN_URL') || !DC_ADMIN_URL) {
+if (!DC_ADMIN_URL) {
 	echo
 	'<p class="static-msg">'.
-	'DC_ADMIN_URL '.__('is not defined, you should edit your configuration file.').
-	'</p>';
-}
-
-if (!defined('DC_ADMIN_MAILFROM') || !DC_ADMIN_MAILFROM) {
-	echo
-	'<p class="static-msg">'.
-	'DC_ADMIN_MAILFROM '.__('is not defined, you should edit your configuration file.').
+	__('DC_ADMIN_URL is not defined, you should edit your configuration file.').
 	'</p>';
 }
@@ -289,6 +279,6 @@
 {
 	echo
-	'<p><a href="'.$i[1].'"><img src="'.dc_admin_icon_url($i[2]).'" alt="" />'.
-	'<br /><span>'.$i[0].'</span></a></p>';
+	'<p><a href="'.$i[1].'"><img src="'.$i[2].'" alt="" /></a>'.
+	'<span><a href="'.$i[1].'">'.$i[0].'</a></span></p>';
 }
 echo '</div>';
@@ -302,6 +292,5 @@
 			while ($categories->fetch()) {
 				$categories_combo[] = new formSelectOption(
-					str_repeat('&nbsp;&nbsp;',$categories->level-1).
-					($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title),
+					str_repeat('&nbsp;&nbsp;',$categories->level-1).'&bull; '.html::escapeHTML($categories->cat_title),
 					$categories->cat_id
 				);
@@ -313,17 +302,17 @@
 		'<h3>'.__('Quick entry').'</h3>'.
 		'<form id="quick-entry" action="post.php" method="post">'.
-		'<fieldset><legend>'.__('New entry').'</legend>'.
+		'<fieldset>'.
 		'<p class="col"><label for="post_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').
-		form::field('post_title',20,255,'','maximal').
+		form::field('post_title',20,255,'','maximal',2).
 		'</label></p>'.
 		'<p class="area"><label class="required" '.
 		'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '.
-		form::textarea('post_content',50,7).
+		form::textarea('post_content',50,7,'','',2).
 		'</p>'.
 		'<p><label for="cat_id" class="classic">'.__('Category:').' '.
-		form::combo('cat_id',$categories_combo).'</label></p>'.
-		'<p><input type="submit" value="'.__('Save').'" name="save" /> '.
+		form::combo('cat_id',$categories_combo,'','',2).'</label></p>'.
+		'<p><input type="submit" value="'.__('Save').'" name="save" tabindex="3" /> '.
 		($core->auth->check('publish',$core->blog->id)
-			? '<input type="hidden" value="'.__('Save and publish').'" name="save-publish" />'
+			? '<input type="hidden" value="'.__('save and publish').'" name="save-publish" />'
 			: '').
 		$core->formNonce().
@@ -340,17 +329,4 @@
 }
 
-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>';
 
Index: admin/install/check.php
===================================================================
--- admin/install/check.php	(revision 270)
+++ admin/install/check.php	(revision 0)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
Index: admin/install/index.php
===================================================================
--- admin/install/index.php	(revision 557)
+++ admin/install/index.php	(revision 199)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -191,13 +191,5 @@
 		$core->auth->user_prefs->dashboard->put('dcnews',true,'boolean','',null,true);
 		$core->auth->user_prefs->dashboard->put('quickentry',true,'boolean','',null,true);
-
-		# Add accessibility options
-		$core->auth->user_prefs->addWorkspace('accessibility');
-		$core->auth->user_prefs->accessibility->put('nodragdrop',false,'boolean','',null,true);
-
-		# Add user interface options
-		$core->auth->user_prefs->addWorkspace('interface');
-		$core->auth->user_prefs->interface->put('enhanceduploader',false,'boolean','',null,true);
-
+		
 		# Add default favorites
 		$core->auth->user_prefs->addWorkspace('favorites');
@@ -205,27 +197,27 @@
 		$init_fav = array();
 		
-		$init_fav['new_post'] = array('new_post','New entry','post.php',
+		$init_fav['new_post'] = array('new_post',__('New entry'),'post.php',
 			'images/menu/edit.png','images/menu/edit-b.png',
 			'usage,contentadmin',null,'menu-new-post');
-		$init_fav['posts'] = array('posts','Entries','posts.php',
+		$init_fav['posts'] = array('posts',__('Entries'),'posts.php',
 			'images/menu/entries.png','images/menu/entries-b.png',
 			'usage,contentadmin',null,null);
-		$init_fav['comments'] = array('comments','Comments','comments.php',
+		$init_fav['comments'] = array('comments',__('Comments'),'comments.php',
 			'images/menu/comments.png','images/menu/comments-b.png',
 			'usage,contentadmin',null,null);
-		$init_fav['prefs'] = array('prefs','My preferences','preferences.php',
+		$init_fav['prefs'] = array('prefs',__('My preferences'),'preferences.php',
 			'images/menu/user-pref.png','images/menu/user-pref-b.png',
 			'*',null,null);
-		$init_fav['blog_pref'] = array('blog_pref','Blog settings','blog_pref.php',
+		$init_fav['blog_pref'] = array('blog_pref',__('Blog settings'),'blog_pref.php',
 			'images/menu/blog-pref.png','images/menu/blog-pref-b.png',
 			'admin',null,null);
-		$init_fav['blog_theme'] = array('blog_theme','Blog appearance','blog_theme.php',
+		$init_fav['blog_theme'] = array('blog_theme',__('Blog appearance'),'blog_theme.php',
 			'images/menu/themes.png','images/menu/blog-theme-b.png',
 			'admin',null,null);
 
-		$init_fav['pages'] = array('pages','Pages','plugin.php?p=pages',
+		$init_fav['pages'] = array('pages',__('Pages'),'plugin.php?p=pages',
 			'index.php?pf=pages/icon.png','index.php?pf=pages/icon-big.png',
 			'contentadmin,pages',null,null);
-		$init_fav['blogroll'] = array('blogroll','Blogroll','plugin.php?p=blogroll',
+		$init_fav['blogroll'] = array('blogroll',__('Blogroll'),'plugin.php?p=blogroll',
 			'index.php?pf=blogroll/icon-small.png','index.php?pf=blogroll/icon.png',
 			'usage,contentadmin',null,null);
@@ -264,6 +256,7 @@
   <title><?php echo __('Dotclear Install'); ?></title>
   
-	<link rel="stylesheet" href="../style/install.css" type="text/css" media="screen" /> 
-
+  <style type="text/css">
+  @import url(../style/install.css); 
+  </style>
   <script type="text/javascript" src="../js/jquery/jquery.js"></script>
   <script type="text/javascript">
@@ -320,22 +313,22 @@
 	'<form action="index.php" method="post">'.
 	'<fieldset><legend>'.__('User information').'</legend>'.
-	'<p><label for="u_firstname">'.__('First Name:').' '.
+	'<p><label>'.__('First Name:').' '.
 	form::field('u_firstname',30,255,html::escapeHTML($u_firstname)).'</label></p>'.
-	'<p><label for="u_name">'.__('Last Name:').' '.
+	'<p><label>'.__('Last Name:').' '.
 	form::field('u_name',30,255,html::escapeHTML($u_name)).'</label></p>'.
-	'<p><label for="u_email">'.__('Email:').' '.
+	'<p><label>'.__('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:').' '.
+	'<p><label class="required" title="'.__('Required field').'">'.__('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:').' '.
+	'<p><label class="required" title="'.__('Required field').'">'.__('Password:').' '.
 	form::password('u_pwd',30,255).'</label></p>'.
-	'<p><label for="u_pwd2" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Confirm password:').' '.
+	'<p><label class="required" title="'.__('Required field').'">'.__('Confirm password:').' '.
 	form::password('u_pwd2',30,255).'</label></p>'.
 	'</fieldset>'.
 	
-	'<p><input type="submit" value="'.__('Save').'" /></p>'.
+	'<p><input type="submit" value="'.__('save').'" /></p>'.
 	'</form>';
 }
Index: admin/install/wizard.php
===================================================================
--- admin/install/wizard.php	(revision 557)
+++ admin/install/wizard.php	(revision 217)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -100,5 +100,4 @@
 		$admin_url = preg_replace('%install/wizard.php$%','',$_SERVER['REQUEST_URI']);
 		writeConfigValue('DC_ADMIN_URL',http::getHost().$admin_url,$full_conf);
-		writeConfigValue('DC_ADMIN_MAILFROM','dotclear@'.$_SERVER['HTTP_HOST'],$full_conf);
 		writeConfigValue('DC_MASTER_KEY',md5(uniqid()),$full_conf);
 		
@@ -139,5 +138,8 @@
   <meta name="GOOGLEBOT" content="NOSNIPPET" />
   <title><?php echo __('Dotclear installation wizard'); ?></title>
-	<link rel="stylesheet" href="../style/install.css" type="text/css" media="screen" /> 
+  
+  <style type="text/css">
+  @import url(../style/install.css); 
+  </style>
 </head>
 
@@ -169,18 +171,18 @@
 
 '<form action="wizard.php" method="post">'.
-'<p><label class="required" for="DBDRIVER"><abbr title="'.__('Required field').'">*</abbr> '.__('Database type:').' '.
+'<p><label class="required" title="'.__('Required field').'">'.__('Database type:').' '.
 form::combo('DBDRIVER',array('MySQL'=>'mysql','PostgreSQL'=>'pgsql'),$DBDRIVER).'</label></p>'.
-'<p><label for="DBHOST">'.__('Database Host Name:').' '.
+'<p><label>'.__('Database Host Name:').' '.
 form::field('DBHOST',30,255,html::escapeHTML($DBHOST)).'</label></p>'.
-'<p><label for="DBNAME">'.__('Database Name:').' '.
+'<p><label>'.__('Database Name:').' '.
 form::field('DBNAME',30,255,html::escapeHTML($DBNAME)).'</label></p>'.
-'<p><label for="DBUSER">'.__('Database User Name:').' '.
+'<p><label>'.__('Database User Name:').' '.
 form::field('DBUSER',30,255,html::escapeHTML($DBUSER)).'</label></p>'.
-'<p><label for="DBPASSWORD">'.__('Database Password:').' '.
+'<p><label>'.__('Database Password:').' '.
 form::password('DBPASSWORD',30,255).'</label></p>'.
-'<p><label for="DBPREFIX" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Database Tables Prefix:').' '.
+'<p><label class="required" title="'.__('Required field').'">'.__('Database Tables Prefix:').' '.
 form::field('DBPREFIX',30,255,html::escapeHTML($DBPREFIX)).'</label></p>'.
 
-'<p><input type="submit" value="'.__('Continue').'" /></p>'.
+'<p><input type="submit" value="'.__('Save').'" /></p>'.
 '</form>';
 ?>
Index: admin/js/_index.js
===================================================================
--- admin/js/_index.js	(revision 454)
+++ admin/js/_index.js	(revision 3)
@@ -4,12 +4,12 @@
 		var contentTb = new jsToolBar($('#post_content',f)[0]);
 		contentTb.switchMode($('#post_format',f).val());
-
+		
 		$('input[name=save]',f).click(function() {
 			quickPost(f,-2);
 			return false;
 		});
-
+		
 		if ($('input[name=save-publish]',f).length > 0) {
-			var btn = $('<input type="submit" value="' + $('input[name=save-publish]',f).val() + '" />');
+			var btn = $('<input type="submit" value="' + $('input[name=save-publish]',f).val() + '" tabindex="3" />');
 			$('input[name=save-publish]',f).remove();
 			$('input[name=save]',f).after(btn).after(' ');
@@ -19,10 +19,10 @@
 			});
 		}
-
+		
 		function quickPost(f,status) {
 			if (contentTb.getMode() == 'wysiwyg') {
 				contentTb.syncContents('iframe');
 			}
-
+			
 			var params = {
 				f: 'quickPost',
@@ -35,7 +35,7 @@
 				post_lang: $('#post_lang',f).val()
 			}
-
+			
 			$('p.qinfo',f).remove();
-
+			
 			$.post('services.php',params,function(data) {
 				if ($('rsp[status=failed]',data).length > 0) {
@@ -57,13 +57,13 @@
 					}
 				}
-
+				
 				$('fieldset',f).prepend(msg);
 			});
 		}
 	}
-
+	
 	// allow to hide quick entry div, and remember choice
 	$('#quick h3').toggleWithLegend($('#quick').children().not('h3'),{
-		cookie: 'dcx_quick_entry'
-	}, positionFooter);
+		cookie: 'dcx_quick_entry',
+	});
 });
Index: admin/js/_media.js
===================================================================
--- admin/js/_media.js	(revision 740)
+++ admin/js/_media.js	(revision 224)
@@ -17,5 +17,12 @@
 	
 	if (!$.browser.opera) {
-		if (dotclear.candyUpload_force_init == '1') {
+		var cue = $('<a/>').attr({'id':'candyupload-enable','href':'#'}).append(dotclear.msg.activate_enhanced_uploader)
+		.click(function() {
+			candyUploadInit();
+			return false;
+		});
+		$('#media-upload>fieldset').append($('<div></div>').append(cue));
+		
+		if ($.cookie('dc_candy_upl') == 1) {
 			candyUploadInit();
 		}
@@ -36,6 +43,16 @@
 				createControls: function() {
 					var _this = this;
+					var cud = $('<a/>').attr({'id':'candyupload-disable','href':'#'}).append(dotclear.msg.disable_enhanced_uploader)
+					.click(function() {
+						_this.upldr.destroy();
+						_this.ctrl.block.empty().remove();
+						$('#media-upload').show();
+						delete _this;
+						$.cookie('dc_candy_upl','',{expires: -1});
+						return false;
+					});
 					this.ctrl.btn_browse.hide();
 					this.ctrl.msg.html(dotclear.msg.load_enhanced_uploader);
+					this.ctrl.disable = $('<div class="cu-disable"></div>').append(cud).appendTo(this.ctrl.block);
 				},
 				flashReady: function() {
@@ -50,4 +67,5 @@
 						});
 					});
+					this.ctrl.block.append(this.ctrl.disable);
 				},
 				uploadSuccess: function(o,data) {
@@ -68,7 +86,4 @@
 						});
 					}
-				},
-				fileQueued: function() {
-					positionFooter();
 				}
 			}
Index: admin/js/_post.js
===================================================================
--- admin/js/_post.js	(revision 740)
+++ admin/js/_post.js	(revision 0)
@@ -8,5 +8,5 @@
 	$(img).css('cursor','pointer');
 	img.line = line;
-	img.onclick = function() { dotclear.viewCommentContent(this,this.line); positionFooter(); };
+	img.onclick = function() { dotclear.viewCommentContent(this,this.line); };
 	
 	td.insertBefore(img,td.firstChild);
Index: admin/js/_posts_list.js
===================================================================
--- admin/js/_posts_list.js	(revision 740)
+++ admin/js/_posts_list.js	(revision 0)
@@ -8,5 +8,5 @@
 	$(img).css('cursor','pointer');
 	img.line = line;
-	img.onclick = function() { dotclear.viewPostContent(this,this.line); positionFooter(); };
+	img.onclick = function() { dotclear.viewPostContent(this,this.line); };
 	
 	td.insertBefore(img,td.firstChild);
Index: admin/js/_users.js
===================================================================
--- admin/js/_users.js	(revision 548)
+++ admin/js/_users.js	(revision 0)
@@ -20,8 +20,6 @@
 			for (i=0; i<user_ids.length; i++) {
 				if (nb_posts[i] > 0) {
-					if (user_ids[i].checked == true) {
-						msg_cannot_delete = true;
-						user_ids[i].checked = false;
-					}
+					user_ids[i].checked = false;
+					msg_cannot_delete = true;
 				}
 			}
Index: admin/js/color-picker.js
===================================================================
--- admin/js/color-picker.js	(revision 503)
+++ admin/js/color-picker.js	(revision 0)
@@ -36,7 +36,5 @@
 		span.css('display','block');
 		
-		/*ligne supprimée car elle ne fait pas le calcul
-		du width de l'input et ça fout la merde */
-		//span.css('width',($(this).width()+12)+'px');
+		span.css('width',($(this).width()+12)+'px');
 		span.css('padding','0 5px 0 0');
 		$(this).wrap(span);
@@ -47,7 +45,5 @@
 			position: 'absolute',
 			top: 3,
-			/* la largeur du span n'étant pas calculée
-			right: 0 crée un affichage pourri. On vire. */
-			//right: 0
+			right: 0
 		});
 		
Index: admin/js/common.js
===================================================================
--- admin/js/common.js	(revision 343)
+++ admin/js/common.js	(revision 163)
@@ -57,5 +57,5 @@
 }
 
-jQuery.fn.toggleWithLegend = function(target,s) {
+jQuery.fn.toggleWithLegend = function(target,s, callback) {
 	var defaults = {
 		img_on_src: dotclear.img_plus_src,
@@ -79,14 +79,14 @@
 	}
 
-	var toggle = function(i,speed) {
+	var toggle = function(i,speed, callback) {
 		speed = speed || 0;
 		if (p.hide) {
 			$(i).get(0).src = p.img_on_src;
 			$(i).get(0).alt = p.img_on_alt;
-			target.hide(speed, positionFooter);
+			target.hide(speed, callback);
 		} else {
 			$(i).get(0).src = p.img_off_src;
 			$(i).get(0).alt = p.img_off_alt;
-			target.show(speed, positionFooter);
+			target.show(speed, callback);
 			if (p.fn) {
 				p.fn.apply(target);
@@ -122,5 +122,5 @@
 		$(ctarget).css('cursor','pointer');
 		$(ctarget).click(function() {
-			toggle(i,p.speed, positionFooter);
+			toggle(i,p.speed, callback);
 			return false;
 		});
@@ -316,29 +316,4 @@
 };
 
-/* Sticky footer
--------------------------------------------------------- */
-function positionFooter() {
-	$("#wrapper").css({ overflow: "auto" });
-	var page_height = $("#top").height() + $("#wrapper").height() - $("#footer").height();
-	if( page_height < $(window).height() ){
-		// calcul de la largeur
-		var page_width = $(document).width() - 30;
-		$("#footer").css({
-			position: "absolute",
-			bottom: "10px",
-			width: page_width+"px",
-			padding: ".75em 0",
-			marginbottom: "0"
-		});
-	} else {
-		$("#footer").css({
-			position: "static",
-			padding: ".75em 0",
-			width: "auto"
-		});
-	}
-
-}
-
 /* On document ready
 -------------------------------------------------------- */
@@ -356,14 +331,18 @@
 	}
 	$('#blog-menu h3:first').toggleWithLegend($('#blog-menu ul:first'),
-		$.extend({cookie:'dc_blog_menu'},menu_settings)
+		$.extend({cookie:'dc_blog_menu'},menu_settings),
+		positionFooter
 	);
 	$('#system-menu h3:first').toggleWithLegend($('#system-menu ul:first'),
-		$.extend({cookie:'dc_system_menu'},menu_settings)
+		$.extend({cookie:'dc_system_menu'},menu_settings),
+		positionFooter
 	);
 	$('#plugins-menu h3:first').toggleWithLegend($('#plugins-menu ul:first'),
-		$.extend({cookie:'dc_plugins_menu'},menu_settings)
+		$.extend({cookie:'dc_plugins_menu'},menu_settings),
+		positionFooter
 	);
 	$('#favorites-menu h3:first').toggleWithLegend($('#favorites-menu ul:first'),
-		$.extend({cookie:'dc_favorites_menu',hide:false,reverse_cookie:true},menu_settings)
+		$.extend({cookie:'dc_favorites_menu',hide:false,reverse_cookie:true},menu_settings),
+		positionFooter
 	);
 
@@ -388,5 +367,28 @@
 	// Sticky footer
 	positionFooter();
+	function positionFooter() {
+		$("#wrapper").css({ overflow: "auto" });
+		var page_height = $("#top").height() + $("#wrapper").height() - $("#footer").height();
+		if( page_height < $(window).height() ){
+			// calcul de la largeur
+			var page_width = $(document).width() - 30;
+			$("#footer").css({
+				position: "absolute",
+				bottom: "10px",
+				width: page_width+"px",
+				padding: ".75em 0",
+				marginbottom: "0"
+			});
+		} else {
+			$("#footer").css({
+				position: "static",
+				padding: ".75em 0",
+				width: "auto",
+			});
+		}
+
+	}
 	$(window).resize(positionFooter);
+
 });
 
Index: admin/js/filters.js
===================================================================
--- admin/js/filters.js	(revision 417)
+++ admin/js/filters.js	(revision 417)
@@ -0,0 +1,5 @@
+$(function() {
+	$('#toggle-filters').click(function(e) {
+		$('#filters').toggleClass('hidden');
+	});
+});
Index: admin/js/ie7/IE7.js
===================================================================
--- admin/js/ie7/IE7.js	(revision 703)
+++ admin/js/ie7/IE7.js	(revision 175)
@@ -1,2205 +1,2 @@
-// timestamp: Sun, 03 Feb 2008 19:26:22
-/*
-  IE7/IE8.js - copyright 2004-2008, Dean Edwards
-  http://dean.edwards.name/IE7/
-  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
-*/
-
-// =======================================================================
-// TO DO
-// =======================================================================
-
-// PNG - unclickable content
-
-// =======================================================================
-// TEST/BUGGY
-// =======================================================================
-
-// hr{margin:1em auto} (doesn't look right in IE5)
-
-(function() {
-
-IE7 = {
-  toString: function(){return "IE7 version 2.0 (beta2)"}
-};
-var appVersion = IE7.appVersion = navigator.appVersion.match(/MSIE (\d\.\d)/)[1];
-
-if (/ie7_off/.test(top.location.search) || appVersion < 5) return;
-
-var Undefined = K();
-var quirksMode = document.compatMode != "CSS1Compat";
-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);
-
-// we'll use microsoft's http request object to load external files
-try {
-  var httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
-} catch (e) {
-  // ActiveX disabled
-}
-
-var fileCache = {};
-function loadFile(href, path) {
-try {
-  href = makePath(href, path);
-  if (!fileCache[href]) {
-    // easy to load a file huh?
-    httpRequest.open("GET", href, false);
-    httpRequest.send();
-    if (httpRequest.status == 0 || httpRequest.status == 200) {
-      fileCache[href] = httpRequest.responseText;
-    }
-  }
-} catch (e) {
-  // ignore errors
-} finally {
-  return fileCache[href] || "";
-}};
-
-// -----------------------------------------------------------------------
-// IE5.0 compatibility
-// -----------------------------------------------------------------------
-
-
-if (appVersion < 5.5) {
-  undefined = Undefined();
-
-  ANON = "HTML:!"; // for anonymous content
-  
-  // Fix String.replace (Safari1.x/IE5.0).
-  var GLOBAL = /(g|gi)$/;
-  var _String_replace = String.prototype.replace; 
-  String.prototype.replace = function(expression, replacement) {
-    if (typeof replacement == "function") { // Safari doesn't like functions
-      if (expression && expression.constructor == RegExp) {
-        var regexp = expression;
-        var global = regexp.global;
-        if (global == null) global = GLOBAL.test(regexp);
-        // we have to convert global RexpExps for exec() to work consistently
-        if (global) regexp = new RegExp(regexp.source); // non-global
-      } else {
-        regexp = new RegExp(rescape(expression));
-      }
-      var match, string = this, result = "";
-      while (string && (match = regexp.exec(string))) {
-        result += string.slice(0, match.index) + replacement.apply(this, match);
-        string = string.slice(match.index + match[0].length);
-        if (!global) break;
-      }
-      return result + string;
-    }
-    return _String_replace.apply(this, arguments);
-  };
-  
-  Array.prototype.pop = function() {
-    if (this.length) {
-      var i = this[this.length - 1];
-      this.length--;
-      return i;
-    }
-    return undefined;
-  };
-  
-  Array.prototype.push = function() {
-    for (var i = 0; i < arguments.length; i++) {
-      this[this.length] = arguments[i];
-    }
-    return this.length;
-  };
-  
-  var ns = this;
-  Function.prototype.apply = function(o, a) {
-    if (o === undefined) o = ns;
-    else if (o == null) o = window;
-    else if (typeof o == "string") o = new String(o);
-    else if (typeof o == "number") o = new Number(o);
-    else if (typeof o == "boolean") o = new Boolean(o);
-    if (arguments.length == 1) a = [];
-    else if (a[0] && a[0].writeln) a[0] = a[0].documentElement.document || a[0];
-    var $ = "#ie7_apply", r;
-    o[$] = this;
-    switch (a.length) { // unroll for speed
-      case 0: r = o[$](); break;
-      case 1: r = o[$](a[0]); break;
-      case 2: r = o[$](a[0],a[1]); break;
-      case 3: r = o[$](a[0],a[1],a[2]); break;
-      case 4: r = o[$](a[0],a[1],a[2],a[3]); break;
-      case 5: r = o[$](a[0],a[1],a[2],a[3],a[4]); break;
-      default:
-        var b = [], i = a.length - 1;
-        do b[i] = "a[" + i + "]"; while (i--);
-        eval("r=o[$](" + b + ")");
-    }
-    if (typeof o.valueOf == "function") { // not a COM object
-      delete o[$];
-    } else {
-      o[$] = undefined;
-      if (r && r.writeln) r = r.documentElement.document || r;
-    }
-    return r;
-  };
-  
-  Function.prototype.call = function(o) {
-    return this.apply(o, _slice.apply(arguments, [1]));
-  };
-
-  // block elements are "inline" according to IE5.0 so we'll fix it
-  HEADER += "address,blockquote,body,dd,div,dt,fieldset,form,"+
-    "frame,frameset,h1,h2,h3,h4,h5,h6,iframe,noframes,object,p,"+
-    "hr,applet,center,dir,menu,pre,dl,li,ol,ul{display:block}";
-}
-
-// -----------------------------------------------------------------------
-// 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 _KEYS   = "~";
-
-var _RG_ESCAPE_CHARS    = /\\./g;
-var _RG_ESCAPE_BRACKETS = /\(\?[:=!]|\[[^\]]+\]/g;
-var _RG_BRACKETS        = /\(/g;
-
-var RegGrp = Base.extend({
-  constructor: function(values) {
-    this[_KEYS] = [];
-    this.merge(values);
-  },
-
-  exec: function(string) {
-    var items = this, keys = this[_KEYS];    
-    return String(string).replace(new RegExp(this, this.ignoreCase ? "gi" : "g"), function() {
-      var item, offset = 1, i = 0;
-      // Loop through the RegGrp items.
-      while ((item = items[_HASH + keys[i++]])) {
-        var next = offset + item.length + 1;
-        if (arguments[offset]) { // do we have a result?
-          var replacement = item.replacement;
-          switch (typeof replacement) {
-            case "function":
-              return replacement.apply(items, _slice.call(arguments, offset, next));
-            case "number":
-              return arguments[offset + replacement];
-            default:
-              return replacement;
-          }
-        }
-        offset = next;
-      }
-    });
-  },
-
-  add: function(expression, replacement) {
-    if (expression instanceof RegExp) {
-      expression = expression.source;
-    }
-    if (!this[_HASH + expression]) this[_KEYS].push(String(expression));
-    this[_HASH + expression] = new RegGrp.Item(expression, replacement);
-  },
-
-  merge: function(values) {
-    for (var i in values) this.add(i, values[i]);
-  },
-
-  toString: function() {
-    // back references not supported in simple RegGrp
-    return "(" + this[_KEYS].join(")|(") + ")";
-  }
-}, {
-  IGNORE: "$0",
-
-  Item: Base.extend({
-    constructor: function(expression, replacement) {
-      expression = expression instanceof RegExp ? expression.source : String(expression);
-
-      if (typeof replacement == "number") replacement = String(replacement);
-      else if (replacement == null) replacement = "";
-
-      // does the pattern use sub-expressions?
-      if (typeof replacement == "string" && /\$(\d+)/.test(replacement)) {
-        // a simple lookup? (e.g. "$2")
-        if (/^\$\d+$/.test(replacement)) {
-          // store the index (used for fast retrieval of matched strings)
-          replacement = parseInt(replacement.slice(1));
-        } else { // a complicated lookup (e.g. "Hello $2 $1")
-          // build a function to do the lookup
-          var Q = /'/.test(replacement.replace(/\\./g, "")) ? '"' : "'";
-          replacement = replacement.replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\$(\d+)/g, Q +
-            "+(arguments[$1]||" + Q+Q + ")+" + Q);
-          replacement = new Function("return " + Q + replacement.replace(/(['"])\1\+(.*)\+\1\1$/, "$1") + Q);
-        }
-      }
-
-      this.length = RegGrp.count(expression);
-      this.replacement = replacement;
-      this.toString = K(expression);
-    }
-  }),
-
-  count: function(expression) {
-    // Count the number of sub-expressions in a RegExp/RegGrp.Item.
-    expression = String(expression).replace(_RG_ESCAPE_CHARS, "").replace(_RG_ESCAPE_BRACKETS, "");
-    return match(expression, _RG_BRACKETS).length;
-  }
-});
-
-// =========================================================================
-// 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 (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 ENCODED = /\x01(\d+)/g,
-    QUOTES  = /'/g, 
-    STRING = /^\x01/,
-    UNICODE = /\\([\da-fA-F]{1,4})/g;
-
-var _strings = [];
-
-var encoder = new Parser({
-  // comments
-  "<!\\-\\-|\\-\\->": "",
-  "\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\/": "",
-  // get rid
-  "@(namespace|import)[^;\\n]+[;\\n]": "",
-  // strings
-  "'(\\\\.|[^'\\\\])*'": encodeString,
-  '"(\\\\.|[^"\\\\])*"': encodeString,
-  // white space
-  "\\s+": " "
-});
-
-function encode(cssText) {
-  return encoder.exec(cssText);
-};
-
-function decode(cssText) {
-  return cssText.replace(ENCODED, function(match, index) {
-    return _strings[index - 1];
-  });
-};
-
-function encodeString(string) {
-  return "\x01" + _strings.push(string.replace(UNICODE, function(match, chr) {
-    return eval("'\\u" + "0000".slice(chr.length) + chr + "'");
-  }).slice(1, -1).replace(QUOTES, "\\'"));
-};
-
-function getString(value) {
-  return STRING.test(value) ? _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.exec(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 (ignore) {
-  // 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. the temporary element can be resized
-//  to determine pixel widths/heights
-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-cssQuery.js
-// =========================================================================
-
-function cssQuery(selector, context, single) {
-  if (!_cache[selector]) {
-    reg = []; // store for RegExp objects
-    var fn = "";
-    var selectors = cssParser.escape(selector).split(",");
-    for (var i = 0; i < selectors.length; i++) {
-      _wild = _index = _list = 0; // reset
-      _duplicate = selectors.length > 1 ? 2 : 0; // reset
-      var block = cssParser.exec(selectors[i]) || "if(0){";
-      if (_wild) { // IE's pesky comment nodes
-        block += format("if(e%1.nodeName!='!'){", _index);
-      }
-      // check for duplicates before storing results
-      var store = _duplicate > 1 ? _TEST : "";
-      block += format(store + _STORE, _index);
-      // add closing braces
-      block += Array(match(block, /\{/g).length + 1).join("}");
-      fn += block;
-    }
-    eval(format(_FN, reg) + cssParser.unescape(fn) + "return s?null:r}");
-    _cache[selector] = _selectorFunction;
-  }
-  return _cache[selector](context || document, single);
-};
-
-var _MSIE5 = appVersion < 6;
-
-var _EVALUATED = /^(href|src)$/;
-var _ATTRIBUTES = {
-  "class": "className",
-  "for": "htmlFor"
-};
-
-IE7._indexed = 1;
-
-IE7._byId = function(document, id) {
-  var result = document.all[id] || null;
-  // returns a single element or a collection
-  if (!result || 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 (result[i].id == id) return result[i];
-  }
-  return null;
-};
-
-IE7._getAttribute = function(element, name) {
-  if (name == "src" && element.pngSrc) return element.pngSrc;
-  
-  var attribute = _MSIE5 ? (element.attributes[name] || element.attributes[_ATTRIBUTES[name.toLowerCase()]]) : element.getAttributeNode(name);
-  if (attribute && (attribute.specified || name == "value")) {
-    if (_EVALUATED.test(name)) {
-      return element.getAttribute(name, 2);
-    } else if (name == "class") {
-     return element.className.replace(/\sie7_\w+/g, "");
-    } else if (name == "style") {
-     return element.style.cssText;
-    } else {
-     return attribute.nodeValue;
-    }
-  }
-  return 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._getNextElementSibling = function(node) {
-  // return the next element to the supplied element
-  //  nextSibling is not good enough as it might return a text or comment node
-  while (node && (node = node.nextSibling) && (node.nodeType != 1 || node.nodeName == "!")) continue;
-  return node;
-};
-
-IE7._getPreviousElementSibling = function(node) {
-  // return the previous element to the supplied element
-  while (node && (node = node.previousSibling) && (node.nodeType != 1 || node.nodeName == "!")) continue;
-  return node;
-};
-
-// =========================================================================
-// CSSParser
-// =========================================================================
-
-var IMPLIED_ASTERISK = /([\s>+~,]|[^(]\+|^)([#.:\[])/g,
-    IMPLIED_SPACE =    /(^|,)([^\s>+~])/g,
-    WHITESPACE =       /\s*([\s>+~(),]|^|$)\s*/g,
-    WILD_CARD =        /\s\*\s/g;;
-
-var CSSParser = RegGrp.extend({
-  constructor: function(items) {
-    this.base(items);
-    this.sorter = new RegGrp;
-    this.sorter.add(/:not\([^)]*\)/, RegGrp.IGNORE);
-    this.sorter.add(/([ >](\*|[\w-]+))([^: >+~]*)(:\w+-child(\([^)]+\))?)([^: >+~]*)/, "$1$3$6$4");
-  },
-  
-  ignoreCase: true,
-
-  escape: function(selector) {
-    return this.optimise(this.format(selector));
-  },
-
-  format: function(selector) {
-    return selector
-      .replace(WHITESPACE, "$1")
-      .replace(IMPLIED_SPACE, "$1 $2")
-      .replace(IMPLIED_ASTERISK, "$1*$2");
-  },
-
-  optimise: function(selector) {
-    // optimise wild card descendant selectors
-    return this.sorter.exec(selector.replace(WILD_CARD, ">* "));
-  },
-
-  unescape: function(selector) {
-    return decode(selector);
-  }
-});
-
-// some constants
-var _OPERATORS = {
-  "":   "%1!=null",
-  "=":  "%1=='%2'",
-  "~=": /(^| )%1( |$)/,
-  "|=": /^%1(-|$)/,
-  "^=": /^%1/,
-  "$=": /%1$/,
-  "*=": /%1/
-};
-
-var _PSEUDO_CLASSES = {
-  "first-child": "!IE7._getPreviousElementSibling(e%1)",
-  "link":        "e%1.currentStyle['ie7-link']=='link'",
-  "visited":     "e%1.currentStyle['ie7-link']=='visited'"
-};
-
-var _VAR = "var p%2=0,i%2,e%2,n%2=e%1.";
-var _ID = "e%1.sourceIndex";
-var _TEST = "var g=" + _ID + ";if(!p[g]){p[g]=1;";
-var _STORE = "r[r.length]=e%1;if(s)return e%1;";
-var _FN = "var _selectorFunction=function(e0,s){IE7._indexed++;var r=[],p={},reg=[%1],d=document;";
-var reg; // a store for RexExp objects
-var _index;
-var _wild; // need to flag certain _wild card selectors as MSIE includes comment nodes
-var _list; // are we processing a node _list?
-var _duplicate; // possible duplicates?
-var _cache = {}; // store parsed selectors
-
-// a hideous parser
-var cssParser = new CSSParser({
-  " (\\*|[\\w-]+)#([\\w-]+)": function(match, tagName, id) { // descendant selector followed by ID
-    _wild = false;
-    var replacement = "var e%2=IE7._byId(d,'%4');if(e%2&&";
-    if (tagName != "*") replacement += "e%2.nodeName=='%3'&&";
-    replacement += "(e%1==d||e%1.contains(e%2))){";
-    if (_list) replacement += format("i%1=n%1.length;", _list);
-    return format(replacement, _index++, _index, tagName.toUpperCase(), id);
-  },
-  
-  " (\\*|[\\w-]+)": function(match, tagName) { // descendant selector
-    _duplicate++; // this selector may produce duplicates
-    _wild = tagName == "*";
-    var replacement = _VAR;
-    // IE5.x does not support getElementsByTagName("*");
-    replacement += (_wild && _MSIE5) ? "all" : "getElementsByTagName('%3')";
-    replacement += ";for(i%2=0;(e%2=n%2[i%2]);i%2++){";
-    return format(replacement, _index++, _list = _index, tagName.toUpperCase());
-  },
-  
-  ">(\\*|[\\w-]+)": function(match, tagName) { // child selector
-    var children = _list;
-    _wild = tagName == "*";
-    var replacement = _VAR;
-    // use the children property for MSIE as it does not contain text nodes
-    //  (but the children collection still includes comments).
-    // the document object does not have a children collection
-    replacement += children ? "children": "childNodes";
-    if (!_wild && children) replacement += ".tags('%3')";
-    replacement += ";for(i%2=0;(e%2=n%2[i%2]);i%2++){";
-    if (_wild) {
-      replacement += "if(e%2.nodeType==1){";
-      _wild = _MSIE5;
-    } else {
-      if (!children) replacement += "if(e%2.nodeName=='%3'){";
-    }
-    return format(replacement, _index++, _list = _index, tagName.toUpperCase());
-  },
-  
-  "\\+(\\*|[\\w-]+)": function(match, tagName) { // direct adjacent selector
-    var replacement = "";
-    if (_wild) replacement += "if(e%1.nodeName!='!'){";
-    _wild = false;
-    replacement += "e%1=IE7._getNextElementSibling(e%1);if(e%1";
-    if (tagName != "*") replacement += "&&e%1.nodeName=='%2'";
-    replacement += "){";
-    return format(replacement, _index, tagName.toUpperCase());
-  },
-  
-  "~(\\*|[\\w-]+)": function(match, tagName) { // indirect adjacent selector
-    var replacement = "";
-    if (_wild) replacement += "if(e%1.nodeName!='!'){";
-    _wild = false;
-    _duplicate = 2; // this selector may produce duplicates
-    replacement += "while(e%1=e%1.nextSibling){if(e%1.ie7_adjacent==IE7._indexed)break;if(";
-    if (tagName == "*") {
-      replacement += "e%1.nodeType==1";
-      if (_MSIE5) replacement += "&&e%1.nodeName!='!'";
-    } else replacement += "e%1.nodeName=='%2'";
-    replacement += "){e%1.ie7_adjacent=IE7._indexed;";
-    return format(replacement, _index, tagName.toUpperCase());
-  },
-  
-  "#([\\w-]+)": function(match, id) { // ID selector
-    _wild = false;
-    var replacement = "if(e%1.id=='%2'){";
-    if (_list) replacement += format("i%1=n%1.length;", _list);
-    return format(replacement, _index, id);
-  },
-  
-  "\\.([\\w-]+)": function(match, className) { // class selector
-    _wild = false;
-    // store RegExp objects - slightly faster on IE
-    reg.push(new RegExp("(^|\\s)" + rescape(className) + "(\\s|$)"));
-    return format("if(e%1.className&&reg[%2].test(e%1.className)){", _index, reg.length - 1);
-  },
-  
-  "\\[([\\w-]+)\\s*([^=]?=)?\\s*([^\\]]*)\\]": function(match, attr, operator, value) { // attribute selectors
-    var alias = _ATTRIBUTES[attr] || attr;
-    if (operator) {
-      var getAttribute = "e%1.getAttribute('%2',2)";
-      if (!_EVALUATED.test(attr)) {
-        getAttribute = "e%1.%3||" + getAttribute;
-      }
-      attr = format("(" + getAttribute + ")", _index, attr, alias);
-    } else {
-      attr = format("IE7._getAttribute(e%1,'%2')", _index, attr);
-    }
-    var replacement = _OPERATORS[operator || ""] || "0";
-    if (replacement && replacement.source) {
-      reg.push(new RegExp(format(replacement.source, rescape(cssParser.unescape(value)))));
-      replacement = "reg[%2].test(%1)";
-      value = reg.length - 1;
-    }
-    return "if(" + format(replacement, attr, value) + "){";
-  },
-  
-  ":+([\\w-]+)(\\(([^)]+)\\))?": function(match, pseudoClass, $2, args) { // pseudo class selectors
-    pseudoClass = _PSEUDO_CLASSES[pseudoClass];
-    return "if(" + (pseudoClass ? format(pseudoClass, _index, args || "")  : "0") + "){";
-  }
-});
-
-// =========================================================================
-// ie7-css.js
-// =========================================================================
-
-var HYPERLINK = /a(#[\w-]+)?(\.[\w-]+)?:(hover|active)/i;
-var BRACE1 = /\s*\{\s*/, BRACE2 = /\s*\}\s*/, COMMA = /\s*\,\s*/;
-var FIRST_LINE_LETTER = /(.*)(:first-(line|letter))/;
-
-//var UNKNOWN = /UNKNOWN|([:.])\w+\1/i;
-
-var styleSheets = document.styleSheets;
-
-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");
-    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()
-    test = new RegExp("([{;\\s])" + propertyName + "\\s*:\\s*" + test + "[^;}]*");
-    var id = this.recalcs.length;
-    if (replacement) replacement = propertyName + ":" + replacement;
-    this.addFix(test, function(match, $1) {
-      return (replacement ? $1 + replacement : match) + ";ie7-" + match.slice(1) + ";ie7_recalc" + id + ":1";
-    });
-    this.recalcs.push(arguments);
-    return id;
-  },
-  
-  apply: function() {
-    this.getInlineStyles();
-    new StyleSheet("screen");
-    this.trash();
-  },
-  
-  createStyleSheet: function() {
-    // create the IE7 style sheet
-    this.styleSheet = document.createStyleSheet();
-    // flag it so we can ignore it during parsing
-    this.styleSheet.ie7 = true;
-    this.styleSheet.owningElement.ie7 = true;
-    this.styleSheet.cssText = HEADER;
-  },
-  
-  getInlineStyles: 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) {
-        this.styles.push(styleSheet.innerHTML);
-      }
-    }
-  },
-  
-  getText: function(styleSheet, path) {
-    // 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 stop = start + (this.screen.cssText.match(/\{/g)||"").length;
-    var rules = this.styleSheet.rules, rule;
-    var calcs, calc, elements, element, i, j, k, id;
-    // loop through all rules
-    for (i = start; i < stop; i++) {
-      rule = rules[i];
-      var cssText = rule.style.cssText;
-      // search for the "ie7_recalc" flag (there may be more than one)
-      if (rule && (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) {
-    if (IE7.CSS.UNKNOWN.test(selector)) {
-      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
-    var _inlineStyles = [].concat(IE7.CSS.styles);
-    // parse media decalarations
-    var MEDIA = /@media\s+([^{]*)\{([^@]+\})\s*\}/gi;
-    var ALL = /\ball\b|^$/i, SCREEN = /\bscreen\b/i, PRINT = /\bprint\b/i;
-    function _parseMedia(cssText, media) {
-      _filterMedia.value = media;
-      return cssText.replace(MEDIA, _filterMedia);
-    };
-    function _filterMedia(match, media, cssText) {
-      media = _simpleMedia(media);
-      switch (media) {
-        case "screen":
-        case "print":
-          if (media != _filterMedia.value) return "";
-        case "all":
-          return cssText;
-      }
-      return "";
-    };
-    function _simpleMedia(media) {
-      if (ALL.test(media)) return "all";
-      else if (SCREEN.test(media)) return (PRINT.test(media)) ? "all" : "screen";
-      else if (PRINT.test(media)) return "print";
-    };
-    var self = this;
-    function _getCSSText(styleSheet, path, media, level) {
-      var cssText = "";
-      if (!level) {
-        media = _simpleMedia(styleSheet.media);
-        level = 0;
-      }
-      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
-        if (level < 3) {
-          // loop through imported style sheets
-          for (var i = 0; i < styleSheet.imports.length; i++) {
-            // call this function recursively to get all imported style sheets
-            cssText += _getCSSText(styleSheet.imports[i], getPath(styleSheet.href, path), media, level + 1);
-          }
-        }
-        // retrieve inline style or load an external style sheet
-        cssText += encode(styleSheet.href ? _loadStyleSheet(styleSheet, path) : _inlineStyles.pop() || "");
-        cssText = _parseMedia(cssText, self.media);
-      }
-      return cssText;
-    };
-    // store loaded cssText URLs
-    var fileCache = {};
-    // load an external style sheet
-    function _loadStyleSheet(styleSheet, path) {
-      var url = makePath(styleSheet.href, path);
-      // if the style sheet has already loaded then don't duplicate it
-      if (fileCache[url]) return "";
-      // load from source
-      fileCache[url] = (styleSheet.disabled) ? "" :
-        _fixUrls(IE7.CSS.getText(styleSheet, path), getPath(styleSheet.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
-    //  explorer bugs.
-    var URL = /(url\s*\(\s*['"]?)([\w\.]+[^:\)]*['"]?\))/gi;
-    function _fixUrls(cssText, pathname) {
-      // hack & slash
-      return cssText.replace(URL, "$1" + pathname.slice(0, pathname.lastIndexOf("/") + 1) + "$2");
-    };
-
-    // load all style sheets in the document
-    for (var i = 0; i < styleSheets.length; i++) {
-      if (!styleSheets[i].disabled && !styleSheets[i].ie7) {
-        this.cssText += _getCSSText(styleSheets[i]);
-      }
-    }
-  },
-  
-  load: function() {
-    this.cssText = "";
-    this.getText();
-    this.parse();
-    this.cssText = decode(this.cssText);
-    fileCache = {};
-  },
-  
-  parse: function() {
-    this.cssText = IE7.CSS.parser.exec(this.cssText);
-    
-    // parse the style sheet
-    var offset = IE7.CSS.rules.length;
-    var rules = this.cssText.split(BRACE2), rule;
-    var selectors, cssText, i, j;
-    for (i = 0; i < rules.length; i++) {
-      rule = rules[i].split(BRACE1);
-      selectors = rule[0].split(COMMA);
-      cssText = rule[1];
-      for (j = 0; j < selectors.length; j++) {
-        selectors[j] = cssText ? this.createRule(selectors[j], cssText) : "";
-      }
-      rules[i] = 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 "@media " + this.media + "{" + this.cssText + "}";
-  }
-});
-
-var PseudoElement;
-
-// -----------------------------------------------------------------------
-// IE7 style rules
-// -----------------------------------------------------------------------
-
-var Rule = IE7.Rule = Base.extend({
-  // properties
-  constructor: function(selector, cssText) {
-    this.id = IE7.CSS.rules.length;
-    this.className = Rule.PREFIX + this.id;
-    selector = selector.match(FIRST_LINE_LETTER) || selector || "*";
-    this.selector = selector[1] || selector;
-    this.selectorText = this.parse(this.selector) + (selector[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) {
-    // 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) {
-    // an "instance" is actually an Arguments object
-    var _class = instance[2];
-    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) {
-    if (this.instances[instance.id]) {
-      var _class = instance[2];
-      var target = instance[1], j;
-      for (j = 0; j < target.length; j++) _class.remove(target[j]);
-      delete this.instances[instance.id];
-    }
-  }
-});
-  
-// -----------------------------------------------------------------------
-// dynamic pseudo-classes
-// -----------------------------------------------------------------------
-
-if (appVersion < 7) {
-  var Hover = new DynamicPseudoClass("hover", function(element) {
-    var instance = arguments;
-    IE7.CSS.addEventHandler(element, appVersion < 5.5 ? "onmouseover" : "onmouseenter", function() {
-      Hover.register(instance);
-    });
-    IE7.CSS.addEventHandler(element, appVersion < 5.5 ? "onmouseout" : "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]);
-  });
-}
-
-// -----------------------------------------------------------------------
-// propertyName: inherit;
-// -----------------------------------------------------------------------
-
-IE7.CSS.addRecalc("[\\w-]+", "inherit", function(element, cssText) {
-  var inherited = cssText.match(/[\w-]+\s*:\s*inherit/g);
-  for (var i = 0; i < inherited.length; i++) {
-    var propertyName = inherited[i].replace(/ie7\-|\s*:\s*inherit/g, "").replace(/\-([a-z])/g, function(match, chr) {
-      return chr.toUpperCase()
-    });
-    element.runtimeStyle[propertyName] = element.parentElement.currentStyle[propertyName];
-  }
-});
-
-// =========================================================================
-// 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.
-  //  this is a proper fix, it preserves the DOM structure and
-  //  <abbr> elements report the correct tagName & namespace prefix
-  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]";
-
-new function(_) {
-var layout = IE7.Layout = this;
-
-  // big, ugly box-model hack + min/max stuff
-  
-  // #tantek > #erik > #dean { voice-family: hacker; }
-  
-  // -----------------------------------------------------------------------
-  // "layout"
-  // -----------------------------------------------------------------------
-  
-  HEADER += "*{boxSizing:content-box}";
-  
-  // does an element have "layout" ?
-  IE7.hasLayout = appVersion < 5.5 ? function(element) {
-    // element.currentStyle.hasLayout doesn't work for IE5.0
-    return element.clientWidth;
-  } : function(element) {
-    return element.currentStyle.hasLayout;
-  };
-  
-  // give an element "layout"
-  layout.boxSizing = function(element) {
-    if (!IE7.hasLayout(element)) {
-    //#  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;
-      if (parentElement && IE7.hasLayout(parentElement) && !IE7[type == "marginTop" ? "_getPreviousElementSibling" : "_getNextElementSibling"](element)) return;
-      var child = cssQuery(">*:" + (type == "marginTop" ? "first" : "last") + "-child", element, true);
-      if (child && child.currentStyle.styleFloat == "none" && IE7.hasLayout(child)) {
-        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 applyWidth, applyHeight;
-  IE7.Layout.borderBox = function(element){
-    applyWidth(element);
-    applyHeight(element);
-  };
-  
-  var fixWidth = function(HEIGHT) {
-    applyWidth = function(element) {
-      if (!PERCENT.test(element.currentStyle.width)) fixWidth(element);
-      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)) : value;
-        setOverrideStyle(element, "width", element.runtimeStyle.fixedWidth);
-      }
-    };
-  
-    function layoutWidth(element) {
-      if (!isFixed(element)) {
-        var layoutParent = element.offsetParent;
-        while (layoutParent && !IE7.hasLayout(layoutParent)) 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["box-sizing"] == "border-box";
-      var adjustment = 0;
-      if (quirksMode && !borderBox)
-        adjustment += getBorderWidth(element) + getWidth(element, "padding");
-      else if (!quirksMode && 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
-      var rect = element.getBoundingClientRect();
-      var 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; // || "auto";
-      }
-    };
-  
-    // -----------------------------------------------------------------------
-    // 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);
-          IE7.Layout.boxSizing(element);
-      }
-    };
-    IE7.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 (!quirksMode) 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 (quirksMode) {
-      IE7.CSS.addRecalc("width", NUMERIC, applyWidth);
-    }
-    if (appVersion < 7) {
-      IE7.CSS.addRecalc("min-width", NUMERIC, layout.minWidth);
-      IE7.CSS.addRecalc("max-width", NUMERIC, layout.maxWidth);
-      IE7.CSS.addRecalc("right", NUMERIC, fixRight);
-    }
-  };
-  
-  eval("var fixHeight=" + rotate(fixWidth));
-  
-  // apply box-model + min/max fixes
-  fixWidth();
-  fixHeight(true);
-};
-
-// =========================================================================
-// 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 >= 5.5 && appVersion < 7) {
-  // ** IE7 VARIABLE
-  // e.g. only apply the hack to files ending in ".png"
-  // IE7_PNG_SUFFIX = ".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, "crop") +
-      ";zoom:1;background" + ($1||"") + ":" + ($2||"") + "none" + ($4||"") : match;
-  });
-  
-  // -----------------------------------------------------------------------
-  //  fix PNG transparency (HTML images)
-  // -----------------------------------------------------------------------
-
-  IE7.HTML.addRecalc("img,input", function(element) {
-    if (element.tagName == "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) {
-  var filter = element.filters[ALPHA_IMAGE_LOADER];
-  if (filter) {
-    filter.src = element.src;
-    filter.enabled = true;
-  } else {
-    element.runtimeStyle.filter = format(PNG_FILTER, 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
-// =========================================================================
-
-new 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 = quirksMode ? "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();
-      bgLeft(element);
-      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);
-    setOffsetLeft(element);
-    setOffsetTop(element);
-    parentElement.removeChild(_tmp);
-  };
-  
-  function bgLeft(element) {
-    element.style.backgroundPositionX = element.currentStyle.backgroundPositionX;
-    if (!_isFixed(element)) {
-      _setExpression(element, "backgroundPositionX", "(parseInt(runtimeStyle.offsetLeft)+document." + $viewport + ".scrollLeft)||0");
-    }
-  };
-  eval(rotate(bgLeft));
-  
-  function setOffsetLeft(element) {
-    var propertyName = _isFixed(element) ? "backgroundPositionX" : "offsetLeft";
-    element.runtimeStyle[propertyName] =
-      getOffsetLeft(element, element.style.backgroundPositionX) -
-      element.getBoundingClientRect().left - element.clientLeft + 2;
-  };
-  eval(rotate(setOffsetLeft));
-  
-  function getOffsetLeft(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;
-    }
-  };
-  eval(rotate(getOffsetLeft));
-  
-  // -----------------------------------------------------------------------
-  //  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);
-      _foregroundPosition(element);
-    }
-  };
-  
-  function _foregroundPosition(element, recalc) {
-    positionTop(element, recalc);
-    positionLeft(element, recalc, true);
-    if (!element.runtimeStyle.autoLeft && element.currentStyle.marginLeft == "auto" &&
-      element.currentStyle.right != "auto") {
-      var left = viewport.clientWidth - getPixelWidth(element, element.currentStyle.right) -
-        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;
-    }
-    clipWidth(element);
-    clipHeight(element);
-  };
-
-  function clipWidth(element) {
-    var fixWidth = element.runtimeStyle.fixWidth;
-    element.runtimeStyle.borderRightWidth = "";
-    element.runtimeStyle.width = fixWidth ? getPixelWidth(element, fixWidth) : "";
-    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;
-      }
-    }
-  };
-  eval(rotate(clipWidth));
-  
-  function positionLeft(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 = 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 = 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");
-    }
-  };
-  // clone this function so we can do "top"
-  eval(rotate(positionLeft));
-  
-  // I've forgotten how this works...
-  function getScreenLeft(element) { // thanks to kevin newman (captainn)
-    var screenLeft = element.offsetLeft, nested = 1;
-    if (element.runtimeStyle.autoLeft) {
-      screenLeft = viewport.clientWidth - element.offsetWidth - getPixelWidth(element, element.currentStyle.right);
-    }
-    // accommodate margins
-    if (element.currentStyle.marginLeft != "auto") {
-      screenLeft -= getPixelWidth(element, element.currentStyle.marginLeft);
-    }
-    while (element = element.offsetParent) {
-      if (element.currentStyle.position != "static") nested = -1;
-      screenLeft += element.offsetLeft * nested;
-    }
-    return screenLeft;
-  };
-  eval(rotate(getScreenLeft));
-  
-  function getPixelWidth(element, value) {
-    return PERCENT.test(value) ? parseInt(parseFloat(value) / 100 * viewport.clientWidth) : getPixelValue(element, value);
-  };
-  eval(rotate(getPixelWidth));
-  
-  // -----------------------------------------------------------------------
-  //  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);
-      // do this twice to be sure - hackish, I know :-)
-      _foregroundPosition(elements[i], true);
-    }
-    _timer = 0;
-  };
-  
-  // use a timer for some reason.
-  //  (sometimes this is a good way to prevent resize loops)
-  var _timer;
-  addResize(function() {
-    if (!_timer) _timer = setTimeout(_resize, 0);
-  });
-};
-
-// =========================================================================
-// ie7-oveflow.js
-// =========================================================================
-
-/* ---------------------------------------------------------------------
-
-  This module alters the structure of the document.
-  It may adversely affect other CSS rules. Be warned.
-
---------------------------------------------------------------------- */
-
-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,
-  height: null,
-  marginTop: 0,
-  marginBottom: 0,
-  marginRight: 0,
-  marginLeft: 0,
-  width: "100%"
-};
-
-IE7.CSS.addRecalc("overflow", "visible", function(element) {
-  // 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);
-  });
-  
-  if (appVersion < 6) {
-    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) {
-    if (appVersion < 5.5) IE7.Layout.boxSizing(element.parentElement);
-    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);
-    }
-  });
-};
-
-
-// -----------------------------------------------------------------------
-// initialisation
-// -----------------------------------------------------------------------
-
-IE7.loaded = true;
-
-(function() {
-  try {
-    // http://javascript.nwbox.com/IEContentLoaded/
-    documentElement.doScroll("left");
-  } catch (e) {
-    setTimeout(arguments.callee, 1);
-    return;
-  }
-  // execute the inner text of the IE7 script
-  try {
-    eval(script.innerHTML);
-  } catch (e) {
-    // ignore errors
-  }
-  PNG = new RegExp(rescape(typeof IE7_PNG_SUFFIX == "string" ? IE7_PNG_SUFFIX : "-trans.png") + "$", "i");
-
-  // frequently used references
-  body = document.body;
-  viewport = quirksMode ? body : documentElement;
-
-  // classes
-  body.className += " ie7_body";
-  documentElement.className += " ie7_html";
-
-  if (quirksMode) ie7Quirks();
-
-  IE7.CSS.init();
-  IE7.HTML.init();
-
-  IE7.HTML.apply();
-  IE7.CSS.apply();
-
-  IE7.recalc();
-})();
-
-
-})();
+/* IE7/IE8.js - copyright 2004-2008, Dean Edwards */
+(function(){IE7={toString:function(){return"IE7 version 2.0 (beta2)"}};var k=IE7.appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(top.location.search)||k<5)return;var Q=bG();var C=document.compatMode!="CSS1Compat";var bm=document.documentElement,v,s;var bA="!";var G=":link{ie7-link:link}:visited{ie7-link:visited}";var cj=/^[\w\.]+[^:]*$/;function W(a,b){if(cj.test(a))a=(b||"")+a;return a};function bn(a,b){a=W(a,b);return a.slice(0,a.lastIndexOf("/")+1)};var bB=document.scripts[document.scripts.length-1];var ck=bn(bB.src);try{var H=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}var X={};function cl(a,b){try{a=W(a,b);if(!X[a]){H.open("GET",a,false);H.send();if(H.status==0||H.status==200){X[a]=H.responseText}}}catch(e){}finally{return X[a]||""}};if(k<5.5){undefined=Q();bA="HTML:!";var cm=/(g|gi)$/;var cn=String.prototype.replace;String.prototype.replace=function(a,b){if(typeof b=="function"){if(a&&a.constructor==RegExp){var c=a;var d=c.global;if(d==null)d=cm.test(c);if(d)c=new RegExp(c.source)}else{c=new RegExp(bb(a))}var f,g=this,h="";while(g&&(f=c.exec(g))){h+=g.slice(0,f.index)+b.apply(this,f);g=g.slice(f.index+f[0].length);if(!d)break}return h+g}return cn.apply(this,arguments)};Array.prototype.pop=function(){if(this.length){var a=this[this.length-1];this.length--;return a}return undefined};Array.prototype.push=function(){for(var a=0;a<arguments.length;a++){this[this.length]=arguments[a]}return this.length};var co=this;Function.prototype.apply=function(a,b){if(a===undefined)a=co;else if(a==null)a=window;else if(typeof a=="string")a=new String(a);else if(typeof a=="number")a=new Number(a);else if(typeof a=="boolean")a=new Boolean(a);if(arguments.length==1)b=[];else if(b[0]&&b[0].writeln)b[0]=b[0].documentElement.document||b[0];var c="#ie7_apply",d;a[c]=this;switch(b.length){case 0:d=a[c]();break;case 1:d=a[c](b[0]);break;case 2:d=a[c](b[0],b[1]);break;case 3:d=a[c](b[0],b[1],b[2]);break;case 4:d=a[c](b[0],b[1],b[2],b[3]);break;case 5:d=a[c](b[0],b[1],b[2],b[3],b[4]);break;default:var f=[],g=b.length-1;do f[g]="a["+g+"]";while(g--);eval("r=o[$]("+f+")")}if(typeof a.valueOf=="function"){delete a[c]}else{a[c]=undefined;if(d&&d.writeln)d=d.documentElement.document||d}return d};Function.prototype.call=function(a){return this.apply(a,bC.apply(arguments,[1]))};G+="address,blockquote,body,dd,div,dt,fieldset,form,"+"frame,frameset,h1,h2,h3,h4,h5,h6,iframe,noframes,object,p,"+"hr,applet,center,dir,menu,pre,dl,li,ol,ul{display:block}"}var bC=Array.prototype.slice;var cJ=/%([1-9])/g;var cp=/^\s\s*/;var cq=/\s\s*$/;var cr=/([\/()[\]{}|*+-.,^$?\\])/g;var bD=/\bbase\b/;var bE=["constructor","toString"];var Y;function z(){};z.extend=function(a,b){Y=true;var c=new this;ba(c,a);Y=false;var d=c.constructor;function f(){if(!Y)d.apply(this,arguments)};c.constructor=f;f.extend=arguments.callee;ba(f,b);f.prototype=c;return f};z.prototype.extend=function(a){return ba(this,a)};var bo="#";var Z="~";var cs=/\\./g;var ct=/\(\?[:=!]|\[[^\]]+\]/g;var cu=/\(/g;var D=z.extend({constructor:function(a){this[Z]=[];this.merge(a)},exec:function(g){var h=this,p=this[Z];return String(g).replace(new RegExp(this,this.ignoreCase?"gi":"g"),function(){var a,b=1,c=0;while((a=h[bo+p[c++]])){var d=b+a.length+1;if(arguments[b]){var f=a.replacement;switch(typeof f){case"function":return f.apply(h,bC.call(arguments,b,d));case"number":return arguments[b+f];default:return f}}b=d}})},add:function(a,b){if(a instanceof RegExp){a=a.source}if(!this[bo+a])this[Z].push(String(a));this[bo+a]=new D.Item(a,b)},merge:function(a){for(var b in a)this.add(b,a[b])},toString:function(){return"("+this[Z].join(")|(")+")"}},{IGNORE:"$0",Item:z.extend({constructor:function(a,b){a=a instanceof RegExp?a.source:String(a);if(typeof b=="number")b=String(b);else if(b==null)b="";if(typeof b=="string"&&/\$(\d+)/.test(b)){if(/^\$\d+$/.test(b)){b=parseInt(b.slice(1))}else{var c=/'/.test(b.replace(/\\./g,""))?'"':"'";b=b.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\$(\d+)/g,c+"+(arguments[$1]||"+c+c+")+"+c);b=new Function("return "+c+b.replace(/(['"])\1\+(.*)\+\1\1$/,"$1")+c)}}this.length=D.count(a);this.replacement=b;this.toString=bG(a)}}),count:function(a){a=String(a).replace(cs,"").replace(ct,"");return I(a,cu).length}});function ba(a,b){if(a&&b){var c=(typeof b=="function"?Function:Object).prototype;var d=bE.length,f;if(Y)while(f=bE[--d]){var g=b[f];if(g!=c[f]){if(bD.test(g)){bF(a,f,g)}else{a[f]=g}}}for(f in b)if(c[f]===undefined){var g=b[f];if(a[f]&&typeof g=="function"&&bD.test(g)){bF(a,f,g)}else{a[f]=g}}}return a};function bF(c,d,f){var g=c[d];c[d]=function(){var a=this.base;this.base=g;var b=f.apply(this,arguments);this.base=a;return b}};function cv(a,b){if(!b)b=a;var c={};for(var d in a)c[d]=b[d];return c};function i(c){var d=arguments;var f=new RegExp("%([1-"+arguments.length+"])","g");return String(c).replace(f,function(a,b){return b<d.length?d[b]:a})};function I(a,b){return String(a).match(b)||[]};function bb(a){return String(a).replace(cr,"\\$1")};function cK(a){return String(a).replace(cp,"").replace(cq,"")};function bG(a){return function(){return a}};var bH=D.extend({ignoreCase:true});var cw=/\x01(\d+)/g,cx=/'/g,cy=/^\x01/,cz=/\\([\da-fA-F]{1,4})/g;var bp=[];var cA=new bH({"<!\\-\\-|\\-\\->":"","\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\/":"","@(namespace|import)[^;\\n]+[;\\n]":"","'(\\\\.|[^'\\\\])*'":bJ,'"(\\\\.|[^"\\\\])*"':bJ,"\\s+":" "});function cB(a){return cA.exec(a)};function bI(c){return c.replace(cw,function(a,b){return bp[b-1]})};function bJ(c){return"\x01"+bp.push(c.replace(cz,function(a,b){return eval("'\\u"+"0000".slice(b.length)+b+"'")}).slice(1,-1).replace(cx,"\\'"))};function cC(a){return cy.test(a)?bp[a.slice(1)-1]:a};var cD=new D({Width:"Height",width:"height",Left:"Top",left:"top",Right:"Bottom",right:"bottom",onX:"onY"});function A(a){return cD.exec(a)};var bK=[];function bq(a){cF(a);w(window,"onresize",a)};function w(a,b,c){a.attachEvent(b,c);bK.push(arguments)};function cE(a,b,c){try{a.detachEvent(b,c)}catch(ignore){}};w(window,"onunload",function(){var a;while(a=bK.pop()){cE(a[0],a[1],a[2])}});function R(a,b,c){if(!a.elements)a.elements={};if(c)a.elements[b.uniqueID]=b;else delete a.elements[b.uniqueID];return c};w(window,"onbeforeprint",function(){if(!IE7.CSS.print)new bw("print");IE7.CSS.print.recalc()});var bL=/^\d+(px)?$/i;var J=/^\d+%$/;var E=function(a,b){if(bL.test(b))return parseInt(b);var c=a.style.left;var d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b||0;b=a.style.pixelLeft;a.style.left=c;a.runtimeStyle.left=d;return b};var br="ie7-";var bM=z.extend({constructor:function(){this.fixes=[];this.recalcs=[]},init:Q});var bs=[];function cF(a){bs.push(a)};IE7.recalc=function(){IE7.HTML.recalc();IE7.CSS.recalc();for(var a=0;a<bs.length;a++)bs[a]()};function bc(a){return a.currentStyle["ie7-position"]=="fixed"};function bt(a,b){return a.currentStyle[br+b]||a.currentStyle[b]};function K(a,b,c){if(a.currentStyle[br+b]==null){a.runtimeStyle[br+b]=a.currentStyle[b]}a.runtimeStyle[b]=c};function bN(a){var b=document.createElement(a||"object");b.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";b.ie7_anon=true;return b};function B(a,b,c){if(!be[a]){F=[];var d="";var f=T.escape(a).split(",");for(var g=0;g<f.length;g++){o=m=x=0;S=f.length>1?2:0;var h=T.exec(f[g])||"if(0){";if(o){h+=i("if(e%1.nodeName!='!'){",m)}var p=S>1?bV:"";h+=i(p+bW,m);h+=Array(I(h,/\{/g).length+1).join("}");d+=h}eval(i(bX,F)+T.unescape(d)+"return s?null:r}");be[a]=_h}return be[a](b||document,c)};var bd=k<6;var bO=/^(href|src)$/;var bu={"class":"className","for":"htmlFor"};IE7._5=1;IE7._e=function(a,b){var c=a.all[b]||null;if(!c||c.id==b)return c;for(var d=0;d<c.length;d++){if(c[d].id==b)return c[d]}return null};IE7._f=function(a,b){if(b=="src"&&a.pngSrc)return a.pngSrc;var c=bd?(a.attributes[b]||a.attributes[bu[b.toLowerCase()]]):a.getAttributeNode(b);if(c&&(c.specified||b=="value")){if(bO.test(b)){return a.getAttribute(b,2)}else if(b=="class"){return a.className.replace(/\sie7_\w+/g,"")}else if(b=="style"){return a.style.cssText}else{return c.nodeValue}}return null};var bP="colSpan,rowSpan,vAlign,dateTime,accessKey,tabIndex,encType,maxLength,readOnly,longDesc";ba(bu,cv(bP.toLowerCase().split(","),bP.split(",")));IE7._a=function(a){while(a&&(a=a.nextSibling)&&(a.nodeType!=1||a.nodeName=="!"))continue;return a};IE7._b=function(a){while(a&&(a=a.previousSibling)&&(a.nodeType!=1||a.nodeName=="!"))continue;return a};var cG=/([\s>+~,]|[^(]\+|^)([#.:\[])/g,cH=/(^|,)([^\s>+~])/g,cI=/\s*([\s>+~(),]|^|$)\s*/g,bQ=/\s\*\s/g;var bR=D.extend({constructor:function(a){this.base(a);this.sorter=new D;this.sorter.add(/:not\([^)]*\)/,D.IGNORE);this.sorter.add(/([ >](\*|[\w-]+))([^: >+~]*)(:\w+-child(\([^)]+\))?)([^: >+~]*)/,"$1$3$6$4")},ignoreCase:true,escape:function(a){return this.optimise(this.format(a))},format:function(a){return a.replace(cI,"$1").replace(cH,"$1 $2").replace(cG,"$1*$2")},optimise:function(a){return this.sorter.exec(a.replace(bQ,">* "))},unescape:function(a){return bI(a)}});var bS={"":"%1!=null","=":"%1=='%2'","~=":/(^| )%1( |$)/,"|=":/^%1(-|$)/,"^=":/^%1/,"$=":/%1$/,"*=":/%1/};var bT={"first-child":"!IE7._b(e%1)","link":"e%1.currentStyle['ie7-link']=='link'","visited":"e%1.currentStyle['ie7-link']=='visited'"};var bv="var p%2=0,i%2,e%2,n%2=e%1.";var bU="e%1.sourceIndex";var bV="var g="+bU+";if(!p[g]){p[g]=1;";var bW="r[r.length]=e%1;if(s)return e%1;";var bX="var _h=function(e0,s){IE7._5++;var r=[],p={},reg=[%1],d=document;";var F;var m;var o;var x;var S;var be={};var T=new bR({" (\\*|[\\w-]+)#([\\w-]+)":function(a,b,c){o=false;var d="var e%2=IE7._e(d,'%4');if(e%2&&";if(b!="*")d+="e%2.nodeName=='%3'&&";d+="(e%1==d||e%1.contains(e%2))){";if(x)d+=i("i%1=n%1.length;",x);return i(d,m++,m,b.toUpperCase(),c)}," (\\*|[\\w-]+)":function(a,b){S++;o=b=="*";var c=bv;c+=(o&&bd)?"all":"getElementsByTagName('%3')";c+=";for(i%2=0;(e%2=n%2[i%2]);i%2++){";return i(c,m++,x=m,b.toUpperCase())},">(\\*|[\\w-]+)":function(a,b){var c=x;o=b=="*";var d=bv;d+=c?"children":"childNodes";if(!o&&c)d+=".tags('%3')";d+=";for(i%2=0;(e%2=n%2[i%2]);i%2++){";if(o){d+="if(e%2.nodeType==1){";o=bd}else{if(!c)d+="if(e%2.nodeName=='%3'){"}return i(d,m++,x=m,b.toUpperCase())},"\\+(\\*|[\\w-]+)":function(a,b){var c="";if(o)c+="if(e%1.nodeName!='!'){";o=false;c+="e%1=IE7._a(e%1);if(e%1";if(b!="*")c+="&&e%1.nodeName=='%2'";c+="){";return i(c,m,b.toUpperCase())},"~(\\*|[\\w-]+)":function(a,b){var c="";if(o)c+="if(e%1.nodeName!='!'){";o=false;S=2;c+="while(e%1=e%1.nextSibling){if(e%1.ie7_adjacent==IE7._5)break;if(";if(b=="*"){c+="e%1.nodeType==1";if(bd)c+="&&e%1.nodeName!='!'"}else c+="e%1.nodeName=='%2'";c+="){e%1.ie7_adjacent=IE7._5;";return i(c,m,b.toUpperCase())},"#([\\w-]+)":function(a,b){o=false;var c="if(e%1.id=='%2'){";if(x)c+=i("i%1=n%1.length;",x);return i(c,m,b)},"\\.([\\w-]+)":function(a,b){o=false;F.push(new RegExp("(^|\\s)"+bb(b)+"(\\s|$)"));return i("if(e%1.className&&reg[%2].test(e%1.className)){",m,F.length-1)},"\\[([\\w-]+)\\s*([^=]?=)?\\s*([^\\]]*)\\]":function(a,b,c,d){var f=bu[b]||b;if(c){var g="e%1.getAttribute('%2',2)";if(!bO.test(b)){g="e%1.%3||"+g}b=i("("+g+")",m,b,f)}else{b=i("IE7._f(e%1,'%2')",m,b)}var h=bS[c||""]||"0";if(h&&h.source){F.push(new RegExp(i(h.source,bb(T.unescape(d)))));h="reg[%2].test(%1)";d=F.length-1}return"if("+i(h,b,d)+"){"},":+([\\w-]+)(\\(([^)]+)\\))?":function(a,b,c,d){b=bT[b];return"if("+(b?i(b,m,d||""):"0")+"){"}});var bY=/a(#[\w-]+)?(\.[\w-]+)?:(hover|active)/i;var bZ=/\s*\{\s*/,ca=/\s*\}\s*/,cb=/\s*\,\s*/;var cc=/(.*)(:first-(line|letter))/;var y=document.styleSheets;IE7.CSS=new(bM.extend({parser:new bH,screen:"",print:"",styles:[],rules:[],pseudoClasses:k<7?"first\\-child":"",dynamicPseudoClasses:{toString:function(){var a=[];for(var b in this)a.push(b);return a.join("|")}},init:function(){var a="^\x01$";var b="\\[class=?[^\\]]*\\]";var c=[];if(this.pseudoClasses)c.push(this.pseudoClasses);var d=this.dynamicPseudoClasses.toString();if(d)c.push(d);c=c.join("|");var f=k<7?["[>+~[(]|([:.])\\w+\\1"]:[b];if(c)f.push(":("+c+")");this.UNKNOWN=new RegExp(f.join("|")||a,"i");var g=k<7?["\\[[^\\]]+\\]|[^\\s(\\[]+\\s*[+~]"]:[b];var h=g.concat();if(c)h.push(":("+c+")");n.COMPLEX=new RegExp(h.join("|")||a,"ig");if(this.pseudoClasses)g.push(":("+this.pseudoClasses+")");L.COMPLEX=new RegExp(g.join("|")||a,"i");L.MATCH=new RegExp(d?"(.*):("+d+")(.*)":a,"i");this.createStyleSheet();this.refresh()},addEventHandler:function(){w.apply(null,arguments)},addFix:function(a,b){this.parser.add(a,b)},addRecalc:function(c,d,f,g){d=new RegExp("([{;\\s])"+c+"\\s*:\\s*"+d+"[^;}]*");var h=this.recalcs.length;if(g)g=c+":"+g;this.addFix(d,function(a,b){return(g?b+g:a)+";ie7-"+a.slice(1)+";ie7_recalc"+h+":1"});this.recalcs.push(arguments);return h},apply:function(){this.getInlineStyles();new bw("screen");this.trash()},createStyleSheet:function(){this.styleSheet=document.createStyleSheet();this.styleSheet.ie7=true;this.styleSheet.owningElement.ie7=true;this.styleSheet.cssText=G},getInlineStyles:function(){var a=document.getElementsByTagName("style"),b;for(var c=a.length-1;(b=a[c]);c--){if(!b.disabled&&!b.ie7){this.styles.push(b.innerHTML)}}},getText:function(a,b){try{var c=a.cssText}catch(e){c=""}if(H)c=cl(a.href,b)||c;return c},recalc:function(){this.screen.recalc();var a=/ie7_recalc\d+/g;var b=G.match(/[{,]/g).length;var c=b+(this.screen.cssText.match(/\{/g)||"").length;var d=this.styleSheet.rules,f;var g,h,p,t,q,j,u,l;for(q=b;q<c;q++){f=d[q];var r=f.style.cssText;if(f&&(g=r.match(a))){p=B(f.selectorText);if(p.length)for(j=0;j<g.length;j++){l=g[j];h=IE7.CSS.recalcs[l.slice(10)][2];for(u=0;(t=p[u]);u++){if(t.currentStyle[l])h(t,r)}}}}},refresh:function(){this.styleSheet.cssText=G+this.screen+this.print},trash:function(){for(var a=0;a<y.length;a++){if(!y[a].ie7){try{var b=y[a].cssText}catch(e){b=""}if(b)y[a].cssText=""}}}}));var bw=z.extend({constructor:function(a){this.media=a;this.load();IE7.CSS[a]=this;IE7.CSS.refresh()},createRule:function(a,b){if(IE7.CSS.UNKNOWN.test(a)){var c;if(bf&&(c=a.match(bf.MATCH))){return new bf(c[1],c[2],b)}else if(c=a.match(L.MATCH)){if(!bY.test(c[0])||L.COMPLEX.test(c[0])){return new L(a,c[1],c[2],c[3],b)}}else return new n(a,b)}return a+" {"+b+"}"},getText:function(){var h=[].concat(IE7.CSS.styles);var p=/@media\s+([^{]*)\{([^@]+\})\s*\}/gi;var t=/\ball\b|^$/i,q=/\bscreen\b/i,j=/\bprint\b/i;function u(a,b){l.value=b;return a.replace(p,l)};function l(a,b,c){b=r(b);switch(b){case"screen":case"print":if(b!=l.value)return"";case"all":return c}return""};function r(a){if(t.test(a))return"all";else if(q.test(a))return(j.test(a))?"all":"screen";else if(j.test(a))return"print"};var N=this;function O(a,b,c,d){var f="";if(!d){c=r(a.media);d=0}if(c=="all"||c==N.media){if(d<3){for(var g=0;g<a.imports.length;g++){f+=O(a.imports[g],bn(a.href,b),c,d+1)}}f+=cB(a.href?cg(a,b):h.pop()||"");f=u(f,N.media)}return f};var bl={};function cg(a,b){var c=W(a.href,b);if(bl[c])return"";bl[c]=(a.disabled)?"":ci(IE7.CSS.getText(a,b),bn(a.href,b));return bl[c]};var ch=/(url\s*\(\s*['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function ci(a,b){return a.replace(ch,"$1"+b.slice(0,b.lastIndexOf("/")+1)+"$2")};for(var P=0;P<y.length;P++){if(!y[P].disabled&&!y[P].ie7){this.cssText+=O(y[P])}}},load:function(){this.cssText="";this.getText();this.parse();this.cssText=bI(this.cssText);X={}},parse:function(){this.cssText=IE7.CSS.parser.exec(this.cssText);var a=IE7.CSS.rules.length;var b=this.cssText.split(ca),c;var d,f,g,h;for(g=0;g<b.length;g++){c=b[g].split(bZ);d=c[0].split(cb);f=c[1];for(h=0;h<d.length;h++){d[h]=f?this.createRule(d[h],f):""}b[g]=d.join("\n")}this.cssText=b.join("\n");this.rules=IE7.CSS.rules.slice(a)},recalc:function(){var a,b;for(b=0;(a=this.rules[b]);b++)a.recalc()},toString:function(){return"@media "+this.media+"{"+this.cssText+"}"}});var bf;var n=IE7.Rule=z.extend({constructor:function(a,b){this.id=IE7.CSS.rules.length;this.className=n.PREFIX+this.id;a=a.match(cc)||a||"*";this.selector=a[1]||a;this.selectorText=this.parse(this.selector)+(a[2]||"");this.cssText=b;this.MATCH=new RegExp("\\s"+this.className+"(\\s|$)","g");IE7.CSS.rules.push(this);this.init()},init:Q,add:function(a){a.className+=" "+this.className},recalc:function(){var a=B(this.selector);for(var b=0;b<a.length;b++)this.add(a[b])},parse:function(a){var b=a.replace(n.CHILD," ").replace(n.COMPLEX,"");if(k<7)b=b.replace(n.MULTI,"");var c=I(b,n.TAGS).length-I(a,n.TAGS).length;var d=I(b,n.CLASSES).length-I(a,n.CLASSES).length+1;while(d>0&&n.CLASS.test(b)){b=b.replace(n.CLASS,"");d--}while(c>0&&n.TAG.test(b)){b=b.replace(n.TAG,"$1*");c--}b+="."+this.className;d=Math.min(d,2);c=Math.min(c,2);var f=-10*d-c;if(f>0){b=b+","+n.MAP[f]+" "+b}return b},remove:function(a){a.className=a.className.replace(this.MATCH,"$1")},toString:function(){return i("%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"}});var L=n.extend({constructor:function(a,b,c,d,f){this.attach=b||"*";this.dynamicPseudoClass=IE7.CSS.dynamicPseudoClasses[c];this.target=d;this.base(a,f)},recalc:function(){var a=B(this.attach),b;for(var c=0;b=a[c];c++){var d=this.target?B(this.target,b):[b];if(d.length)this.dynamicPseudoClass.apply(b,d,this)}}});var cd=z.extend({constructor:function(a,b){this.name=a;this.apply=b;this.instances={};IE7.CSS.dynamicPseudoClasses[a]=this},register:function(a){var b=a[2];a.id=b.id+a[0].uniqueID;if(!this.instances[a.id]){var c=a[1],d;for(d=0;d<c.length;d++)b.add(c[d]);this.instances[a.id]=a}},unregister:function(a){if(this.instances[a.id]){var b=a[2];var c=a[1],d;for(d=0;d<c.length;d++)b.remove(c[d]);delete this.instances[a.id]}}});if(k<7){var U=new cd("hover",function(a){var b=arguments;IE7.CSS.addEventHandler(a,k<5.5?"onmouseover":"onmouseenter",function(){U.register(b)});IE7.CSS.addEventHandler(a,k<5.5?"onmouseout":"onmouseleave",function(){U.unregister(b)})});w(document,"onmouseup",function(){var a=U.instances;for(var b in a)if(!a[b][0].contains(event.srcElement))U.unregister(a[b])})}IE7.CSS.addRecalc("[\\w-]+","inherit",function(c,d){var f=d.match(/[\w-]+\s*:\s*inherit/g);for(var g=0;g<f.length;g++){var h=f[g].replace(/ie7\-|\s*:\s*inherit/g,"").replace(/\-([a-z])/g,function(a,b){return b.toUpperCase()});c.runtimeStyle[h]=c.parentElement.currentStyle[h]}});IE7.HTML=new(bM.extend({fixed:{},init:Q,addFix:function(){this.fixes.push(arguments)},apply:function(){for(var a=0;a<this.fixes.length;a++){var b=B(this.fixes[a][0]);var c=this.fixes[a][1];for(var d=0;d<b.length;d++)c(b[d])}},addRecalc:function(){this.recalcs.push(arguments)},recalc:function(){for(var a=0;a<this.recalcs.length;a++){var b=B(this.recalcs[a][0]);var c=this.recalcs[a][1],d;var f=Math.pow(2,a);for(var g=0;(d=b[g]);g++){var h=d.uniqueID;if((this.fixed[h]&f)==0){d=c(d)||d;this.fixed[h]|=f}}}}}));if(k<7){document.createElement("abbr");IE7.HTML.addRecalc("label",function(a){if(!a.htmlFor){var b=B("input,textarea",a,true);if(b){w(a,"onclick",function(){b.click()})}}})}var V="[.\\d]";new function(_){var layout=IE7.Layout=this;G+="*{boxSizing:content-box}";IE7.hasLayout=k<5.5?function(a){return a.clientWidth}:function(a){return a.currentStyle.hasLayout};layout.boxSizing=function(a){if(!IE7.hasLayout(a)){a.style.height="0cm";if(a.currentStyle.verticalAlign=="auto")a.runtimeStyle.verticalAlign="top";collapseMargins(a)}};function collapseMargins(a){if(a!=s&&a.currentStyle.position!="absolute"){collapseMargin(a,"marginTop");collapseMargin(a,"marginBottom")}};function collapseMargin(a,b){if(!a.runtimeStyle[b]){var c=a.parentElement;if(c&&IE7.hasLayout(c)&&!IE7[b=="marginTop"?"_b":"_a"](a))return;var d=B(">*:"+(b=="marginTop"?"first":"last")+"-child",a,true);if(d&&d.currentStyle.styleFloat=="none"&&IE7.hasLayout(d)){collapseMargin(d,b);margin=_9(a,a.currentStyle[b]);childMargin=_9(d,d.currentStyle[b]);if(margin<0||childMargin<0){a.runtimeStyle[b]=margin+childMargin}else{a.runtimeStyle[b]=Math.max(childMargin,margin)}d.runtimeStyle[b]="0px"}}};function _9(a,b){return b=="auto"?0:E(a,b)};var UNIT=/^[.\d][\w%]*$/,AUTO=/^(auto|0cm)$/;var applyWidth,applyHeight;IE7.Layout.borderBox=function(a){applyWidth(a);applyHeight(a)};var fixWidth=function(g){applyWidth=function(a){if(!J.test(a.currentStyle.width))h(a);collapseMargins(a)};function h(a,b){if(!a.runtimeStyle.fixedWidth){if(!b)b=a.currentStyle.width;a.runtimeStyle.fixedWidth=(UNIT.test(b))?Math.max(0,q(a,b)):b;K(a,"width",a.runtimeStyle.fixedWidth)}};function p(a){if(!bc(a)){var b=a.offsetParent;while(b&&!IE7.hasLayout(b))b=b.offsetParent}return(b||s).clientWidth};function t(a,b){if(J.test(b))return parseInt(parseFloat(b)/100*p(a));return E(a,b)};var q=function(a,b){var c=a.currentStyle["box-sizing"]=="border-box";var d=0;if(C&&!c)d+=j(a)+u(a,"padding");else if(!C&&c)d-=j(a)+u(a,"padding");return t(a,b)+d};function j(a){return a.offsetWidth-a.clientWidth};function u(a,b){return t(a,a.currentStyle[b+"Left"])+t(a,a.currentStyle[b+"Right"])};G+="*{minWidth:none;maxWidth:none;min-width:none;max-width:none}";layout.minWidth=function(a){if(a.currentStyle["min-width"]!=null){a.style.minWidth=a.currentStyle["min-width"]}if(R(arguments.callee,a,a.currentStyle.minWidth!="none")){layout.boxSizing(a);h(a);l(a)}};eval("IE7.Layout.maxWidth="+String(layout.minWidth).replace(/min/g,"max"));function l(a){var b=a.getBoundingClientRect();var c=b.right-b.left;if(a.currentStyle.minWidth!="none"&&c<=q(a,a.currentStyle.minWidth)){a.runtimeStyle.width=a.currentStyle.minWidth}else if(a.currentStyle.maxWidth!="none"&&c>=q(a,a.currentStyle.maxWidth)){a.runtimeStyle.width=a.currentStyle.maxWidth}else{a.runtimeStyle.width=a.runtimeStyle.fixedWidth}};function r(a){if(R(r,a,/^(fixed|absolute)$/.test(a.currentStyle.position)&&bt(a,"left")!="auto"&&bt(a,"right")!="auto"&&AUTO.test(bt(a,"width")))){N(a);IE7.Layout.boxSizing(a)}};IE7.Layout.fixRight=r;function N(a){var b=t(a,a.runtimeStyle._c||a.currentStyle.left);var c=p(a)-t(a,a.currentStyle.right)-b-u(a,"margin");if(parseInt(a.runtimeStyle.width)==c)return;a.runtimeStyle.width="";if(bc(a)||g||a.offsetWidth<c){if(!C)c-=j(a)+u(a,"padding");if(c<0)c=0;a.runtimeStyle.fixedWidth=c;K(a,"width",c)}};var O=0;bq(function(){if(!s)return;var a,b=(O<s.clientWidth);O=s.clientWidth;var c=layout.minWidth.elements;for(a in c){var d=c[a];var f=(parseInt(d.runtimeStyle.width)==q(d,d.currentStyle.minWidth));if(b&&f)d.runtimeStyle.width="";if(b==f)l(d)}var c=layout.maxWidth.elements;for(a in c){var d=c[a];var f=(parseInt(d.runtimeStyle.width)==q(d,d.currentStyle.maxWidth));if(!b&&f)d.runtimeStyle.width="";if(b!=f)l(d)}for(a in r.elements)N(r.elements[a])});if(C){IE7.CSS.addRecalc("width",V,applyWidth)}if(k<7){IE7.CSS.addRecalc("min-width",V,layout.minWidth);IE7.CSS.addRecalc("max-width",V,layout.maxWidth);IE7.CSS.addRecalc("right",V,r)}};eval("var fixHeight="+A(fixWidth));fixWidth();fixHeight(true)};var bg=W("blank.gif",ck);var bh="DXImageTransform.Microsoft.AlphaImageLoader";var bx="progid:"+bh+"(src='%1',sizingMethod='%2')";var bi;var M=[];function by(a){if(bi.test(a.src)){var b=new Image(a.width,a.height);b.onload=function(){a.width=b.width;a.height=b.height;b=null};b.src=a.src;a.pngSrc=a.src;bz(a)}};if(k>=5.5&&k<7){IE7.CSS.addFix(/background(-image)?\s*:\s*([^};]*)?url\(([^\)]+)\)([^;}]*)?/,function(a,b,c,d,f){d=cC(d);return bi.test(d)?"filter:"+i(bx,d,"crop")+";zoom:1;background"+(b||"")+":"+(c||"")+"none"+(f||""):a});IE7.HTML.addRecalc("img,input",function(a){if(a.tagName=="INPUT"&&a.type!="image")return;by(a);w(a,"onpropertychange",function(){if(!bj&&event.propertyName=="src"&&a.src.indexOf(bg)==-1)by(a)})});var bj=false;w(window,"onbeforeprint",function(){bj=true;for(var a=0;a<M.length;a++)ce(M[a])});w(window,"onafterprint",function(){for(var a=0;a<M.length;a++)bz(M[a]);bj=false})}function bz(a,b){var c=a.filters[bh];if(c){c.src=a.src;c.enabled=true}else{a.runtimeStyle.filter=i(bx,a.src,b||"scale");M.push(a)}a.src=bg};function ce(a){a.src=a.pngSrc;a.filters[bh].enabled=false};new function(_){if(k>=7)return;IE7.CSS.addRecalc("position","fixed",_6,"absolute");IE7.CSS.addRecalc("background(-attachment)?","[^};]*fixed",_2);var $viewport=C?"body":"documentElement";function _3(){if(v.currentStyle.backgroundAttachment!="fixed"){if(v.currentStyle.backgroundImage=="none"){v.runtimeStyle.backgroundRepeat="no-repeat";v.runtimeStyle.backgroundImage="url("+bg+")"}v.runtimeStyle.backgroundAttachment="fixed"}_3=Q};var _0=bN("img");function _1(a){return a?bc(a)||_1(a.parentElement):false};function _d(a,b,c){setTimeout("document.all."+a.uniqueID+".runtimeStyle.setExpression('"+b+"','"+c+"')",0)};function _2(a){if(R(_2,a,a.currentStyle.backgroundAttachment=="fixed"&&!a.contains(v))){_3();bgLeft(a);bgTop(a);_8(a)}};function _8(a){_0.src=a.currentStyle.backgroundImage.slice(5,-2);var b=a.canHaveChildren?a:a.parentElement;b.appendChild(_0);setOffsetLeft(a);setOffsetTop(a);b.removeChild(_0)};function bgLeft(a){a.style.backgroundPositionX=a.currentStyle.backgroundPositionX;if(!_1(a)){_d(a,"backgroundPositionX","(parseInt(runtimeStyle.offsetLeft)+document."+$viewport+".scrollLeft)||0")}};eval(A(bgLeft));function setOffsetLeft(a){var b=_1(a)?"backgroundPositionX":"offsetLeft";a.runtimeStyle[b]=getOffsetLeft(a,a.style.backgroundPositionX)-a.getBoundingClientRect().left-a.clientLeft+2};eval(A(setOffsetLeft));function getOffsetLeft(a,b){switch(b){case"left":case"top":return 0;case"right":case"bottom":return s.clientWidth-_0.offsetWidth;case"center":return(s.clientWidth-_0.offsetWidth)/2;default:if(J.test(b)){return parseInt((s.clientWidth-_0.offsetWidth)*parseFloat(b)/100)}_0.style.left=b;return _0.offsetLeft}};eval(A(getOffsetLeft));function _6(a){if(R(_6,a,bc(a))){K(a,"position","absolute");K(a,"left",a.currentStyle.left);K(a,"top",a.currentStyle.top);_3();IE7.Layout.fixRight(a);_4(a)}};function _4(a,b){positionTop(a,b);positionLeft(a,b,true);if(!a.runtimeStyle.autoLeft&&a.currentStyle.marginLeft=="auto"&&a.currentStyle.right!="auto"){var c=s.clientWidth-getPixelWidth(a,a.currentStyle.right)-getPixelWidth(a,a.runtimeStyle._c)-a.clientWidth;if(a.currentStyle.marginRight=="auto")c=parseInt(c/2);if(_1(a.offsetParent))a.runtimeStyle.pixelLeft+=c;else a.runtimeStyle.shiftLeft=c}clipWidth(a);clipHeight(a)};function clipWidth(a){var b=a.runtimeStyle.fixWidth;a.runtimeStyle.borderRightWidth="";a.runtimeStyle.width=b?getPixelWidth(a,b):"";if(a.currentStyle.width!="auto"){var c=a.getBoundingClientRect();var d=a.offsetWidth-s.clientWidth+c.left-2;if(d>=0){a.runtimeStyle.borderRightWidth="0px";d=Math.max(E(a,a.currentStyle.width)-d,0);K(a,"width",d);return d}}};eval(A(clipWidth));function positionLeft(a,b){if(!b&&J.test(a.currentStyle.width)){a.runtimeStyle.fixWidth=a.currentStyle.width}if(a.runtimeStyle.fixWidth){a.runtimeStyle.width=getPixelWidth(a,a.runtimeStyle.fixWidth)}a.runtimeStyle.shiftLeft=0;a.runtimeStyle._c=a.currentStyle.left;a.runtimeStyle.autoLeft=a.currentStyle.right!="auto"&&a.currentStyle.left=="auto";a.runtimeStyle.left="";a.runtimeStyle.screenLeft=getScreenLeft(a);a.runtimeStyle.pixelLeft=a.runtimeStyle.screenLeft;if(!b&&!_1(a.offsetParent)){_d(a,"pixelLeft","runtimeStyle.screenLeft+runtimeStyle.shiftLeft+document."+$viewport+".scrollLeft")}};eval(A(positionLeft));function getScreenLeft(a){var b=a.offsetLeft,c=1;if(a.runtimeStyle.autoLeft){b=s.clientWidth-a.offsetWidth-getPixelWidth(a,a.currentStyle.right)}if(a.currentStyle.marginLeft!="auto"){b-=getPixelWidth(a,a.currentStyle.marginLeft)}while(a=a.offsetParent){if(a.currentStyle.position!="static")c=-1;b+=a.offsetLeft*c}return b};eval(A(getScreenLeft));function getPixelWidth(a,b){return J.test(b)?parseInt(parseFloat(b)/100*s.clientWidth):E(a,b)};eval(A(getPixelWidth));function _g(){var a=_2.elements;for(var b in a)_8(a[b]);a=_6.elements;for(b in a){_4(a[b],true);_4(a[b],true)}_7=0};var _7;bq(function(){if(!_7)_7=setTimeout(_g,0)})};var bk={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,height:null,marginTop:0,marginBottom:0,marginRight:0,marginLeft:0,width:"100%"};IE7.CSS.addRecalc("overflow","visible",function(a){if(a.parentNode.ie7_wrapped)return;if(IE7.Layout&&a.currentStyle["max-height"]!="auto"){IE7.Layout.maxHeight(a)}if(a.currentStyle.marginLeft=="auto")a.style.marginLeft=0;if(a.currentStyle.marginRight=="auto")a.style.marginRight=0;var b=document.createElement(bA);b.ie7_wrapped=a;for(var c in bk){b.style[c]=a.currentStyle[c];if(bk[c]!=null){a.runtimeStyle[c]=bk[c]}}b.style.display="block";b.style.position="relative";a.runtimeStyle.position="absolute";a.parentNode.insertBefore(b,a);b.appendChild(a)});function cf(){var f="xx-small,x-small,small,medium,large,x-large,xx-large".split(",");for(var g=0;g<f.length;g++){f[f[g]]=f[g-1]||"0.67em"}IE7.CSS.addFix(/(font(-size)?\s*:\s*)([\w.-]+)/,function(a,b,c,d){return b+(f[d]||d)});if(k<6){var h=/^\-/,p=/(em|ex)$/i;var t=/em$/i,q=/ex$/i;E=function(a,b){if(bL.test(b))return parseInt(b)||0;var c=h.test(b)?-1:1;if(p.test(b))c*=u(a);j.style.width=(c<0)?b.slice(1):b;v.appendChild(j);b=c*j.offsetWidth;j.removeNode();return parseInt(b)};var j=bN();function u(a){var b=1;j.style.fontFamily=a.currentStyle.fontFamily;j.style.lineHeight=a.currentStyle.lineHeight;while(a!=v){var c=a.currentStyle["ie7-font-size"];if(c){if(t.test(c))b*=parseFloat(c);else if(J.test(c))b*=(parseFloat(c)/100);else if(q.test(c))b*=(parseFloat(c)/2);else{j.style.fontSize=c;return 1}}a=a.parentElement}return b};IE7.CSS.addFix(/cursor\s*:\s*pointer/,"cursor:hand");IE7.CSS.addFix(/display\s*:\s*list-item/,"display:block")}function l(a){if(k<5.5)IE7.Layout.boxSizing(a.parentElement);var b=a.parentElement;var c=b.offsetWidth-a.offsetWidth-r(b);var d=(a.currentStyle["ie7-margin"]&&a.currentStyle.marginRight=="auto")||a.currentStyle["ie7-margin-right"]=="auto";switch(b.currentStyle.textAlign){case"right":c=d?parseInt(c/2):0;a.runtimeStyle.marginRight=c+"px";break;case"center":if(d)c=0;default:if(d)c/=2;a.runtimeStyle.marginLeft=parseInt(c)+"px"}};function r(a){return E(a,a.currentStyle.paddingLeft)+E(a,a.currentStyle.paddingRight)};IE7.CSS.addRecalc("margin(-left|-right)?","[^};]*auto",function(a){if(R(l,a,a.parentElement&&a.currentStyle.display=="block"&&a.currentStyle.marginLeft=="auto"&&a.currentStyle.position!="absolute")){l(a)}});bq(function(){for(var a in l.elements){var b=l.elements[a];b.runtimeStyle.marginLeft=b.runtimeStyle.marginRight="";l(b)}})};IE7.loaded=true;(function(){try{bm.doScroll("left")}catch(e){setTimeout(arguments.callee,1);return}try{eval(bB.innerHTML)}catch(e){}bi=new RegExp(bb(typeof IE7_PNG_SUFFIX=="string"?IE7_PNG_SUFFIX:"-trans.png")+"$","i");v=document.body;s=C?v:bm;v.className+=" ie7_body";bm.className+=" ie7_html";if(C)cf();IE7.CSS.init();IE7.HTML.init();IE7.HTML.apply();IE7.CSS.apply();IE7.recalc()})()})();
Index: admin/js/ie7/IE8.js
===================================================================
--- admin/js/ie7/IE8.js	(revision 703)
+++ admin/js/ie7/IE8.js	(revision 175)
@@ -1,2601 +1,2 @@
-// timestamp: Sun, 03 Feb 2008 19:26:22
-/*
-  IE7/IE8.js - copyright 2004-2008, Dean Edwards
-  http://dean.edwards.name/IE7/
-  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
-*/
-
-// =======================================================================
-// TO DO
-// =======================================================================
-
-// PNG - unclickable content
-
-// =======================================================================
-// TEST/BUGGY
-// =======================================================================
-
-// hr{margin:1em auto} (doesn't look right in IE5)
-
-(function() {
-
-IE7 = {
-  toString: function(){return "IE7 version 2.0 (beta2)"}
-};
-var appVersion = IE7.appVersion = navigator.appVersion.match(/MSIE (\d\.\d)/)[1];
-
-if (/ie7_off/.test(top.location.search) || appVersion < 5) return;
-
-var Undefined = K();
-var quirksMode = document.compatMode != "CSS1Compat";
-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);
-
-// we'll use microsoft's http request object to load external files
-try {
-  var httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
-} catch (e) {
-  // ActiveX disabled
-}
-
-var fileCache = {};
-function loadFile(href, path) {
-try {
-  href = makePath(href, path);
-  if (!fileCache[href]) {
-    // easy to load a file huh?
-    httpRequest.open("GET", href, false);
-    httpRequest.send();
-    if (httpRequest.status == 0 || httpRequest.status == 200) {
-      fileCache[href] = httpRequest.responseText;
-    }
-  }
-} catch (e) {
-  // ignore errors
-} finally {
-  return fileCache[href] || "";
-}};
-
-// -----------------------------------------------------------------------
-// IE5.0 compatibility
-// -----------------------------------------------------------------------
-
-
-if (appVersion < 5.5) {
-  undefined = Undefined();
-
-  ANON = "HTML:!"; // for anonymous content
-  
-  // Fix String.replace (Safari1.x/IE5.0).
-  var GLOBAL = /(g|gi)$/;
-  var _String_replace = String.prototype.replace; 
-  String.prototype.replace = function(expression, replacement) {
-    if (typeof replacement == "function") { // Safari doesn't like functions
-      if (expression && expression.constructor == RegExp) {
-        var regexp = expression;
-        var global = regexp.global;
-        if (global == null) global = GLOBAL.test(regexp);
-        // we have to convert global RexpExps for exec() to work consistently
-        if (global) regexp = new RegExp(regexp.source); // non-global
-      } else {
-        regexp = new RegExp(rescape(expression));
-      }
-      var match, string = this, result = "";
-      while (string && (match = regexp.exec(string))) {
-        result += string.slice(0, match.index) + replacement.apply(this, match);
-        string = string.slice(match.index + match[0].length);
-        if (!global) break;
-      }
-      return result + string;
-    }
-    return _String_replace.apply(this, arguments);
-  };
-  
-  Array.prototype.pop = function() {
-    if (this.length) {
-      var i = this[this.length - 1];
-      this.length--;
-      return i;
-    }
-    return undefined;
-  };
-  
-  Array.prototype.push = function() {
-    for (var i = 0; i < arguments.length; i++) {
-      this[this.length] = arguments[i];
-    }
-    return this.length;
-  };
-  
-  var ns = this;
-  Function.prototype.apply = function(o, a) {
-    if (o === undefined) o = ns;
-    else if (o == null) o = window;
-    else if (typeof o == "string") o = new String(o);
-    else if (typeof o == "number") o = new Number(o);
-    else if (typeof o == "boolean") o = new Boolean(o);
-    if (arguments.length == 1) a = [];
-    else if (a[0] && a[0].writeln) a[0] = a[0].documentElement.document || a[0];
-    var $ = "#ie7_apply", r;
-    o[$] = this;
-    switch (a.length) { // unroll for speed
-      case 0: r = o[$](); break;
-      case 1: r = o[$](a[0]); break;
-      case 2: r = o[$](a[0],a[1]); break;
-      case 3: r = o[$](a[0],a[1],a[2]); break;
-      case 4: r = o[$](a[0],a[1],a[2],a[3]); break;
-      case 5: r = o[$](a[0],a[1],a[2],a[3],a[4]); break;
-      default:
-        var b = [], i = a.length - 1;
-        do b[i] = "a[" + i + "]"; while (i--);
-        eval("r=o[$](" + b + ")");
-    }
-    if (typeof o.valueOf == "function") { // not a COM object
-      delete o[$];
-    } else {
-      o[$] = undefined;
-      if (r && r.writeln) r = r.documentElement.document || r;
-    }
-    return r;
-  };
-  
-  Function.prototype.call = function(o) {
-    return this.apply(o, _slice.apply(arguments, [1]));
-  };
-
-  // block elements are "inline" according to IE5.0 so we'll fix it
-  HEADER += "address,blockquote,body,dd,div,dt,fieldset,form,"+
-    "frame,frameset,h1,h2,h3,h4,h5,h6,iframe,noframes,object,p,"+
-    "hr,applet,center,dir,menu,pre,dl,li,ol,ul{display:block}";
-}
-
-// -----------------------------------------------------------------------
-// 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 _KEYS   = "~";
-
-var _RG_ESCAPE_CHARS    = /\\./g;
-var _RG_ESCAPE_BRACKETS = /\(\?[:=!]|\[[^\]]+\]/g;
-var _RG_BRACKETS        = /\(/g;
-
-var RegGrp = Base.extend({
-  constructor: function(values) {
-    this[_KEYS] = [];
-    this.merge(values);
-  },
-
-  exec: function(string) {
-    var items = this, keys = this[_KEYS];    
-    return String(string).replace(new RegExp(this, this.ignoreCase ? "gi" : "g"), function() {
-      var item, offset = 1, i = 0;
-      // Loop through the RegGrp items.
-      while ((item = items[_HASH + keys[i++]])) {
-        var next = offset + item.length + 1;
-        if (arguments[offset]) { // do we have a result?
-          var replacement = item.replacement;
-          switch (typeof replacement) {
-            case "function":
-              return replacement.apply(items, _slice.call(arguments, offset, next));
-            case "number":
-              return arguments[offset + replacement];
-            default:
-              return replacement;
-          }
-        }
-        offset = next;
-      }
-    });
-  },
-
-  add: function(expression, replacement) {
-    if (expression instanceof RegExp) {
-      expression = expression.source;
-    }
-    if (!this[_HASH + expression]) this[_KEYS].push(String(expression));
-    this[_HASH + expression] = new RegGrp.Item(expression, replacement);
-  },
-
-  merge: function(values) {
-    for (var i in values) this.add(i, values[i]);
-  },
-
-  toString: function() {
-    // back references not supported in simple RegGrp
-    return "(" + this[_KEYS].join(")|(") + ")";
-  }
-}, {
-  IGNORE: "$0",
-
-  Item: Base.extend({
-    constructor: function(expression, replacement) {
-      expression = expression instanceof RegExp ? expression.source : String(expression);
-
-      if (typeof replacement == "number") replacement = String(replacement);
-      else if (replacement == null) replacement = "";
-
-      // does the pattern use sub-expressions?
-      if (typeof replacement == "string" && /\$(\d+)/.test(replacement)) {
-        // a simple lookup? (e.g. "$2")
-        if (/^\$\d+$/.test(replacement)) {
-          // store the index (used for fast retrieval of matched strings)
-          replacement = parseInt(replacement.slice(1));
-        } else { // a complicated lookup (e.g. "Hello $2 $1")
-          // build a function to do the lookup
-          var Q = /'/.test(replacement.replace(/\\./g, "")) ? '"' : "'";
-          replacement = replacement.replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\$(\d+)/g, Q +
-            "+(arguments[$1]||" + Q+Q + ")+" + Q);
-          replacement = new Function("return " + Q + replacement.replace(/(['"])\1\+(.*)\+\1\1$/, "$1") + Q);
-        }
-      }
-
-      this.length = RegGrp.count(expression);
-      this.replacement = replacement;
-      this.toString = K(expression);
-    }
-  }),
-
-  count: function(expression) {
-    // Count the number of sub-expressions in a RegExp/RegGrp.Item.
-    expression = String(expression).replace(_RG_ESCAPE_CHARS, "").replace(_RG_ESCAPE_BRACKETS, "");
-    return match(expression, _RG_BRACKETS).length;
-  }
-});
-
-// =========================================================================
-// 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 (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 ENCODED = /\x01(\d+)/g,
-    QUOTES  = /'/g, 
-    STRING = /^\x01/,
-    UNICODE = /\\([\da-fA-F]{1,4})/g;
-
-var _strings = [];
-
-var encoder = new Parser({
-  // comments
-  "<!\\-\\-|\\-\\->": "",
-  "\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\/": "",
-  // get rid
-  "@(namespace|import)[^;\\n]+[;\\n]": "",
-  // strings
-  "'(\\\\.|[^'\\\\])*'": encodeString,
-  '"(\\\\.|[^"\\\\])*"': encodeString,
-  // white space
-  "\\s+": " "
-});
-
-function encode(cssText) {
-  return encoder.exec(cssText);
-};
-
-function decode(cssText) {
-  return cssText.replace(ENCODED, function(match, index) {
-    return _strings[index - 1];
-  });
-};
-
-function encodeString(string) {
-  return "\x01" + _strings.push(string.replace(UNICODE, function(match, chr) {
-    return eval("'\\u" + "0000".slice(chr.length) + chr + "'");
-  }).slice(1, -1).replace(QUOTES, "\\'"));
-};
-
-function getString(value) {
-  return STRING.test(value) ? _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.exec(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 (ignore) {
-  // 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. the temporary element can be resized
-//  to determine pixel widths/heights
-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-cssQuery.js
-// =========================================================================
-
-function cssQuery(selector, context, single) {
-  if (!_cache[selector]) {
-    reg = []; // store for RegExp objects
-    var fn = "";
-    var selectors = cssParser.escape(selector).split(",");
-    for (var i = 0; i < selectors.length; i++) {
-      _wild = _index = _list = 0; // reset
-      _duplicate = selectors.length > 1 ? 2 : 0; // reset
-      var block = cssParser.exec(selectors[i]) || "if(0){";
-      if (_wild) { // IE's pesky comment nodes
-        block += format("if(e%1.nodeName!='!'){", _index);
-      }
-      // check for duplicates before storing results
-      var store = _duplicate > 1 ? _TEST : "";
-      block += format(store + _STORE, _index);
-      // add closing braces
-      block += Array(match(block, /\{/g).length + 1).join("}");
-      fn += block;
-    }
-    eval(format(_FN, reg) + cssParser.unescape(fn) + "return s?null:r}");
-    _cache[selector] = _selectorFunction;
-  }
-  return _cache[selector](context || document, single);
-};
-
-var _MSIE5 = appVersion < 6;
-
-var _EVALUATED = /^(href|src)$/;
-var _ATTRIBUTES = {
-  "class": "className",
-  "for": "htmlFor"
-};
-
-IE7._indexed = 1;
-
-IE7._byId = function(document, id) {
-  var result = document.all[id] || null;
-  // returns a single element or a collection
-  if (!result || 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 (result[i].id == id) return result[i];
-  }
-  return null;
-};
-
-IE7._getAttribute = function(element, name) {
-  if (name == "src" && element.pngSrc) return element.pngSrc;
-  
-  var attribute = _MSIE5 ? (element.attributes[name] || element.attributes[_ATTRIBUTES[name.toLowerCase()]]) : element.getAttributeNode(name);
-  if (attribute && (attribute.specified || name == "value")) {
-    if (_EVALUATED.test(name)) {
-      return element.getAttribute(name, 2);
-    } else if (name == "class") {
-     return element.className.replace(/\sie7_\w+/g, "");
-    } else if (name == "style") {
-     return element.style.cssText;
-    } else {
-     return attribute.nodeValue;
-    }
-  }
-  return 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._getNextElementSibling = function(node) {
-  // return the next element to the supplied element
-  //  nextSibling is not good enough as it might return a text or comment node
-  while (node && (node = node.nextSibling) && (node.nodeType != 1 || node.nodeName == "!")) continue;
-  return node;
-};
-
-IE7._getPreviousElementSibling = function(node) {
-  // return the previous element to the supplied element
-  while (node && (node = node.previousSibling) && (node.nodeType != 1 || node.nodeName == "!")) continue;
-  return node;
-};
-
-// =========================================================================
-// CSSParser
-// =========================================================================
-
-var IMPLIED_ASTERISK = /([\s>+~,]|[^(]\+|^)([#.:\[])/g,
-    IMPLIED_SPACE =    /(^|,)([^\s>+~])/g,
-    WHITESPACE =       /\s*([\s>+~(),]|^|$)\s*/g,
-    WILD_CARD =        /\s\*\s/g;;
-
-var CSSParser = RegGrp.extend({
-  constructor: function(items) {
-    this.base(items);
-    this.sorter = new RegGrp;
-    this.sorter.add(/:not\([^)]*\)/, RegGrp.IGNORE);
-    this.sorter.add(/([ >](\*|[\w-]+))([^: >+~]*)(:\w+-child(\([^)]+\))?)([^: >+~]*)/, "$1$3$6$4");
-  },
-  
-  ignoreCase: true,
-
-  escape: function(selector) {
-    return this.optimise(this.format(selector));
-  },
-
-  format: function(selector) {
-    return selector
-      .replace(WHITESPACE, "$1")
-      .replace(IMPLIED_SPACE, "$1 $2")
-      .replace(IMPLIED_ASTERISK, "$1*$2");
-  },
-
-  optimise: function(selector) {
-    // optimise wild card descendant selectors
-    return this.sorter.exec(selector.replace(WILD_CARD, ">* "));
-  },
-
-  unescape: function(selector) {
-    return decode(selector);
-  }
-});
-
-// some constants
-var _OPERATORS = {
-  "":   "%1!=null",
-  "=":  "%1=='%2'",
-  "~=": /(^| )%1( |$)/,
-  "|=": /^%1(-|$)/,
-  "^=": /^%1/,
-  "$=": /%1$/,
-  "*=": /%1/
-};
-
-var _PSEUDO_CLASSES = {
-  "first-child": "!IE7._getPreviousElementSibling(e%1)",
-  "link":        "e%1.currentStyle['ie7-link']=='link'",
-  "visited":     "e%1.currentStyle['ie7-link']=='visited'"
-};
-
-var _VAR = "var p%2=0,i%2,e%2,n%2=e%1.";
-var _ID = "e%1.sourceIndex";
-var _TEST = "var g=" + _ID + ";if(!p[g]){p[g]=1;";
-var _STORE = "r[r.length]=e%1;if(s)return e%1;";
-var _FN = "var _selectorFunction=function(e0,s){IE7._indexed++;var r=[],p={},reg=[%1],d=document;";
-var reg; // a store for RexExp objects
-var _index;
-var _wild; // need to flag certain _wild card selectors as MSIE includes comment nodes
-var _list; // are we processing a node _list?
-var _duplicate; // possible duplicates?
-var _cache = {}; // store parsed selectors
-
-// a hideous parser
-var cssParser = new CSSParser({
-  " (\\*|[\\w-]+)#([\\w-]+)": function(match, tagName, id) { // descendant selector followed by ID
-    _wild = false;
-    var replacement = "var e%2=IE7._byId(d,'%4');if(e%2&&";
-    if (tagName != "*") replacement += "e%2.nodeName=='%3'&&";
-    replacement += "(e%1==d||e%1.contains(e%2))){";
-    if (_list) replacement += format("i%1=n%1.length;", _list);
-    return format(replacement, _index++, _index, tagName.toUpperCase(), id);
-  },
-  
-  " (\\*|[\\w-]+)": function(match, tagName) { // descendant selector
-    _duplicate++; // this selector may produce duplicates
-    _wild = tagName == "*";
-    var replacement = _VAR;
-    // IE5.x does not support getElementsByTagName("*");
-    replacement += (_wild && _MSIE5) ? "all" : "getElementsByTagName('%3')";
-    replacement += ";for(i%2=0;(e%2=n%2[i%2]);i%2++){";
-    return format(replacement, _index++, _list = _index, tagName.toUpperCase());
-  },
-  
-  ">(\\*|[\\w-]+)": function(match, tagName) { // child selector
-    var children = _list;
-    _wild = tagName == "*";
-    var replacement = _VAR;
-    // use the children property for MSIE as it does not contain text nodes
-    //  (but the children collection still includes comments).
-    // the document object does not have a children collection
-    replacement += children ? "children": "childNodes";
-    if (!_wild && children) replacement += ".tags('%3')";
-    replacement += ";for(i%2=0;(e%2=n%2[i%2]);i%2++){";
-    if (_wild) {
-      replacement += "if(e%2.nodeType==1){";
-      _wild = _MSIE5;
-    } else {
-      if (!children) replacement += "if(e%2.nodeName=='%3'){";
-    }
-    return format(replacement, _index++, _list = _index, tagName.toUpperCase());
-  },
-  
-  "\\+(\\*|[\\w-]+)": function(match, tagName) { // direct adjacent selector
-    var replacement = "";
-    if (_wild) replacement += "if(e%1.nodeName!='!'){";
-    _wild = false;
-    replacement += "e%1=IE7._getNextElementSibling(e%1);if(e%1";
-    if (tagName != "*") replacement += "&&e%1.nodeName=='%2'";
-    replacement += "){";
-    return format(replacement, _index, tagName.toUpperCase());
-  },
-  
-  "~(\\*|[\\w-]+)": function(match, tagName) { // indirect adjacent selector
-    var replacement = "";
-    if (_wild) replacement += "if(e%1.nodeName!='!'){";
-    _wild = false;
-    _duplicate = 2; // this selector may produce duplicates
-    replacement += "while(e%1=e%1.nextSibling){if(e%1.ie7_adjacent==IE7._indexed)break;if(";
-    if (tagName == "*") {
-      replacement += "e%1.nodeType==1";
-      if (_MSIE5) replacement += "&&e%1.nodeName!='!'";
-    } else replacement += "e%1.nodeName=='%2'";
-    replacement += "){e%1.ie7_adjacent=IE7._indexed;";
-    return format(replacement, _index, tagName.toUpperCase());
-  },
-  
-  "#([\\w-]+)": function(match, id) { // ID selector
-    _wild = false;
-    var replacement = "if(e%1.id=='%2'){";
-    if (_list) replacement += format("i%1=n%1.length;", _list);
-    return format(replacement, _index, id);
-  },
-  
-  "\\.([\\w-]+)": function(match, className) { // class selector
-    _wild = false;
-    // store RegExp objects - slightly faster on IE
-    reg.push(new RegExp("(^|\\s)" + rescape(className) + "(\\s|$)"));
-    return format("if(e%1.className&&reg[%2].test(e%1.className)){", _index, reg.length - 1);
-  },
-  
-  "\\[([\\w-]+)\\s*([^=]?=)?\\s*([^\\]]*)\\]": function(match, attr, operator, value) { // attribute selectors
-    var alias = _ATTRIBUTES[attr] || attr;
-    if (operator) {
-      var getAttribute = "e%1.getAttribute('%2',2)";
-      if (!_EVALUATED.test(attr)) {
-        getAttribute = "e%1.%3||" + getAttribute;
-      }
-      attr = format("(" + getAttribute + ")", _index, attr, alias);
-    } else {
-      attr = format("IE7._getAttribute(e%1,'%2')", _index, attr);
-    }
-    var replacement = _OPERATORS[operator || ""] || "0";
-    if (replacement && replacement.source) {
-      reg.push(new RegExp(format(replacement.source, rescape(cssParser.unescape(value)))));
-      replacement = "reg[%2].test(%1)";
-      value = reg.length - 1;
-    }
-    return "if(" + format(replacement, attr, value) + "){";
-  },
-  
-  ":+([\\w-]+)(\\(([^)]+)\\))?": function(match, pseudoClass, $2, args) { // pseudo class selectors
-    pseudoClass = _PSEUDO_CLASSES[pseudoClass];
-    return "if(" + (pseudoClass ? format(pseudoClass, _index, args || "")  : "0") + "){";
-  }
-});
-
-// =========================================================================
-// ie7-css.js
-// =========================================================================
-
-var HYPERLINK = /a(#[\w-]+)?(\.[\w-]+)?:(hover|active)/i;
-var BRACE1 = /\s*\{\s*/, BRACE2 = /\s*\}\s*/, COMMA = /\s*\,\s*/;
-var FIRST_LINE_LETTER = /(.*)(:first-(line|letter))/;
-
-//var UNKNOWN = /UNKNOWN|([:.])\w+\1/i;
-
-var styleSheets = document.styleSheets;
-
-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");
-    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()
-    test = new RegExp("([{;\\s])" + propertyName + "\\s*:\\s*" + test + "[^;}]*");
-    var id = this.recalcs.length;
-    if (replacement) replacement = propertyName + ":" + replacement;
-    this.addFix(test, function(match, $1) {
-      return (replacement ? $1 + replacement : match) + ";ie7-" + match.slice(1) + ";ie7_recalc" + id + ":1";
-    });
-    this.recalcs.push(arguments);
-    return id;
-  },
-  
-  apply: function() {
-    this.getInlineStyles();
-    new StyleSheet("screen");
-    this.trash();
-  },
-  
-  createStyleSheet: function() {
-    // create the IE7 style sheet
-    this.styleSheet = document.createStyleSheet();
-    // flag it so we can ignore it during parsing
-    this.styleSheet.ie7 = true;
-    this.styleSheet.owningElement.ie7 = true;
-    this.styleSheet.cssText = HEADER;
-  },
-  
-  getInlineStyles: 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) {
-        this.styles.push(styleSheet.innerHTML);
-      }
-    }
-  },
-  
-  getText: function(styleSheet, path) {
-    // 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 stop = start + (this.screen.cssText.match(/\{/g)||"").length;
-    var rules = this.styleSheet.rules, rule;
-    var calcs, calc, elements, element, i, j, k, id;
-    // loop through all rules
-    for (i = start; i < stop; i++) {
-      rule = rules[i];
-      var cssText = rule.style.cssText;
-      // search for the "ie7_recalc" flag (there may be more than one)
-      if (rule && (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) {
-    if (IE7.CSS.UNKNOWN.test(selector)) {
-      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
-    var _inlineStyles = [].concat(IE7.CSS.styles);
-    // parse media decalarations
-    var MEDIA = /@media\s+([^{]*)\{([^@]+\})\s*\}/gi;
-    var ALL = /\ball\b|^$/i, SCREEN = /\bscreen\b/i, PRINT = /\bprint\b/i;
-    function _parseMedia(cssText, media) {
-      _filterMedia.value = media;
-      return cssText.replace(MEDIA, _filterMedia);
-    };
-    function _filterMedia(match, media, cssText) {
-      media = _simpleMedia(media);
-      switch (media) {
-        case "screen":
-        case "print":
-          if (media != _filterMedia.value) return "";
-        case "all":
-          return cssText;
-      }
-      return "";
-    };
-    function _simpleMedia(media) {
-      if (ALL.test(media)) return "all";
-      else if (SCREEN.test(media)) return (PRINT.test(media)) ? "all" : "screen";
-      else if (PRINT.test(media)) return "print";
-    };
-    var self = this;
-    function _getCSSText(styleSheet, path, media, level) {
-      var cssText = "";
-      if (!level) {
-        media = _simpleMedia(styleSheet.media);
-        level = 0;
-      }
-      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
-        if (level < 3) {
-          // loop through imported style sheets
-          for (var i = 0; i < styleSheet.imports.length; i++) {
-            // call this function recursively to get all imported style sheets
-            cssText += _getCSSText(styleSheet.imports[i], getPath(styleSheet.href, path), media, level + 1);
-          }
-        }
-        // retrieve inline style or load an external style sheet
-        cssText += encode(styleSheet.href ? _loadStyleSheet(styleSheet, path) : _inlineStyles.pop() || "");
-        cssText = _parseMedia(cssText, self.media);
-      }
-      return cssText;
-    };
-    // store loaded cssText URLs
-    var fileCache = {};
-    // load an external style sheet
-    function _loadStyleSheet(styleSheet, path) {
-      var url = makePath(styleSheet.href, path);
-      // if the style sheet has already loaded then don't duplicate it
-      if (fileCache[url]) return "";
-      // load from source
-      fileCache[url] = (styleSheet.disabled) ? "" :
-        _fixUrls(IE7.CSS.getText(styleSheet, path), getPath(styleSheet.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
-    //  explorer bugs.
-    var URL = /(url\s*\(\s*['"]?)([\w\.]+[^:\)]*['"]?\))/gi;
-    function _fixUrls(cssText, pathname) {
-      // hack & slash
-      return cssText.replace(URL, "$1" + pathname.slice(0, pathname.lastIndexOf("/") + 1) + "$2");
-    };
-
-    // load all style sheets in the document
-    for (var i = 0; i < styleSheets.length; i++) {
-      if (!styleSheets[i].disabled && !styleSheets[i].ie7) {
-        this.cssText += _getCSSText(styleSheets[i]);
-      }
-    }
-  },
-  
-  load: function() {
-    this.cssText = "";
-    this.getText();
-    this.parse();
-    this.cssText = decode(this.cssText);
-    fileCache = {};
-  },
-  
-  parse: function() {
-    this.cssText = IE7.CSS.parser.exec(this.cssText);
-    
-    // parse the style sheet
-    var offset = IE7.CSS.rules.length;
-    var rules = this.cssText.split(BRACE2), rule;
-    var selectors, cssText, i, j;
-    for (i = 0; i < rules.length; i++) {
-      rule = rules[i].split(BRACE1);
-      selectors = rule[0].split(COMMA);
-      cssText = rule[1];
-      for (j = 0; j < selectors.length; j++) {
-        selectors[j] = cssText ? this.createRule(selectors[j], cssText) : "";
-      }
-      rules[i] = 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 "@media " + this.media + "{" + this.cssText + "}";
-  }
-});
-
-var PseudoElement;
-
-// -----------------------------------------------------------------------
-// IE7 style rules
-// -----------------------------------------------------------------------
-
-var Rule = IE7.Rule = Base.extend({
-  // properties
-  constructor: function(selector, cssText) {
-    this.id = IE7.CSS.rules.length;
-    this.className = Rule.PREFIX + this.id;
-    selector = selector.match(FIRST_LINE_LETTER) || selector || "*";
-    this.selector = selector[1] || selector;
-    this.selectorText = this.parse(this.selector) + (selector[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) {
-    // 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) {
-    // an "instance" is actually an Arguments object
-    var _class = instance[2];
-    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) {
-    if (this.instances[instance.id]) {
-      var _class = instance[2];
-      var target = instance[1], j;
-      for (j = 0; j < target.length; j++) _class.remove(target[j]);
-      delete this.instances[instance.id];
-    }
-  }
-});
-  
-// -----------------------------------------------------------------------
-// dynamic pseudo-classes
-// -----------------------------------------------------------------------
-
-if (appVersion < 7) {
-  var Hover = new DynamicPseudoClass("hover", function(element) {
-    var instance = arguments;
-    IE7.CSS.addEventHandler(element, appVersion < 5.5 ? "onmouseover" : "onmouseenter", function() {
-      Hover.register(instance);
-    });
-    IE7.CSS.addEventHandler(element, appVersion < 5.5 ? "onmouseout" : "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]);
-  });
-}
-
-// -----------------------------------------------------------------------
-// propertyName: inherit;
-// -----------------------------------------------------------------------
-
-IE7.CSS.addRecalc("[\\w-]+", "inherit", function(element, cssText) {
-  var inherited = cssText.match(/[\w-]+\s*:\s*inherit/g);
-  for (var i = 0; i < inherited.length; i++) {
-    var propertyName = inherited[i].replace(/ie7\-|\s*:\s*inherit/g, "").replace(/\-([a-z])/g, function(match, chr) {
-      return chr.toUpperCase()
-    });
-    element.runtimeStyle[propertyName] = element.parentElement.currentStyle[propertyName];
-  }
-});
-
-// =========================================================================
-// 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.
-  //  this is a proper fix, it preserves the DOM structure and
-  //  <abbr> elements report the correct tagName & namespace prefix
-  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]";
-
-new function(_) {
-var layout = IE7.Layout = this;
-
-  // big, ugly box-model hack + min/max stuff
-  
-  // #tantek > #erik > #dean { voice-family: hacker; }
-  
-  // -----------------------------------------------------------------------
-  // "layout"
-  // -----------------------------------------------------------------------
-  
-  HEADER += "*{boxSizing:content-box}";
-  
-  // does an element have "layout" ?
-  IE7.hasLayout = appVersion < 5.5 ? function(element) {
-    // element.currentStyle.hasLayout doesn't work for IE5.0
-    return element.clientWidth;
-  } : function(element) {
-    return element.currentStyle.hasLayout;
-  };
-  
-  // give an element "layout"
-  layout.boxSizing = function(element) {
-    if (!IE7.hasLayout(element)) {
-    //#  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;
-      if (parentElement && IE7.hasLayout(parentElement) && !IE7[type == "marginTop" ? "_getPreviousElementSibling" : "_getNextElementSibling"](element)) return;
-      var child = cssQuery(">*:" + (type == "marginTop" ? "first" : "last") + "-child", element, true);
-      if (child && child.currentStyle.styleFloat == "none" && IE7.hasLayout(child)) {
-        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 applyWidth, applyHeight;
-  IE7.Layout.borderBox = function(element){
-    applyWidth(element);
-    applyHeight(element);
-  };
-  
-  var fixWidth = function(HEIGHT) {
-    applyWidth = function(element) {
-      if (!PERCENT.test(element.currentStyle.width)) fixWidth(element);
-      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)) : value;
-        setOverrideStyle(element, "width", element.runtimeStyle.fixedWidth);
-      }
-    };
-  
-    function layoutWidth(element) {
-      if (!isFixed(element)) {
-        var layoutParent = element.offsetParent;
-        while (layoutParent && !IE7.hasLayout(layoutParent)) 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["box-sizing"] == "border-box";
-      var adjustment = 0;
-      if (quirksMode && !borderBox)
-        adjustment += getBorderWidth(element) + getWidth(element, "padding");
-      else if (!quirksMode && 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
-      var rect = element.getBoundingClientRect();
-      var 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; // || "auto";
-      }
-    };
-  
-    // -----------------------------------------------------------------------
-    // 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);
-          IE7.Layout.boxSizing(element);
-      }
-    };
-    IE7.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 (!quirksMode) 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 (quirksMode) {
-      IE7.CSS.addRecalc("width", NUMERIC, applyWidth);
-    }
-    if (appVersion < 7) {
-      IE7.CSS.addRecalc("min-width", NUMERIC, layout.minWidth);
-      IE7.CSS.addRecalc("max-width", NUMERIC, layout.maxWidth);
-      IE7.CSS.addRecalc("right", NUMERIC, fixRight);
-    }
-  };
-  
-  eval("var fixHeight=" + rotate(fixWidth));
-  
-  // apply box-model + min/max fixes
-  fixWidth();
-  fixHeight(true);
-};
-
-// =========================================================================
-// 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 >= 5.5 && appVersion < 7) {
-  // ** IE7 VARIABLE
-  // e.g. only apply the hack to files ending in ".png"
-  // IE7_PNG_SUFFIX = ".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, "crop") +
-      ";zoom:1;background" + ($1||"") + ":" + ($2||"") + "none" + ($4||"") : match;
-  });
-  
-  // -----------------------------------------------------------------------
-  //  fix PNG transparency (HTML images)
-  // -----------------------------------------------------------------------
-
-  IE7.HTML.addRecalc("img,input", function(element) {
-    if (element.tagName == "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) {
-  var filter = element.filters[ALPHA_IMAGE_LOADER];
-  if (filter) {
-    filter.src = element.src;
-    filter.enabled = true;
-  } else {
-    element.runtimeStyle.filter = format(PNG_FILTER, 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
-// =========================================================================
-
-new 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 = quirksMode ? "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();
-      bgLeft(element);
-      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);
-    setOffsetLeft(element);
-    setOffsetTop(element);
-    parentElement.removeChild(_tmp);
-  };
-  
-  function bgLeft(element) {
-    element.style.backgroundPositionX = element.currentStyle.backgroundPositionX;
-    if (!_isFixed(element)) {
-      _setExpression(element, "backgroundPositionX", "(parseInt(runtimeStyle.offsetLeft)+document." + $viewport + ".scrollLeft)||0");
-    }
-  };
-  eval(rotate(bgLeft));
-  
-  function setOffsetLeft(element) {
-    var propertyName = _isFixed(element) ? "backgroundPositionX" : "offsetLeft";
-    element.runtimeStyle[propertyName] =
-      getOffsetLeft(element, element.style.backgroundPositionX) -
-      element.getBoundingClientRect().left - element.clientLeft + 2;
-  };
-  eval(rotate(setOffsetLeft));
-  
-  function getOffsetLeft(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;
-    }
-  };
-  eval(rotate(getOffsetLeft));
-  
-  // -----------------------------------------------------------------------
-  //  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);
-      _foregroundPosition(element);
-    }
-  };
-  
-  function _foregroundPosition(element, recalc) {
-    positionTop(element, recalc);
-    positionLeft(element, recalc, true);
-    if (!element.runtimeStyle.autoLeft && element.currentStyle.marginLeft == "auto" &&
-      element.currentStyle.right != "auto") {
-      var left = viewport.clientWidth - getPixelWidth(element, element.currentStyle.right) -
-        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;
-    }
-    clipWidth(element);
-    clipHeight(element);
-  };
-
-  function clipWidth(element) {
-    var fixWidth = element.runtimeStyle.fixWidth;
-    element.runtimeStyle.borderRightWidth = "";
-    element.runtimeStyle.width = fixWidth ? getPixelWidth(element, fixWidth) : "";
-    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;
-      }
-    }
-  };
-  eval(rotate(clipWidth));
-  
-  function positionLeft(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 = 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 = 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");
-    }
-  };
-  // clone this function so we can do "top"
-  eval(rotate(positionLeft));
-  
-  // I've forgotten how this works...
-  function getScreenLeft(element) { // thanks to kevin newman (captainn)
-    var screenLeft = element.offsetLeft, nested = 1;
-    if (element.runtimeStyle.autoLeft) {
-      screenLeft = viewport.clientWidth - element.offsetWidth - getPixelWidth(element, element.currentStyle.right);
-    }
-    // accommodate margins
-    if (element.currentStyle.marginLeft != "auto") {
-      screenLeft -= getPixelWidth(element, element.currentStyle.marginLeft);
-    }
-    while (element = element.offsetParent) {
-      if (element.currentStyle.position != "static") nested = -1;
-      screenLeft += element.offsetLeft * nested;
-    }
-    return screenLeft;
-  };
-  eval(rotate(getScreenLeft));
-  
-  function getPixelWidth(element, value) {
-    return PERCENT.test(value) ? parseInt(parseFloat(value) / 100 * viewport.clientWidth) : getPixelValue(element, value);
-  };
-  eval(rotate(getPixelWidth));
-  
-  // -----------------------------------------------------------------------
-  //  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);
-      // do this twice to be sure - hackish, I know :-)
-      _foregroundPosition(elements[i], true);
-    }
-    _timer = 0;
-  };
-  
-  // use a timer for some reason.
-  //  (sometimes this is a good way to prevent resize loops)
-  var _timer;
-  addResize(function() {
-    if (!_timer) _timer = setTimeout(_resize, 0);
-  });
-};
-
-// =========================================================================
-// ie7-oveflow.js
-// =========================================================================
-
-/* ---------------------------------------------------------------------
-
-  This module alters the structure of the document.
-  It may adversely affect other CSS rules. Be warned.
-
---------------------------------------------------------------------- */
-
-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,
-  height: null,
-  marginTop: 0,
-  marginBottom: 0,
-  marginRight: 0,
-  marginLeft: 0,
-  width: "100%"
-};
-
-IE7.CSS.addRecalc("overflow", "visible", function(element) {
-  // 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);
-  });
-  
-  if (appVersion < 6) {
-    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) {
-    if (appVersion < 5.5) IE7.Layout.boxSizing(element.parentElement);
-    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-cssQuery.js
-// =========================================================================
-
-IE7._isEmpty = function(element) {
-  element = element.firstChild;
-  while (element) {
-    if (element.nodeType == 3 || (element.nodeType == 1 && element.nodeName != "!")) return false;
-    element = element.nextSibling;
-  }
-  return true;
-};
-
-IE7._isLang = function(element, code) {
-  while (element && !element.getAttribute("lang")) element = element.parentNode;
-  return element && new RegExp("^" + rescape(code), "i").test(element.getAttribute("lang"));
-};
-
-function _nthChild(match, args, position, last) {
-  // ugly but it works...
-  last = /last/i.test(match) ? last + "+1-" : "";
-  if (!isNaN(args)) args = "0n+" + args;
-  else if (args == "even") args = "2n";
-  else if (args == "odd") args = "2n+1";
-  args = args.split("n");
-  var a = args[0] ? (args[0] == "-") ? -1 : parseInt(args[0]) : 1;
-  var b = parseInt(args[1]) || 0;
-  var negate = a < 0;
-  if (negate) {
-    a = -a;
-    if (a == 1) b++;
-  }
-  var query = format(a == 0 ? "%3%7" + (last + b) : "(%4%3-%2)%6%1%70%5%4%3>=%2", a, b, position, last, "&&", "%", "==");
-  if (negate) query = "!(" + query + ")";
-  return query;
-};
-
-_PSEUDO_CLASSES = {
-  "link":          "e%1.currentStyle['ie7-link']=='link'",
-  "visited":       "e%1.currentStyle['ie7-link']=='visited'",
-  "checked":       "e%1.checked",
-  "contains":      "e%1.innerText.indexOf('%2')!=-1",
-  "disabled":      "e%1.isDisabled",
-  "empty":         "IE7._isEmpty(e%1)",
-  "enabled":       "e%1.disabled===false",
-  "first-child":   "!IE7._getPreviousElementSibling(e%1)",
-  "lang":          "IE7._isLang(e%1,'%2')",
-  "last-child":    "!IE7._getNextElementSibling(e%1)",
-  "only-child":    "!IE7._getPreviousElementSibling(e%1)&&!IE7._getNextElementSibling(e%1)",
-  "target":        "e%1.id==location.hash.slice(1)",
-  "indeterminate": "e%1.indeterminate"
-};
-
-
-// register a node and index its children
-IE7._register = function(element) {
-  if (element.rows) {
-    element.ie7_length = element.rows.length;
-    element.ie7_lookup = "rowIndex";
-  } else if (element.cells) {
-    element.ie7_length = element.cells.length;
-    element.ie7_lookup = "cellIndex";
-  } else if (element.ie7_indexed != IE7._indexed) {
-    var index = 0;
-    var child = element.firstChild;
-    while (child) {
-      if (child.nodeType == 1 && child.nodeName != "!") {
-        child.ie7_index = ++index;
-      }
-      child = child.nextSibling;
-    }
-    element.ie7_length = index;
-    element.ie7_lookup = "ie7_index";
-  }
-  element.ie7_indexed = IE7._indexed;
-  return element;
-};
-
-var keys = cssParser[_KEYS];
-var pseudoClass = keys[keys.length - 1];
-keys.length--;
-
-cssParser.merge({
-  ":not\\((\\*|[\\w-]+)?([^)]*)\\)": function(match, tagName, filters) { // :not pseudo class
-    var replacement = (tagName && tagName != "*") ? format("if(e%1.nodeName=='%2'){", _index, tagName.toUpperCase()) : "";
-    replacement += cssParser.exec(filters);
-    return "if(!" + replacement.slice(2, -1).replace(/\)\{if\(/g, "&&") + "){";
-  },
-  
-  ":nth(-last)?-child\\(([^)]+)\\)": function(match, last, args) { // :nth-child pseudo classes
-    _wild = false;
-    last = format("e%1.parentNode.ie7_length", _index);
-    var replacement = "if(p%1!==e%1.parentNode)p%1=IE7._register(e%1.parentNode);";
-    replacement += "var i=e%1[p%1.ie7_lookup];if(p%1.ie7_lookup!='ie7_index')i++;if(";
-    return format(replacement, _index) + _nthChild(match, args, "i", last) + "){";
-  }
-});
-
-keys.push(pseudoClass);
-
-// =========================================================================
-// ie8-css.js
-// =========================================================================
-
-var BRACKETS = "\\([^)]*\\)";
-
-if (IE7.CSS.pseudoClasses) IE7.CSS.pseudoClasses += "|";
-IE7.CSS.pseudoClasses += "before|after|last\\-child|only\\-child|empty|root|" +
-  "not|nth\\-child|nth\\-last\\-child|contains|lang".split("|").join(BRACKETS + "|") + BRACKETS;
-
-// pseudo-elements can be declared with a double colon
-encoder.add(/::/, ":");
-
-// -----------------------------------------------------------------------
-// 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]);
-});
-
-// :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) Checked.register(instance);
-      else Checked.unregister(instance);
-    }
-  });
-  // check current checked state
-  if (element.checked) 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.isDisabled) Enabled.register(instance);
-      else Enabled.unregister(instance);
-    }
-  });
-  // check current disabled state
-  if (!element.isDisabled) 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.isDisabled) Disabled.register(instance);
-      else Disabled.unregister(instance);
-    }
-  });
-  // check current disabled state
-  if (element.isDisabled) 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) 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 :-(
-  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);
-});
-
-// -----------------------------------------------------------------------
-// IE7 pseudo elements
-// -----------------------------------------------------------------------
-
-// constants
-var ATTR = /^attr/;
-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, '"');
-      if (target.currentStyle.styleFloat != "none") {
-        //cssText = cssText.replace(/display\s*:\s*block/, "display:inline-block");
-      }
-      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 pseudoElement = document.getElementById(id);
-        pseudoElement.src = getString(url[1]);
-        addFilter(pseudoElement, "crop");
-      }
-      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
-});
-
-// =========================================================================
-// 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.tagName == "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.tagName == "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
-// =========================================================================
-
-IE7.CSS.addRecalc("border-spacing", NUMERIC, function(element) {
-  if (element.currentStyle.borderCollapse != "collapse") {
-    element.cellSpacing = getPixelValue(element, element.currentStyle["border-spacing"]);
-  }
-});
-IE7.CSS.addRecalc("box-sizing", "content-box", IE7.Layout.boxSizing);
-IE7.CSS.addRecalc("box-sizing", "border-box", IE7.Layout.borderBox);
-
-// =========================================================================
-// ie8-graphics.js
-// =========================================================================
-
-IE7.CSS.addFix(/opacity\s*:\s*([\d.]+)/, function(match, value) {
-  return "zoom:1;filter:Alpha(opacity=" + ((value * 100) || 1) + ")";
-});
-
-// 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;
-  }
-});
-
-// -----------------------------------------------------------------------
-// initialisation
-// -----------------------------------------------------------------------
-
-IE7.loaded = true;
-
-(function() {
-  try {
-    // http://javascript.nwbox.com/IEContentLoaded/
-    documentElement.doScroll("left");
-  } catch (e) {
-    setTimeout(arguments.callee, 1);
-    return;
-  }
-  // execute the inner text of the IE7 script
-  try {
-    eval(script.innerHTML);
-  } catch (e) {
-    // ignore errors
-  }
-  PNG = new RegExp(rescape(typeof IE7_PNG_SUFFIX == "string" ? IE7_PNG_SUFFIX : "-trans.png") + "$", "i");
-
-  // frequently used references
-  body = document.body;
-  viewport = quirksMode ? body : documentElement;
-
-  // classes
-  body.className += " ie7_body";
-  documentElement.className += " ie7_html";
-
-  if (quirksMode) ie7Quirks();
-
-  IE7.CSS.init();
-  IE7.HTML.init();
-
-  IE7.HTML.apply();
-  IE7.CSS.apply();
-
-  IE7.recalc();
-})();
-
-
-})();
+/* IE7/IE8.js - copyright 2004-2008, Dean Edwards */
+(function(){IE7={toString:function(){return"IE7 version 2.0 (beta2)"}};var m=IE7.appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(top.location.search)||m<5)return;var U=bT();var G=document.compatMode!="CSS1Compat";var bx=document.documentElement,w,t;var bN="!";var J=":link{ie7-link:link}:visited{ie7-link:visited}";var cB=/^[\w\.]+[^:]*$/;function bc(a,b){if(cB.test(a))a=(b||"")+a;return a};function by(a,b){a=bc(a,b);return a.slice(0,a.lastIndexOf("/")+1)};var bO=document.scripts[document.scripts.length-1];var cC=by(bO.src);try{var K=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}var bd={};function cD(a,b){try{a=bc(a,b);if(!bd[a]){K.open("GET",a,false);K.send();if(K.status==0||K.status==200){bd[a]=K.responseText}}}catch(e){}finally{return bd[a]||""}};if(m<5.5){undefined=U();bN="HTML:!";var cE=/(g|gi)$/;var cF=String.prototype.replace;String.prototype.replace=function(a,b){if(typeof b=="function"){if(a&&a.constructor==RegExp){var c=a;var d=c.global;if(d==null)d=cE.test(c);if(d)c=new RegExp(c.source)}else{c=new RegExp(W(a))}var f,g=this,h="";while(g&&(f=c.exec(g))){h+=g.slice(0,f.index)+b.apply(this,f);g=g.slice(f.index+f[0].length);if(!d)break}return h+g}return cF.apply(this,arguments)};Array.prototype.pop=function(){if(this.length){var a=this[this.length-1];this.length--;return a}return undefined};Array.prototype.push=function(){for(var a=0;a<arguments.length;a++){this[this.length]=arguments[a]}return this.length};var cG=this;Function.prototype.apply=function(a,b){if(a===undefined)a=cG;else if(a==null)a=window;else if(typeof a=="string")a=new String(a);else if(typeof a=="number")a=new Number(a);else if(typeof a=="boolean")a=new Boolean(a);if(arguments.length==1)b=[];else if(b[0]&&b[0].writeln)b[0]=b[0].documentElement.document||b[0];var c="#ie7_apply",d;a[c]=this;switch(b.length){case 0:d=a[c]();break;case 1:d=a[c](b[0]);break;case 2:d=a[c](b[0],b[1]);break;case 3:d=a[c](b[0],b[1],b[2]);break;case 4:d=a[c](b[0],b[1],b[2],b[3]);break;case 5:d=a[c](b[0],b[1],b[2],b[3],b[4]);break;default:var f=[],g=b.length-1;do f[g]="a["+g+"]";while(g--);eval("r=o[$]("+f+")")}if(typeof a.valueOf=="function"){delete a[c]}else{a[c]=undefined;if(d&&d.writeln)d=d.documentElement.document||d}return d};Function.prototype.call=function(a){return this.apply(a,bP.apply(arguments,[1]))};J+="address,blockquote,body,dd,div,dt,fieldset,form,"+"frame,frameset,h1,h2,h3,h4,h5,h6,iframe,noframes,object,p,"+"hr,applet,center,dir,menu,pre,dl,li,ol,ul{display:block}"}var bP=Array.prototype.slice;var cZ=/%([1-9])/g;var cH=/^\s\s*/;var cI=/\s\s*$/;var cJ=/([\/()[\]{}|*+-.,^$?\\])/g;var bQ=/\bbase\b/;var bR=["constructor","toString"];var be;function B(){};B.extend=function(a,b){be=true;var c=new this;bf(c,a);be=false;var d=c.constructor;function f(){if(!be)d.apply(this,arguments)};c.constructor=f;f.extend=arguments.callee;bf(f,b);f.prototype=c;return f};B.prototype.extend=function(a){return bf(this,a)};var bz="#";var V="~";var cK=/\\./g;var cL=/\(\?[:=!]|\[[^\]]+\]/g;var cM=/\(/g;var H=B.extend({constructor:function(a){this[V]=[];this.merge(a)},exec:function(g){var h=this,j=this[V];return String(g).replace(new RegExp(this,this.ignoreCase?"gi":"g"),function(){var a,b=1,c=0;while((a=h[bz+j[c++]])){var d=b+a.length+1;if(arguments[b]){var f=a.replacement;switch(typeof f){case"function":return f.apply(h,bP.call(arguments,b,d));case"number":return arguments[b+f];default:return f}}b=d}})},add:function(a,b){if(a instanceof RegExp){a=a.source}if(!this[bz+a])this[V].push(String(a));this[bz+a]=new H.Item(a,b)},merge:function(a){for(var b in a)this.add(b,a[b])},toString:function(){return"("+this[V].join(")|(")+")"}},{IGNORE:"$0",Item:B.extend({constructor:function(a,b){a=a instanceof RegExp?a.source:String(a);if(typeof b=="number")b=String(b);else if(b==null)b="";if(typeof b=="string"&&/\$(\d+)/.test(b)){if(/^\$\d+$/.test(b)){b=parseInt(b.slice(1))}else{var c=/'/.test(b.replace(/\\./g,""))?'"':"'";b=b.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\$(\d+)/g,c+"+(arguments[$1]||"+c+c+")+"+c);b=new Function("return "+c+b.replace(/(['"])\1\+(.*)\+\1\1$/,"$1")+c)}}this.length=H.count(a);this.replacement=b;this.toString=bT(a)}}),count:function(a){a=String(a).replace(cK,"").replace(cL,"");return L(a,cM).length}});function bf(a,b){if(a&&b){var c=(typeof b=="function"?Function:Object).prototype;var d=bR.length,f;if(be)while(f=bR[--d]){var g=b[f];if(g!=c[f]){if(bQ.test(g)){bS(a,f,g)}else{a[f]=g}}}for(f in b)if(c[f]===undefined){var g=b[f];if(a[f]&&typeof g=="function"&&bQ.test(g)){bS(a,f,g)}else{a[f]=g}}}return a};function bS(c,d,f){var g=c[d];c[d]=function(){var a=this.base;this.base=g;var b=f.apply(this,arguments);this.base=a;return b}};function cN(a,b){if(!b)b=a;var c={};for(var d in a)c[d]=b[d];return c};function i(c){var d=arguments;var f=new RegExp("%([1-"+arguments.length+"])","g");return String(c).replace(f,function(a,b){return b<d.length?d[b]:a})};function L(a,b){return String(a).match(b)||[]};function W(a){return String(a).replace(cJ,"\\$1")};function da(a){return String(a).replace(cH,"").replace(cI,"")};function bT(a){return function(){return a}};var bU=H.extend({ignoreCase:true});var cO=/\x01(\d+)/g,cP=/'/g,cQ=/^\x01/,cR=/\\([\da-fA-F]{1,4})/g;var bA=[];var bV=new bU({"<!\\-\\-|\\-\\->":"","\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\/":"","@(namespace|import)[^;\\n]+[;\\n]":"","'(\\\\.|[^'\\\\])*'":bW,'"(\\\\.|[^"\\\\])*"':bW,"\\s+":" "});function cS(a){return bV.exec(a)};function bg(c){return c.replace(cO,function(a,b){return bA[b-1]})};function bW(c){return"\x01"+bA.push(c.replace(cR,function(a,b){return eval("'\\u"+"0000".slice(b.length)+b+"'")}).slice(1,-1).replace(cP,"\\'"))};function bB(a){return cQ.test(a)?bA[a.slice(1)-1]:a};var cT=new H({Width:"Height",width:"height",Left:"Top",left:"top",Right:"Bottom",right:"bottom",onX:"onY"});function C(a){return cT.exec(a)};var bX=[];function bC(a){cV(a);v(window,"onresize",a)};function v(a,b,c){a.attachEvent(b,c);bX.push(arguments)};function cU(a,b,c){try{a.detachEvent(b,c)}catch(ignore){}};v(window,"onunload",function(){var a;while(a=bX.pop()){cU(a[0],a[1],a[2])}});function X(a,b,c){if(!a.elements)a.elements={};if(c)a.elements[b.uniqueID]=b;else delete a.elements[b.uniqueID];return c};v(window,"onbeforeprint",function(){if(!IE7.CSS.print)new bJ("print");IE7.CSS.print.recalc()});var bY=/^\d+(px)?$/i;var M=/^\d+%$/;var D=function(a,b){if(bY.test(b))return parseInt(b);var c=a.style.left;var d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b||0;b=a.style.pixelLeft;a.style.left=c;a.runtimeStyle.left=d;return b};var bD="ie7-";var bZ=B.extend({constructor:function(){this.fixes=[];this.recalcs=[]},init:U});var bE=[];function cV(a){bE.push(a)};IE7.recalc=function(){IE7.HTML.recalc();IE7.CSS.recalc();for(var a=0;a<bE.length;a++)bE[a]()};function bh(a){return a.currentStyle["ie7-position"]=="fixed"};function bF(a,b){return a.currentStyle[bD+b]||a.currentStyle[b]};function N(a,b,c){if(a.currentStyle[bD+b]==null){a.runtimeStyle[bD+b]=a.currentStyle[b]}a.runtimeStyle[b]=c};function ca(a){var b=document.createElement(a||"object");b.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";b.ie7_anon=true;return b};function x(a,b,c){if(!bj[a]){I=[];var d="";var f=E.escape(a).split(",");for(var g=0;g<f.length;g++){p=l=y=0;Y=f.length>1?2:0;var h=E.exec(f[g])||"if(0){";if(p){h+=i("if(e%1.nodeName!='!'){",l)}var j=Y>1?ch:"";h+=i(j+ci,l);h+=Array(L(h,/\{/g).length+1).join("}");d+=h}eval(i(cj,I)+E.unescape(d)+"return s?null:r}");bj[a]=_k}return bj[a](b||document,c)};var bi=m<6;var cb=/^(href|src)$/;var bG={"class":"className","for":"htmlFor"};IE7._1=1;IE7._e=function(a,b){var c=a.all[b]||null;if(!c||c.id==b)return c;for(var d=0;d<c.length;d++){if(c[d].id==b)return c[d]}return null};IE7._f=function(a,b){if(b=="src"&&a.pngSrc)return a.pngSrc;var c=bi?(a.attributes[b]||a.attributes[bG[b.toLowerCase()]]):a.getAttributeNode(b);if(c&&(c.specified||b=="value")){if(cb.test(b)){return a.getAttribute(b,2)}else if(b=="class"){return a.className.replace(/\sie7_\w+/g,"")}else if(b=="style"){return a.style.cssText}else{return c.nodeValue}}return null};var cc="colSpan,rowSpan,vAlign,dateTime,accessKey,tabIndex,encType,maxLength,readOnly,longDesc";bf(bG,cN(cc.toLowerCase().split(","),cc.split(",")));IE7._3=function(a){while(a&&(a=a.nextSibling)&&(a.nodeType!=1||a.nodeName=="!"))continue;return a};IE7._4=function(a){while(a&&(a=a.previousSibling)&&(a.nodeType!=1||a.nodeName=="!"))continue;return a};var cW=/([\s>+~,]|[^(]\+|^)([#.:\[])/g,cX=/(^|,)([^\s>+~])/g,cY=/\s*([\s>+~(),]|^|$)\s*/g,cd=/\s\*\s/g;var ce=H.extend({constructor:function(a){this.base(a);this.sorter=new H;this.sorter.add(/:not\([^)]*\)/,H.IGNORE);this.sorter.add(/([ >](\*|[\w-]+))([^: >+~]*)(:\w+-child(\([^)]+\))?)([^: >+~]*)/,"$1$3$6$4")},ignoreCase:true,escape:function(a){return this.optimise(this.format(a))},format:function(a){return a.replace(cY,"$1").replace(cX,"$1 $2").replace(cW,"$1*$2")},optimise:function(a){return this.sorter.exec(a.replace(cd,">* "))},unescape:function(a){return bg(a)}});var cf={"":"%1!=null","=":"%1=='%2'","~=":/(^| )%1( |$)/,"|=":/^%1(-|$)/,"^=":/^%1/,"$=":/%1$/,"*=":/%1/};var bH={"first-child":"!IE7._4(e%1)","link":"e%1.currentStyle['ie7-link']=='link'","visited":"e%1.currentStyle['ie7-link']=='visited'"};var bI="var p%2=0,i%2,e%2,n%2=e%1.";var cg="e%1.sourceIndex";var ch="var g="+cg+";if(!p[g]){p[g]=1;";var ci="r[r.length]=e%1;if(s)return e%1;";var cj="var _k=function(e0,s){IE7._1++;var r=[],p={},reg=[%1],d=document;";var I;var l;var p;var y;var Y;var bj={};var E=new ce({" (\\*|[\\w-]+)#([\\w-]+)":function(a,b,c){p=false;var d="var e%2=IE7._e(d,'%4');if(e%2&&";if(b!="*")d+="e%2.nodeName=='%3'&&";d+="(e%1==d||e%1.contains(e%2))){";if(y)d+=i("i%1=n%1.length;",y);return i(d,l++,l,b.toUpperCase(),c)}," (\\*|[\\w-]+)":function(a,b){Y++;p=b=="*";var c=bI;c+=(p&&bi)?"all":"getElementsByTagName('%3')";c+=";for(i%2=0;(e%2=n%2[i%2]);i%2++){";return i(c,l++,y=l,b.toUpperCase())},">(\\*|[\\w-]+)":function(a,b){var c=y;p=b=="*";var d=bI;d+=c?"children":"childNodes";if(!p&&c)d+=".tags('%3')";d+=";for(i%2=0;(e%2=n%2[i%2]);i%2++){";if(p){d+="if(e%2.nodeType==1){";p=bi}else{if(!c)d+="if(e%2.nodeName=='%3'){"}return i(d,l++,y=l,b.toUpperCase())},"\\+(\\*|[\\w-]+)":function(a,b){var c="";if(p)c+="if(e%1.nodeName!='!'){";p=false;c+="e%1=IE7._3(e%1);if(e%1";if(b!="*")c+="&&e%1.nodeName=='%2'";c+="){";return i(c,l,b.toUpperCase())},"~(\\*|[\\w-]+)":function(a,b){var c="";if(p)c+="if(e%1.nodeName!='!'){";p=false;Y=2;c+="while(e%1=e%1.nextSibling){if(e%1.ie7_adjacent==IE7._1)break;if(";if(b=="*"){c+="e%1.nodeType==1";if(bi)c+="&&e%1.nodeName!='!'"}else c+="e%1.nodeName=='%2'";c+="){e%1.ie7_adjacent=IE7._1;";return i(c,l,b.toUpperCase())},"#([\\w-]+)":function(a,b){p=false;var c="if(e%1.id=='%2'){";if(y)c+=i("i%1=n%1.length;",y);return i(c,l,b)},"\\.([\\w-]+)":function(a,b){p=false;I.push(new RegExp("(^|\\s)"+W(b)+"(\\s|$)"));return i("if(e%1.className&&reg[%2].test(e%1.className)){",l,I.length-1)},"\\[([\\w-]+)\\s*([^=]?=)?\\s*([^\\]]*)\\]":function(a,b,c,d){var f=bG[b]||b;if(c){var g="e%1.getAttribute('%2',2)";if(!cb.test(b)){g="e%1.%3||"+g}b=i("("+g+")",l,b,f)}else{b=i("IE7._f(e%1,'%2')",l,b)}var h=cf[c||""]||"0";if(h&&h.source){I.push(new RegExp(i(h.source,W(E.unescape(d)))));h="reg[%2].test(%1)";d=I.length-1}return"if("+i(h,b,d)+"){"},":+([\\w-]+)(\\(([^)]+)\\))?":function(a,b,c,d){b=bH[b];return"if("+(b?i(b,l,d||""):"0")+"){"}});var ck=/a(#[\w-]+)?(\.[\w-]+)?:(hover|active)/i;var cl=/\s*\{\s*/,cm=/\s*\}\s*/,cn=/\s*\,\s*/;var co=/(.*)(:first-(line|letter))/;var z=document.styleSheets;IE7.CSS=new(bZ.extend({parser:new bU,screen:"",print:"",styles:[],rules:[],pseudoClasses:m<7?"first\\-child":"",dynamicPseudoClasses:{toString:function(){var a=[];for(var b in this)a.push(b);return a.join("|")}},init:function(){var a="^\x01$";var b="\\[class=?[^\\]]*\\]";var c=[];if(this.pseudoClasses)c.push(this.pseudoClasses);var d=this.dynamicPseudoClasses.toString();if(d)c.push(d);c=c.join("|");var f=m<7?["[>+~[(]|([:.])\\w+\\1"]:[b];if(c)f.push(":("+c+")");this.UNKNOWN=new RegExp(f.join("|")||a,"i");var g=m<7?["\\[[^\\]]+\\]|[^\\s(\\[]+\\s*[+~]"]:[b];var h=g.concat();if(c)h.push(":("+c+")");o.COMPLEX=new RegExp(h.join("|")||a,"ig");if(this.pseudoClasses)g.push(":("+this.pseudoClasses+")");O.COMPLEX=new RegExp(g.join("|")||a,"i");O.MATCH=new RegExp(d?"(.*):("+d+")(.*)":a,"i");this.createStyleSheet();this.refresh()},addEventHandler:function(){v.apply(null,arguments)},addFix:function(a,b){this.parser.add(a,b)},addRecalc:function(c,d,f,g){d=new RegExp("([{;\\s])"+c+"\\s*:\\s*"+d+"[^;}]*");var h=this.recalcs.length;if(g)g=c+":"+g;this.addFix(d,function(a,b){return(g?b+g:a)+";ie7-"+a.slice(1)+";ie7_recalc"+h+":1"});this.recalcs.push(arguments);return h},apply:function(){this.getInlineStyles();new bJ("screen");this.trash()},createStyleSheet:function(){this.styleSheet=document.createStyleSheet();this.styleSheet.ie7=true;this.styleSheet.owningElement.ie7=true;this.styleSheet.cssText=J},getInlineStyles:function(){var a=document.getElementsByTagName("style"),b;for(var c=a.length-1;(b=a[c]);c--){if(!b.disabled&&!b.ie7){this.styles.push(b.innerHTML)}}},getText:function(a,b){try{var c=a.cssText}catch(e){c=""}if(K)c=cD(a.href,b)||c;return c},recalc:function(){this.screen.recalc();var a=/ie7_recalc\d+/g;var b=J.match(/[{,]/g).length;var c=b+(this.screen.cssText.match(/\{/g)||"").length;var d=this.styleSheet.rules,f;var g,h,j,q,r,k,u,n;for(r=b;r<c;r++){f=d[r];var s=f.style.cssText;if(f&&(g=s.match(a))){j=x(f.selectorText);if(j.length)for(k=0;k<g.length;k++){n=g[k];h=IE7.CSS.recalcs[n.slice(10)][2];for(u=0;(q=j[u]);u++){if(q.currentStyle[n])h(q,s)}}}}},refresh:function(){this.styleSheet.cssText=J+this.screen+this.print},trash:function(){for(var a=0;a<z.length;a++){if(!z[a].ie7){try{var b=z[a].cssText}catch(e){b=""}if(b)z[a].cssText=""}}}}));var bJ=B.extend({constructor:function(a){this.media=a;this.load();IE7.CSS[a]=this;IE7.CSS.refresh()},createRule:function(a,b){if(IE7.CSS.UNKNOWN.test(a)){var c;if(F&&(c=a.match(F.MATCH))){return new F(c[1],c[2],b)}else if(c=a.match(O.MATCH)){if(!ck.test(c[0])||O.COMPLEX.test(c[0])){return new O(a,c[1],c[2],c[3],b)}}else return new o(a,b)}return a+" {"+b+"}"},getText:function(){var h=[].concat(IE7.CSS.styles);var j=/@media\s+([^{]*)\{([^@]+\})\s*\}/gi;var q=/\ball\b|^$/i,r=/\bscreen\b/i,k=/\bprint\b/i;function u(a,b){n.value=b;return a.replace(j,n)};function n(a,b,c){b=s(b);switch(b){case"screen":case"print":if(b!=n.value)return"";case"all":return c}return""};function s(a){if(q.test(a))return"all";else if(r.test(a))return(k.test(a))?"all":"screen";else if(k.test(a))return"print"};var R=this;function S(a,b,c,d){var f="";if(!d){c=s(a.media);d=0}if(c=="all"||c==R.media){if(d<3){for(var g=0;g<a.imports.length;g++){f+=S(a.imports[g],by(a.href,b),c,d+1)}}f+=cS(a.href?cy(a,b):h.pop()||"");f=u(f,R.media)}return f};var bw={};function cy(a,b){var c=bc(a.href,b);if(bw[c])return"";bw[c]=(a.disabled)?"":cA(IE7.CSS.getText(a,b),by(a.href,b));return bw[c]};var cz=/(url\s*\(\s*['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function cA(a,b){return a.replace(cz,"$1"+b.slice(0,b.lastIndexOf("/")+1)+"$2")};for(var T=0;T<z.length;T++){if(!z[T].disabled&&!z[T].ie7){this.cssText+=S(z[T])}}},load:function(){this.cssText="";this.getText();this.parse();this.cssText=bg(this.cssText);bd={}},parse:function(){this.cssText=IE7.CSS.parser.exec(this.cssText);var a=IE7.CSS.rules.length;var b=this.cssText.split(cm),c;var d,f,g,h;for(g=0;g<b.length;g++){c=b[g].split(cl);d=c[0].split(cn);f=c[1];for(h=0;h<d.length;h++){d[h]=f?this.createRule(d[h],f):""}b[g]=d.join("\n")}this.cssText=b.join("\n");this.rules=IE7.CSS.rules.slice(a)},recalc:function(){var a,b;for(b=0;(a=this.rules[b]);b++)a.recalc()},toString:function(){return"@media "+this.media+"{"+this.cssText+"}"}});var F;var o=IE7.Rule=B.extend({constructor:function(a,b){this.id=IE7.CSS.rules.length;this.className=o.PREFIX+this.id;a=a.match(co)||a||"*";this.selector=a[1]||a;this.selectorText=this.parse(this.selector)+(a[2]||"");this.cssText=b;this.MATCH=new RegExp("\\s"+this.className+"(\\s|$)","g");IE7.CSS.rules.push(this);this.init()},init:U,add:function(a){a.className+=" "+this.className},recalc:function(){var a=x(this.selector);for(var b=0;b<a.length;b++)this.add(a[b])},parse:function(a){var b=a.replace(o.CHILD," ").replace(o.COMPLEX,"");if(m<7)b=b.replace(o.MULTI,"");var c=L(b,o.TAGS).length-L(a,o.TAGS).length;var d=L(b,o.CLASSES).length-L(a,o.CLASSES).length+1;while(d>0&&o.CLASS.test(b)){b=b.replace(o.CLASS,"");d--}while(c>0&&o.TAG.test(b)){b=b.replace(o.TAG,"$1*");c--}b+="."+this.className;d=Math.min(d,2);c=Math.min(c,2);var f=-10*d-c;if(f>0){b=b+","+o.MAP[f]+" "+b}return b},remove:function(a){a.className=a.className.replace(this.MATCH,"$1")},toString:function(){return i("%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"}});var O=o.extend({constructor:function(a,b,c,d,f){this.attach=b||"*";this.dynamicPseudoClass=IE7.CSS.dynamicPseudoClasses[c];this.target=d;this.base(a,f)},recalc:function(){var a=x(this.attach),b;for(var c=0;b=a[c];c++){var d=this.target?x(this.target,b):[b];if(d.length)this.dynamicPseudoClass.apply(b,d,this)}}});var A=B.extend({constructor:function(a,b){this.name=a;this.apply=b;this.instances={};IE7.CSS.dynamicPseudoClasses[a]=this},register:function(a){var b=a[2];a.id=b.id+a[0].uniqueID;if(!this.instances[a.id]){var c=a[1],d;for(d=0;d<c.length;d++)b.add(c[d]);this.instances[a.id]=a}},unregister:function(a){if(this.instances[a.id]){var b=a[2];var c=a[1],d;for(d=0;d<c.length;d++)b.remove(c[d]);delete this.instances[a.id]}}});if(m<7){var Z=new A("hover",function(a){var b=arguments;IE7.CSS.addEventHandler(a,m<5.5?"onmouseover":"onmouseenter",function(){Z.register(b)});IE7.CSS.addEventHandler(a,m<5.5?"onmouseout":"onmouseleave",function(){Z.unregister(b)})});v(document,"onmouseup",function(){var a=Z.instances;for(var b in a)if(!a[b][0].contains(event.srcElement))Z.unregister(a[b])})}IE7.CSS.addRecalc("[\\w-]+","inherit",function(c,d){var f=d.match(/[\w-]+\s*:\s*inherit/g);for(var g=0;g<f.length;g++){var h=f[g].replace(/ie7\-|\s*:\s*inherit/g,"").replace(/\-([a-z])/g,function(a,b){return b.toUpperCase()});c.runtimeStyle[h]=c.parentElement.currentStyle[h]}});IE7.HTML=new(bZ.extend({fixed:{},init:U,addFix:function(){this.fixes.push(arguments)},apply:function(){for(var a=0;a<this.fixes.length;a++){var b=x(this.fixes[a][0]);var c=this.fixes[a][1];for(var d=0;d<b.length;d++)c(b[d])}},addRecalc:function(){this.recalcs.push(arguments)},recalc:function(){for(var a=0;a<this.recalcs.length;a++){var b=x(this.recalcs[a][0]);var c=this.recalcs[a][1],d;var f=Math.pow(2,a);for(var g=0;(d=b[g]);g++){var h=d.uniqueID;if((this.fixed[h]&f)==0){d=c(d)||d;this.fixed[h]|=f}}}}}));if(m<7){document.createElement("abbr");IE7.HTML.addRecalc("label",function(a){if(!a.htmlFor){var b=x("input,textarea",a,true);if(b){v(a,"onclick",function(){b.click()})}}})}var P="[.\\d]";new function(_){var layout=IE7.Layout=this;J+="*{boxSizing:content-box}";IE7.hasLayout=m<5.5?function(a){return a.clientWidth}:function(a){return a.currentStyle.hasLayout};layout.boxSizing=function(a){if(!IE7.hasLayout(a)){a.style.height="0cm";if(a.currentStyle.verticalAlign=="auto")a.runtimeStyle.verticalAlign="top";collapseMargins(a)}};function collapseMargins(a){if(a!=t&&a.currentStyle.position!="absolute"){collapseMargin(a,"marginTop");collapseMargin(a,"marginBottom")}};function collapseMargin(a,b){if(!a.runtimeStyle[b]){var c=a.parentElement;if(c&&IE7.hasLayout(c)&&!IE7[b=="marginTop"?"_4":"_3"](a))return;var d=x(">*:"+(b=="marginTop"?"first":"last")+"-child",a,true);if(d&&d.currentStyle.styleFloat=="none"&&IE7.hasLayout(d)){collapseMargin(d,b);margin=_b(a,a.currentStyle[b]);childMargin=_b(d,d.currentStyle[b]);if(margin<0||childMargin<0){a.runtimeStyle[b]=margin+childMargin}else{a.runtimeStyle[b]=Math.max(childMargin,margin)}d.runtimeStyle[b]="0px"}}};function _b(a,b){return b=="auto"?0:D(a,b)};var UNIT=/^[.\d][\w%]*$/,AUTO=/^(auto|0cm)$/;var applyWidth,applyHeight;IE7.Layout.borderBox=function(a){applyWidth(a);applyHeight(a)};var fixWidth=function(g){applyWidth=function(a){if(!M.test(a.currentStyle.width))h(a);collapseMargins(a)};function h(a,b){if(!a.runtimeStyle.fixedWidth){if(!b)b=a.currentStyle.width;a.runtimeStyle.fixedWidth=(UNIT.test(b))?Math.max(0,r(a,b)):b;N(a,"width",a.runtimeStyle.fixedWidth)}};function j(a){if(!bh(a)){var b=a.offsetParent;while(b&&!IE7.hasLayout(b))b=b.offsetParent}return(b||t).clientWidth};function q(a,b){if(M.test(b))return parseInt(parseFloat(b)/100*j(a));return D(a,b)};var r=function(a,b){var c=a.currentStyle["box-sizing"]=="border-box";var d=0;if(G&&!c)d+=k(a)+u(a,"padding");else if(!G&&c)d-=k(a)+u(a,"padding");return q(a,b)+d};function k(a){return a.offsetWidth-a.clientWidth};function u(a,b){return q(a,a.currentStyle[b+"Left"])+q(a,a.currentStyle[b+"Right"])};J+="*{minWidth:none;maxWidth:none;min-width:none;max-width:none}";layout.minWidth=function(a){if(a.currentStyle["min-width"]!=null){a.style.minWidth=a.currentStyle["min-width"]}if(X(arguments.callee,a,a.currentStyle.minWidth!="none")){layout.boxSizing(a);h(a);n(a)}};eval("IE7.Layout.maxWidth="+String(layout.minWidth).replace(/min/g,"max"));function n(a){var b=a.getBoundingClientRect();var c=b.right-b.left;if(a.currentStyle.minWidth!="none"&&c<=r(a,a.currentStyle.minWidth)){a.runtimeStyle.width=a.currentStyle.minWidth}else if(a.currentStyle.maxWidth!="none"&&c>=r(a,a.currentStyle.maxWidth)){a.runtimeStyle.width=a.currentStyle.maxWidth}else{a.runtimeStyle.width=a.runtimeStyle.fixedWidth}};function s(a){if(X(s,a,/^(fixed|absolute)$/.test(a.currentStyle.position)&&bF(a,"left")!="auto"&&bF(a,"right")!="auto"&&AUTO.test(bF(a,"width")))){R(a);IE7.Layout.boxSizing(a)}};IE7.Layout.fixRight=s;function R(a){var b=q(a,a.runtimeStyle._c||a.currentStyle.left);var c=j(a)-q(a,a.currentStyle.right)-b-u(a,"margin");if(parseInt(a.runtimeStyle.width)==c)return;a.runtimeStyle.width="";if(bh(a)||g||a.offsetWidth<c){if(!G)c-=k(a)+u(a,"padding");if(c<0)c=0;a.runtimeStyle.fixedWidth=c;N(a,"width",c)}};var S=0;bC(function(){if(!t)return;var a,b=(S<t.clientWidth);S=t.clientWidth;var c=layout.minWidth.elements;for(a in c){var d=c[a];var f=(parseInt(d.runtimeStyle.width)==r(d,d.currentStyle.minWidth));if(b&&f)d.runtimeStyle.width="";if(b==f)n(d)}var c=layout.maxWidth.elements;for(a in c){var d=c[a];var f=(parseInt(d.runtimeStyle.width)==r(d,d.currentStyle.maxWidth));if(!b&&f)d.runtimeStyle.width="";if(b!=f)n(d)}for(a in s.elements)R(s.elements[a])});if(G){IE7.CSS.addRecalc("width",P,applyWidth)}if(m<7){IE7.CSS.addRecalc("min-width",P,layout.minWidth);IE7.CSS.addRecalc("max-width",P,layout.maxWidth);IE7.CSS.addRecalc("right",P,s)}};eval("var fixHeight="+C(fixWidth));fixWidth();fixHeight(true)};var bk=bc("blank.gif",cC);var bl="DXImageTransform.Microsoft.AlphaImageLoader";var bK="progid:"+bl+"(src='%1',sizingMethod='%2')";var bm;var Q=[];function bL(a){if(bm.test(a.src)){var b=new Image(a.width,a.height);b.onload=function(){a.width=b.width;a.height=b.height;b=null};b.src=a.src;a.pngSrc=a.src;bo(a)}};if(m>=5.5&&m<7){IE7.CSS.addFix(/background(-image)?\s*:\s*([^};]*)?url\(([^\)]+)\)([^;}]*)?/,function(a,b,c,d,f){d=bB(d);return bm.test(d)?"filter:"+i(bK,d,"crop")+";zoom:1;background"+(b||"")+":"+(c||"")+"none"+(f||""):a});IE7.HTML.addRecalc("img,input",function(a){if(a.tagName=="INPUT"&&a.type!="image")return;bL(a);v(a,"onpropertychange",function(){if(!bn&&event.propertyName=="src"&&a.src.indexOf(bk)==-1)bL(a)})});var bn=false;v(window,"onbeforeprint",function(){bn=true;for(var a=0;a<Q.length;a++)cp(Q[a])});v(window,"onafterprint",function(){for(var a=0;a<Q.length;a++)bo(Q[a]);bn=false})}function bo(a,b){var c=a.filters[bl];if(c){c.src=a.src;c.enabled=true}else{a.runtimeStyle.filter=i(bK,a.src,b||"scale");Q.push(a)}a.src=bk};function cp(a){a.src=a.pngSrc;a.filters[bl].enabled=false};new function(_){if(m>=7)return;IE7.CSS.addRecalc("position","fixed",_8,"absolute");IE7.CSS.addRecalc("background(-attachment)?","[^};]*fixed",_5);var $viewport=G?"body":"documentElement";function _6(){if(w.currentStyle.backgroundAttachment!="fixed"){if(w.currentStyle.backgroundImage=="none"){w.runtimeStyle.backgroundRepeat="no-repeat";w.runtimeStyle.backgroundImage="url("+bk+")"}w.runtimeStyle.backgroundAttachment="fixed"}_6=U};var _0=ca("img");function _2(a){return a?bh(a)||_2(a.parentElement):false};function _d(a,b,c){setTimeout("document.all."+a.uniqueID+".runtimeStyle.setExpression('"+b+"','"+c+"')",0)};function _5(a){if(X(_5,a,a.currentStyle.backgroundAttachment=="fixed"&&!a.contains(w))){_6();bgLeft(a);bgTop(a);_a(a)}};function _a(a){_0.src=a.currentStyle.backgroundImage.slice(5,-2);var b=a.canHaveChildren?a:a.parentElement;b.appendChild(_0);setOffsetLeft(a);setOffsetTop(a);b.removeChild(_0)};function bgLeft(a){a.style.backgroundPositionX=a.currentStyle.backgroundPositionX;if(!_2(a)){_d(a,"backgroundPositionX","(parseInt(runtimeStyle.offsetLeft)+document."+$viewport+".scrollLeft)||0")}};eval(C(bgLeft));function setOffsetLeft(a){var b=_2(a)?"backgroundPositionX":"offsetLeft";a.runtimeStyle[b]=getOffsetLeft(a,a.style.backgroundPositionX)-a.getBoundingClientRect().left-a.clientLeft+2};eval(C(setOffsetLeft));function getOffsetLeft(a,b){switch(b){case"left":case"top":return 0;case"right":case"bottom":return t.clientWidth-_0.offsetWidth;case"center":return(t.clientWidth-_0.offsetWidth)/2;default:if(M.test(b)){return parseInt((t.clientWidth-_0.offsetWidth)*parseFloat(b)/100)}_0.style.left=b;return _0.offsetLeft}};eval(C(getOffsetLeft));function _8(a){if(X(_8,a,bh(a))){N(a,"position","absolute");N(a,"left",a.currentStyle.left);N(a,"top",a.currentStyle.top);_6();IE7.Layout.fixRight(a);_7(a)}};function _7(a,b){positionTop(a,b);positionLeft(a,b,true);if(!a.runtimeStyle.autoLeft&&a.currentStyle.marginLeft=="auto"&&a.currentStyle.right!="auto"){var c=t.clientWidth-getPixelWidth(a,a.currentStyle.right)-getPixelWidth(a,a.runtimeStyle._c)-a.clientWidth;if(a.currentStyle.marginRight=="auto")c=parseInt(c/2);if(_2(a.offsetParent))a.runtimeStyle.pixelLeft+=c;else a.runtimeStyle.shiftLeft=c}clipWidth(a);clipHeight(a)};function clipWidth(a){var b=a.runtimeStyle.fixWidth;a.runtimeStyle.borderRightWidth="";a.runtimeStyle.width=b?getPixelWidth(a,b):"";if(a.currentStyle.width!="auto"){var c=a.getBoundingClientRect();var d=a.offsetWidth-t.clientWidth+c.left-2;if(d>=0){a.runtimeStyle.borderRightWidth="0px";d=Math.max(D(a,a.currentStyle.width)-d,0);N(a,"width",d);return d}}};eval(C(clipWidth));function positionLeft(a,b){if(!b&&M.test(a.currentStyle.width)){a.runtimeStyle.fixWidth=a.currentStyle.width}if(a.runtimeStyle.fixWidth){a.runtimeStyle.width=getPixelWidth(a,a.runtimeStyle.fixWidth)}a.runtimeStyle.shiftLeft=0;a.runtimeStyle._c=a.currentStyle.left;a.runtimeStyle.autoLeft=a.currentStyle.right!="auto"&&a.currentStyle.left=="auto";a.runtimeStyle.left="";a.runtimeStyle.screenLeft=getScreenLeft(a);a.runtimeStyle.pixelLeft=a.runtimeStyle.screenLeft;if(!b&&!_2(a.offsetParent)){_d(a,"pixelLeft","runtimeStyle.screenLeft+runtimeStyle.shiftLeft+document."+$viewport+".scrollLeft")}};eval(C(positionLeft));function getScreenLeft(a){var b=a.offsetLeft,c=1;if(a.runtimeStyle.autoLeft){b=t.clientWidth-a.offsetWidth-getPixelWidth(a,a.currentStyle.right)}if(a.currentStyle.marginLeft!="auto"){b-=getPixelWidth(a,a.currentStyle.marginLeft)}while(a=a.offsetParent){if(a.currentStyle.position!="static")c=-1;b+=a.offsetLeft*c}return b};eval(C(getScreenLeft));function getPixelWidth(a,b){return M.test(b)?parseInt(parseFloat(b)/100*t.clientWidth):D(a,b)};eval(C(getPixelWidth));function _j(){var a=_5.elements;for(var b in a)_a(a[b]);a=_8.elements;for(b in a){_7(a[b],true);_7(a[b],true)}_9=0};var _9;bC(function(){if(!_9)_9=setTimeout(_j,0)})};var bp={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,height:null,marginTop:0,marginBottom:0,marginRight:0,marginLeft:0,width:"100%"};IE7.CSS.addRecalc("overflow","visible",function(a){if(a.parentNode.ie7_wrapped)return;if(IE7.Layout&&a.currentStyle["max-height"]!="auto"){IE7.Layout.maxHeight(a)}if(a.currentStyle.marginLeft=="auto")a.style.marginLeft=0;if(a.currentStyle.marginRight=="auto")a.style.marginRight=0;var b=document.createElement(bN);b.ie7_wrapped=a;for(var c in bp){b.style[c]=a.currentStyle[c];if(bp[c]!=null){a.runtimeStyle[c]=bp[c]}}b.style.display="block";b.style.position="relative";a.runtimeStyle.position="absolute";a.parentNode.insertBefore(b,a);b.appendChild(a)});function cq(){var f="xx-small,x-small,small,medium,large,x-large,xx-large".split(",");for(var g=0;g<f.length;g++){f[f[g]]=f[g-1]||"0.67em"}IE7.CSS.addFix(/(font(-size)?\s*:\s*)([\w.-]+)/,function(a,b,c,d){return b+(f[d]||d)});if(m<6){var h=/^\-/,j=/(em|ex)$/i;var q=/em$/i,r=/ex$/i;D=function(a,b){if(bY.test(b))return parseInt(b)||0;var c=h.test(b)?-1:1;if(j.test(b))c*=u(a);k.style.width=(c<0)?b.slice(1):b;w.appendChild(k);b=c*k.offsetWidth;k.removeNode();return parseInt(b)};var k=ca();function u(a){var b=1;k.style.fontFamily=a.currentStyle.fontFamily;k.style.lineHeight=a.currentStyle.lineHeight;while(a!=w){var c=a.currentStyle["ie7-font-size"];if(c){if(q.test(c))b*=parseFloat(c);else if(M.test(c))b*=(parseFloat(c)/100);else if(r.test(c))b*=(parseFloat(c)/2);else{k.style.fontSize=c;return 1}}a=a.parentElement}return b};IE7.CSS.addFix(/cursor\s*:\s*pointer/,"cursor:hand");IE7.CSS.addFix(/display\s*:\s*list-item/,"display:block")}function n(a){if(m<5.5)IE7.Layout.boxSizing(a.parentElement);var b=a.parentElement;var c=b.offsetWidth-a.offsetWidth-s(b);var d=(a.currentStyle["ie7-margin"]&&a.currentStyle.marginRight=="auto")||a.currentStyle["ie7-margin-right"]=="auto";switch(b.currentStyle.textAlign){case"right":c=d?parseInt(c/2):0;a.runtimeStyle.marginRight=c+"px";break;case"center":if(d)c=0;default:if(d)c/=2;a.runtimeStyle.marginLeft=parseInt(c)+"px"}};function s(a){return D(a,a.currentStyle.paddingLeft)+D(a,a.currentStyle.paddingRight)};IE7.CSS.addRecalc("margin(-left|-right)?","[^};]*auto",function(a){if(X(n,a,a.parentElement&&a.currentStyle.display=="block"&&a.currentStyle.marginLeft=="auto"&&a.currentStyle.position!="absolute")){n(a)}});bC(function(){for(var a in n.elements){var b=n.elements[a];b.runtimeStyle.marginLeft=b.runtimeStyle.marginRight="";n(b)}})};IE7._g=function(a){a=a.firstChild;while(a){if(a.nodeType==3||(a.nodeType==1&&a.nodeName!="!"))return false;a=a.nextSibling}return true};IE7._h=function(a,b){while(a&&!a.getAttribute("lang"))a=a.parentNode;return a&&new RegExp("^"+W(b),"i").test(a.getAttribute("lang"))};function cr(a,b,c,d){d=/last/i.test(a)?d+"+1-":"";if(!isNaN(b))b="0n+"+b;else if(b=="even")b="2n";else if(b=="odd")b="2n+1";b=b.split("n");var f=b[0]?(b[0]=="-")?-1:parseInt(b[0]):1;var g=parseInt(b[1])||0;var h=f<0;if(h){f=-f;if(f==1)g++}var j=i(f==0?"%3%7"+(d+g):"(%4%3-%2)%6%1%70%5%4%3>=%2",f,g,c,d,"&&","%","==");if(h)j="!("+j+")";return j};bH={"link":"e%1.currentStyle['ie7-link']=='link'","visited":"e%1.currentStyle['ie7-link']=='visited'","checked":"e%1.checked","contains":"e%1.innerText.indexOf('%2')!=-1","disabled":"e%1.isDisabled","empty":"IE7._g(e%1)","enabled":"e%1.disabled===false","first-child":"!IE7._4(e%1)","lang":"IE7._h(e%1,'%2')","last-child":"!IE7._3(e%1)","only-child":"!IE7._4(e%1)&&!IE7._3(e%1)","target":"e%1.id==location.hash.slice(1)","indeterminate":"e%1.indeterminate"};IE7._i=function(a){if(a.rows){a.ie7_length=a.rows.length;a.ie7_lookup="rowIndex"}else if(a.cells){a.ie7_length=a.cells.length;a.ie7_lookup="cellIndex"}else if(a.ie7_indexed!=IE7._1){var b=0;var c=a.firstChild;while(c){if(c.nodeType==1&&c.nodeName!="!"){c.ie7_index=++b}c=c.nextSibling}a.ie7_length=b;a.ie7_lookup="ie7_index"}a.ie7_indexed=IE7._1;return a};var ba=E[V];var cs=ba[ba.length-1];ba.length--;E.merge({":not\\((\\*|[\\w-]+)?([^)]*)\\)":function(a,b,c){var d=(b&&b!="*")?i("if(e%1.nodeName=='%2'){",l,b.toUpperCase()):"";d+=E.exec(c);return"if(!"+d.slice(2,-1).replace(/\)\{if\(/g,"&&")+"){"},":nth(-last)?-child\\(([^)]+)\\)":function(a,b,c){p=false;b=i("e%1.parentNode.ie7_length",l);var d="if(p%1!==e%1.parentNode)p%1=IE7._i(e%1.parentNode);";d+="var i=e%1[p%1.ie7_lookup];if(p%1.ie7_lookup!='ie7_index')i++;if(";return i(d,l)+cr(a,c,"i",b)+"){"}});ba.push(cs);var bM="\\([^)]*\\)";if(IE7.CSS.pseudoClasses)IE7.CSS.pseudoClasses+="|";IE7.CSS.pseudoClasses+="before|after|last\\-child|only\\-child|empty|root|"+"not|nth\\-child|nth\\-last\\-child|contains|lang".split("|").join(bM+"|")+bM;bV.add(/::/,":");var bb=new A("focus",function(a){var b=arguments;IE7.CSS.addEventHandler(a,"onfocus",function(){bb.unregister(b);bb.register(b)});IE7.CSS.addEventHandler(a,"onblur",function(){bb.unregister(b)});if(a==document.activeElement){bb.register(b)}});var bq=new A("active",function(a){var b=arguments;IE7.CSS.addEventHandler(a,"onmousedown",function(){bq.register(b)})});v(document,"onmouseup",function(){var a=bq.instances;for(var b in a)bq.unregister(a[b])});var br=new A("checked",function(a){if(typeof a.checked!="boolean")return;var b=arguments;IE7.CSS.addEventHandler(a,"onpropertychange",function(){if(event.propertyName=="checked"){if(a.checked)br.register(b);else br.unregister(b)}});if(a.checked)br.register(b)});var bs=new A("enabled",function(a){if(typeof a.disabled!="boolean")return;var b=arguments;IE7.CSS.addEventHandler(a,"onpropertychange",function(){if(event.propertyName=="disabled"){if(!a.isDisabled)bs.register(b);else bs.unregister(b)}});if(!a.isDisabled)bs.register(b)});var bt=new A("disabled",function(a){if(typeof a.disabled!="boolean")return;var b=arguments;IE7.CSS.addEventHandler(a,"onpropertychange",function(){if(event.propertyName=="disabled"){if(a.isDisabled)bt.register(b);else bt.unregister(b)}});if(a.isDisabled)bt.register(b)});var bu=new A("indeterminate",function(a){if(typeof a.indeterminate!="boolean")return;var b=arguments;IE7.CSS.addEventHandler(a,"onpropertychange",function(){if(event.propertyName=="indeterminate"){if(a.indeterminate)bu.register(b);else bu.unregister(b)}});IE7.CSS.addEventHandler(a,"onclick",function(){bu.unregister(b)})});var bv=new A("target",function(a){var b=arguments;if(!a.tabIndex)a.tabIndex=0;IE7.CSS.addEventHandler(document,"onpropertychange",function(){if(event.propertyName=="activeElement"){if(a.id&&a.id==location.hash.slice(1))bv.register(b);else bv.unregister(b)}});if(a.id&&a.id==location.hash.slice(1))bv.register(b)});var ct=/^attr/;var cu=/^url\s*\(\s*([^)]*)\)$/;var cv={before0:"beforeBegin",before1:"afterBegin",after0:"afterEnd",after1:"beforeEnd"};var F=IE7.PseudoElement=o.extend({constructor:function(a,b,c){this.position=b;var d=c.match(F.CONTENT),f,g;if(d){d=d[1];f=d.split(/\s+/);for(var h=0;(g=f[h]);h++){f[h]=ct.test(g)?{attr:g.slice(5,-1)}:(g.charAt(0)=="'")?bB(g):bg(g)}d=f}this.content=d;this.base(a,bg(c))},init:function(){this.match=x(this.selector);for(var a=0;a<this.match.length;a++){var b=this.match[a].runtimeStyle;if(!b[this.position])b[this.position]={cssText:""};b[this.position].cssText+=";"+this.cssText;if(this.content!=null)b[this.position].content=this.content}},create:function(a){var b=a.runtimeStyle[this.position];if(b){var c=[].concat(b.content||"");for(var d=0;d<c.length;d++){if(typeof c[d]=="object"){c[d]=a.getAttribute(c[d].attr)}}c=c.join("");var f=c.match(cu);var g="overflow:hidden;"+b.cssText.replace(/'/g,'"');if(a.currentStyle.styleFloat!="none"){}var h=cv[this.position+Number(a.canHaveChildren)];var j='ie7_pseudo'+F.count++;a.insertAdjacentHTML(h,i(F.ANON,this.className,j,g,f?"":c));if(f){var q=document.getElementById(j);q.src=bB(f[1]);bo(q,"crop")}a.runtimeStyle[this.position]=null}},recalc:function(){if(this.content==null)return;for(var a=0;a<this.match.length;a++){this.create(this.match[a])}},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});var cw=/^(submit|reset|button)$/;IE7.HTML.addRecalc("button,input",function(a){if(a.tagName=="BUTTON"){var b=a.outerHTML.match(/ value="([^"]*)"/i);a.runtimeStyle.value=(b)?b[1]:""}if(a.type=="submit"){v(a,"onclick",function(){a.runtimeStyle.clicked=true;setTimeout("document.all."+a.uniqueID+".runtimeStyle.clicked=false",1)})}});IE7.HTML.addRecalc("form",function(c){v(c,"onsubmit",function(){for(var a,b=0;a=c[b];b++){if(cw.test(a.type)&&!a.disabled&&!a.runtimeStyle.clicked){a.disabled=true;setTimeout("document.all."+a.uniqueID+".disabled=false",1)}else if(a.tagName=="BUTTON"&&a.type=="submit"){setTimeout("document.all."+a.uniqueID+".value='"+a.value+"'",1);a.value=a.runtimeStyle.value}}})});IE7.HTML.addRecalc("img",function(a){if(a.alt&&!a.title)a.title=""});IE7.CSS.addRecalc("border-spacing",P,function(a){if(a.currentStyle.borderCollapse!="collapse"){a.cellSpacing=D(a,a.currentStyle["border-spacing"])}});IE7.CSS.addRecalc("box-sizing","content-box",IE7.Layout.boxSizing);IE7.CSS.addRecalc("box-sizing","border-box",IE7.Layout.borderBox);IE7.CSS.addFix(/opacity\s*:\s*([\d.]+)/,function(a,b){return"zoom:1;filter:Alpha(opacity="+((b*100)||1)+")"});var cx=/^image/i;IE7.HTML.addRecalc("object",function(a){if(cx.test(a.type)){a.body.style.cssText="margin:0;padding:0;border:none;overflow:hidden";return a}});IE7.loaded=true;(function(){try{bx.doScroll("left")}catch(e){setTimeout(arguments.callee,1);return}try{eval(bO.innerHTML)}catch(e){}bm=new RegExp(W(typeof IE7_PNG_SUFFIX=="string"?IE7_PNG_SUFFIX:"-trans.png")+"$","i");w=document.body;t=G?w:bx;w.className+=" ie7_body";bx.className+=" ie7_html";if(G)cq();IE7.CSS.init();IE7.HTML.init();IE7.HTML.apply();IE7.CSS.apply();IE7.recalc()})()})();
Index: admin/js/ie7/ie7-recalc.js
===================================================================
--- admin/js/ie7/ie7-recalc.js	(revision 703)
+++ admin/js/ie7/ie7-recalc.js	(revision 0)
@@ -1,166 +1,2 @@
-
-// =========================================================================
-// ie7-recalc.js
-// =========================================================================
-
-(function() {
-  /* ---------------------------------------------------------------------
-  
-    This allows refreshing of IE7 style rules. If you modify the DOM
-    you can update IE7 by calling document.recalc().
-  
-    This should be the LAST module included.
-  
-  --------------------------------------------------------------------- */
-  
-  if (!IE7.loaded) return;
-  
-  // remove all IE7 classes from an element
-  CLASSES = /\sie7_class\d+/g;
-  
-  IE7.CSS.extend({
-    // store for elements that have style properties calculated
-    elements: {},
-    handlers: [],
-    
-    // clear IE7 classes and styles
-    reset: function() {
-      this.removeEventHandlers();
-      // reset IE7 classes here
-      var elements = this.elements;
-      for (var i in elements) elements[i].runtimeStyle.cssText = "";
-      this.elements = {};
-      // reset runtimeStyle here
-      var elements = IE7.Rule.elements;
-      for (var i in elements) {
-        with (elements[i]) className = className.replace(CLASSES, "");
-      }
-      IE7.Rule.elements = {};
-    },
-    
-    reload: function() {
-      this.rules = [];
-      this.getInlineStyles();
-      this.screen.load();
-      if (this.print) this.print.load();
-      this.refresh();
-      this.trash();
-    },
-    
-    addRecalc: function(propertyName, test, handler, replacement) {
-      // call the ancestor method to add a wrapped recalc method
-      this.base(propertyName, test, function(element) {
-        // execute the original recalc method
-        handler(element);
-        // store a reference to this element so we can clear its style later
-        IE7.CSS.elements[element.uniqueID] = element;
-      }, replacement);
-    },
-    
-    recalc: function() {
-      // clear IE7 styles and classes
-      this.reset();
-      // execute the ancestor method to perform recalculations
-      this.base();
-    },
-    
-    addEventHandler: function(element, type, handler) {
-      element.attachEvent(type, handler);
-      // store the handler so it can be detached later
-      this.handlers.push(arguments);
-    },
-    
-    removeEventHandlers: function() {
-      var handler;
-       while (handler = this.handlers.pop()) {
-         handler[0].detachEvent(handler[1], handler[2]);
-       }
-    },
-    
-    getInlineStyles: 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) {
-          var cssText = styleSheet.cssText || styleSheet.innerHTML;
-          this.styles.push(cssText);
-          styleSheet.cssText = cssText;
-        }
-      }
-    },
-    
-    trash: function() {
-      // trash the old style sheets
-      var styleSheets = document.styleSheets, styleSheet, i;
-      for (i = 0; i < styleSheets.length; i++) {
-        styleSheet = styleSheets[i];
-        if (!styleSheet.ie7 && !styleSheet.cssText) {
-          styleSheet.cssText = styleSheet.cssText;
-        }
-      }
-      this.base();
-    },
-    
-    getText: function(styleSheet) {
-      return styleSheet.cssText || this.base(styleSheet);
-    }
-  });
-  
-  // remove event handlers (they eat memory)
-  IE7.CSS.addEventHandler(window, "onunload", function() {
-     IE7.CSS.removeEventHandlers();
-  });
-  
-  // store all elements with an IE7 class assigned
-  IE7.Rule.elements = {};
-
-  IE7.Rule.prototype.extend({
-    add: function(element) {
-      // execute the ancestor "add" method
-      this.base(element);
-      // store a reference to this element so we can clear its classes later
-      IE7.Rule.elements[element.uniqueID] = element;
-    }
-  });
-
-  // store created pseudo elements
-  if (IE7.PseudoElement) {
-    IE7.PseudoElement.hash = {};
-  
-    IE7.PseudoElement.prototype.extend({
-      create: function(target) {
-        var key = this.selector + ":" + target.uniqueID;
-        if (!IE7.PseudoElement.hash[key]) {
-          IE7.PseudoElement.hash[key] = true;
-          this.base(target);
-        }
-      }
-    });
-  }
-  
-  IE7.HTML.extend({
-    elements: {},
-    
-    addRecalc: function(selector, handler) {
-      // call the ancestor method to add a wrapped recalc method
-      this.base(selector, function(element) {
-        if (!this.elements[element.uniqueID]) {
-          // execute the original recalc method
-          handler(element);
-          // store a reference to this element so that
-          //  it is not "fixed" again
-          this.elements[element.uniqueID] = element;
-        }
-      });
-    }
-  });
-  
-  // allow refreshing of IE7 fixes
-  document.recalc = function(reload) {
-    if (IE7.CSS.screen) {
-      if (reload) IE7.CSS.reload();
-      IE7.recalc();
-    }
-  };
-
-})();
+/* IE7/IE8.js - copyright 2004-2008, Dean Edwards */
+(function(){if(!IE7.loaded)return;CLASSES=/\sie7_class\d+/g;IE7.CSS.extend({elements:{},handlers:[],reset:function(){this.removeEventHandlers();var a=this.elements;for(var b in a)a[b].runtimeStyle.cssText="";this.elements={};var a=IE7.Rule.elements;for(var b in a){with(a[b])className=className.replace(CLASSES,"")}IE7.Rule.elements={}},reload:function(){this.rules=[];this.getInlineStyles();this.screen.load();if(this.print)this.print.load();this.refresh();this.trash()},addRecalc:function(b,c,d,e){this.base(b,c,function(a){d(a);IE7.CSS.elements[a.uniqueID]=a},e)},recalc:function(){this.reset();this.base()},addEventHandler:function(a,b,c){a.attachEvent(b,c);this.handlers.push(arguments)},removeEventHandlers:function(){var a;while(a=this.handlers.pop()){a[0].detachEvent(a[1],a[2])}},getInlineStyles:function(){var a=document.getElementsByTagName("style"),b;for(var c=a.length-1;(b=a[c]);c--){if(!b.disabled&&!b.ie7){var d=b.cssText||b.innerHTML;this.styles.push(d);b.cssText=d}}},trash:function(){var a=document.styleSheets,b,c;for(c=0;c<a.length;c++){b=a[c];if(!b.ie7&&!b.cssText){b.cssText=b.cssText}}this.base()},getText:function(a){return a.cssText||this.base(a)}});IE7.CSS.addEventHandler(window,"onunload",function(){IE7.CSS.removeEventHandlers()});IE7.Rule.elements={};IE7.Rule.prototype.extend({add:function(a){this.base(a);IE7.Rule.elements[a.uniqueID]=a}});if(IE7.PseudoElement){IE7.PseudoElement.hash={};IE7.PseudoElement.prototype.extend({create:function(a){var b=this.selector+":"+a.uniqueID;if(!IE7.PseudoElement.hash[b]){IE7.PseudoElement.hash[b]=true;this.base(a)}}})}IE7.HTML.extend({elements:{},addRecalc:function(b,c){this.base(b,function(a){if(!this.elements[a.uniqueID]){c(a);this.elements[a.uniqueID]=a}})}});document.recalc=function(a){if(IE7.CSS.screen){if(a)IE7.CSS.reload();IE7.recalc()}}})();
Index: admin/js/ie7/ie7-squish.js
===================================================================
--- admin/js/ie7/ie7-squish.js	(revision 703)
+++ admin/js/ie7/ie7-squish.js	(revision 0)
Index: admin/js/jquery/jquery.candyUpload.js
===================================================================
--- admin/js/jquery/jquery.candyUpload.js	(revision 536)
+++ admin/js/jquery/jquery.candyUpload.js	(revision 3)
@@ -501,5 +501,5 @@
 			
 			var size = this.formatSize(upldr.params.file_size_limit);
-			$('<p class="cu-maxsize form-note info">' + this.locales.max_file_size + ' ' + size + '</p>').appendTo(this.ctrl.block);
+			$('<div class="cu-maxsize">' + this.locales.max_file_size + ' ' + size + '</div>').appendTo(this.ctrl.block);
 		},
 		
@@ -553,5 +553,5 @@
 					'<div class="cu-fileinfo"><span class="cu-filename">' + o.name + '</span> ' + 
 					'<span class="cu-filesize">(' + this.formatSize(o.size) + ')</span> ' +
-					'<span class="cu-filecancel"><a href="#">cancel</a> </span> ' +
+					'<span class="cu-filecancel"><a href="#">cancel</a></span> ' +
 					'<span class="cu-filemsg"></span>' +
 					'</div>');
Index: admin/js/jquery/jquery.pageTabs.js
===================================================================
--- admin/js/jquery/jquery.pageTabs.js	(revision 297)
+++ admin/js/jquery/jquery.pageTabs.js	(revision 0)
@@ -9,7 +9,7 @@
 		breakerClassName: 'clear'
 	};
-
+	
 	var index = start_tab ? start_tab : 0;
-
+	
 	this.params = jQuery.extend(defaults,settings);
 	this.divs = jQuery('div.'+this.params.className);
@@ -20,10 +20,10 @@
 jQuery._pageTabs.prototype = {
 	items: new Array(),
-
+	
 	createList: function() {
 		if (this.divs.length <= 0) {
 			return;
 		}
-
+		
 		this.block = document.createElement('div');
 		this.block.className = this.params.listClassName;
@@ -32,5 +32,5 @@
 		this.block.appendChild(this.list);
 		var li, a;
-
+		
 		var This = this;
 		var i=0;
@@ -57,30 +57,30 @@
 			}
 		});
-
+		
 		this.breaker = document.createElement('br');
 		this.breaker.className = this.params.breakerClassName;
-
+		
 		jQuery(this.divs.get(0)).before(this.block);
 		jQuery(this.block).after(this.breaker);
 	},
-
+	
 	showDiv: function(index) {
 		var This = this;
 		var i = 0;
 		var to_trigger = null;
-
+		
 		this.divs.each(function() {
 			if ((this.id != '' && this.id == index) || i == index) {
-				jQuery(this).show(0, positionFooter);
+				jQuery(this).show();
 				This.items[i].className = This.params.listClassName+'-active';
 				to_trigger = i;
 			} else {
-				jQuery(this).hide(0, positionFooter);
+				jQuery(this).hide();
 				This.items[i].className = '';
 			}
-
+			
 			i++;
 		});
-
+		
 		if (to_trigger != null) {
 			jQuery(this.divs[to_trigger]).onetabload();
Index: admin/js/jsToolBar/jsToolBar.dotclear.js
===================================================================
--- admin/js/jsToolBar/jsToolBar.dotclear.js	(revision 723)
+++ admin/js/jsToolBar/jsToolBar.dotclear.js	(revision 169)
@@ -116,5 +116,4 @@
 	a.href = data.href;
 	if (data.hreflang) a.setAttribute('hreflang',data.hreflang);
-	if (data.title) a.setAttribute('title',data.title);
 	a.appendChild(n);
 	this.insertNode(a);
Index: admin/js/jsToolBar/jsToolBar.js
===================================================================
--- admin/js/jsToolBar/jsToolBar.js	(revision 530)
+++ admin/js/jsToolBar/jsToolBar.js	(revision 0)
@@ -44,15 +44,18 @@
 	
 	// Dragable resizing (only for gecko)
-	if (navigator.appName == 'Microsoft Internet Explorer')
+	if (this.editor.addEventListener)
 	{
-		if (this.editor.addEventListener)
-		{		
-			this.handle = document.createElement('div');
-			this.handle.className = 'jstHandle';
-			var dragStart = this.resizeDragStart;
-			var This = this;
-			this.handle.addEventListener('mousedown',function(event) { dragStart.call(This,event); },false);
-			this.editor.parentNode.insertBefore(this.handle,this.editor.nextSibling);
-		}
+		this.handle = document.createElement('div');
+		this.handle.className = 'jstHandle';
+		var dragStart = this.resizeDragStart;
+		var This = this;
+		this.handle.addEventListener('mousedown',function(event) { dragStart.call(This,event); },false);
+		// fix memory leak in Firefox (bug #241518)
+		window.addEventListener('unload',function() {
+				var del = This.handle.parentNode.removeChild(This.handle);
+				delete(This.handle);
+		},false);
+		
+		this.editor.parentNode.insertBefore(this.handle,this.editor.nextSibling);
 	}
 	
Index: admin/js/prelude.js
===================================================================
--- admin/js/prelude.js	(revision 447)
+++ 	(revision )
@@ -1,20 +1,0 @@
-// Accessibility links thks to vie-publique.fr
-aFocus = function() {
-	if(document.getElementById("prelude")) {
-		var aElts = document.getElementById("prelude").getElementsByTagName("A");
-		for (var i=0; i<aElts.length; i++) {
-			aElts[i].className="hidden";
-			aElts[i].onfocus=function() {
-				this.className="";
-			}
-		}
-	}
-}
-// events onload
-function addLoadEvent(func) {
-	if (window.addEventListener)
-		window.addEventListener("load", func, false);
-	else if (window.attachEvent)
-		window.attachEvent("onload", func);
-}
-addLoadEvent(aFocus);
Index: admin/langs.php
===================================================================
--- admin/langs.php	(revision 500)
+++ admin/langs.php	(revision 456)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -133,5 +133,5 @@
 
 echo
-'<h2 class="page-title">'.__('Languages management').'</h2>';
+'<h2>'.__('Languages management').'</h2>';
 
 if (!empty($_GET['removed'])) {
@@ -173,8 +173,10 @@
 {
 	echo
-	'<table class="clear plugins"><tr>'.
-	'<th>'.__('Language').'</th>'.
-	'<th class="nowrap">'.__('Action').'</th>'.
-	'</tr>';
+	'<table class="clear plugins">'.
+	'<thead><tr>'.
+	'<th scope="col">'.__('Language').'</th>'.
+	'<th scope="col" class="nowrap">'.__('Action').'</th>'.
+	'</tr></thead>'.
+	'<tbody>';
 	
 	foreach ($locales_content as $k => $v)
@@ -184,6 +186,6 @@
 		echo
 		'<tr class="line wide">'.
-		'<td class="maximal nowrap">('.$k.') '.
-		'<strong>'.html::escapeHTML($iso_codes[$k]).'</strong></td>'.
+		'<th scope="row" class="maximal nowrap">('.$k.') '.
+		'<strong>'.html::escapeHTML($iso_codes[$k]).'</strong></th>'.
 		'<td class="nowrap action">';
 		
@@ -202,5 +204,7 @@
 		echo '</td></tr>';
 	}
-	echo '</table>';
+	echo
+	'</tbody>'.
+	'</table>';
 }
 
@@ -228,5 +232,5 @@
 	'Proposed languages are based on your version: %s.'),'<strong>'.DC_VERSION.'</strong>').'</p>'.
 	'<p class="field"><label for="pkg_url" class="classic">'.__('Language:').' '.
-	form::combo(array('pkg_url'),$dc_langs_combo).'</label></p>'.
+	form::combo('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>'.
Index: admin/media.php
===================================================================
--- admin/media.php	(revision 747)
+++ admin/media.php	(revision 217)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -68,4 +68,5 @@
 	unset($post);
 }
+
 $d = isset($_REQUEST['d']) ? $_REQUEST['d'] : null;
 $dir = null;
@@ -222,5 +223,5 @@
 	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 '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.__('Media manager').' &rsaquo; '.__('confirm removal').'</h2>';
 	
 	echo
@@ -228,6 +229,6 @@
 	'<p>'.sprintf(__('Are you sure you want to remove %s?'),
 	html::escapeHTML($_GET['remove'])).'</p>'.
-	'<p><input type="submit" value="'.__('Cancel').'" /> '.
-	' &nbsp; <input type="submit" name="rmyes" value="'.__('Yes').'" />'.
+	'<p><input type="submit" value="'.__('cancel').'" /> '.
+	' &nbsp; <input type="submit" name="rmyes" value="'.__('yes').'" />'.
 	form::hidden('d',$d).
 	$core->formNonce().
@@ -241,16 +242,7 @@
 /* DISPLAY Main page
 -------------------------------------------------------- */
-$core->auth->user_prefs->addWorkspace('interface');
-$user_ui_enhanceduploader = $core->auth->user_prefs->interface->enhanceduploader;
-
 call_user_func($open_f,__('Media manager'),
-	'<script type="text/javascript">'."\n".
-	"//<![CDATA["."\n".
-	dcPage::jsVar('dotclear.candyUpload_force_init',$user_ui_enhanceduploader)."\n".
-	"//]]>".
-	"</script>".
 	dcPage::jsLoad('js/_media.js').
-	(($user_ui_enhanceduploader && $core_media_writable) ? dcPage::jsCandyUpload(array('d='.$d)) : '')
-	);
+	($core_media_writable ? dcPage::jsCandyUpload(array('d='.$d)) : ''));
 
 if (!empty($_GET['mkdok'])) {
@@ -278,15 +270,6 @@
 }
 
-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>';
-	}
-}
+echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <a href="'.html::escapeURL($page_url.'&d=').'">'.__('Media manager').'</a>'.
+' / '.(isset($core->media) ? $core->media->breadCrumb(html::escapeURL($page_url).'&amp;d=%s') : '').'</h2>';
 
 if (!$dir) {
@@ -323,5 +306,5 @@
 	form::hidden(array('popup'),$popup).
 	form::hidden(array('post_id'),$post_id).
-	'<input type="submit" value="'.__('Sort').'" /></p>'.
+	'<input type="submit" value="'.__('ok').'" /></p>'.
 	'</form>'.
 	
@@ -344,20 +327,18 @@
 	
 	echo
-	'<div class="col">'.
-	'<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>'.
+	'<div class="col"><h3 id="add-file">'.__('Add files').'</h3>'.
+	'<p class="form-note info">'.__('Please take care to publish media that you own and that are not protected by copyright.').'</p>'.
 	'<form id="media-upload" class="clear" action="'.html::escapeURL($page_url).'" method="post" enctype="multipart/form-data">'.
 	'<div>'.form::hidden(array('MAX_FILE_SIZE'),DC_MAX_UPLOAD_SIZE).
 	$core->formNonce().'</div>'.
+	'<fieldset id="add-file-f">'.
 	'<p><label for="upfile">'.__('Choose a file:').
 	' ('.sprintf(__('Maximum size %s'),files::size(DC_MAX_UPLOAD_SIZE)).')'.
 	'<input type="file" id="upfile" name="upfile" size="20" />'.
 	'</label></p>'.
-	'<p><label for="upfiletitle">'.__('Title:').form::field(array('upfiletitle','upfiletitle'),35,255).'</label></p>'.
-	'<p><label for="upfilepriv" class="classic">'.form::checkbox(array('upfilepriv','upfilepriv'),1).' '.
+	'<p><label for="upfiletitle">'.__('Title:').form::field(array('upfiletitle'),35,255).'</label></p>'.
+	'<p><label for="upfilepriv" class="classic">'.form::checkbox(array('upfilepriv'),1).' '.
 	__('Private').'</label></p>'.
-	'<p class="form-help info">'.__('To send several files at the same time, you can activate the enhanced uploader in').
-	'<a href="preferences.php?tab=user-options"> '.__('My preferences').'</a></p>'.
-	'<p><input type="submit" value="'.__('Send').'" />'.
+	'<p><input type="submit" value="'.__('send').'" />'.
 	form::hidden(array('d'),$d).'</p>'.
 	'</fieldset>'.
@@ -366,12 +347,11 @@
 	
 	echo
-	'<div class="col">'.
+	'<div class="col"><h3 id="new-dir">'.__('New directory').'</h3>'.
 	'<form class="clear" action="'.html::escapeURL($page_url).'" method="post">'.
 	'<fieldset id="new-dir-f">'.
-	'<legend>'.__('New directory').'</legend>'.
 	$core->formNonce().
 	'<p><label for="newdir">'.__('Directory Name:').
-	form::field(array('newdir','newdir'),35,255).'</label></p>'.
-	'<p><input type="submit" value="'.__('Create').'" />'.
+	form::field(array('newdir'),35,255).'</label></p>'.
+	'<p><input type="submit" value="'.__('Save').'" />'.
 	form::hidden(array('d'),html::escapeHTML($d)).'</p>'.
 	'</fieldset>'.
@@ -457,5 +437,5 @@
 		'href="'.html::escapeURL($page_url).'&amp;d='.
 		rawurlencode($GLOBALS['d']).'&amp;remove='.rawurlencode($f->basename).'">'.
-		'<img src="images/trash.png" alt="'.__('Delete').'" title="'.__('delete').'" /></a>';
+		'<img src="images/trash.png" alt="'.__('delete').'" title="'.__('delete').'" /></a>';
 	}
 	
Index: admin/media_item.php
===================================================================
--- admin/media_item.php	(revision 663)
+++ admin/media_item.php	(revision 217)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -182,5 +182,5 @@
 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>';
+$file->basename.'</h2>';
 
 # Insertion popup
@@ -394,9 +394,5 @@
 	if ($file->media_image)
 	{ # We look for thumbnails too
-		if (preg_match('#^http(s)?://#',$core->blog->settings->system->public_url)) {
-			$media_root = $core->blog->settings->system->public_url;
-		} else {
-			$media_root = $core->blog->host.path::clean($core->blog->settings->system->public_url).'/';
-		}
+		$media_root = $core->blog->host.path::clean($core->blog->settings->system->public_url).'/';
 		foreach ($file->media_thumb as $v) {
 			$v = preg_replace('/^'.preg_quote($media_root,'/').'/','',$v);
@@ -456,5 +452,5 @@
 		'<fieldset><legend>'.__('Update thumbnails').'</legend>'.
 		'<p>'.__('This will create or update thumbnails for this image.').'</p>'.
-		'<p><input type="submit" name="thumbs" value="'.__('Update thumbnails').'" />'.
+		'<p><input type="submit" name="thumbs" value="'.__('update thumbnails').'" />'.
 		form::hidden(array('id'),$id).
 		$core->formNonce().'</p>'.
@@ -480,5 +476,5 @@
 		'<p><label for="inflate_mode" class="classic">'.__('Extract mode:').' '.
 		form::combo('inflate_mode',$inflate_combo,'new').'</label> '.
-		'<input type="submit" name="unzip" value="'.__('Extract').'" />'.
+		'<input type="submit" name="unzip" value="'.__('extract').'" />'.
 		form::hidden(array('id'),$id).
 		$core->formNonce().'</p>'.
@@ -512,5 +508,5 @@
 	'<input type="file" id="upfile" name="upfile" size="35" />'.
 	'</label></p>'.
-	'<p><input type="submit" value="'.__('Send').'" />'.
+	'<p><input type="submit" value="'.__('send').'" />'.
 	form::hidden(array('id'),$id).
 	$core->formNonce().'</p>'.
Index: admin/permissions.php
===================================================================
--- admin/permissions.php	(revision 536)
+++ admin/permissions.php	(revision 217)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -98,5 +98,5 @@
 );
 
-echo '<h2><a href="users.php">'.__('Users').'</a> &rsaquo; <span class="page-title">'.__('Permissions').'</span></h2>';
+echo '<h2><a href="users.php">'.__('Users').'</a> &rsaquo; '.__('Permissions').'</h2>';
 
 if (!empty($_GET['upd'])) {
@@ -143,7 +143,7 @@
 	
 	echo
-	'<fieldset><legend>'.__('Validate permissions').'</legend>'.
+	'<fieldset>'.
 	'<p><label for="your_pwd">'.__('Your password:').
-	form::password('your_pwd',20,255).'</label></p>'.
+	form::password('your_pwd',20,255,'','',15).'</label></p>'.
 	'</fieldset>'.
 	'<p><input type="submit" accesskey="s" value="'.__('Save').'" />'.
Index: admin/permissions_blog.php
===================================================================
--- admin/permissions_blog.php	(revision 557)
+++ admin/permissions_blog.php	(revision 520)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -15,19 +15,5 @@
 dcPage::checkSuper();
 
-# Filters
-$sortby_combo = array(
-__('Blog ID') => 'B.blog_id',
-__('Blog name') => 'blog_name'
-);
-
-$order_combo = array(
-__('Descending') => 'desc',
-__('Ascending') => 'asc'
-);
-
 $q = !empty($_GET['q']) ? $_GET['q'] : '';
-$sortby = !empty($_GET['sortby']) ? $_GET['sortby'] : 'blog_id';
-$order = !empty($_GET['order']) ? $_GET['order'] : 'asc';
-
 
 # Check users
@@ -48,10 +34,10 @@
 else
 {
-	$page = !empty($_GET['page']) ? $_GET['page'] : 1;
-	$nb_per_page =  30;
+	$blogs_list = new adminBlogPermissionsList($core);
 	
-	if (!empty($_GET['nb']) && (integer) $_GET['nb'] > 0) {
-		$nb_per_page = $_GET['nb'];
-	}
+	$params = new ArrayObject();
+	
+	# - Limit, sortby and order filter
+	$params = $blogs_list->applyFilters($params);
 	
 	$show_filters = false;
@@ -63,18 +49,8 @@
 	}
 	
-	# - Sortby and order filter
-	if ($sortby !== '' && in_array($sortby,$sortby_combo)) {
-		if ($order !== '' && in_array($order,$order_combo)) {
-			$params['order'] = $sortby.' '.$order;
-			$show_filters = true;
-		}
-	}
-	
-	$params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page);
-	
 	try {
 		$rs = $core->getBlogs($params);
 		$counter = $core->getBlogs($params,1);
-		$nb_blog = $counter->f(0);
+		$blogs_list->setItems($rs,$counter->f(0));
 	} catch (Exception $e) {
 		$core->error->add($e->getMessage());
@@ -90,5 +66,5 @@
 dcPage::open(__('choose a blog'),$starting_script);
 
-echo '<h2><a href="users.php">'.__('Users').'</a> &rsaquo; <span class="page-title">'.__('Choose a blog').'</span></h2>';
+echo '<h2><a href="users.php">'.__('Users').'</a> &rsaquo; '.__('Choose a blog').'</h2>';
 
 if (!$core->error->flag())
@@ -107,22 +83,9 @@
 	'<fieldset class="two-cols"><legend>'.__('Filters').'</legend>'.
 	
-	'<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="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).' '.
-	__('Entries per page').'</label> '.
-	'<input type="submit" value="'.__('Apply filters').'" />'.
+	'<p><input type="submit" value="'.__('Apply filters').'" />'.
 	$hidden_fields.'</p>'.
-	'</div>'.
 	
 	'<br class="clear" />'. //Opera sucks
@@ -136,61 +99,15 @@
 	
 	# Show blogs
-	if ($nb_blog == 0)
-	{
-		echo '<p><strong>'.__('No blog').'</strong></p>';
-	}
-	else
-	{
-		$pager = new pager($page,$nb_blog,$nb_per_page,10);
-		$pager->var_page = 'page';
-		
-		echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
-		
-		echo
-		'<form action="permissions.php" method="post" id="form-blogs">'.
-		'<table class="clear"><tr>'.
-		'<th colspan="2">'.__('Blog ID').'</th>'.
-		'<th>'.__('Blog name').'</th>'.
-		'<th class="nowrap">'.__('Entries').'</th>'.
-		'<th class="nowrap">'.__('Status').'</th>'.
-		'</tr>';
-		
-		while ($rs->fetch()) {
-			echo blogLine($rs);
-		}
-		
-		echo
-		'</table>'.
-		
+	$blogs_list->display('<form action="permissions.php" method="post" id="form-blogs">'.
+		'%s'.
 		'<p class="checkboxes-helpers"></p>'.
-		
-		'<p><input type="submit" value="'.__('Set permissions').'" />'.
+		'<p><input type="submit" value="'.__('set permissions').'" />'.
 		$hidden_fields.
 		$core->formNonce().'</p>'.
-		'</form>';
-		
-		echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
-	}
+		'</form>'
+	);
 }
 
 dcPage::close();
 
-function blogLine($rs)
-{
-	global $core;
-	
-	$img_status = $rs->blog_status == 1 ? 'check-on' : 'check-off';
-	$txt_status = $GLOBALS['core']->getBlogStatus($rs->blog_status);
-	$img_status = sprintf('<img src="images/%1$s.png" alt="%2$s" title="%2$s" />',$img_status,$txt_status);
-	
-	return
-	'<tr class="line">'.
-	'<td class="nowrap">'.
-	form::checkbox(array('blog_id[]'),$rs->blog_id,'','','',false,'title="'.__('select').' '.$rs->blog_id.'"').'</td>'.
-	'<td class="nowrap">'.$rs->blog_id.'</td>'.
-	'<td class="maximal">'.html::escapeHTML($rs->blog_name).'</td>'.
-	'<td class="nowrap">'.$core->countBlogPosts($rs->blog_id).'</td>'.
-	'<td class="status">'.$img_status.'</td>'.
-	'</tr>';
-}
 ?>
Index: admin/plugin.php
===================================================================
--- admin/plugin.php	(revision 500)
+++ admin/plugin.php	(revision 0)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -83,5 +83,5 @@
 	call_user_func($open_f,__('Plugin not found'));
 	
-	echo '<h2 class="page-title">'.__('Plugin not found').'</h2>';
+	echo '<h2>'.__('Plugin not found').'</h2>';
 	
 	echo '<p>'.__('The plugin you reached does not exist or does not have an admin page.').'</p>';
Index: admin/plugins.php
===================================================================
--- admin/plugins.php	(revision 500)
+++ admin/plugins.php	(revision 456)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -173,5 +173,5 @@
 
 echo
-'<h2 class="page-title">'.__('Plugins management').'</h2>';
+'<h2>'.__('Plugins management').'</h2>';
 
 if (!empty($_GET['removed'])) {
@@ -227,10 +227,13 @@
 	echo
 	'<h3>'.__('Activated plugins').'</h3>'.
-	'<table class="clear plugins"><tr>'.
-	'<th>'.__('Plugin').'</th>'.
-	'<th class="nowrap">'.__('Version').'</th>'.
-	'<th class="nowrap">'.__('Details').'</th>'.
-	'<th class="nowrap">'.__('Action').'</th>'.
-	'</tr>';
+	'<table class="clear plugins">'.
+	'<caption>'.__('Activated plugin list').'</caption>'.
+	'<thead><tr>'.
+	'<th scope="col">'.__('Plugin').'</th>'.
+	'<th scope="col" class="nowrap">'.__('Version').'</th>'.
+	'<th scope="col" class="nowrap">'.__('Details').'</th>'.
+	'<th scope="col" class="nowrap">'.__('Action').'</th>'.
+	'</tr></thead>'.
+	'<tbody>';
 	
 	foreach ($p_available as $k => $v)
@@ -241,5 +244,5 @@
 		echo
 		'<tr class="line wide">'.
-		'<td class="minimal nowrap"><strong>'.html::escapeHTML($k).'</strong></td>'.
+		'<th scope="row" class="minimal nowrap"><strong>'.html::escapeHTML($k).'</strong></th>'.
 		'<td class="minimal">'.html::escapeHTML($v['version']).'</td>'.
 		'<td class="maximal"><strong>'.html::escapeHTML($v['name']).'</strong> '.
@@ -265,4 +268,5 @@
 	}
 	echo
+	'</tbody>'.
 	'</table>';
 }
@@ -274,8 +278,11 @@
 	echo
 	'<h3>'.__('Deactivated plugins').'</h3>'.
-	'<table class="clear plugins"><tr>'.
-	'<th>'.__('Plugin').'</th>'.
-	'<th class="nowrap">'.__('Action').'</th>'.
-	'</tr>';
+	'<table class="clear plugins">'.
+	'<caption>'.__('Deactivated plugin list').'</caption>'.
+	'<thead><tr>'.
+	'<th scope="col">'.__('Plugin').'</th>'.
+	'<th scope="col" class="nowrap">'.__('Action').'</th>'.
+	'</tr></thead>'.
+	'<tbody>';
 	
 	foreach ($p_disabled as $k => $v)
@@ -286,5 +293,5 @@
 		echo
 		'<tr class="line wide">'.
-		'<td class="maximal nowrap"><strong>'.html::escapeHTML($k).'</strong></td>'.
+		'<th scope="row" class="maximal nowrap"><strong>'.html::escapeHTML($k).'</strong></th>'.
 		'<td class="nowrap action">';
 		
@@ -308,4 +315,5 @@
 	}
 	echo
+	'</tbody>'.
 	'</table>';
 }
Index: admin/popup_link.php
===================================================================
--- admin/popup_link.php	(revision 730)
+++ admin/popup_link.php	(revision 68)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -21,5 +21,5 @@
 dcPage::openPopup(__('Add a link'),dcPage::jsLoad('js/jsToolBar/popup_link.js'));
 
-echo '<h2 class="page-title">'.__('Add a link').'</h2>';
+echo '<h2>'.__('Add a link').'</h2>';
 
 # Languages combo
@@ -50,6 +50,6 @@
 '</form>'.
 
-'<p><a class="button reset" href="#" id="link-insert-cancel">'.__('Cancel').'</a> - '.
-'<strong><a class="button" href="#" id="link-insert-ok">'.__('Insert').'</a></strong></p>'."\n".
+'<p><a class="button reset" href="#" id="link-insert-cancel">'.__('cancel').'</a> - '.
+'<strong><a class="button" href="#" id="link-insert-ok">'.__('insert').'</a></strong></p>'."\n".
 
 '<script type="text/javascript">'."\n".
Index: admin/popup_posts.php
===================================================================
--- admin/popup_posts.php	(revision 557)
+++ admin/popup_posts.php	(revision 520)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -17,11 +17,11 @@
 $q = !empty($_GET['q']) ? $_GET['q'] : null;
 
-$page = !empty($_GET['page']) ? (integer) $_GET['page'] : 1;
-$nb_per_page =  10;
+$post_list = new adminPostMiniList($core);
 
 $params = array();
-$params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page);
 $params['no_content'] = true;
-$params['order'] = 'post_dt DESC';
+
+# - Limit, sortby and order filter
+$params = $post_list->applyFilters($params);
 
 if ($q) {
@@ -33,9 +33,9 @@
 	dcPage::jsLoad('js/jsToolBar/popup_posts.js'));
 
-echo '<h2 class="page-title">'.__('Add a link to an entry').'</h2>';
+echo '<h2>'.__('Add a link to an entry').'</h2>';
 
 echo '<form action="popup_posts.php" method="get">'.
 '<p><label for="q" class="classic">'.__('Search entry:').' '.form::field('q',30,255,html::escapeHTML($q)).'</label> '.
-' <input type="submit" value="'.__('Search').'" /></p>'.
+' <input type="submit" value="'.__('ok').'" /></p>'.
 '</form>';
 
@@ -43,5 +43,5 @@
 	$posts = $core->blog->getPosts($params);
 	$counter = $core->blog->getPosts($params,true);
-	$post_list = new adminPostMiniList($core,$posts,$counter->f(0));
+	$post_list->setItems($posts,$counter->f(0));
 } catch (Exception $e) {
 	$core->error->add($e->getMessage());
@@ -49,5 +49,5 @@
 
 echo '<div id="form-entries">'; # I know it's not a form but we just need the ID
-$post_list->display($page,$nb_per_page);
+$post_list->display();
 echo '</div>';
 
Index: admin/post.php
===================================================================
--- admin/post.php	(revision 747)
+++ admin/post.php	(revision 456)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -33,4 +33,6 @@
 $post_open_tb = $core->blog->settings->system->allow_trackbacks;
 
+$post_media = array();
+
 $page_title = __('New entry');
 
@@ -144,4 +146,5 @@
 		try {
 			$core->media = new dcMedia($core);
+			$post_media = $core->media->getPostMedia($post_id);
 		} catch (Exception $e) {}
 	}
@@ -314,5 +317,4 @@
 	$post_excerpt = $post_excerpt_xhtml;
 	$post_content = $post_content_xhtml;
-	$post_title = $post_title_xhtml;
 	$post_format = 'xhtml';
 	
@@ -320,14 +322,19 @@
 }
 
-echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.'<a href="posts.php">'.__('Entries').'</a> &rsaquo; <span class="page-title">'.$page_title;
-
-	if ($post_id) {
-		echo ' &ldquo;'.$post_title.'&rdquo;';
-	}
-echo	'</span></h2>';
+echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.'<a href="posts.php">'.__('Entries').'</a> &rsaquo; '.$page_title;
 
 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>';
-}
+	echo ' - <a id="post-preview" href="'.$post->getURL().'" class="button">'.__('View entry').'</a>';
+} elseif ($post_id) {
+	$preview_url =
+	$core->blog->url.$core->url->getBase('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">'.__('Preview entry').'</a>';
+}
+
+echo '</h2>';
+
 if ($post_id)
 {
@@ -356,88 +363,43 @@
 	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->getBase('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">'.__('Preview').'</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').
+	form::combo('cat_id',$categories_combo,$cat_id,'maximal',3).
 	'</label></p>'.
 	
 	'<p><label for="post_status">'.__('Entry status:').
-	form::combo('post_status',$status_combo,$post_status,'','',!$can_publish).
+	form::combo('post_status',$status_combo,$post_status,'',3,!$can_publish).
 	'</label></p>'.
 	
 	'<p><label for="post_dt">'.__('Published on:').
-	form::field('post_dt',16,16,$post_dt).
+	form::field('post_dt',16,16,$post_dt,'',3).
 	'</label></p>'.
 	
 	'<p><label for="post_format">'.__('Text formating:').
-	form::combo('post_format',$formaters_combo,$post_format).
+	form::combo('post_format',$formaters_combo,$post_format,'',3).
 	'</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).' '.
+	'<p><label for="post_open_comment" class="classic">'.form::checkbox('post_open_comment',1,$post_open_comment,'',3).' '.
 	__('Accept comments').'</label></p>'.
-	'<p><label for="post_open_tb" class="classic">'.form::checkbox('post_open_tb',1,$post_open_tb).' '.
+	'<p><label for="post_open_tb" class="classic">'.form::checkbox('post_open_tb',1,$post_open_tb,'',3).' '.
 	__('Accept trackbacks').'</label></p>'.
-	'<p><label for="post_selected" class="classic">'.form::checkbox('post_selected',1,$post_selected).' '.
+	'<p><label for="post_selected" class="classic">'.form::checkbox('post_selected',1,$post_selected,'',3).' '.
 	__('Selected entry').'</label></p>'.
 	
 	'<p><label for="post_lang">'.__('Entry lang:').
-	form::combo('post_lang',$lang_combo,$post_lang).
+	form::combo('post_lang',$lang_combo,$post_lang,'',5).
 	'</label></p>'.
 	
 	'<p><label for="post_password">'.__('Entry password:').
-	form::field('post_password',10,32,html::escapeHTML($post_password),'maximal').
+	form::field('post_password',10,32,html::escapeHTML($post_password),'maximal',3).
 	'</label></p>'.
 	
 	'<div class="lockable">'.
 	'<p><label for="post_url">'.__('Basename:').
-	form::field('post_url',10,255,html::escapeHTML($post_url),'maximal').
+	form::field('post_url',10,255,html::escapeHTML($post_url),'maximal',3).
 	'</label></p>'.
 	'<p class="form-note warn">'.
@@ -446,14 +408,80 @@
 	'</div>';
 	
+	if ($post_id)
+	{
+		echo
+		'<h3 class="clear">'.__('Attachments').'</h3>';
+		foreach ($post_media as $f)
+		{
+			$ftitle = $f->media_title;
+			if (strlen($ftitle) > 18) {
+				$ftitle = substr($ftitle,0,16).'...';
+			}
+			echo
+			'<div class="media-item">'.
+			'<a class="media-icon" href="media_item.php?id='.$f->media_id.'">'.
+			'<img src="'.$f->media_icon.'" alt="" title="'.$f->basename.'" /></a>'.
+			'<ul>'.
+			'<li><a class="media-link" href="media_item.php?id='.$f->media_id.'"'.
+			'title="'.$f->basename.'">'.$ftitle.'</a></li>'.
+			'<li>'.$f->media_dtstr.'</li>'.
+			'<li>'.files::size($f->size).' - '.
+			'<a href="'.$f->file_url.'">'.__('open').'</a>'.'</li>'.
+			
+			'<li class="media-action"><a class="attachment-remove" id="attachment-'.$f->media_id.'" '.
+			'href="post_media.php?post_id='.$post_id.'&amp;media_id='.$f->media_id.'&amp;remove=1">'.
+			'<img src="images/check-off.png" alt="'.__('remove').'" /></a>'.
+			'</li>'.
+			
+			'</ul>'.
+			'</div>';
+		}
+		unset($f);
+		
+		if (empty($post_media)) {
+			echo '<p>'.__('No attachment.').'</p>';
+		}
+		echo '<p><a class="button" href="media.php?post_id='.$post_id.'">'.__('Add files to this entry').'</a></p>';
+	}
+	
 	# --BEHAVIOR-- adminPostFormSidebar
 	$core->callBehavior('adminPostFormSidebar',isset($post) ? $post : null);
 	
 	echo '</div>';		// End #entry-sidebar
-
+	
+	echo '<div id="entry-content"><fieldset 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',2).
+	'</label></p>'.
+	
+	'<p class="area" id="excerpt-area"><label for="post_excerpt">'.__('Excerpt:').'</label> '.
+	form::textarea('post_excerpt',50,5,html::escapeHTML($post_excerpt),'',2).
+	'</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),'',2).
+	'</p>'.
+	
+	'<p class="area" id="notes-area"><label for="post_notes">'.__('Notes:').'</label>'.
+	form::textarea('post_notes',50,5,html::escapeHTML($post_notes),'',2).
+	'</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)" tabindex="4" '.
+	'accesskey="s" name="save" /> '.
+	($can_delete ? '<input type="submit" class="delete" value="'.__('Delete').'" name="delete" />' : '').
+	$core->formNonce().
+	'</p>';
+	
+	echo '</fieldset></div>';		// End #entry-content
 	echo '</form>';
-	
-	# --BEHAVIOR-- adminPostForm
-	$core->callBehavior('adminPostAfterForm',isset($post) ? $post : null);
-	
 	echo '</div>';
 	
@@ -463,4 +491,13 @@
 	}
 	
+	if ($post_id && !empty($post_media))
+	{
+		echo
+		'<form action="post_media.php" id="attachment-remove-hide" method="post">'.
+		'<div>'.form::hidden(array('post_id'),$post_id).
+		form::hidden(array('media_id'),'').
+		form::hidden(array('remove'),1).
+		$core->formNonce().'</div></form>';
+	}
 }
 
@@ -487,9 +524,6 @@
 	if ($can_edit_post && $core->auth->check('delete,contentadmin',$core->blog->id))
 	{
-		$combo_action[__('Delete')] = 'delete';
-	}
-	
-	# --BEHAVIOR-- adminCommentsActionsCombo
-	$core->callBehavior('adminCommentsActionsCombo',array(&$combo_action));
+		$combo_action[__('delete')] = 'delete';
+	}
 	
 	$has_action = !empty($combo_action) && (!$trackbacks->isEmpty() || !$comments->isEmpty());
@@ -543,5 +577,5 @@
 	
 	'<form action="comment.php" method="post" id="comment-form">'.
-	'<div class="constrained">'.
+	'<fieldset 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'))).
@@ -564,5 +598,5 @@
 	$core->formNonce().
 	'<input type="submit" name="add" value="'.__('Save').'" /></p>'.
-	'</div>'.
+	'</fieldset>'.
 	'</form>'.
 	'</div>';
@@ -574,11 +608,14 @@
 {
 	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>';
+	'<table class="comments-list">'.
+	'<caption>'.__('Post comments and trackbacks').'</caption>'.
+	'<thead><tr>'.
+	'<th scope="col" colspan="2">'.__('Author').'</th>'.
+	'<th scope="col">'.__('Date').'</th>'.
+	'<th scope="col" class="nowrap">'.__('IP address').'</th>'.
+	'<th scope="col">'.__('Status').'</th>'.
+	'<th scope="col">&nbsp;</th>'.
+	'</tr></thead>'.
+	'<tbody>';
 	
 	while($rs->fetch())
@@ -608,5 +645,5 @@
 		'<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>'.
+		'<th scope="row" class="maximal">'.html::escapeHTML($rs->comment_author).'</th>'.
 		'<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>'.
@@ -618,5 +655,7 @@
 	}
 	
-	echo '</table>';
+	echo
+	'</tbody>'.
+	'</table>';
 }
 
Index: admin/post_media.php
===================================================================
--- admin/post_media.php	(revision 557)
+++ admin/post_media.php	(revision 70)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -61,11 +61,11 @@
 		dcPage::open(__('Remove attachment'));
 		
-		echo '<h2>'.__('Attachment').' &rsaquo; <span class="page-title">'.__('confirm removal').'</span></h2>';
+		echo '<h2>'.__('Attachment').' &rsaquo; '.__('confirm removal').'</h2>';
 		
 		echo
 		'<form action="post_media.php" method="post">'.
 		'<p>'.__('Are you sure you want to remove this attachment?').'</p>'.
-		'<p><input type="submit" class="reset" value="'.__('Cancel').'" /> '.
-		' &nbsp; <input type="submit" class="delete" name="remove" value="'.__('Yes').'" />'.
+		'<p><input type="submit" class="reset" value="'.__('cancel').'" /> '.
+		' &nbsp; <input type="submit" class="delete" name="remove" value="'.__('yes').'" />'.
 		form::hidden('post_id',$post_id).
 		form::hidden('media_id',$media_id).
Index: admin/posts.php
===================================================================
--- admin/posts.php	(revision 500)
+++ admin/posts.php	(revision 755)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -48,5 +48,4 @@
 	# Filter form we'll put in html_block
 	$users_combo = $categories_combo = array();
-	$users_combo['-'] = $categories_combo['-'] = '';
 	while ($users->fetch())
 	{
@@ -63,5 +62,5 @@
 	$categories_combo[__('None')] = 'NULL';
 	while ($categories->fetch()) {
-		$categories_combo[str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').
+		$categories_combo[str_repeat('&nbsp;&nbsp;',$categories->level-1).'&bull; '.
 			html::escapeHTML($categories->cat_title).
 			' ('.$categories->nb_post.')'] = $categories->cat_id;
@@ -69,5 +68,4 @@
 	
 	$status_combo = array(
-	'-' => ''
 	);
 	foreach ($core->blog->getAllPostStatus() as $k => $v) {
@@ -76,33 +74,16 @@
 	
 	$selected_combo = array(
-	'-' => '',
-	__('selected') => '1',
-	__('not selected') => '0'
+	__('is selected') => '1',
+	__('is not selected') => '0'
 	);
 	
 	# Months array
-	$dt_m_combo['-'] = '';
 	while ($dates->fetch()) {
 		$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;
 	}
-	
-	$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'
-	);
 }
 
@@ -138,91 +119,63 @@
 /* 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);
+$post_list = new adminPostList($core);
+
+$params = new ArrayObject();
 $params['no_content'] = true;
 
-# - User filter
-if ($user_id !== '' && in_array($user_id,$users_combo)) {
-	$params['user_id'] = $user_id;
-	$show_filters = true;
-}
-
-# - Categories filter
-if ($cat_id !== '' && in_array($cat_id,$categories_combo)) {
-	$params['cat_id'] = $cat_id;
-	$show_filters = true;
-}
-
-# - Status filter
-if ($status !== '' && in_array($status,$status_combo)) {
-	$params['post_status'] = $status;
-	$show_filters = true;
-}
-
-# - Selected filter
-if ($selected !== '' && in_array($selected,$selected_combo)) {
-	$params['post_selected'] = $selected;
-	$show_filters = true;
-}
-
-# - 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;
-}
-
-# - Lang filter
-if ($lang !== '' && in_array($lang,$lang_combo)) {
-	$params['post_lang'] = $lang;
-	$show_filters = true;
-}
-
-# - Sortby and order filter
-if ($sortby !== '' && in_array($sortby,$sortby_combo)) {
-	if ($order !== '' && in_array($order,$order_combo)) {
-		$params['order'] = $sortby.' '.$order;
-	}
-	
-	if ($sortby != 'post_dt' || $order != 'desc') {
-		$show_filters = true;
-	}
-}
+# - Limit, sortby and order filter
+$params = $post_list->applyFilters($params);
+
+$filterSet = new dcFilterSet('posts','posts.php');
+class monthComboFilter extends comboFilter {
+	public function applyFilter($params) {
+		$month=$this->values[0];
+		$params['post_month'] = substr($month,4,2);
+		$params['post_year'] = substr($month,0,4);
+	}
+}
+$filterSet
+	->addFilter(new comboFilter(
+		'users',__('Author'), __('Author'), 'user_id', $users_combo))
+	->addFilter(new comboFilter(
+		'category',__('Category'), __('Category'), 'cat_id', $categories_combo))
+	->addFilter(new comboFilter(
+		'post_status',__('Status'), __('Status'), 'post_status', $status_combo))
+	->addFilter(new booleanFilter(
+		'post_selected',__('Selected'), __('The post : '),'post_selected', $selected_combo))
+	->addFilter(new comboFilter(
+		'lang',__('Lang'), __('Lang'), 'post_lang', $lang_combo))
+	->addFilter(new monthComboFilter(
+		'month',__('Month'),__('Month'), 'post_month', $dt_m_combo,array('singleval' => 1)));
+
+$core->callBehavior('adminPostsFilters',$filterSet);
+
+$filterSet->setup($_GET,$_POST);
 
 # Get posts
 try {
+	$nfparams = $params->getArrayCopy();
+	$filtered = $filterSet->applyFilters($params);
+	$core->callBehavior('adminPostsParams',$params);
 	$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());
-}
+	if ($filtered) {
+		$totalcounter = $core->blog->getPosts($nfparams,true);
+		$page_title = sprintf(__('Entries / %s filtered out of %s'),$counter->f(0),$totalcounter->f(0));
+	} else {
+		$page_title = __('Entries');
+	}
+	$post_list->setItems($posts,$counter->f(0));
+} catch (Exception $e) {
+	$core->error->add($e->getMessage());
+}
+
+$filterSet->setExtraData($post_list->getColumnsForm());
 
 /* DISPLAY
 -------------------------------------------------------- */
 $starting_script = dcPage::jsLoad('js/_posts_list.js');
-if (!$show_filters) {
-	$starting_script .= dcPage::jsLoad('js/filter-controls.js');
-}
+
+$starting_script .= $filterSet->header();
 
 dcPage::open(__('Entries'),$starting_script);
@@ -231,51 +184,11 @@
 {
 	echo 
-	'<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.__('Entries').'</span></h2>'.
+	'<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.$page_title.'</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>';
-	
+
+	$filterSet->display();
+
 	# Show posts
-	$post_list->display($page,$nb_per_page,
-	'<form action="posts_actions.php" method="post" id="form-entries">'.
+	$post_list->display('<form action="posts_actions.php" method="post" id="form-entries">'.
 	
 	'%s'.
@@ -284,17 +197,9 @@
 	'<p class="col checkboxes-helpers"></p>'.
 	
-	'<p class="col right"><label for="action" class="classic">'.__('Selected entries action:').'</label> '.
+	'<p class="col right"><span class="filter-title">'.__('Selected entries action:').'</span> '.
 	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).
+	$filterSet->getFormFieldsAsHidden().
+	$post_list->getFormFieldsAsHidden().
 	$core->formNonce().
 	'</div>'.
Index: admin/posts_actions.php
===================================================================
--- admin/posts_actions.php	(revision 500)
+++ admin/posts_actions.php	(revision 217)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -207,5 +207,5 @@
 if ($action == 'category')
 {
-	echo '<h2 class="page-title">'.__('Change category for entries').'</h2>';
+	echo '<h2>'.__('Change category for entries').'</h2>';
 	
 	# categories list
@@ -216,6 +216,5 @@
 		while ($categories->fetch()) {
 			$categories_combo[] = new formSelectOption(
-				str_repeat('&nbsp;&nbsp;',$categories->level-1).
-				($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title),
+				str_repeat('&nbsp;&nbsp;',$categories->level-1).'&bull; '.html::escapeHTML($categories->cat_title),
 				$categories->cat_id
 			);
@@ -238,5 +237,5 @@
 elseif ($action == 'author' && $core->auth->check('admin',$core->blog->id))
 {
-	echo '<h2 class="page-title">'.__('Change author for entries').'</h2>';
+	echo '<h2>'.__('Change author for entries').'</h2>';
 	
 	echo
Index: admin/preferences.php
===================================================================
--- admin/preferences.php	(revision 745)
+++ admin/preferences.php	(revision 190)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -34,24 +34,13 @@
 
 $core->auth->user_prefs->addWorkspace('accessibility');
-$user_acc_nodragdrop = $core->auth->user_prefs->accessibility->nodragdrop;
-
-$core->auth->user_prefs->addWorkspace('interface');
-$user_ui_enhanceduploader = $core->auth->user_prefs->interface->enhanceduploader;
-if ($core->auth->isSuperAdmin()) {
-	$user_ui_hide_std_favicon = $core->auth->user_prefs->interface->hide_std_favicon;
-}
-$user_ui_iconset = @$core->auth->user_prefs->interface->iconset;
-
-$default_tab = !empty($_GET['tab']) ? html::escapeHTML($_GET['tab']) : 'user-profile';
-
-if (!empty($_GET['append']) || !empty($_GET['removed']) || !empty($_GET['neworder']) || 
-	!empty($_GET['replaced']) || !empty($_POST['appendaction']) || !empty($_POST['removeaction'])) {
+$user_dm_nodragdrop = $core->auth->user_prefs->accessibility->nodragdrop;
+
+$default_tab = 'user-profile';
+
+if (!empty($_GET['append']) || !empty($_GET['removed']) || !empty($_GET['neworder']) || !empty($_GET['replaced'])) {
 	$default_tab = 'user-favorites';
 } elseif (!empty($_GET['updated'])) {
 	$default_tab = 'user-options';
 }
-if (($default_tab != 'user-profile') && ($default_tab != 'user-options') && ($default_tab != 'user-favorites')) {
-	$default_tab = 'user-profile';
-}
 
 foreach ($core->getFormaters() as $v) {
@@ -61,16 +50,4 @@
 foreach ($core->blog->getAllPostStatus() as $k => $v) {
 	$status_combo[$v] = $k;
-}
-
-$iconsets_combo = array(__('Default') => '');
-$iconsets_root = dirname(__FILE__).'/images/iconset/';
-if (is_dir($iconsets_root) && is_readable($iconsets_root)) {
-	if (($d = @dir($iconsets_root)) !== false) {
-		while (($entry = $d->read()) !== false) {
-			if ($entry != '.' && $entry != '..' && is_dir($iconsets_root.'/'.$entry)) {
-				$iconsets_combo[$entry] = $entry;
-			}
-		}
-	}
 }
 
@@ -136,6 +113,5 @@
 
 # Update user options
-if (isset($_POST['user_post_format'])) 
-{
+if (isset($_POST['user_post_format'])) {
 	try
 	{
@@ -168,11 +144,5 @@
 		$core->auth->user_prefs->dashboard->put('dcnews',!empty($_POST['user_dm_dcnews']),'boolean');
 		$core->auth->user_prefs->dashboard->put('quickentry',!empty($_POST['user_dm_quickentry']),'boolean');
-		$core->auth->user_prefs->accessibility->put('nodragdrop',!empty($_POST['user_acc_nodragdrop']),'boolean');
-		$core->auth->user_prefs->interface->put('enhanceduploader',!empty($_POST['user_ui_enhanceduploader']),'boolean');
-		if ($core->auth->isSuperAdmin()) {
-			# Applied to all users
-			$core->auth->user_prefs->interface->put('hide_std_favicon',!empty($_POST['user_ui_hide_std_favicon']),'boolean',null,true,true);
-		}
-		$core->auth->user_prefs->interface->put('iconset',(!empty($_POST['user_ui_iconset']) ? $_POST['user_ui_iconset'] : ''));
+		$core->auth->user_prefs->accessibility->put('nodragdrop',!empty($_POST['user_dm_nodragdrop']),'boolean');
 		
 		# Udate user
@@ -191,75 +161,23 @@
 
 # Add selected favorites
-if (!empty($_POST['appendaction'])) 
-{
-	try {
-		if (empty($_POST['append'])) {
-			throw new Exception(__('No favorite selected'));
-		}
-
-		$ws = $core->auth->user_prefs->addWorkspace('favorites');
-		$user_favs = $ws->DumpLocalPrefs();
-		$count = count($user_favs);
-		foreach ($_POST['append'] as $k => $v)
-		{
-			try {
-				$found = false;
-				foreach ($user_favs as $f) {
-					$f = unserialize($f['value']);
-					if ($f['name'] == $v) {
-						$found = true;
-						break;
-					}
+if (!empty($_POST['appendaction']) && !empty($_POST['append'])) {
+	$ws = $core->auth->user_prefs->addWorkspace('favorites');
+	$user_favs = $ws->DumpLocalPrefs();
+	$count = count($user_favs);
+	foreach ($_POST['append'] as $k => $v)
+	{
+		try {
+			$found = false;
+			foreach ($user_favs as $f) {
+				$f = unserialize($f['value']);
+				if ($f['name'] == $v) {
+					$found = true;
+					break;
 				}
-				if (!$found) {
-					$uid = sprintf("u%03s",$count);
-					$fav = array('name' => $_fav[$v][0],'title' => $_fav[$v][1],'url' => $_fav[$v][2],'small-icon' => $_fav[$v][3],
-						'large-icon' => $_fav[$v][4],'permissions' => $_fav[$v][5],'id' => $_fav[$v][6],'class' => $_fav[$v][7]);
-					$core->auth->user_prefs->favorites->put($uid,serialize($fav),'string');
-					$count++;
-				}
-			} catch (Exception $e) {
-				$core->error->add($e->getMessage());
-				break;
 			}
-		}
-	
-		if (!$core->error->flag()) {
-			http::redirect('preferences.php?append=1');
-		}
-	} catch (Exception $e) {
-		$core->error->add($e->getMessage());
-	}
-}
-
-# Delete selected favorites
-if (!empty($_POST['removeaction']))
-{
-	try {
-		if (empty($_POST['remove'])) {
-			throw new Exception(__('No favorite selected'));
-		}
-		
-		$ws = $core->auth->user_prefs->addWorkspace('favorites');
-		foreach ($_POST['remove'] as $k => $v)
-		{
-			try {
-				$core->auth->user_prefs->favorites->drop($v);
-			} catch (Exception $e) {
-				$core->error->add($e->getMessage());
-				break;
-			}
-		}
-		// Update pref_id values
-		try {
-			$user_favs = $ws->DumpLocalPrefs();
-			$core->auth->user_prefs->favorites->dropAll();
-			$count = 0;
-			foreach ($user_favs as $k => $v)
-			{
+			if (!$found) {
 				$uid = sprintf("u%03s",$count);
-				$f = unserialize($v['value']);
-				$fav = array('name' => $f['name'],'title' => $f['title'],'url' => $f['url'],'small-icon' => $f['small-icon'],
-					'large-icon' => $f['large-icon'],'permissions' => $f['permissions'],'id' => $f['id'],'class' => $f['class']);
+				$fav = array('name' => $_fav[$v][0],'title' => $_fav[$v][1],'url' => $_fav[$v][2],'small-icon' => $_fav[$v][3],
+					'large-icon' => $_fav[$v][4],'permissions' => $_fav[$v][5],'id' => $_fav[$v][6],'class' => $_fav[$v][7]);
 				$core->auth->user_prefs->favorites->put($uid,serialize($fav),'string');
 				$count++;
@@ -267,11 +185,45 @@
 		} catch (Exception $e) {
 			$core->error->add($e->getMessage());
-		}
+			break;
+		}
+	}
 	
-		if (!$core->error->flag()) {
-			http::redirect('preferences.php?removed=1');
+	if (!$core->error->flag()) {
+		http::redirect('preferences.php?append=1');
+	}
+}
+
+# Delete selected favorites
+if (!empty($_POST['removeaction']) && !empty($_POST['remove'])) {
+	$ws = $core->auth->user_prefs->addWorkspace('favorites');
+	foreach ($_POST['remove'] as $k => $v)
+	{
+		try {
+			$core->auth->user_prefs->favorites->drop($v);
+		} catch (Exception $e) {
+			$core->error->add($e->getMessage());
+			break;
+		}
+	}
+	// Update pref_id values
+	try {
+		$user_favs = $ws->DumpLocalPrefs();
+		$core->auth->user_prefs->favorites->dropAll();
+		$count = 0;
+		foreach ($user_favs as $k => $v)
+		{
+			$uid = sprintf("u%03s",$count);
+			$f = unserialize($v['value']);
+			$fav = array('name' => $f['name'],'title' => $f['title'],'url' => $f['url'],'small-icon' => $f['small-icon'],
+				'large-icon' => $f['large-icon'],'permissions' => $f['permissions'],'id' => $f['id'],'class' => $f['class']);
+			$core->auth->user_prefs->favorites->put($uid,serialize($fav),'string');
+			$count++;
 		}
 	} catch (Exception $e) {
 		$core->error->add($e->getMessage());
+	}
+	
+	if (!$core->error->flag()) {
+		http::redirect('preferences.php?removed=1');
 	}
 }
@@ -340,5 +292,5 @@
 dcPage::open($page_title,
 	dcPage::jsLoad('js/_preferences.js').
-	($user_acc_nodragdrop ? '' : dcPage::jsLoad('js/_preferences-dragdrop.js')).
+	($user_dm_nodragdrop ? '' : dcPage::jsLoad('js/_preferences-dragdrop.js')).
 	dcPage::jsLoad('js/jquery/jquery-ui-1.8.12.custom.min.js').
 	dcPage::jsPageTabs($default_tab).
@@ -368,5 +320,5 @@
 }
 
-echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.$page_title.'</span></h2>';
+echo '<h2>'.$page_title.'</h2>';
 
 # User profile
@@ -379,17 +331,17 @@
 '<div class="col">'.
 '<p><label for="user_name">'.__('Last Name:').
-form::field('user_name',20,255,html::escapeHTML($user_name)).'</label></p>'.
+form::field('user_name',20,255,html::escapeHTML($user_name),'',2).'</label></p>'.
 
 '<p><label for="user_firstname">'.__('First Name:').
-form::field('user_firstname',20,255,html::escapeHTML($user_firstname)).'</label></p>'.
+form::field('user_firstname',20,255,html::escapeHTML($user_firstname),'',3).'</label></p>'.
 
 '<p><label for="user_displayname">'.__('Display name:').
-form::field('user_displayname',20,255,html::escapeHTML($user_displayname)).'</label></p>'.
+form::field('user_displayname',20,255,html::escapeHTML($user_displayname),'',4).'</label></p>'.
 
 '<p><label for="user_email">'.__('Email:').
-form::field('user_email',20,255,html::escapeHTML($user_email)).'</label></p>'.
+form::field('user_email',20,255,html::escapeHTML($user_email),'',5).'</label></p>'.
 
 '<p><label for="user_url">'.__('URL:').
-form::field('user_url',30,255,html::escapeHTML($user_url)).'</label></p>'.
+form::field('user_url',30,255,html::escapeHTML($user_url),'',6).'</label></p>'.
 
 '</div>'.
@@ -398,8 +350,8 @@
 
 '<p><label for="user_lang">'.__('User language:').
-form::combo('user_lang',$lang_combo,$user_lang,'l10n').'</label></p>'.
+form::combo('user_lang',$lang_combo,$user_lang,'l10n',10).'</label></p>'.
 
 '<p><label for="user_tz">'.__('User timezone:').
-form::combo('user_tz',dt::getZones(true,true),$user_tz).'</label></p>'.
+form::combo('user_tz',dt::getZones(true,true),$user_tz,'',11).'</label></p>'.
 
 '</div>'.
@@ -415,13 +367,15 @@
 	
 	'<p><label for="new_pwd">'.__('New password:').
-	form::password('new_pwd',20,255).'</label></p>'.
+	form::password('new_pwd',20,255,'','',30).'</label></p>'.
 	
 	'<p><label for="new_pwd_c">'.__('Confirm password:').
-	form::password('new_pwd_c',20,255).'</label></p>'.
+	form::password('new_pwd_c',20,255,'','',31).'</label></p>'.
 	'</fieldset>'.
 	
-	'<p>'.__('If you have changed this user email or password you must provide your current password to save these modifications.').'</p>'.
+	'<fieldset>'.
+	'<p>'.__('If you want to change your email or password you must provide your current password.').'</p>'.
 	'<p><label for="cur_pwd">'.__('Your password:').
-	form::password('cur_pwd',20,255).'</label></p>';
+	form::password('cur_pwd',20,255,'','',32).'</label></p>'.
+	'</fieldset>';
 }
 
@@ -429,5 +383,5 @@
 '<p class="clear">'.
 $core->formNonce().
-'<input type="submit" accesskey="s" value="'.__('Save').'" /></p>'.
+'<input type="submit" accesskey="s" value="'.__('Save').'" tabindex="33" /></p>'.
 '</form>';
 
@@ -442,37 +396,15 @@
 
 '<p><label for="user_post_format">'.__('Preferred format:').
-form::combo('user_post_format',$formaters_combo,$user_options['post_format']).'</label></p>'.
+form::combo('user_post_format',$formaters_combo,$user_options['post_format'],'',7).'</label></p>'.
 
 '<p><label for="user_post_status">'.__('Default entry status:').
-form::combo('user_post_status',$status_combo,$user_post_status).'</label></p>'.
+form::combo('user_post_status',$status_combo,$user_post_status,'',8).'</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>'.
+form::field('user_edit_size',5,4,(integer) $user_options['edit_size'],'',9).'</label></p>'.
 
 '<p><label for="user_wysiwyg" class="classic">'.
-form::checkbox('user_wysiwyg',1,$user_options['enable_wysiwyg']).' '.
+form::checkbox('user_wysiwyg',1,$user_options['enable_wysiwyg'],'',12).' '.
 __('Enable WYSIWYG mode').'</label></p>'.
-
-'<p><label for="user_ui_enhanceduploader" class="classic">'.
-form::checkbox('user_ui_enhanceduploader',1,$user_ui_enhanceduploader).' '.
-__('Activate enhanced uploader in media manager').'</label></p>';
-
-if (count($iconsets_combo) > 1) {
-	echo 
-		'<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','');
-}
-
-if ($core->auth->isSuperAdmin()) {
-	echo
-	'<p><label for="user_ui_hide_std_favicon" class="classic">'.
-	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').'</p>';
-}
-
-echo 
 '<br class="clear" />'. //Opera sucks
 '</fieldset>';
@@ -481,6 +413,6 @@
 '<fieldset><legend>'.__('Accessibility options').'</legend>'.
 
-'<p><label for="user_acc_nodragdrop" class="classic">'.
-form::checkbox('user_acc_nodragdrop',1,$user_acc_nodragdrop).' '.
+'<p><label for="user_dm_nodragdrop" class="classic">'.
+form::checkbox('user_dm_nodragdrop',1,$user_dm_nodragdrop,'',13).' '.
 __('Disable javascript powered drag and drop for ordering items').'</label></p>'.
 
@@ -492,13 +424,13 @@
 
 '<p><label for="user_dm_doclinks" class="classic">'.
-form::checkbox('user_dm_doclinks',1,$user_dm_doclinks).' '.
+form::checkbox('user_dm_doclinks',1,$user_dm_doclinks,'',14).' '.
 __('Display documentation links').'</label></p>'.
 
 '<p><label for="user_dm_dcnews" class="classic">'.
-form::checkbox('user_dm_dcnews',1,$user_dm_dcnews).' '.
+form::checkbox('user_dm_dcnews',1,$user_dm_dcnews,'',15).' '.
 __('Display Dotclear news').'</label></p>'.
 
 '<p><label for="user_dm_quickentry" class="classic">'.
-form::checkbox('user_dm_quickentry',1,$user_dm_quickentry).' '.
+form::checkbox('user_dm_quickentry',1,$user_dm_quickentry,'',16).' '.
 __('Display quick entry form').'</label></p>'.
 
@@ -512,5 +444,5 @@
 '<p class="clear">'.
 $core->formNonce().
-'<input type="submit" accesskey="s" value="'.__('Save').'" /></p>'.
+'<input type="submit" accesskey="s" value="'.__('Save').'" tabindex="33" /></p>'.
 '</form>';
 
@@ -534,8 +466,8 @@
 			$count++;
 			echo '<li id="fu-'.$k.'">'.
-				'<img src="'.dc_admin_icon_url($fav['large-icon']).'" alt="" /> '.
+				'<img src="'.$fav['large-icon'].'" alt="" /> '.
 				form::field(array('order['.$k.']'),2,3,$count,'position','',false,'title="'.sprintf(__('position of %s'),$fav['title']).'"').
 				form::hidden(array('dynorder[]','dynorder-'.$k.''),$k).
-				'<label for="fuk-'.$k.'">'.form::checkbox(array('remove[]','fuk-'.$k),$k).__($fav['title']).'</label>'.
+				'<label for="fuk-'.$k.'">'.form::checkbox(array('remove[]','fuk-'.$k),$k).$fav['title'].'</label>'.
 				'</li>';
 		}
@@ -580,5 +512,5 @@
 			$count++;
 			echo '<li id="fd-'.$k.'">'.
-			'<img src="'.dc_admin_icon_url($fav['small-icon']).'" alt="" /> '.__($fav['title']).'</li>';
+			'<img src="'.$fav['small-icon'].'" alt="" /> '.$fav['title'].'</li>';
 		}
 	}
@@ -593,8 +525,8 @@
 $array = $_fav;
 function cmp($a,$b) {
-    if (__($a[1]) == __($b[1])) {
+    if ($a[1] == $b[1]) {
         return 0;
     }
-    return (__($a[1]) < __($b[1])) ? -1 : 1;
+    return ($a[1] < $b[1]) ? -1 : 1;
 }
 $array=$array->getArrayCopy();
@@ -606,6 +538,6 @@
 		echo '<li id="fa-'.$fav[0].'">'.'<label for="fak-'.$fav[0].'">'.
 			form::checkbox(array('append[]','fak-'.$fav[0]),$k).
-			'<img src="'.dc_admin_icon_url($fav[3]).'" alt="" /> '.'<span class="zoom"><img src="'.dc_admin_icon_url($fav[4]).'" alt="" /></span>'.
-			__($fav[1]).'</label>'.'</li>';
+			'<img src="'.$fav[3].'" alt="" /> '.'<span class="zoom"><img src="'.$fav[4].'" alt="" /></span>'.$fav[1].
+			'</label>'.'</li>';
 	}
 }	
Index: admin/search.php
===================================================================
--- admin/search.php	(revision 747)
+++ admin/search.php	(revision 125)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -73,12 +73,12 @@
 
 echo
-'<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.__('Search').'</span></h2>'.
+'<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.__('Search').'</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 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>'.
+'<fieldset><legend>'.__('Search options').'</legend>'.
+'<p><label for="q" class="classic">'.__('Query:').' '.form::field('q',30,255,html::escapeHTML($q)).'</label> '.
+'<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> '.
+' <input type="submit" value="'.__('ok').'" /></p>'.
+'</fieldset>'.
 '</form>';
 
@@ -105,5 +105,5 @@
 		if ($core->auth->check('delete,contentadmin',$core->blog->id))
 		{
-			$combo_action[__('Delete')] = 'delete';
+			$combo_action[__('delete')] = 'delete';
 		}
 		
@@ -148,5 +148,5 @@
 		if ($core->auth->check('delete,contentadmin',$core->blog->id))
 		{
-			$combo_action[__('Delete')] = 'delete';
+			$combo_action[__('delete')] = 'delete';
 		}
 		
Index: admin/services.php
===================================================================
--- admin/services.php	(revision 323)
+++ admin/services.php	(revision 0)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -133,5 +133,6 @@
 			$rsp->comment_ip($rs->comment_ip);
 			$rsp->comment_email($rs->comment_email);
-			$rsp->comment_spam_disp(dcAntispam::statusMessage($rs));
+			# --BEHAVIOR-- adminAfterCommentDesc
+			$rsp->comment_spam_disp($core->callBehavior('adminAfterCommentDesc', $rs));
 		}
 		
Index: admin/style/candyUpload/style.css
===================================================================
--- admin/style/candyUpload/style.css	(revision 536)
+++ admin/style/candyUpload/style.css	(revision 3)
@@ -1,27 +1,33 @@
 
-.cu-ctrl {
+div.cu-ctrl {
 	background: #f5f5f5;
-	padding: .5em 0 0 0;
+	padding: 5px 0 0 0;
 	margin: 0 0 1em 0;
 	overflow: hidden;
+	border-color: #ccc;
+	border-width: 1px 0;
+	border-style: solid;
 }
-.cu-msg {
+
+div.cu-msg {
+	padding: 0 0.5em;
 	font-weight: bold;
 }
-.cu-msg.cu-error {
+div.cu-msg.cu-error {
 	color: #c00;
 }
-.cu-files {
+
+div.cu-files {
 	padding: 0 0.5em;
 	margin: 10px 0;
 }
-.cu-file {
+div.cu-file {
 	margin: 0 0 8px 0;
 	position: relative;
 }
-.cu-fileinfo {
+div.cu-fileinfo {
 	margin-left: 16px;
 }
-.cu-fileinfo span.cu-filecancel {
+div.cu-fileinfo span.cu-filecancel {
 	display: block;
 	position: absolute;
@@ -30,5 +36,5 @@
 	left: -16px;
 }
-.cu-filecancel a {
+div.cu-files span.cu-filecancel a {
 	display: block;
 	width: 12px;
@@ -39,15 +45,16 @@
 	outline: none;
 }
-.cu-filemsg {
+div.cu-files span.cu-filemsg {
 	font-weight: bold;
 	color: green;
 }
-span.cu-filemsg.cu-error {
+div.cu-files span.cu-filemsg.cu-error {
 	color: #c00;
 }
-.cu-progress {
+
+div.cu-progress {
 	margin-left: 16px;
 }
-.cu-progress div {
+div.cu-progress div {
 	height: 10px;
 	width: 0;
@@ -62,5 +69,6 @@
 	-moz-border-radius: 2px;
 }
-.cu-btn {
+
+div.cu-btn {
 	padding: 0 0.5em;
 	line-height: 1.2em;
@@ -69,23 +77,20 @@
 	position: relative;
 }
-.cu-btn span {
+div.cu-btn span {
 	display: block;
-	margin: 0 1em 0 0;
+	margin: 0 0 0 .5em;
 	float: right;
 }
-.cu-btn span a {
+div.cu-btn span a {
 	display: block;
 	padding: .3em 1.5em;
 }
-span.cu-btn-browse {
+div.cu-btn span.cu-btn-browse {
 	float: none;
 	position: absolute;
-	left: 0;
+	left: 0.5em;
 	margin: 0;
 }
-span.cu-btn-upload, span.cu-btn-clean {
-	margin-right: 0;
-}
-span.cu-btn-upload a.button {
+div.cu-btn span.cu-btn-upload a.button {
 	color: #fff;
 	border: 1px solid #2373A8;
@@ -94,6 +99,5 @@
 	background: -moz-linear-gradient(top,  #2C8FD1,  #2373A8);
 }
-span.cu-btn-upload a.button:hover, 
-span.cu-btn-upload a.button:focus {
+div.cu-btn span.cu-btn-upload a.button:hover, div.cu-btn span.cu-btn-upload a.button:focus {
 	color: #fff;
 	border: 1px solid #2C8FD1;
@@ -103,10 +107,11 @@
 	filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#2373A8', endColorstr='#2C8FD1');
 }
-.cu-maxsize.form-note {
+div.cu-maxsize {
 	clear: both;
-	margin: 1.5em 0 0;
+	margin: .75em 0 0 0.5em;
 	font-style: italic;
 }
-.cu-disable {
+
+div.cu-disable {
 	margin: 1em 0;
 	padding: 0 0 0.5em 0.5em;
Index: admin/style/default.css
===================================================================
--- admin/style/default.css	(revision 683)
+++ admin/style/default.css	(revision 520)
@@ -11,8 +11,6 @@
 # -- END LICENSE BLOCK -----------------------------------------
 */
-
-/* ------------------------------------------------------------------ html */
 body {
-	font: 75%/1.5em Helvetica,Arial,sans-serif;
+	font: 76%/1.5em Helvetica,Arial,sans-serif;
 	color: #333;
 	background: #f5f5f5;
@@ -23,4 +21,6 @@
 	background: #fff;
 }
+
+a img,:link img,:visited img { border:none }
 
 a, a:link, a:visited {
@@ -32,7 +32,4 @@
 	text-decoration: underline;
 }
-a img, a:link img, a:visited img { 
-	border:none;
-}
 
 h1, h2, h3, h4, h5, h6, p {
@@ -40,4 +37,5 @@
 	margin-bottom: 0.6em;
 }
+
 h2 {
 	color: #666;
@@ -45,14 +43,14 @@
 	padding: 4px 0;
 }
-.page-title {
-	color: #d30e60;
-}
+
 h3 {
 	color: #333;
 	font-size: 1.2em;
 }
+
 p, div.p {
 	margin: 0 0 1em 0;
 }
+
 hr {
 	height: 1px;
@@ -61,4 +59,5 @@
 	border-style: solid;
 }
+
 pre, code {
 	font: 100% "Andale Mono","Courier New",monospace;
@@ -78,35 +77,12 @@
 }
 
+
 /* LAYOUT
 -------------------------------------------------------- */
-/* header */
-#header {
-	background: #575859;
-	height: 3em;
-	position: relative;
-}
-#prelude {
-	background: #575859;
-	line-height: 1.5em;
-	margin: 0;
-	padding: 0 1.7em 0 1em;
-	overflow: hidden;
-	position: absolute;
-	top: 1.2em;
-	left: 0;
-	}
-#prelude li {
-	list-style-type: none;
-	margin: 0 1em 0 0;
-	background:transparent;
-	}
-#prelude li a {
-	color:#fff;
-	}
+
 #top {
 	margin: 0;
 	padding: 0;
-	width: 13em;
-	float: left;
+	background: #575859 url(dc_bg.png) repeat-x 0 3em;
 }
 #top h1 {
@@ -127,57 +103,49 @@
 	color: #fff;
 }
-#info-boxes {
+
+#info-box {
 	background: #575859;
-	font-size: .95em;
-	height: 3em;
-}
-#info-box1 {
-	margin: 0;
-	padding: .5em 3px 4px 0;
+	position: absolute;
+	left: 13em;
+	top: 3px;
+	margin: 0;
+	padding: 3px 3px 4px 0;
 	color: #fff;
-	float: left;
+}
+#info-box2 {
 	background: #575859;
-}
-#info-box2 {
-	margin: .1em 0 0 0;
-	padding: .5em 1.3em 4px 0;
+	position: absolute;
+	right: 1em;
+	top: 3px;
+	margin: 0;
+	padding: 3px 3px 4px 0;
 	color: #fff;
-	float: right;
-	text-align: right;
-	background: #575859;
-	height: 2em;
-}
-#info-box1 select {
-	width: 15em;
-}
-#info-box1 a img, #info-box2 a img {
+}
+#info-box div, #info-box2 div {
+	margin: 0; padding: 0;
+}
+#info-box div div, #info-box2 div div {
+	display: inline;
+}
+#info-box>form>div, #info-box2>form>div {
+	line-height: 1.5;
+}
+#info-box select {
+	width: 20em;
+}
+#info-box a img, #info-box2 a img {
 	vertical-align: middle;
 	padding-left: .3em;
 	}
-#info-box1 a, #info-box2 a {
+#info-box a, #info-box2 a {
 	background: #575859;
 	font-weight: bold;
 	color: #fff;
 	border-bottom-color: #ccc;
-	margin-left: .3em;
-	margin-right: .3em;
-	white-space: nowrap;
-	font-weight: normal;
-}
-#info-box1 a {
-	margin-left: 1.33em;
-}
-#info-box2 a.active {
-	border-bottom-color: #f5f5f5;
-	margin: 0;
-	padding: 1.2em .5em;
-	background-color: #f5f5f5;
-	color: #333;
-	font-weight: bold;
-}
-#info-box2 span {
-	color: #575859;
-}
-/* prelude */
+}
+#info-box a {
+	margin-left: 2em;
+}
+
 #wrapper {
 	width: 100%;
@@ -190,5 +158,5 @@
 }
 #content {
-	margin: 1.5em 1.5em 4em 13em;
+	margin: .5em 1.5em 4em 13em;
 	padding: 1em;
 	background: #fff;
@@ -201,86 +169,16 @@
 	#content:before, #content:after {content:"";display:table;}
 	#content:after {clear:both;}
-/* -------------------------------------------------- layout - multipart */
-.three-cols {
-}
-.three-cols .col {
-	width: 32.3%;
-	float: left;
-	margin-left: 1%;
-}
-.three-cols .col:first-child {
-	width: 33.3%;
-	margin-left: 0;
-}
-.two-cols {
-	position: static;
-}
-.two-cols .col {
-	width: 49%;
-	margin-left: 2%;
-	float: left;
-}
-.two-cols .col:first-child {
-	width: 49%;
-	margin-left: 0;
-}
-.two-cols .col70{
-	width: 69%;
-	margin-left: 0;
-	float: left;
-}
-.two-cols .col30 {
-	width: 28%;
-	margin-left: 2%;
-	float: left;
-}
-/* -------------------------------------------------------------- layout - onglets */
-.part-tabs ul {
-	padding: .3em 0 1px 1em;
-	border-bottom: 1px solid #999;
-}
-.part-tabs li {
-	list-style: none;
-	margin: 0;
-	display: inline;
-}
-.part-tabs li a {
-	padding: .3em 0.5em;
-	margin-right: .5em;
-	border: 1px solid #999;
-	border-bottom: none;
-	background: #dfdfdf;
-	text-decoration: none;
-	-webkit-border-top-left-radius: .3em;
-	-webkit-border-top-right-radius: .3em;
-	-moz-border-radius-topleft: .3em;
-	-moz-border-radius-topright: .3em;
-	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 {
-	color: #000;
-	background: #fff;
-	border-bottom-color: #fff;
-}
-.part-tabs li.part-tabs-active a {
-	background: #fff;
-	border-bottom: 1px solid #fff;
-	color: #000;
-	font-weight: bold;
-}
-/* ------------------------------------------------------------------ main-menu */
+
 #main-menu {
 	width: 13em;
 	float: left;
-	margin-top: 1.2em;
+	margin-top: 1em;
 	margin-bottom: 1em;
 }
+#main-menu * {
+}
+
 #main-menu h3 {
-	margin: 0 0 0.5em;
+	margin: 0 0 0.5em 0;
 	padding: .5em 0 0 .5em;
 	text-transform: uppercase;
@@ -296,5 +194,5 @@
 #main-menu li {
 	display: block;
-	margin: 0.5em 0 0;
+	margin: 0.5em 0 0 0;
 	padding: .2em 0 0 32px;
 	background-repeat: no-repeat;
@@ -308,5 +206,5 @@
 	color: #333;
 }
-#main-menu .active {
+#main-menu li.active {
 	background-color: #fff;
 	padding: .4em 0 .1em 32px;
@@ -316,23 +214,8 @@
 	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;
-}
-#favorites-menu .active a {
-	font-weight: bold;
-	color: #666;
-}
-/* ------------------------------------------------------------------ footer */
+#main-menu #dashboard-menu li {
+	margin-left: 0;
+}
+
 #footer {
 	clear: both;
@@ -358,36 +241,27 @@
 	font-weight: normal;
 }
-/* ---------------------------------------------------------------------------- auth.php */
-#login-screen {
-	display: block;
-	width: 18em;
-	margin: 1.5em auto 0;
-	font-size: 1.1em;
-}
-#login-screen h1 {
-	text-indent: -2000px;
-	background: transparent url(dotclear-logo2.png) no-repeat top left;
-	height: 50px;
-	margin-bottom: .5em;
-	margin-left: .5em;
-}
-#login-screen fieldset, #login-screen .fieldset {
-	border: 1px solid #999;
-	padding: 1em 1em 0 1em;
-	-moz-border-radius: 4px;
-	-webkit-border-radius: 4px;
-	border-radius: 4px;
-}
-#login-screen input[type=text], #login-screen input[type=password], #login-screen input[type=submit] {
+
+#debug {
+	position: absolute;
+	top: 0;
 	width: 100%;
-}
-#login-screen #issue {
-	margin-left: 1em;
-	font-size: 1em;
-}
-#login-screen #issue strong {font-weight: normal;}
-
-
-/* ------------------------------------------------------------------ dashboard */
+	height: 4px;
+	background: #d99;
+}
+#debug div {
+	display: none;
+	padding: 3px 0.5em 2px;
+}
+#debug p {
+	margin: 0.5em 0;
+}
+#debug:hover {
+	height: auto;
+}
+#debug:hover div {
+	display: block;
+}
+
+/* DASHBOARD */
 #dashboard-main {
 	float: left;
@@ -401,10 +275,10 @@
 	float: none;
 }
-#icons {
+#dashboard-main #icons {
 	overflow: hidden;
 	padding-bottom: 1em;
 	text-align: center;
 }
-#icons p {
+#dashboard-main #icons p {
 	width: 210px;
 	text-align: center;
@@ -412,27 +286,23 @@
 	display:inline-block;
 }
-#icons a,
-#icons a:link,
-#icons a:visited,
-#icons a:hover,
-#icons a:focus {
-	border-bottom-width: 0px;
-	text-decoration: none;
-}
-#icons a span {
-	border-bottom: 1px dotted #f90;
-}
-#icons a:focus span, #icons a:hover span {
-	text-decoration: underline;
-}
-#quick {
+#dashboard-main #icons span {
+	display: block;
+}
+#dashboard-main #icons a {
+	border-bottom-width: 0;
+}
+#dashboard-main #icons span a {
+	border-bottom-width: 1px;
+}
+
+#dashboard-main #quick {
 	clear: left;
 	margin-top: 2em;
 }
-#quick h3 {
+#dashboard-main #quick h3 {
 	margin-bottom: 0.2em;
 	font-size: 1.2em;
 }
-#quick p.qinfo {
+#dashboard-main #quick p.qinfo {
 	margin: -.7em -1em 1em;
 	background: #eef url(info.png) no-repeat .2em .2em;
@@ -441,4 +311,5 @@
 	color: #666;
 }
+
 #dashboard-items {
 	float: left;
@@ -448,5 +319,5 @@
 	padding-top: 3em;
 }
-#dashboard-items img {
+#dashboard-items p img {
 	vertical-align: middle;
 }
@@ -460,12 +331,12 @@
 	color: #666;
 }
-#news dt {
+#dashboard-items #news dt {
 	font-weight: bold;
 	margin: 0 0 0.4em 0;
 }
-#news dd {
+#dashboard-items #news dd {
 	margin: 0 0 1em 0;
 }
-#news dd p {
+#dashboard-items #news dd p {
 	margin: 0.2em 0 0 0;
 }
@@ -479,21 +350,18 @@
 	color: #fff;
 }
-/* ------------------------------------------------------------------ post */
-#entry-wrapper {
-	float: left;
-	width: 100%;
-	margin-right: -18em;
-}
-#entry-content {
-	margin-right: 18em;
-}
+
+/* POST */
 #entry-sidebar {
 	width: 17em;
 	float: right;
 }
+#entry-content {
+	margin-right: 18em;
+}
 #comments {
 	clear: both;
 }
-/* ------------------------------------------------------------------ categories */
+
+/* CATEGORIES */
 #categories {
 	margin: 1em 0 2em;
@@ -504,5 +372,5 @@
 	padding: 0;
 }
-#categories li {
+#categories ul li {
 	margin: .5em 0;
 	padding: .3em 1.5em;
@@ -513,11 +381,11 @@
 	border-radius: .3em;
 }
-#categories h4 {
-	margin: 0;
-}
-#categories h4 span {
+#categories ul li h4 {
+	margin: 0;
+}
+#categories ul li h4 span {
 	font-weight: normal;
 }
-#categories li p {
+#categories ul li p {
 	margin: 0;
 }
@@ -525,5 +393,6 @@
 	width: 100%;
 }
-/* ------------------------------------------------------------------ media */
+
+/* MEDIA */
 #media-icon {
 	float: left;
@@ -548,4 +417,5 @@
 	height: 500px;
 }
+
 #add-file-f {
 	position: relative;
@@ -558,52 +428,6 @@
 	border: none;
 }
-.media-list {
-	position: static;
-}
-.media-col-0 {
-	clear: left;
-}
-.media-item {
-	position: relative;
-	border-top: 1px solid #ccc;
-	margin-bottom: 1em;
-	padding: 5px 0;
-}
-div.media-list .media-item {
-	width: 49%;
-	float: left;
-	margin-right: 1%;
-}
-a.media-icon {
-	display: block;
-	border-bottom: none;
-	float: left;
-}
-.media-icon img {
-	display: block;
-}
-.media-item ul {
-	display: block;
-	list-style: none;
-	margin: 0 0 0 60px;
-	padding: 0;
-}
-li.media-action {
-	display: block;
-	position: absolute;
-	top: 5px;
-	right: 5px;
-	height: 16px;
-}
-li.media-action a {
-	border: none;
-}
-li.media-action form {
-	display: inline;
-}
-li.media-action input {
-	border: none;
-}
-/* ------------------------------------------------------------------ preferences */
+
+/* favorites */
 #my-favs ul {
 	list-style-type: none;
@@ -612,5 +436,5 @@
 	line-height: 1.2;
 }
-#my-favs li {
+#my-favs ul li {
 	display: block;
 	float: left;
@@ -631,8 +455,10 @@
 	display: inline;
 }
+
 #default-favs h3 {
 	margin-top: 2em;
 	margin-bottom: 1em;
 }
+
 .fav-list {
 	list-style-type: none;
@@ -646,5 +472,5 @@
 	position: relative;
 }
-.fav-list img {
+.fav-list li img {
 	vertical-align: middle;
 	margin-right: .2em;
@@ -665,130 +491,6 @@
 	border-radius: .5em;
 }
-/* -------------------------------------------------------------------- Themes */
-#themes {
-	border-bottom: 1px solid #ccc;
-	margin: 1em 0;
-}
-#themes div.theme-details {
-	clear: left;
-	border-top: 1px solid #ccc;
-	padding: 1em 0;
-}
-#themes div.theme-details:hover {
-	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;
-}
-#themes div.theme-details div.theme-info {
-	margin-left: 67px;
-}
-#themes div.theme-details div.theme-info span.theme-desc {
-	display: block;
-}
-#themes div.theme-details div.theme-info span.theme-version {
-	color: #666;
-}
-#themes div.theme-details div.theme-actions {
-	margin-left: 67px;
-}
-/* Themes list, JS version */
-#themes-wrapper {
-}
-#theme-box {
-	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 0 0 10px;
-	width: 280px;
-	height: 245px;
-	border: 1px solid #ccc;
-}
-#theme-box div.theme-info {
-	margin: 1em 0 0 10px;
-}
-#theme-box h3 {
-	margin: 0;
-}
-#theme-box div.theme-info span {
-	display: block;
-}
-#theme-box span.theme-version {
-	color: #666;
-}
-#theme-box span.theme-parent-ok {
-	color: #666;
-}
-#theme-box span.theme-parent-missing {
-	color: #c00;
-	font-weight:bold;
-}
-#theme-box div.theme-actions {
-	margin-left: 10px;
-}
-#themes-wrapper #themes {
-	border: 1px solid #999;
-	overflow: auto;
-	height: 420px;
-	padding: 5px;
-	margin: 0;
-}
-#themes div.theme-details-js {
-	float: left;
-	width: 120px;
-	height: 150px;
-	margin: 0 10px 20px;
-	padding: 10px 10px 0;
-	text-align: center;
-	background: #f3f3f3;
-	border: 1px solid #f3f3f3;
-	cursor: pointer;
-	-moz-border-radius: 4px;
-	-webkit-border-radius: 4px;
-	border-radius: 4px;
-}
-#themes div.theme-details-js label {
-	cursor: pointer;
-}
-#themes div.theme-details-js.theme-selected {
-	background: #E5E3DA;
-	border: 1px solid #999;
-}
-#themes div.theme-details-js div.theme-shot img {
-	width: 120px;
-	height: 105px;
-	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 {
-	vertical-align: middle;
-}
-
-select.l10n option {
-	padding-left: 16px;
-}
-option.avail10n {
-	background: transparent url(../images/check-on.png) no-repeat 0 50%;
-}
-/* ------------------------------------------------------------------ contextual help */
+
+/* Help */
 #help {
 	margin-top: 2em;
@@ -837,16 +539,8 @@
 	padding: 0 5px 1em 5px;
 }
-.help-content dt {
-	font-weight: bold;
-	color: #626262;
-	margin: 0;
-}
-.help-content dd {
-	margin: 0.3em 0 1.5em 0;
-}
-/* ------------------------------------------------------------------ popups */
+
+/* POPUP */
 body.popup #wrapper, body.popup #top {
 	margin-top: -1.5em;
-	float: none;
 }
 body.popup #top h1 {
@@ -868,59 +562,9 @@
 	border: none;
 }
-/* ------------------------------------------------------------------ messages */
-div.error, p.error, 
-div.message, p.message, 
-div.static-msg, p.static-msg {
-	padding: 0.5em 0.5em 0.5em 40px;
-	margin-bottom: 1em;
-	-moz-border-radius: 8px;
-	-webkit-border-radius: 8px;
-	border-radius: 8px;
-}
-p.error, p.message, p.static-msg {
-	padding-top: 1em;
-	padding-bottom: 1em;
-}
-div.error, p.error {
-	background: #e5bfbf url(msg-error.png) no-repeat 5px 5px;
-	color: #600;
-}
-div.message, p.message, 
-div.static-msg, p.static-msg {
-	background: #666 url(msg-std.png) no-repeat 5px 5px;
-	color: #fff;
-}
-div.message a, p.message a, 
-div.static-msg a, p.static-msg a {
-	color: #fff;
-}
-/* ------------------------------------------------------------------ debug */
-#debug {
-	position: absolute;
-	top: 0;
-	width: 100%;
-	height: 4px;
-	background: #d99;
-}
-#debug div {
-	display: none;
-	padding: 3px 0.5em 2px;
-}
-#debug p {
-	margin: 0.5em 0;
-}
-#debug:hover {
-	height: auto;
-}
-#debug:hover div {
-	display: block;
-}
-/* -------------------------------------------------------------------- CLASSES COMMUNES */
-
-.no-margin {
-	margin: 0;
-}
-
-/* paragraphe pour bouton Nouveau bidule */
+
+/* CLASSES
+-------------------------------------------------------- */
+
+/* -------------- paragraphe pour bouton Nouveau bidule ----------- */
 p.top-add {
 	text-align: right;
@@ -935,4 +579,5 @@
 	vertical-align: middle;
 }
+
 /* Si quelque chose a besoin d'être caché sauf pour les revues d'écran */
 .hidden {
@@ -946,4 +591,15 @@
     overflow: hidden;
     }
+
+/* -------------- aide ----------- */
+.help-content dt {
+	font-weight: bold;
+	color: #626262;
+	margin: 0;
+}
+.help-content dd {
+	margin: 0.3em 0 1.5em 0;
+}
+
 .clear {
 	clear: both;
@@ -969,13 +625,40 @@
 	overflow: auto;
 }
+
 .grid {
 	background: transparent repeat url('grid.png') 0 0;
 }
+
 .line p {
 	margin: 0;
 }
+
+div.error, p.error, div.message, p.message, div.static-msg, p.static-msg {
+	padding: 0.5em 0.5em 0.5em 40px;
+	margin-bottom: 1em;
+	-moz-border-radius: 8px;
+	-webkit-border-radius: 8px;
+	border-radius: 8px;
+}
+p.error, p.message, p.static-msg {
+	padding-top: 1em;
+	padding-bottom: 1em;
+}
+div.error, p.error {
+	background: #e5bfbf url(msg-error.png) no-repeat 5px 5px;
+	color: #600;
+}
+div.message, p.message, div.static-msg, p.static-msg {
+	background: #666 url(msg-std.png) no-repeat 5px 5px;
+	color: #fff;
+}
+div.message a, p.message a, div.static-msg a, p.static-msg a {
+	color: #fff;
+}
+
 .offline {
 	color: #666;
 }
+
 ul.nice {
 	margin: 1em 0;
@@ -987,9 +670,39 @@
 	padding: 0;
 }
-.zip-dl {
-	background: transparent url(package.png) no-repeat 0 50%;
-	padding: 5px 0 5px 20px;
-}
-/* pas trouvé dans le code */
+
+.three-cols {
+}
+.three-cols .col {
+	width: 32.3%;
+	float: left;
+	margin-left: 1%;
+}
+.three-cols .col:first-child {
+	width: 33.3%;
+	margin-left: 0;
+}
+.two-cols {
+	position: static;
+}
+.two-cols .col {
+	width: 49%;
+	margin-left: 2%;
+	float: left;
+}
+.two-cols .col:first-child {
+	width: 49%;
+	margin-left: 0;
+}
+.two-cols .col70{
+	width: 69%;
+	margin-left: 0;
+	float: left;
+}
+.two-cols .col30 {
+	width: 28%;
+	margin-left: 2%;
+	float: left;
+}
+
 .comment {
 	border-top: 2px solid #ccc;
@@ -1004,4 +717,224 @@
 	right: 0;
 }
+
+/* -------- onglets ------ */
+.part-tabs ul {
+	padding: .3em 0 1px 1em;
+	border-bottom: 1px solid #999;
+}
+.part-tabs li {
+	list-style: none;
+	margin: 0;
+	display: inline;
+}
+.part-tabs li a {
+	padding: .3em 0.5em;
+	margin-right: .5em;
+	border: 1px solid #999;
+	border-bottom: none;
+	background: #dfdfdf;
+	text-decoration: none;
+	-webkit-border-top-left-radius: .3em;
+	-webkit-border-top-right-radius: .3em;
+	-moz-border-radius-topleft: .3em;
+	-moz-border-radius-topright: .3em;
+	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 {
+	color: #000;
+	background: #fff;
+	border-bottom-color: #fff;
+}
+.part-tabs li.part-tabs-active a {
+	background: #fff;
+	border-bottom: 1px solid #fff;
+	color: #000;
+	font-weight: bold;
+}
+
+/* Themes list */
+#themes {
+	border-bottom: 1px solid #ccc;
+	margin: 1em 0;
+}
+#themes div.theme-details {
+	clear: left;
+	border-top: 1px solid #ccc;
+	padding: 1em 0;
+}
+#themes div.theme-details:hover {
+	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;
+}
+#themes div.theme-details div.theme-info {
+	margin-left: 67px;
+}
+#themes div.theme-details div.theme-info span.theme-desc {
+	display: block;
+}
+#themes div.theme-details div.theme-info span.theme-version {
+	color: #666;
+}
+#themes div.theme-details div.theme-actions {
+	margin-left: 67px;
+}
+/* Themes list, JS version */
+#themes-wrapper {
+}
+#theme-box {
+	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 0 0 10px;
+	width: 280px;
+	height: 245px;
+	border: 1px solid #ccc;
+}
+#theme-box div.theme-info {
+	margin: 1em 0 0 10px;
+}
+#theme-box h3 {
+	margin: 0;
+}
+#theme-box div.theme-info span {
+	display: block;
+}
+#theme-box span.theme-version {
+	color: #666;
+}
+#theme-box span.theme-parent-ok {
+	color: #666;
+}
+#theme-box span.theme-parent-missing {
+	color: #c00;
+	font-weight:bold;
+}
+#theme-box div.theme-actions {
+	margin-left: 10px;
+}
+#themes-wrapper #themes {
+	border: 1px solid #999;
+	overflow: auto;
+	height: 420px;
+	padding: 5px;
+	margin: 0;
+}
+#themes div.theme-details-js {
+	float: left;
+	width: 120px;
+	height: 150px;
+	margin: 0 10px 20px;
+	padding: 10px 10px 0;
+	text-align: center;
+	background: #f3f3f3;
+	border: 1px solid #f3f3f3;
+	cursor: pointer;
+	-moz-border-radius: 4px;
+	-webkit-border-radius: 4px;
+	border-radius: 4px;
+}
+#themes div.theme-details-js label {
+	cursor: pointer;
+}
+#themes div.theme-details-js.theme-selected {
+	background: #E5E3DA;
+	border: 1px solid #999;
+}
+#themes div.theme-details-js div.theme-shot img {
+	width: 120px;
+	height: 105px;
+	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 {
+	vertical-align: middle;
+}
+.media-list {
+	position: static;
+}
+.media-col-0 {
+	clear: left;
+}
+.media-item {
+	position: relative;
+	border-top: 1px solid #ccc;
+	margin-bottom: 1em;
+	padding: 5px 0;
+}
+div.media-list .media-item {
+	width: 49%;
+	float: left;
+	margin-right: 1%;
+}
+a.media-icon {
+	display: block;
+	border-bottom: none;
+	float: left;
+}
+.media-icon img {
+	display: block;
+}
+.media-item ul {
+	display: block;
+	list-style: none;
+	margin: 0 0 0 60px;
+	padding: 0;
+}
+li.media-action {
+	display: block;
+	position: absolute;
+	top: 5px;
+	right: 5px;
+	height: 16px;
+}
+li.media-action a {
+	border: none;
+}
+li.media-action form {
+	display: inline;
+}
+li.media-action input {
+	border: none;
+}
+
+.zip-dl {
+	background: transparent url(package.png) no-repeat 0 50%;
+	padding: 5px 0 5px 20px;
+}
+
+select.l10n option {
+	padding-left: 16px;
+}
+option.avail10n {
+	background: transparent url(../images/check-on.png) no-repeat 0 50%;
+}
+
 /* TABLES
 -------------------------------------------------------- */
@@ -1011,15 +944,11 @@
 	margin: 0 0 1em 0;
 }
+table caption {
+	position: absolute;
+	left: -9999px;
+}
 tr.line:hover {
 	background: #ddd;
 }
-caption {
-	color: #333;
-	font-size: 1.2em;
-	font-weight: bold;
-	text-align: left;
-	margin-bottom: .5em;
-}
-
 th, td {
 	border-width: 0 0 1px 0;
@@ -1029,11 +958,34 @@
 	vertical-align: top;
 }
-th {
+thead th {
 	text-align: left;
-	border-bottom-color: #666;
-}
+	border-top: 1px solid #666;
+	border-bottom: 1px solid #666;
+}
+thead a, thead a:link, thead a:visited {
+	color: #000;
+	text-decoration: none;
+	border-bottom: 1px dotted #000;
+}
+thead th.asc a {
+	color: #2373A8;
+	padding-left: 15px;
+	background: transparent url(asc.png) no-repeat left center;
+}
+thead th.desc a {
+	color: #2373A8;
+	padding-left: 15px;
+	background: transparent url(desc.png) no-repeat left center;
+}
+tbody th {
+	text-align: left;
+	font-weight: normal;
+	border-bottom-color: #ccc;
+}
+
 .noborder td, td.noborder, .noborder th, th.noborder {
 	border-width: 0;
 }
+
 table .maximal, table.maximal {
 	width: 100%;
@@ -1042,8 +994,10 @@
 	width: 1px;
 }
+
 table .nowrap {
 	white-space: nowrap;
 	vertical-align: top;
 }
+
 td.status {
 	vertical-align: middle;
@@ -1085,5 +1039,16 @@
 }
 
-/* ----------------------------------------------------------------- FORMS */
+div.pagination {
+	padding-bottom: 1em;
+}
+div.pagination a {
+	margin: 0 0.3em 0 0.3em;
+}
+div.pagination span{
+	margin: 0 1em 0 1em;
+}
+
+/* FORMS
+-------------------------------------------------------- */
 form {
 	display: block;
@@ -1091,5 +1056,6 @@
 	padding: 0;
 }
-fieldset, .fieldset {
+
+fieldset {
 	display: block;
 	margin: 0 0 1em 0;
@@ -1116,4 +1082,5 @@
 	font-weight: normal;
 }
+
 input, textarea, select {
 	background: #f9f9f9;
@@ -1142,4 +1109,5 @@
 	background: transparent;
 }
+
 label {
 	display: block;
@@ -1147,4 +1115,7 @@
 label input, label select, label span {
 	display: block;
+}
+#filters label {
+	display: inline;
 }
 p.form-note {
@@ -1180,6 +1151,6 @@
 	display: block;
 	width: 100%;
-	resize: vertical;
-}
+}
+
 label.required {
 	font-weight: bold;
@@ -1194,5 +1165,5 @@
 p.field {
 	position: relative;
-	
+
 }
 p.field label {
@@ -1206,9 +1177,7 @@
 	top: 0;
 }
+
 label .maximal, textarea.maximal, input.maximal {
 	width: 100%;
-}
-textarea.maximal {
-	resize: vertical;
 }
 
@@ -1220,5 +1189,6 @@
 	padding-left: 20px;
 }
-.constrained {
+
+fieldset.constrained {
 	margin: 0;
 	padding: 0;
@@ -1227,5 +1197,34 @@
 }
 
-/* --------------------------------------------------------------- buttons */
+#login-screen {
+	display: block;
+	width: 18em;
+	margin: 1.5em auto 0;
+	font-size: 1.1em;
+}
+#login-screen h1 {
+	text-indent: -2000px;
+	background: transparent url(dotclear-logo2.png) no-repeat top left;
+	height: 50px;
+	margin-bottom: .5em;
+}
+#login-screen fieldset {
+	border: 1px solid #999;
+	padding: 1em 1em 0 1em;
+	-moz-border-radius: 4px;
+	-webkit-border-radius: 4px;
+	border-radius: 4px;
+}
+#login-screen input[type=text], #login-screen input[type=password], #login-screen input[type=submit] {
+	width: 100%;
+}
+#login-screen #issue {
+	margin-left: 1em;
+	font-size: 1em;
+}
+#login-screen #issue strong {font-weight: normal;}
+
+
+/* ------------------  Tous les boutons -------------------- */
 h2 a.button {
 	color: #333;
@@ -1246,5 +1245,5 @@
 	text-align: center;
 	text-decoration: none;
-	padding: .1em .5em 0 .5em;
+	padding: .1em .5em;
 	text-shadow: 0 1px 1px rgba(0,0,0,.3);
 	-webkit-border-radius: .2em;
@@ -1306,8 +1305,4 @@
 input[type=submit].delete {
 	color: #c00;
-	padding-bottom: .1em;
-}
-#entry-content .delete {
-	margin-left: 1em;
 }
 a.delete:hover,
@@ -1335,7 +1330,7 @@
 	border-radius: .5em;
 	margin-bottom: .1em;	
-	background: #2C8FD1 url(add.png) no-repeat 6px center;
+	background: #2C8FD1 url(add.png) no-repeat .2em center;
 	color: #fff;
-	padding: .2em 16px .2em 30px;
+	padding: .1em 1em .2em 28px;
 	border: 1px solid #2373A8;
 }
@@ -1343,2 +1338,23 @@
 	background-color: #2373A8;
 }
+
+form#filters {font-size: 100%; background: #f0f0f0; padding: 1em; border-radius: .5em; border: 1px solid #ddd;}
+form#filters .margintop {padding-top: 1.33em;}
+form#filters ul {list-style-type:none;margin: 0; padding: 0; margin-left: 1em;}
+form#filters .col30 {border-left: 1px solid #999;}
+form#filters .col30 h3 {margin-left: 1em;}
+p.line, li.line { position: relative; padding: 3px 0 0 28px; margin: 0 0 1em 0;}
+li.line input[type=submit] {position: absolute; left:0;top:0; padding: 0 .1em; margin: 0;}
+li.line input[type=checkbox], li.line input[type=checkbox] {position: absolute; left: 0; top: .2em; padding: 0 .1em; margin: 0;}
+li.line select { margin-right: 2em;}
+li.line label { display: block; width: 8em; float: left;}
+li.line label img {margin-right: 8px;}
+li.line span.or {
+	text-align: right;
+	margin-left: 5em;
+	font-weight: bold;
+}
+p.line label.or + select {margin-left: 2em;}
+li.line { padding: 0 0 0 20px; height: 1em;}
+li.line label {width: auto;}
+#available_filters input[type=submit] {padding: 0 .1em; margin-left: .5em;}
Index: admin/style/install.css
===================================================================
--- admin/style/install.css	(revision 269)
+++ admin/style/install.css	(revision 69)
@@ -7,11 +7,10 @@
 */
 body.install {
-	font: 0.875em Helvetica,Arial,sans-serif;
+	font: 0.8em "DejaVu Sans","Lucida Grande","Lucida Sans Unicode",Arial,sans-serif;
 	color: #000;
 	background-color: #fff;
-	line-height: 1.5em;
 }
 body.install #content {
-	width:32em;
+	width:500px;
 	margin:1em auto;
 }
@@ -21,5 +20,4 @@
 	-moz-border-radius:8px;
 	-webkit-border-radius:8px;
-	border-radius: 8px;
 }
 body.install h1,h2 {
@@ -42,9 +40,10 @@
 }
 body.install label {
+	font-weight: bold;
 	color: #555;
 }
 
 body.install .msg {
-	padding:10px 10px 10px 60px;
+	padding:10px 10px 10px 42px;
 	-moz-border-radius:8px;
 	-webkit-border-radius:8px;
@@ -56,15 +55,7 @@
 	background: #eef url(install/note.png) no-repeat 10px 10px;
 }
-a, a:link, a:visited {
-	color: #2373A8;
-	text-decoration: none;
-	border-bottom: 1px dotted #f90;
-}
-a:hover, a:active, a:focus {
-	text-decoration: underline;
-}
 
 div.error, p.error, div.message, p.message, div.static-msg, p.static-msg {
-	padding: 0.5em 0.5em 0.5em 60px;
+	padding: 0.5em 0.5em 0.5em 40px;
 	margin-bottom: 1em;
 	-moz-border-radius: 8px;
@@ -76,9 +67,9 @@
 }
 div.error, p.error {
-	background: #e5bfbf url(install/process_warning.png) no-repeat 5px 5px;
+	background: #e5bfbf url(msg-error.png) no-repeat 5px 5px;
 	color: #600;
 }
 div.message, p.message, div.static-msg, p.static-msg {
-	background: #666 url(install/note.png) no-repeat 5px 5px;
+	background: #666 url(msg-std.png) no-repeat 5px 5px;
 	color: #fff;
 }
@@ -96,7 +87,7 @@
 	font-weight : bold;
 }
-label.required abbr {
-	color: #dd0000;
-	font-size: 1.3em;
+label.required:before {
+	content : '* ';
+	color : #c00;
 }
 
@@ -132,31 +123,2 @@
 	-webkit-border-radius: 2px;
 }
-
-input[type=submit]{
-	font-size: 1.05em;
-	display: inline-block;
-	outline: none;
-	cursor: pointer;
-	text-align: center;
-	text-decoration: none;
-	padding: .1em .5em;
-	text-shadow: 0 1px 1px rgba(0,0,0,.3);
-	-webkit-border-radius: .2em;
-	-moz-border-radius: .2em;
-	border-radius: .2em;
-	margin-bottom: .1em;
-	color: #fff;
-	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);
-	width: 100%;
-}
-input[type=submit]:hover,
-input[type=submit]:focus {
-	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;
-}
Index: admin/trackbacks.php
===================================================================
--- admin/trackbacks.php	(revision 510)
+++ admin/trackbacks.php	(revision 196)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -95,5 +95,5 @@
 }
 
-echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.$page_title.'</span></h2>';
+echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.$page_title.'</h2>';
 
 echo '<p><a class="back" href="'.$core->getPostAdminURL($post->post_type,$id).'">'.
Index: admin/update.php
===================================================================
--- admin/update.php	(revision 270)
+++ admin/update.php	(revision 166)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
Index: admin/user.php
===================================================================
--- admin/user.php	(revision 557)
+++ admin/user.php	(revision 181)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -96,8 +96,4 @@
 		$cur->user_post_status = $user_post_status = $_POST['user_post_status'];
 		
-		if ($cur->user_id == $core->auth->userID() && $core->auth->isSuperAdmin()) {
-			// force super_user to true if current user
-			$cur->user_super = $user_super = true;
-		}
 		if ($core->auth->allowPassChange()) {
 			$cur->user_change_pwd = !empty($_POST['user_change_pwd']) ? 1 : 0;
@@ -154,9 +150,5 @@
 			$core->callBehavior('adminAfterUserCreate',$cur,$new_id);
 			
-			if (!empty($_POST['saveplus'])) {
-				http::redirect('user.php?add=1');
-			} else {
-				http::redirect('user.php?id='.$new_id.'&add=1');
-			}
+			http::redirect('user.php?id='.$new_id.'&add=1');
 		}
 	}
@@ -185,5 +177,5 @@
 }
 
-echo '<h2><a href="users.php">'.__('Users').'</a> &rsaquo; <span class="page-title">'.$page_title.'</span></h2>';
+echo '<h2><a href="users.php">'.__('Users').'</a> &rsaquo; '.$page_title.'</h2>';
 
 if ($user_id == $core->auth->userID()) {
@@ -199,5 +191,5 @@
 '<div class="col">'.
 '<p><label for="user_id" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Username:').' '.
-form::field('user_id',20,255,html::escapeHTML($user_id)).
+form::field('user_id',20,255,html::escapeHTML($user_id),'',2).
 '</label></p>'.
 '<p class="form-note">'.__('At least 2 characters using letters, numbers or symbols.').'</p>'.
@@ -206,5 +198,5 @@
 ($user_id != '' ? '' : '<abbr title="'.__('Required field').'">*</abbr> ').
 ($user_id != '' ? __('New password:') : __('Password:')).' '.
-form::password('new_pwd',20,255).
+form::password('new_pwd',20,255,'','',3).
 '</label></p>'.
 '<p class="form-note">'.__('Password must contain at least 6 characters.').'</p>'.
@@ -212,47 +204,46 @@
 '<p><label for="new_pwd_c" '.($user_id != '' ? '' : 'class="required"').'>'.
 ($user_id != '' ? '' : '<abbr title="'.__('Required field').'">*</abbr> ').__('Confirm password:').' '.
-form::password('new_pwd_c',20,255).
+form::password('new_pwd_c',20,255,'','',4).
 '</label></p>'.
 
 '<p><label for="user_name">'.__('Last Name:').' '.
-form::field('user_name',20,255,html::escapeHTML($user_name)).
+form::field('user_name',20,255,html::escapeHTML($user_name),'',5).
 '</label></p>'.
 
 '<p><label for="user_firstname">'.__('First Name:').' '.
-form::field('user_firstname',20,255,html::escapeHTML($user_firstname)).
+form::field('user_firstname',20,255,html::escapeHTML($user_firstname),'',6).
 '</label></p>'.
 
 '<p><label for="user_displayname">'.__('Display name:').' '.
-form::field('user_displayname',20,255,html::escapeHTML($user_displayname)).
+form::field('user_displayname',20,255,html::escapeHTML($user_displayname),'',7).
 '</label></p>'.
 
 '<p><label for="user_email">'.__('Email:').' '.
-form::field('user_email',20,255,html::escapeHTML($user_email)).
-'</label></p>'.
-'<p class="form-note">'.__('Mandatory for password recovering procedure.').'</p>'.
+form::field('user_email',20,255,html::escapeHTML($user_email),'',8).
+'</label></p>'.
 '</div>'.
 
 '<div class="col">'.
 '<p><label for="user_url">'.__('URL:').' '.
-form::field('user_url',30,255,html::escapeHTML($user_url)).
+form::field('user_url',30,255,html::escapeHTML($user_url),'',9).
 '</label></p>'.
 '<p><label for="user_post_format">'.__('Preferred format:').' '.
-form::combo('user_post_format',$formaters_combo,$user_options['post_format']).
+form::combo('user_post_format',$formaters_combo,$user_options['post_format'],'',10).
 '</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_lang">'.__('User language:').' '.
-form::combo('user_lang',$lang_combo,$user_lang,'l10n').
+form::combo('user_post_status',$status_combo,$user_post_status,'',11).
+'</label></p>'.
+
+'<p><label>'.__('Entry edit field height:').' '.
+form::field('user_edit_size',5,4,(integer) $user_options['edit_size'],'',12).
+'</label></p>'.
+
+'<p><label for="user_edit_size">'.__('User language:').' '.
+form::combo('user_lang',$lang_combo,$user_lang,'l10n',13).
 '</label></p>'.
 
 '<p><label for="user_tz">'.__('User timezone:').' '.
-form::combo('user_tz',dt::getZones(true,true),$user_tz).
+form::combo('user_tz',dt::getZones(true,true),$user_tz,'',14).
 '</label></p>';
 
@@ -260,12 +251,10 @@
 	echo
 	'<p><label for="user_change_pwd" class="classic">'.
-	form::checkbox('user_change_pwd','1',$user_change_pwd).' '.
+	form::checkbox('user_change_pwd','1',$user_change_pwd,'',15).' '.
 	__('Password change required to connect').'</label></p>';
 }
 
-$super_disabled = $user_super && $user_id == $core->auth->userID();
-
 echo
-'<p><label for="user_super" class="classic">'.form::checkbox('user_super','1',$user_super,'','',$super_disabled).' '.
+'<p><label for="user_super" class="classic">'.form::checkbox('user_super','1',$user_super,'',16).' '.
 __('Super administrator').'</label></p>'.
 '</div>'.
@@ -277,9 +266,10 @@
 
 echo
+'<fieldset>'.
 '<p><label for="your_pwd" '.($user_id != '' ? '' : 'class="required"').'>'.
 ($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').'" />').
+form::password('your_pwd',20,255,'','',17).'</label></p>'.
+'</fieldset>'.
+'<p class="clear"><input type="submit" accesskey="s" value="'.__('Save').'" tabindex="16" />'.
 ($user_id != '' ? form::hidden('id',$user_id) : '').
 $core->formNonce().
@@ -290,5 +280,5 @@
 if ($user_id)
 {
-	echo '<div class="clear fieldset"><h3>'.__('Permissions').'</h3>';
+	echo '<fieldset class="clear"><legend>'.__('Permissions').'</legend>';
 	
 	$permissions = $core->getUserPermissions($user_id);
@@ -308,5 +298,5 @@
 				html::escapeHTML($v['name']).'</a> ('.html::escapeHTML($k).') - '.
 				'<a href="permissions.php?blog_id[]='.$k.'&amp;user_id[]='.$user_id.'">'
-				.__('Change permissions').'</a></h4>';
+				.__('change permissions').'</a></h4>';
 				
 				echo '<ul>';
@@ -324,5 +314,5 @@
 	'<p><a href="permissions_blog.php?user_id[]='.$user_id.'">'.
 	__('Add new permissions').'</a></p>'.
-	'</div>';
+	'</fieldset>';
 }
 
Index: admin/users.php
===================================================================
--- admin/users.php	(revision 565)
+++ admin/users.php	(revision 520)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -24,7 +24,6 @@
 			# --BEHAVIOR-- adminBeforeUserDelete
 			$core->callBehavior('adminBeforeUserDelete',$u);
-			if ($u != $core->auth->userID()) {
-				$core->delUser($u);
-			}
+			
+			$core->delUser($u);
 		}
 		catch (Exception $e)
@@ -33,4 +32,5 @@
 		}
 	}
+	
 	if (!$core->error->flag()) {
 		http::redirect('users.php?del=1');
@@ -59,23 +59,19 @@
 );
 
-# --BEHAVIOR-- adminUsersActionsCombo
+# --BEHAVIOR-- adminUser	sActionsCombo
 $core->callBehavior('adminUsersActionsCombo',array(&$combo_action));
 
 
 # Get users
-$page = !empty($_GET['page']) ? $_GET['page'] : 1;
-$nb_per_page =  30;
-
-if (!empty($_GET['nb']) && (integer) $_GET['nb'] > 0) {
-	$nb_per_page = $_GET['nb'];
-}
+$user_list = new adminUserList($core);
 
 $q = !empty($_GET['q']) ? $_GET['q'] : '';
-$sortby = !empty($_GET['sortby']) ?	$_GET['sortby'] : 'user_id';
-$order = !empty($_GET['order']) ?		$_GET['order'] : 'asc';
-
-$params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page);
 
 $show_filters = false;
+
+$params = new ArrayObject();
+
+# - Limit, sortby and order filter
+$params = $user_list->applyFilters($params);
 
 # - Search filter
@@ -85,20 +81,11 @@
 }
 
-# - Sortby and order filter
-if ($sortby !== '' && in_array($sortby,$sortby_combo)) {
-	if ($order !== '' && in_array($order,$order_combo)) {
-		$params['order'] = $sortby.' '.$order;
-		$show_filters = true;
-	}
-}
-
 try {
 	$rs = $core->getUsers($params);
 	$counter = $core->getUsers($params,1);
-	$user_list = new adminUserList($core,$rs,$counter->f(0));
+	$user_list->setItems($rs,$counter->f(0));
 } catch (Exception $e) {
 	$core->error->add($e->getMessage());
 }
-
 
 /* DISPLAY
@@ -118,5 +105,5 @@
 	
 	echo 
-	'<h2 class="post-title">'.__('Users').'</h2>'.
+	'<h2>'.__('Users').'</h2>'.
 	'<p class="top-add"><strong><a class="button add" href="user.php">'.__('Create a new user').'</a></strong></p>';
 	
@@ -127,23 +114,10 @@
 	echo
 	'<form action="users.php" method="get" id="filters-form">'.
-	'<fieldset class="two-cols"><legend>'.__('Filters').'</legend>'.
+	'<fieldset><legend>'.__('Filters').'</legend>'.
 	
-	'<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="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>'.
+	'<p><input type="submit" value="'.__('Apply filters').'" /></p>'.
 	
 	'<br class="clear" />'. //Opera sucks
@@ -152,6 +126,5 @@
 	
 	# Show users
-	$user_list->display($page,$nb_per_page,
-	'<form action="dispatcher.php" method="get" id="form-users">'.
+	$user_list->display('<form action="dispatcher.php" method="get" id="form-users">'.
 	
 	'%s'.
@@ -166,4 +139,5 @@
 	'<input type="submit" value="'.__('ok').'" />'.
 	'</p>'.
+	$user_list->getFormFieldsAsHidden().
 	'</div>'.
 	'</form>'
Index: admin/xmlrpc.php
===================================================================
--- admin/xmlrpc.php	(revision 270)
+++ admin/xmlrpc.php	(revision 0)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
