Index: /extensions/GuestBook/include/functions.inc.php
===================================================================
--- /extensions/GuestBook/include/functions.inc.php	(revision 20180)
+++ /extensions/GuestBook/include/functions.inc.php	(revision 20181)
@@ -3,27 +3,31 @@
 if (!defined('GUESTBOOK_PATH')) die('Hacking attempt!');
 
-if (!function_exists('is_valid_email'))
+function gb_is_valid_email($mail_address)
 {
-  function is_valid_email($mail_address)
+  if (function_exists('email_check_format'))
   {
-    if (version_compare(PHP_VERSION, '5.2.0') >= 0)
-    {
-      return filter_var($mail_address, FILTER_VALIDATE_EMAIL)!==false;
-    }
-    else
-    {
-      $atom   = '[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]';   // before  arobase
-      $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name
-      $regex = '/^' . $atom . '+' . '(\.' . $atom . '+)*' . '@' . '(' . $domain . '{1,63}\.)+' . $domain . '{2,63}$/i';
+    return email_check_format($email_address);
+  }
+  else if (version_compare(PHP_VERSION, '5.2.0') >= 0)
+  {
+    return filter_var($mail_address, FILTER_VALIDATE_EMAIL)!==false;
+  }
+  else
+  {
+    $atom   = '[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]';   // before  arobase
+    $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name
+    $regex = '/^' . $atom . '+' . '(\.' . $atom . '+)*' . '@' . '(' . $domain . '{1,63}\.)+' . $domain . '{2,63}$/i';
 
-      if (!preg_match($regex, $mail_address)) return false;
-      return true;
-    }
+    return (bool)preg_match($regex, $mail_address);
   }
 }
 
-function is_valid_url($url)
+function gb_is_valid_url($url)
 {
-  if (version_compare(PHP_VERSION, '5.2.0') >= 0)
+  if (function_exists('url_check_format'))
+  {
+    return url_check_format($url);
+  }
+  else if (version_compare(PHP_VERSION, '5.2.0') >= 0)
   {
     return filter_var($url, FILTER_VALIDATE_URL)!==false;
@@ -33,6 +37,5 @@
     $regex = '#^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$#i';
 
-    if (!preg_match($regex, $url)) return false;
-    return true;
+    return (bool)preg_match($regex, $url);
   }
 }
Index: /extensions/GuestBook/include/functions_comment.inc.php
===================================================================
--- /extensions/GuestBook/include/functions_comment.inc.php	(revision 20180)
+++ /extensions/GuestBook/include/functions_comment.inc.php	(revision 20181)
@@ -6,5 +6,5 @@
   EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
 
-function insert_user_comment_guestbook( &$comm, $key, &$infos )
+function insert_user_comment_guestbook( &$comm, $key )
 {
   global $conf, $user, $page;
@@ -16,6 +16,5 @@
     )
    );
-
-  $infos = array();
+  
   if (!$conf['guestbook']['comments_validation'] or is_admin())
   {
@@ -75,5 +74,5 @@
     $comm['email'] = $user['email'];
   }
-  else if ( !empty($comm['email']) and !is_valid_email($comm['email']) )
+  else if ( !empty($comm['email']) and !gb_is_valid_email($comm['email']) )
   {
     array_push($page['errors'], l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)'));
@@ -86,5 +85,5 @@
     $comm['website'] = 'http://'.$comm['website'];
   }
-  if ( !empty($comm['website']) and !is_valid_url($comm['website']) )
+  if ( !empty($comm['website']) and !gb_is_valid_url($comm['website']) )
   {
     array_push($page['errors'], l10n('invalid website address'));
@@ -121,5 +120,5 @@
     if ($counter > 0)
     {
-      array_push( $infos, l10n('Anti-flood system : please wait for a moment before trying to post another comment') );
+      array_push($page['errors'], l10n('Anti-flood system : please wait for a moment before trying to post another comment') );
       $comment_action='reject';
     }
Index: /extensions/GuestBook/include/guestbook.inc.php
===================================================================
--- /extensions/GuestBook/include/guestbook.inc.php	(revision 20180)
+++ /extensions/GuestBook/include/guestbook.inc.php	(revision 20181)
@@ -1,4 +1,6 @@
 <?php
 if (!defined('GUESTBOOK_PATH')) die('Hacking attempt!');
+
+global $user;
 
 include(GUESTBOOK_PATH . '/include/functions.inc.php');
@@ -116,5 +118,5 @@
   include_once(GUESTBOOK_PATH.'include/functions_comment.inc.php');
 
-  $comment_action = insert_user_comment_guestbook($comm, @$_POST['key'], $page['infos']);
+  $comment_action = insert_user_comment_guestbook($comm, @$_POST['key']);
 
   switch ($comment_action)
@@ -303,4 +305,14 @@
     }
   }
+  if (is_classic_user())
+  {
+    $author = $user['username'];
+    $email = $user['email'];
+  }
+  if (empty($conf['comments_email_mandatory'])) // < 2.5 compatibility
+  {
+    $conf['comments_email_mandatory'] = false;
+  }
+
   $template->assign('comment_add',
       array(
@@ -308,9 +320,10 @@
         'KEY' => get_ephemeral_key(3),
         'CONTENT' => $content,
-        'SHOW_AUTHOR' => !is_classic_user(),
-        'AUTHOR' => $author ,
-        'WEBSITE' => $website ,
-        'EMAIL' => $email ,
+        'IS_LOGGED' => is_classic_user(),
+        'AUTHOR' => $author,
+        'WEBSITE' => $website,
+        'EMAIL' => $email,
         'ACTIVATE_RATING' => $conf['guestbook']['activate_rating'],
+        'EMAIL_MANDATORY' => $conf['comments_email_mandatory'],
       ));
 }
@@ -319,22 +332,4 @@
 $template->assign('GUESTBOOK_PATH', GUESTBOOK_PATH);
 
-$template->assign('clear_themes', array(
-  'clear',
-  'gally-minimalist',
-  'hr_os',
-  'hr_os_xl',
-  'kardon',
-  'montblancxl',
-  'Naive',
-  'OS_glass_clear',
-  'p0w0',
-  'Pure_autumn',
-  'Pure_clear_blue',
-  'Pure_sky',
-  'Pure_tr_clear_blue',
-  'simple-white',
-  'VerticalWhite',
-  ));
-
 $template->set_filename('index', dirname(__FILE__).'/../template/guestbook.tpl');
 
Index: /extensions/GuestBook/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/GuestBook/language/en_UK/plugin.lang.php	(revision 20180)
+++ /extensions/GuestBook/language/en_UK/plugin.lang.php	(revision 20181)
@@ -2,4 +2,6 @@
 
 $lang['Please enter your username'] = 'Please enter your username';
+$lang['Please enter your e-mail'] = 'Please enter your e-mail';
+$lang['Please enter a message'] = 'Please enter a message';
 $lang['invalid website address'] = 'invalid website address';
 $lang['GuestBook'] = 'Guestbook';
Index: /extensions/GuestBook/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/GuestBook/language/fr_FR/plugin.lang.php	(revision 20180)
+++ /extensions/GuestBook/language/fr_FR/plugin.lang.php	(revision 20181)
@@ -2,12 +2,14 @@
 
 $lang['Please enter your username'] = 'Veuillez renseigner votre nom';
+$lang['Please enter your e-mail'] = 'Veuillez renseigner votre e-mail';
+$lang['Please enter a message'] = 'Veuillez écrire un message';
 $lang['invalid website address'] = 'adresse du site web invalide';
 $lang['GuestBook'] = 'Livre d\'or';
 $lang['Sign the guestbook'] = 'Signer le livre d\'or';
-$lang['not publicly visible'] = 'not visible';
+$lang['not publicly visible'] = 'non visible';
 $lang['Website'] = 'Site web';
 $lang['* : mandatory fields'] = '* : champs obligatoires';
 $lang['There are %d messages'] = 'Il y a %d messages';
-$lang['Activate rating'] = 'Activater la notation';
+$lang['Activate rating'] = 'Activer la notation';
 $lang['%s says on %s :'] = '%s a dit le %s :';
 
Index: /extensions/GuestBook/template/comment_list.tpl
===================================================================
--- /extensions/GuestBook/template/comment_list.tpl	(revision 20180)
+++ /extensions/GuestBook/template/comment_list.tpl	(revision 20181)
@@ -13,5 +13,5 @@
       <a href="{$comment.U_CANCEL}">
         {'Cancel'|@translate}
-      </a>{if isset($comment.U_VALIDATE) or isset($comment.U_EDIT)} | {/if}
+      </a>{if isset($comment.U_VALIDATE)} | {/if}
     {/if}
     {if isset($comment.U_EDIT) and !isset($comment.IN_EDIT)}
Index: /extensions/GuestBook/template/guestbook.tpl
===================================================================
--- /extensions/GuestBook/template/guestbook.tpl	(revision 20180)
+++ /extensions/GuestBook/template/guestbook.tpl	(revision 20181)
@@ -1,6 +1,33 @@
 {combine_css path=$GUESTBOOK_PATH|@cat:"template/style.css"}
-{if $themeconf.name|in_array:$clear_themes}
-  {combine_css path=$GUESTBOOK_PATH|@cat:"template/style-clear.css"}
+{combine_script id="livevalidation" load="footer" path=$GUESTBOOK_PATH|@cat:"template/livevalidation.min.js"}
+
+{footer_script require='livevalidation'}
+{if !$comment_add.IS_LOGGED}
+var author = new LiveValidation('author', {ldelim} onlyOnSubmit: true });
+author.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter your username'|@translate}" });
 {/if}
+
+{if $add_comment.EMAIL_MANDATORY and (!$add_comment.IS_LOGGED or empty($add_comment.EMAIL))}
+var email = new LiveValidation('email', {ldelim} onlyOnSubmit: true });
+email.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter your e-mail'|@translate}" });
+email.add(Validate.Email, {ldelim} failureMessage: "{'mail address must be like xxx@yyy.eee (example : jack@altern.org)'|@translate}" });
+{/if}
+
+var website = new LiveValidation('website', {ldelim} onlyOnSubmit: true });
+website.add(Validate.Format, {ldelim} pattern: /^https?:\/\/(-\.)?([^\s\/?\.#-]+\.?)+(\/[^\s]*)?$/i,
+  failureMessage: "{'invalid website address'|@translate}"});
+
+var content = new LiveValidation('contentid', {ldelim} onlyOnSubmit: true });
+content.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a message'|@translate}" });
+  
+jQuery("#addComment").hide();
+jQuery("#guestbookAdd").css('width','180px');
+jQuery("#expandForm").click(function() {ldelim}
+  jQuery("#guestbookAdd").animate({ldelim}"width": "550px"}, function() {ldelim}
+    jQuery("#expandForm").slideUp();
+    jQuery("#addComment").slideDown("slow");
+  });
+});
+{/footer_script}
 
 {if $comment_add.ACTIVATE_RATING}
@@ -13,12 +40,4 @@
   {/footer_script}
 {/if}
-
-{footer_script}
-jQuery("#expandForm").click(function() {ldelim}
-  jQuery("#guestbookAdd").animate({ldelim}"width": "500px"}, function() {ldelim}
-    jQuery("#addComment").slideDown("slow");
-  });
-});
-{/footer_script}
 
 
@@ -41,38 +60,52 @@
 {if isset($comment_add)}
 <div id="guestbookAdd">
-<h4 id="expandForm">{'Sign the guestbook'|@translate}</h4>
-<form method="post" action="{$comment_add.F_ACTION}" id="addComment" style="display:none;">
-  <table>
-  {if $comment_add.SHOW_AUTHOR}
-    <tr>
-    <td>
-      <p><label for="author">{'Author'|@translate}* :</label></p>
-      <p><input type="text" name="author" id="author" value="{$comment_add.AUTHOR}"></p>
-    </td>
-    <td>
-      <p><label for="email">{'Email address'|@translate} ({'not publicly visible'|@translate}) :</label></p>
-      <p><input type="text" name="email" id="email" size="30" value="{$comment_add.EMAIL}"></p>
-    </td>
-    </tr>
-  {/if}
-    <tr>
-  {if $comment_add.ACTIVATE_RATING}
-    <td>
-      <p>{'Rate'|@translate} :</p>
-      <p><span id="comment_rate"></span></p>
-    </td>
-  {/if}
-    <td>
-      <p><label for="website">{'Website'|@translate} :</label></p>
-      <p><input type="text" name="website" id="website" size="30" value="{$comment_add.WEBSITE}"></p>
-    </td>
-    </tr>
-  </table>
-  
-  <p><label for="contentid">{'Comment'|@translate}* :</label></p>
-  <p><textarea name="content" id="contentid" rows="10" style="width:100%;">{$comment_add.CONTENT}</textarea></p>
-  <p><input type="hidden" name="key" value="{$comment_add.KEY}">
-    <input type="submit" value="{'Submit'|@translate}"> {'* : mandatory fields'|@translate}</p>
-</form>
+  <h4 id="expandForm">{'Sign the guestbook'|@translate}</h4>
+  <form method="post" action="{$comment_add.F_ACTION}" id="addComment" class="contact">
+    <table>
+    {if not $comment_add.IS_LOGGED or empty($comment_add.EMAIL)}
+      <tr>
+        <td>
+          <label for="author">{'Author'|@translate}* :</label>
+        {if $comment_add.IS_LOGGED}
+          {$comment_add.AUTHOR}
+          <input type="hidden" name="author" value="{$comment_add.AUTHOR}">
+        {else}
+          <input type="text" name="author" id="author" value="{$comment_add.AUTHOR}">
+        {/if}
+        </td>
+        <td>
+          <label for="email">{'Email address'|@translate}{if $comment_add.EMAIL_MANDATORY}*{/if} ({'not publicly visible'|@translate}) :</label>
+          <input type="text" name="email" id="email" value="{$comment_add.EMAIL}">
+        </td>
+      </tr>
+    {/if}
+      <tr>
+      {if $comment_add.ACTIVATE_RATING}
+        <td>
+          <label>{'Rate'|@translate} :</label>
+          <span id="comment_rate"></span>
+        </td>
+      {/if}
+        <td>
+          <label for="website">{'Website'|@translate} :</label>
+          <input type="text" name="website" id="website" value="{$comment_add.WEBSITE}">
+        </td>
+      </tr>
+      <tr>
+        <td colspan="2">
+          <label for="contentid">{'Comment'|@translate}* :</label>
+          <textarea name="content" id="contentid" rows="7">{$comment_add.CONTENT}</textarea>
+        </td>
+      </tr>
+      <tr>
+        <td colspan="2">
+          <input type="submit" value="{'Send'|@translate}"> 
+          {'* : mandatory fields'|@translate}
+        </td>
+      </tr>
+    </table>
+    
+    <input type="hidden" name="key" value="{$comment_add.KEY}">
+  </form>
 </div>
 {/if}
Index: /extensions/GuestBook/template/livevalidation.min.js
===================================================================
--- /extensions/GuestBook/template/livevalidation.min.js	(revision 20181)
+++ /extensions/GuestBook/template/livevalidation.min.js	(revision 20181)
@@ -0,0 +1,4 @@
+// LiveValidation 1.3 (standalone version)
+// Copyright (c) 2007-2008 Alec Hill (www.livevalidation.com)
+// LiveValidation is licensed under the terms of the MIT License
+var LiveValidation=function(B,A){this.initialize(B,A);};LiveValidation.VERSION="1.3 standalone";LiveValidation.TEXTAREA=1;LiveValidation.TEXT=2;LiveValidation.PASSWORD=3;LiveValidation.CHECKBOX=4;LiveValidation.SELECT=5;LiveValidation.FILE=6;LiveValidation.massValidate=function(C){var D=true;for(var B=0,A=C.length;B<A;++B){var E=C[B].validate();if(D){D=E;}}return D;};LiveValidation.prototype={validClass:"LV_valid",invalidClass:"LV_invalid",messageClass:"LV_validation_message",validFieldClass:"LV_valid_field",invalidFieldClass:"LV_invalid_field",initialize:function(D,C){var A=this;if(!D){throw new Error("LiveValidation::initialize - No element reference or element id has been provided!");}this.element=D.nodeName?D:document.getElementById(D);if(!this.element){throw new Error("LiveValidation::initialize - No element with reference or id of '"+D+"' exists!");}this.validations=[];this.elementType=this.getElementType();this.form=this.element.form;var B=C||{};this.validMessage=B.validMessage||"Thankyou!";var E=B.insertAfterWhatNode||this.element;this.insertAfterWhatNode=E.nodeType?E:document.getElementById(E);this.onValid=B.onValid||function(){this.insertMessage(this.createMessageSpan());this.addFieldClass();};this.onInvalid=B.onInvalid||function(){this.insertMessage(this.createMessageSpan());this.addFieldClass();};this.onlyOnBlur=B.onlyOnBlur||false;this.wait=B.wait||0;this.onlyOnSubmit=B.onlyOnSubmit||false;if(this.form){this.formObj=LiveValidationForm.getInstance(this.form);this.formObj.addField(this);}this.oldOnFocus=this.element.onfocus||function(){};this.oldOnBlur=this.element.onblur||function(){};this.oldOnClick=this.element.onclick||function(){};this.oldOnChange=this.element.onchange||function(){};this.oldOnKeyup=this.element.onkeyup||function(){};this.element.onfocus=function(F){A.doOnFocus(F);return A.oldOnFocus.call(this,F);};if(!this.onlyOnSubmit){switch(this.elementType){case LiveValidation.CHECKBOX:this.element.onclick=function(F){A.validate();return A.oldOnClick.call(this,F);};case LiveValidation.SELECT:case LiveValidation.FILE:this.element.onchange=function(F){A.validate();return A.oldOnChange.call(this,F);};break;default:if(!this.onlyOnBlur){this.element.onkeyup=function(F){A.deferValidation();return A.oldOnKeyup.call(this,F);};}this.element.onblur=function(F){A.doOnBlur(F);return A.oldOnBlur.call(this,F);};}}},destroy:function(){if(this.formObj){this.formObj.removeField(this);this.formObj.destroy();}this.element.onfocus=this.oldOnFocus;if(!this.onlyOnSubmit){switch(this.elementType){case LiveValidation.CHECKBOX:this.element.onclick=this.oldOnClick;case LiveValidation.SELECT:case LiveValidation.FILE:this.element.onchange=this.oldOnChange;break;default:if(!this.onlyOnBlur){this.element.onkeyup=this.oldOnKeyup;}this.element.onblur=this.oldOnBlur;}}this.validations=[];this.removeMessageAndFieldClass();},add:function(A,B){this.validations.push({type:A,params:B||{}});return this;},remove:function(B,D){var E=false;for(var C=0,A=this.validations.length;C<A;C++){if(this.validations[C].type==B){if(this.validations[C].params==D){E=true;break;}}}if(E){this.validations.splice(C,1);}return this;},deferValidation:function(B){if(this.wait>=300){this.removeMessageAndFieldClass();}var A=this;if(this.timeout){clearTimeout(A.timeout);}this.timeout=setTimeout(function(){A.validate();},A.wait);},doOnBlur:function(A){this.focused=false;this.validate(A);},doOnFocus:function(A){this.focused=true;this.removeMessageAndFieldClass();},getElementType:function(){switch(true){case (this.element.nodeName.toUpperCase()=="TEXTAREA"):return LiveValidation.TEXTAREA;case (this.element.nodeName.toUpperCase()=="INPUT"&&this.element.type.toUpperCase()=="TEXT"):return LiveValidation.TEXT;case (this.element.nodeName.toUpperCase()=="INPUT"&&this.element.type.toUpperCase()=="PASSWORD"):return LiveValidation.PASSWORD;case (this.element.nodeName.toUpperCase()=="INPUT"&&this.element.type.toUpperCase()=="CHECKBOX"):return LiveValidation.CHECKBOX;case (this.element.nodeName.toUpperCase()=="INPUT"&&this.element.type.toUpperCase()=="FILE"):return LiveValidation.FILE;case (this.element.nodeName.toUpperCase()=="SELECT"):return LiveValidation.SELECT;case (this.element.nodeName.toUpperCase()=="INPUT"):throw new Error("LiveValidation::getElementType - Cannot use LiveValidation on an "+this.element.type+" input!");default:throw new Error("LiveValidation::getElementType - Element must be an input, select, or textarea!");}},doValidations:function(){this.validationFailed=false;for(var C=0,A=this.validations.length;C<A;++C){var B=this.validations[C];switch(B.type){case Validate.Presence:case Validate.Confirmation:case Validate.Acceptance:this.displayMessageWhenEmpty=true;this.validationFailed=!this.validateElement(B.type,B.params);break;default:this.validationFailed=!this.validateElement(B.type,B.params);break;}if(this.validationFailed){return false;}}this.message=this.validMessage;return true;},validateElement:function(A,C){var D=(this.elementType==LiveValidation.SELECT)?this.element.options[this.element.selectedIndex].value:this.element.value;if(A==Validate.Acceptance){if(this.elementType!=LiveValidation.CHECKBOX){throw new Error("LiveValidation::validateElement - Element to validate acceptance must be a checkbox!");}D=this.element.checked;}var E=true;try{A(D,C);}catch(B){if(B instanceof Validate.Error){if(D!==""||(D===""&&this.displayMessageWhenEmpty)){this.validationFailed=true;this.message=B.message;E=false;}}else{throw B;}}finally{return E;}},validate:function(){if(!this.element.disabled){var A=this.doValidations();if(A){this.onValid();return true;}else{this.onInvalid();return false;}}else{return true;}},enable:function(){this.element.disabled=false;return this;},disable:function(){this.element.disabled=true;this.removeMessageAndFieldClass();return this;},createMessageSpan:function(){var A=document.createElement("span");var B=document.createTextNode(this.message);A.appendChild(B);return A;},insertMessage:function(B){this.removeMessage();if((this.displayMessageWhenEmpty&&(this.elementType==LiveValidation.CHECKBOX||this.element.value==""))||this.element.value!=""){var A=this.validationFailed?this.invalidClass:this.validClass;B.className+=" "+this.messageClass+" "+A;if(this.insertAfterWhatNode.nextSibling){this.insertAfterWhatNode.parentNode.insertBefore(B,this.insertAfterWhatNode.nextSibling);}else{this.insertAfterWhatNode.parentNode.appendChild(B);}}},addFieldClass:function(){this.removeFieldClass();if(!this.validationFailed){if(this.displayMessageWhenEmpty||this.element.value!=""){if(this.element.className.indexOf(this.validFieldClass)==-1){this.element.className+=" "+this.validFieldClass;}}}else{if(this.element.className.indexOf(this.invalidFieldClass)==-1){this.element.className+=" "+this.invalidFieldClass;}}},removeMessage:function(){var A;var B=this.insertAfterWhatNode;while(B.nextSibling){if(B.nextSibling.nodeType===1){A=B.nextSibling;break;}B=B.nextSibling;}if(A&&A.className.indexOf(this.messageClass)!=-1){this.insertAfterWhatNode.parentNode.removeChild(A);}},removeFieldClass:function(){if(this.element.className.indexOf(this.invalidFieldClass)!=-1){this.element.className=this.element.className.split(this.invalidFieldClass).join("");}if(this.element.className.indexOf(this.validFieldClass)!=-1){this.element.className=this.element.className.split(this.validFieldClass).join(" ");}},removeMessageAndFieldClass:function(){this.removeMessage();this.removeFieldClass();}};var LiveValidationForm=function(A){this.initialize(A);};LiveValidationForm.instances={};LiveValidationForm.getInstance=function(A){var B=Math.random()*Math.random();if(!A.id){A.id="formId_"+B.toString().replace(/\./,"")+new Date().valueOf();}if(!LiveValidationForm.instances[A.id]){LiveValidationForm.instances[A.id]=new LiveValidationForm(A);}return LiveValidationForm.instances[A.id];};LiveValidationForm.prototype={initialize:function(B){this.name=B.id;this.element=B;this.fields=[];this.oldOnSubmit=this.element.onsubmit||function(){};var A=this;this.element.onsubmit=function(C){return(LiveValidation.massValidate(A.fields))?A.oldOnSubmit.call(this,C||window.event)!==false:false;};},addField:function(A){this.fields.push(A);},removeField:function(C){var D=[];for(var B=0,A=this.fields.length;B<A;B++){if(this.fields[B]!==C){D.push(this.fields[B]);}}this.fields=D;},destroy:function(A){if(this.fields.length!=0&&!A){return false;}this.element.onsubmit=this.oldOnSubmit;LiveValidationForm.instances[this.name]=null;return true;}};var Validate={Presence:function(B,C){var C=C||{};var A=C.failureMessage||"Can't be empty!";if(B===""||B===null||B===undefined){Validate.fail(A);}return true;},Numericality:function(J,E){var A=J;var J=Number(J);var E=E||{};var F=((E.minimum)||(E.minimum==0))?E.minimum:null;var C=((E.maximum)||(E.maximum==0))?E.maximum:null;var D=((E.is)||(E.is==0))?E.is:null;var G=E.notANumberMessage||"Must be a number!";var H=E.notAnIntegerMessage||"Must be an integer!";var I=E.wrongNumberMessage||"Must be "+D+"!";var B=E.tooLowMessage||"Must not be less than "+F+"!";var K=E.tooHighMessage||"Must not be more than "+C+"!";if(!isFinite(J)){Validate.fail(G);}if(E.onlyInteger&&(/\.0+$|\.$/.test(String(A))||J!=parseInt(J))){Validate.fail(H);}switch(true){case (D!==null):if(J!=Number(D)){Validate.fail(I);}break;case (F!==null&&C!==null):Validate.Numericality(J,{tooLowMessage:B,minimum:F});Validate.Numericality(J,{tooHighMessage:K,maximum:C});break;case (F!==null):if(J<Number(F)){Validate.fail(B);}break;case (C!==null):if(J>Number(C)){Validate.fail(K);}break;}return true;},Format:function(C,E){var C=String(C);var E=E||{};var A=E.failureMessage||"Not valid!";var B=E.pattern||/./;var D=E.negate||false;if(!D&&!B.test(C)){Validate.fail(A);}if(D&&B.test(C)){Validate.fail(A);}return true;},Email:function(B,C){var C=C||{};var A=C.failureMessage||"Must be a valid email address!";Validate.Format(B,{failureMessage:A,pattern:/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i});return true;},Length:function(F,G){var F=String(F);var G=G||{};var E=((G.minimum)||(G.minimum==0))?G.minimum:null;var H=((G.maximum)||(G.maximum==0))?G.maximum:null;var C=((G.is)||(G.is==0))?G.is:null;var A=G.wrongLengthMessage||"Must be "+C+" characters long!";var B=G.tooShortMessage||"Must not be less than "+E+" characters long!";var D=G.tooLongMessage||"Must not be more than "+H+" characters long!";switch(true){case (C!==null):if(F.length!=Number(C)){Validate.fail(A);}break;case (E!==null&&H!==null):Validate.Length(F,{tooShortMessage:B,minimum:E});Validate.Length(F,{tooLongMessage:D,maximum:H});break;case (E!==null):if(F.length<Number(E)){Validate.fail(B);}break;case (H!==null):if(F.length>Number(H)){Validate.fail(D);}break;default:throw new Error("Validate::Length - Length(s) to validate against must be provided!");}return true;},Inclusion:function(H,F){var F=F||{};var K=F.failureMessage||"Must be included in the list!";var G=(F.caseSensitive===false)?false:true;if(F.allowNull&&H==null){return true;}if(!F.allowNull&&H==null){Validate.fail(K);}var D=F.within||[];if(!G){var A=[];for(var C=0,B=D.length;C<B;++C){var I=D[C];if(typeof I=="string"){I=I.toLowerCase();}A.push(I);}D=A;if(typeof H=="string"){H=H.toLowerCase();}}var J=false;for(var E=0,B=D.length;E<B;++E){if(D[E]==H){J=true;}if(F.partialMatch){if(H.indexOf(D[E])!=-1){J=true;}}}if((!F.negate&&!J)||(F.negate&&J)){Validate.fail(K);}return true;},Exclusion:function(A,B){var B=B||{};B.failureMessage=B.failureMessage||"Must not be included in the list!";B.negate=true;Validate.Inclusion(A,B);return true;},Confirmation:function(C,D){if(!D.match){throw new Error("Validate::Confirmation - Error validating confirmation: Id of element to match must be provided!");}var D=D||{};var B=D.failureMessage||"Does not match!";var A=D.match.nodeName?D.match:document.getElementById(D.match);if(!A){throw new Error("Validate::Confirmation - There is no reference with name of, or element with id of '"+D.match+"'!");}if(C!=A.value){Validate.fail(B);}return true;},Acceptance:function(B,C){var C=C||{};var A=C.failureMessage||"Must be accepted!";if(!B){Validate.fail(A);}return true;},Custom:function(D,E){var E=E||{};var B=E.against||function(){return true;};var A=E.args||{};var C=E.failureMessage||"Not valid!";if(!B(D,A)){Validate.fail(C);}return true;},now:function(A,D,C){if(!A){throw new Error("Validate::now - Validation function must be provided!");}var E=true;try{A(D,C||{});}catch(B){if(B instanceof Validate.Error){E=false;}else{throw B;}}finally{return E;}},fail:function(A){throw new Validate.Error(A);},Error:function(A){this.message=A;this.name="ValidationError";}};
Index: tensions/GuestBook/template/style-clear.css
===================================================================
--- /extensions/GuestBook/template/style-clear.css	(revision 20180)
+++ 	(revision )
@@ -1,24 +1,0 @@
-#guestbookAdd {
-  background: #ccc;
-  background: -moz-linear-gradient(top, #ccc 0%, #bbb 100%);
-  background: -webkit-linear-gradient(top, #ccc 0%, #bbb 100%);
-  background: -o-linear-gradient(top, #ccc 0%, #bbb 100%);
-  background: -ms-linear-gradient(top, #ccc 0%, #bbb 100%);
-  background: linear-gradient(top, #ccc 0%, #bbb 100%);
-  border-color:#eee;
-  box-shadow:5px 5px 5px rgba(0, 0, 0, 0.20);
-  color:#444;
-}
-
-#guestbookAdd h4:hover {
-  color:#111;
-}
-
-.commentHeader  {
-  background:#ccc;
-  color:#444;
-}
-
-.commentHeader a {
-  color:#005E89;
-}
Index: /extensions/GuestBook/template/style.css
===================================================================
--- /extensions/GuestBook/template/style.css	(revision 20180)
+++ /extensions/GuestBook/template/style.css	(revision 20181)
@@ -1,16 +1,10 @@
 #guestbookAdd {
   padding:15px;
-  width:180px;
+  width:550px;
   margin:10px auto 25px auto;
-  background: #333333;
-  background: -moz-linear-gradient(top, #333333 0%, #252525 100%);
-  background: -webkit-linear-gradient(top, #333333 0%, #252525 100%);
-  background: -o-linear-gradient(top, #333333 0%, #252525 100%);
-  background: -ms-linear-gradient(top, #333333 0%, #252525 100%);
-  background: linear-gradient(top, #333333 0%, #252525 100%);
   border-radius:5px;
   border:1px solid #555;
   box-shadow:5px 5px 5px rgba(0, 0, 0, 0.25);
-  color:#aaa;
+  overflow:hidden;
 }
 
@@ -19,17 +13,51 @@
   cursor:pointer;
   text-align:center;
+  font-size:13px;
 }
-  #guestbookAdd h4:hover {
-    color:#fff;
-  }
+  
 
-#guestbookAdd table {
+.contact table {
   width:100%;
   text-align:left;
 }
+  .contact table td {
+    width:50%;
+    text-align:left;
+  }
+.contact label {
+  font-weight:bold;
+  display:block;
+}
+.contact input[type="text"], .contact textarea, .contact select {
+  border-radius:2px;
+  padding:3px;
+}
+.contact textarea {
+  width:535px;
+}
+.contact input[type="text"] {
+  width:260px;
+}
 
-#addComment {
-  margin-top:5px;
+
+.LV_validation_message{
+  display:block;
+  font-weight:bold;
+  margin:0 0 0 5px;
 }
+.LV_valid {
+   display:none;
+}
+.LV_invalid {
+  color:#cc0000;
+}
+.LV_invalid_field, 
+input.LV_invalid_field:hover, 
+input.LV_invalid_field:active,
+textarea.LV_invalid_field:hover, 
+textarea.LV_invalid_field:active {
+  border: 1px solid #cc0000;
+}
+
 
 p.comment_count {
@@ -40,5 +68,5 @@
 }
 
-#guestbookAdd p, .commentElement p {
+.commentElement p {
   text-align:left;
   margin-bottom:0.5em;
@@ -47,13 +75,18 @@
 
 .commentElement {
-  padding:0;
+  padding:0 !important;
   list-style:none;
   text-align:left;
+  border:1px solid #555;
+  border-radius:5px;
+  margin:5px;
+  overflow:hidden;
 }
   .commentElement .description {
     padding:7px !important;
+    min-height:0;
   }
   .commentHeader  {
-    background:#444;
+    background:rgba(127,127,127,0.5);
     margin:-7px;
     margin-bottom:0;
