Index: /extensions/Piwecard/css/piwecard.css
===================================================================
--- /extensions/Piwecard/css/piwecard.css	(revision 19923)
+++ /extensions/Piwecard/css/piwecard.css	(revision 19923)
@@ -0,0 +1,65 @@
+#addECardForm {
+	line-height: 1.5em;
+	text-align: left;
+}
+
+#addECardForm  .ecard_field {
+	padding-bottom: 0.5em;
+}
+
+#addECardForm .ecard_label {
+	vertical-align: middle;
+	width: 30%;
+	float: left;
+}
+
+#addECardForm  .ecard_input_right {
+	float: left;
+	width: 70%;
+}
+
+#addECardForm  .ecard_input_right textarea {
+	width: 100%;
+}
+
+#addECardForm  .ecard_input_right input {
+	width: 100%;
+}
+
+#addECardForm  .ecard_name {
+	float: left;
+	width: 35%;
+}
+
+#addECardForm  .ecard_name input {
+	width: 90%;
+}
+
+#addECardForm  .ecard_email {
+	float: left;
+	width: 35%;
+}
+
+#addECardForm  .ecard_email input {
+	width: 100%;
+}
+
+#addECardForm  .ecard_submit {
+	text-align: center;
+}
+
+#addECardForm .ecard_mandatory_fields {
+	color: #ff0000;
+	font-style: italic;
+}
+
+#addECardForm .ecard_error {
+	color: #ff0000;
+	font-weight: bold;
+}
+
+#addECardForm .ecard_error_input {
+	border: 1px solid rgb(255, 112, 112);
+	color: rgb(255, 112, 112);
+	font-weight: bold;
+}
Index: /extensions/Piwecard/include/ecard.class.php
===================================================================
--- /extensions/Piwecard/include/ecard.class.php	(revision 19922)
+++ /extensions/Piwecard/include/ecard.class.php	(revision 19923)
@@ -274,5 +274,5 @@
 	function display_ecard_to_picture() {
 		global $page, $user, $template;
-
+		
 		// Init user groups
 		$this->get_user_groups();
@@ -366,11 +366,11 @@
 			
 				// Template informations
-				$template->assign( 'ecard', array(
-						'sujet' => l10n('ecard_send_title'),
+				$template->assign('ecard', array(
+						'subject' => l10n('ecard_send_title'),
 						'message' => l10n('ecard_send_message'),
-						'votrenom' => $user['username'],	//"votre nom",
-						'votremail' => $user['email'], 		//"votre mail (test@test.com)",
-						'sonnom' => l10n('ecard_send_dest_name'),
-						'sonmail' => l10n('ecard_send_dest_mail'),
+						'sender_name' => $user['username'],
+						'sender_email' => $user['email'],
+						'recipient_name' => l10n('ecard_send_dest_name'),
+						'recipient_email' => l10n('ecard_send_dest_mail'),
 						'copy'	=> $this->my_config['send_copy'] ? 'checked="checked"' : '',
 						'changemail' => ($this->my_config['expmail_change'] ? '' : 'disabled="disabled"')
@@ -379,40 +379,35 @@
 				// Template add for the active parameter choice by the user
 				if ($this->my_config['active_parameter']) {	// Allowed for the user
-					$template->append('ECARD_ACTIV',array('ID' => 0,'NAME' => l10n('ecard_nolimit'),'SELECTED' => ($this->my_config['activ'] == 0 ? 'checked' : '')));
+					$template->append('ecard_validity',array('id' => 0, 'name' => l10n('ecard_nolimit'), 'selected' => ($this->my_config['activ'] == 0 ? 'checked' : '')));
 					for($jj=5; $jj < 30; $jj+=5)
-						$template->append('ECARD_ACTIV',array('ID' => $jj,'NAME' => $jj ,'SELECTED' => ($this->my_config['activ'] == $jj ? 'checked' : '')));
+						$template->append('ecard_validity',array('id' => $jj, 'name' => $jj , 'selected' => ($this->my_config['activ'] == $jj ? 'checked' : '')));
 				}
 							
 				// Template add for the send method to be chose, by the user
 				// default : text
-				$template->append('ECARD_SEND',array('ID' => 0,'NAME' => l10n('ecard_maillink'),'SELECTED' => ($this->my_config['send_HTML'] ?  '' : 'checked')));
+				$template->append('ecard_send_method',array('id' => 0, 'name' => l10n('ecard_maillink'), 'selected' => ($this->my_config['send_HTML'] ?  '' : 'checked')));
 				if ($this->my_config['send_HTML']) {	// Allowed for the user
-					$template->append('ECARD_SEND',array('ID' => 1,'NAME' => l10n('ecard_mailhtml') ,'SELECTED' => ($this->my_config['send_HTML'] ? 'checked' : '')));
+					$template->append('ecard_send_method',array('id' => 1, 'name' => l10n('ecard_mailhtml'), 'selected' => ($this->my_config['send_HTML'] ? 'checked' : '')));
 				}
 
 				// Send the card
 				if (isset($_POST['ecard_submit'])) {
-					$send_method = $_POST['ecard_send'];
+					$send_method = $_POST['ecard_send_method'];
+					
 					// If conf doesn't allow to modify the %votremail param, force it to user mail
-					if (!isset($_POST['votremail']))
-						$_POST['votremail'] = $user['email'];
+					if (!isset($_POST['ecard_sender_email']))
+						$_POST['ecard_sender_email'] = $user['email'];
 					
 					// Initialize the array for image element
 					$image_element = array();
 
-					// Get all image informations - to be replaced by a Core PWG function
-					$query = '
-					SELECT *
-					  FROM '.IMAGES_TABLE.'
-					  WHERE id = '.$page['image_id']
-					  .' LIMIT 1'
-					  .';';
-
+					// Get all image informations
+					$query = 'SELECT * FROM '.IMAGES_TABLE.' WHERE id='.$page['image_id'].' LIMIT 1;';
 					$result = pwg_query($query);
 					if (isset($result))
 						$image_element = mysql_fetch_array($result);
 					
-					// Generate random number 
-					$image_element['next_element_id']  = $this->random(15);
+					// Generate random number
+					$image_element['next_element_id']  = $this->random(64);
 
 					// Image infos
@@ -423,52 +418,47 @@
 								$image_element['imginfos'] .= ' ('.$image_element['author'].')';
 						}
-							
 					}
-						
-					if ($this->debug)	echo "Next_element=".$image_element['next_element_id']."\n";
-
-					$query = '
-					INSERT INTO ' . ECARD_TABLE .'
-					VALUES ( "'.$image_element['next_element_id'].'","'
-							 .$_POST['votrenom'].'","'
-							 .$_POST['sonnom'].'","'
-							 .$_POST['votremail'].'","'
-							 .$_POST['sonmail'].'","'
-							 .$_POST['sujet'].'","'
-							 .$_POST['message'].'",'
-							 .$image_element['id'].',
-							 now(),'
-							 .(isset($_POST['ecard_activ']) ? $_POST['ecard_activ'] : $this->my_config['activ'])
-							 .');';
+
+					$insert = array(
+								'numero' => $image_element['next_element_id'],
+								'nomexp' => $_POST['ecard_sender_name'],
+								'nomdest' => $_POST['ecard_recipient_name'],
+								'adrexp' => $_POST['ecard_sender_email'],
+								'adrdest' => $_POST['ecard_recipient_email'],
+								'sujet' => $_POST['ecard_subject'],
+								'message' => $_POST['ecard_message'],
+								'image' => $image_element['id'],
+								'date' => date("Y-m-d H:i:s"),
+								'duration' => (isset($_POST['ecard_validity']) ? $_POST['ecard_validity'] : $this->my_config['activ']),
+					);
 					// TO DO : add valid date (end date or duration) / add number (increment number) / 
-
-					pwg_query($query);
+					single_insert(ECARD_TABLE, $insert);
 
 					// Complete the image_element array with Link for the ecard url to be added in the mail
 					set_make_full_url();
-					$chemin = embellish_url(get_absolute_root_url() . './index.php?/ecard/'.$image_element['next_element_id']);
-					$image_element['chemin'] = $chemin;
+					$mail_url = embellish_url(get_absolute_root_url() . './index.php?/ecard/'.$image_element['next_element_id']);
+					$image_element['mail_url'] = $mail_url;
 					unset_make_full_url();
 
 					// Complete the image_element with the url to point to the image url
 					set_make_full_url();
-					$image_element['url_picture'] = duplicate_picture_url(
-					  array(
-						'image_id' => $image_element['id'],
-						'image_file' => $image_element['file']
-					  ),
-					  array('start')
+					$image_element['picture_url'] = duplicate_picture_url(
+						array(
+							'image_id' => $image_element['id'],
+							'image_file' => $image_element['file']
+						),
+						array('start')
 					);
 					unset_make_full_url();
 
-					$sujetdumail = htmlspecialchars_decode($this->parse( $this->my_config['subject_link'], $_POST));
+					$mail_subject = htmlspecialchars_decode($this->parse( $this->my_config['subject_link'], $_POST));
 					
 					switch($send_method) {
 					case 0 : // text
 						// Get the standard message (in admin param) and parse it with the informations
-						$messagemail =  stripslashes(htmlspecialchars_decode($this->parse($this->my_config['message_link'], $_POST, $image_element)));
-						$mail_arg=array('from' => $_POST['votremail'],
-										'subject' => $sujetdumail,
-										'content' => $messagemail,
+						$mail_message =  stripslashes(htmlspecialchars_decode($this->parse($this->my_config['message_link'], $_POST, $image_element)));
+						$mail_arg=array('from' => $_POST['ecard_sender_email'],
+										'subject' => $mail_subject,
+										'content' => $mail_message,
 										'content_format' => "text/plain",
 										'email_format' => "text/html"
@@ -477,25 +467,24 @@
 						break;
 					case 1 : // html
-						$messagemailHTML =  stripslashes(htmlspecialchars_decode($this->parse($this->my_config['message_HTML'], $_POST, $image_element)));
-						$mail_arg=array('from' => $_POST['votremail'],
-										'subject' => $sujetdumail,
-										'content' => $messagemailHTML,
+						$mail_message_HTML =  stripslashes(htmlspecialchars_decode($this->parse($this->my_config['message_HTML'], $_POST, $image_element)));
+						$mail_arg=array('from' => $_POST['ecard_sender_email'],
+										'subject' => $mail_subject,
+										'content' => $mail_message_HTML,
 										'content_format' => "text/html",
 										'email_format' => "text/html"
 										);
-						if ($this->debug)		echo "messagemailHTML=".$messagemailHTML."\n";
 						break;
 					}
 					
 					// Add the copy to expe if param.
-					if (isset($_POST['copy']))	// send copy to sender
-						$mail_arg['Bcc'] = array((isset($_POST['votremail']) ? $_POST['votremail'] : $user['email']));
+					if (isset($_POST['ecard_copy']))	// send copy to sender
+						$mail_arg['Bcc'] = array((isset($_POST['ecard_sender_email']) ? $_POST['ecard_sender_email'] : $user['email']));
 					
 					// Send the mail
-					pwg_mail($_POST['sonmail'], $mail_arg);
-				}
-				
-				$template->set_filenames(array('ecard' =>  ECARD_ROOT.'/template/ecard.tpl'));
-				$template->concat('COMMENT_IMG', $template->parse('ecard', true));
+					pwg_mail($_POST['ecard_recipient_email'], $mail_arg);
+				}
+				
+				$template->set_filenames(array('ecard_template' =>  ECARD_ROOT.'/template/ecard.tpl'));
+				$template->concat('COMMENT_IMG', $template->parse('ecard_template', true));
 				}
 			}
Index: /extensions/Piwecard/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/Piwecard/language/en_UK/plugin.lang.php	(revision 19922)
+++ /extensions/Piwecard/language/en_UK/plugin.lang.php	(revision 19923)
@@ -17,21 +17,20 @@
 $lang['ecard_send']						= 'Send';
 $lang['ecard_cancel']					= 'Cancel';
-$lang['ecard_activ_choice']				= 'Validity';
+$lang['ecard_validity_label']				= 'Validity';
 $lang['ecard_send_method']				= 'Send method';
 $lang['ecard_maillink']					= 'Mail with link';
-$lang['ecard_mailhtml'] = 'Complete mail with photo';
+$lang['ecard_mailhtml'] 				= 'Complete mail with photo';
 $lang['ecard_send_copy']				= 'Receive a copy';
 
+$lang['ecard_send_stage1'] 				= 'Stage 1: Write your message';
+$lang['ecard_send_stage2']				= 'Stage 2: Edit information';
+$lang['ecard_send_stage3'] 				= 'Stage 3: Options';
+$lang['ecard_send_stage4'] 				= 'Stage 4: Send the eCard!';
 
-$lang['ecard_send_stage1'] = 'Stage 1: Write your message';
-$lang['ecard_send_stage2'] = 'Stage 2: Edit information';
-$lang['ecard_send_stage3'] = 'Stage 3: Options';
-$lang['ecard_send_stage4'] = 'Stage 4: Send the eCard!';
-
-$lang['ecard_send_title']				= 'eCard Title ';
+$lang['ecard_send_title']				= 'eCard Title';
 $lang['ecard_send_message']				= 'eCard Message';
 $lang['ecard_send_exp']					= 'Sender';
 $lang['ecard_send_dest']				= 'Receiver';
-$lang['ecard_send_link1'] = 'To send an eCard';
+$lang['ecard_send_link1'] 				= 'To send an eCard';
 $lang['ecard_send_link2']				= 'Click here';
 $lang['ecard_send_link3']				= 'Creating your personalized eCard';
@@ -42,4 +41,9 @@
 $lang['ecard_send_dest_mail']			= 'Receiver Mail (dest@dest.com)';
 
+$lang['ecard_error']					= 'Error!';
+$lang['ecard_error_text']				= 'Fill in the fields.';
+$lang['ecard_error_email']				= 'Invalid email address.';
+
+$lang['ecard_send_mandatory_fields']	=  'Mandatory fields';
 
 // publish.tpl
Index: /extensions/Piwecard/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/Piwecard/language/fr_FR/plugin.lang.php	(revision 19922)
+++ /extensions/Piwecard/language/fr_FR/plugin.lang.php	(revision 19923)
@@ -17,5 +17,5 @@
 $lang['ecard_send']						= 'Envoyer';
 $lang['ecard_cancel']					= 'Annuler';
-$lang['ecard_activ_choice']				= 'Durée de validité';
+$lang['ecard_validity_label']				= 'Durée de validité';
 $lang['ecard_send_method']				= 'Méthode d\'envoi';
 $lang['ecard_maillink']					= 'Mail avec lien';
@@ -29,9 +29,9 @@
 $lang['ecard_send_stage4']				= 'Etape n°4 : Envoyer la carte !';
 
-$lang['ecard_send_title']				= 'Titre de la carte ';
+$lang['ecard_send_title']				= 'Titre de la carte';
 $lang['ecard_send_message']				= 'Message de la carte';
 $lang['ecard_send_exp']					= 'Expéditeur';
 $lang['ecard_send_dest']				= 'Destinataire';
-$lang['ecard_send_link1']				= 'Pour envoyer une Carte Virtuelle';
+$lang['ecard_send_link1']				= 'Pour envoyer une carte virtuelle';
 $lang['ecard_send_link2']				= 'Cliquez ici';
 $lang['ecard_send_link3']				= 'Création de votre eCard personnalisée';
@@ -42,7 +42,13 @@
 $lang['ecard_send_dest_mail']			= 'Mail du Destinataire (dest@dest.com)';
 
+$lang['ecard_error']					= 'Erreur !';
+$lang['ecard_error_text']				= 'Remplissez les champs.';
+$lang['ecard_error_email']				= 'Adresse mail invalide.';
+
+$lang['ecard_send_mandatory_fields']	=  'Champs obligatoires';
+
 
 // publish.tpl
-$lang['ecard_invalid_ecard']			= 'La Carte Virtuelle est invalide ou a expirée';
+$lang['ecard_invalid_ecard']			= 'La carte virtuelle est invalide ou a expirée';
 $lang['ecard_publish_bottom']			= 'Cette carte vous a été envoyée par';
 
Index: /extensions/Piwecard/main.inc.php
===================================================================
--- /extensions/Piwecard/main.inc.php	(revision 19922)
+++ /extensions/Piwecard/main.inc.php	(revision 19923)
@@ -75,7 +75,5 @@
 	global $template;
 	
-	$file = "lightbox-form";
-	$template->append('head_elements', '<link rel="stylesheet" type="text/css" href="'.ECARD_PATH . 'template/'.$file.'.css">');
-	$template->append('head_elements', '<script src="'.ECARD_PATH .'js/'.$file.'.js" type="text/javascript"></script>');
+	$template->append('head_elements', '<link rel="stylesheet" type="text/css" href="'.ECARD_PATH . 'css/piwecard.css">');
 }	
 ?>
Index: /extensions/Piwecard/template/ecard.tpl
===================================================================
--- /extensions/Piwecard/template/ecard.tpl	(revision 19922)
+++ /extensions/Piwecard/template/ecard.tpl	(revision 19923)
@@ -1,88 +1,148 @@
-<div id="filter"></div>
-<div id="box">
-<span id="boxtitle"></span>
-<div class="ecard">
-<table align="center" cellpadding="0" cellspacing="0">
-<tr>
-<td></td>
-</tr>
-<tr>
-<td><form name="form1" method="post" class="ecard">
-	<table>
-		<tr><td colspan="3"><br></td></tr>
-		<tr><td colspan="3"><br></td></tr>
-		<tr>
-			<td colspan="3" align="left"><strong><em>{'ecard_send_stage1'|@translate}</em></strong></td>
-		</tr>
-		<tr>
-			<td colspan="2"> {'ecard_send_title'|@translate}</td>
-			<td><input name="sujet" type="text" id="sujet" value="{$ecard.sujet}"></td>
-		<tr><td colspan="3"><br></td></tr>
-		<tr>
-			<td> {'ecard_send_message'|@translate}</td>
-			<td colspan="2">  <textarea name="message" cols="50" rows="4" id="message">{$ecard.message}</textarea> </td>
-		<tr>
-		<tr><td colspan="3"><br></td></tr>
-		<tr>
-			<td colspan="3" align="left"><strong><em>{'ecard_send_stage2'|@translate}</em></strong></td>
-		</tr>
-	<tr> 
-		<td><div align="center"> {'ecard_send_exp'|@translate} :</div></td>
-		<td><div align="center"> 
-			<input name="votrenom" type="text" id="votrenom" value="{$ecard.votrenom}" size="25" maxlength="100" >
-		  </div></td>
-		<td><div align="center"> 
-			<input name="votremail" type="text" id="votremail" value="{$ecard.votremail}" size="35" maxlength="100" {$ecard.changemail}>
-		  </div></td>
-	  </tr>
+{include file='include/colorbox.inc.tpl'}
 
-	  <tr> 
-		<td><div align="center"> {'ecard_send_dest'|@translate} :</div></td>
-		<td><div align="center"> 
-			<input name="sonnom" type="text" id="sonnom" value="{$ecard.sonnom}" size="25" maxlength="100">
-		  </div></td>
-		<td><div align="center"> 
-			<input name="sonmail" type="text" id="sonmail" value="{$ecard.sonmail}" size="35" maxlength="100">
-		  </div></td>
-	  </tr>
-		<tr><td colspan="3"><br></td></tr>
-		<tr>
-			<td colspan="3" align="left"><strong><em>{'ecard_send_stage3'|@translate}</em></strong></td>
-		</tr>
-	  <tr> 
-		<td colspan="3" align="left"><input type="checkbox" name="copy" {$ecard.copy}/> {'ecard_send_copy'|@translate} </td>
-	  </tr>
-	  <tr>
-		<td colspan="3" align="left">
-		  {'ecard_send_method'|@translate} : 
-			 {foreach from=$ECARD_SEND item=ECARD_SEND}
-			  <input type="radio" name="ecard_send" value="{$ECARD_SEND.ID}" {$ECARD_SEND.SELECTED}>{$ECARD_SEND.NAME} 
-			 {/foreach}		
-		</td>
-	  </tr>
-	  {if isset($ECARD_ACTIV)}
-		<tr>
-			<td colspan="3" align="left"> {'ecard_activ_choice'|@translate} :
-			 {foreach from=$ECARD_ACTIV item=ECARD_ACTIV}
-			  <input type="radio" name="ecard_activ" value="{$ECARD_ACTIV.ID}" {$ECARD_ACTIV.SELECTED}>{$ECARD_ACTIV.NAME} 
-			 {/foreach}
-			</td>
-		</tr>
-	  {/if}
-	</table>
-	<p align="left"><strong><em>{'ecard_send_stage4'|@translate}</em></strong></p>
-	<p align="center">
-	  <input type="submit" name="ecard_submit" value="{'ecard_send'|@translate}" />
-	  <input type="button" name="cancel" value="{'ecard_cancel'|@translate}" onclick="closebox()">
-	</p>
-  </form></td>
-</tr>
-<tr>
-<td>&nbsp;</td>
-</tr>
-</table>
+{footer_script}{literal}
+jQuery(document).ready(function(){
+	jQuery(".createECardOpen").colorbox({
+		inline:true,
+		href:"#addECardForm",
+		width:"50%",
+		minWidth:"500px",
+		height:"90%",
+		onComplete:function(){
+			jQuery("input[name=ecard_subject]").focus();
+		}
+	});
 
+	jQuery("#addECardForm form").submit(function(){
+		//jQuery(".createECardOpen").colorbox.close();
+	});
+});
+
+function ecard_clearDefaultText(element, defaultText) {
+	if (element.value == defaultText) {
+		element.value = '';
+	}
+}
+
+function ecard_checkField(element, elementType) {
+	var TEXT = 0;
+	var EMAIL = 1;
+	
+	switch (elementType) {
+		case TEXT:
+			if (element.value == '') {
+				document.getElementById(element.id+'_error').innerHTML = "{'ecard_error'|@translate} {'ecard_error_text'|@translate}";
+				element.className += " ecard_error_input";
+				return false;
+			} else {
+				document.getElementById(element.id+'_error').innerHTML = '';
+				element.className = element.className.replace( /(?:^|\s)ecard_error_input(?!\S)/g , '');
+				return true;
+			}
+			break;
+		case EMAIL:
+			var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
+			if (!filter.test(element.value)) {
+				document.getElementById(element.id+'_error').innerHTML = "{'ecard_error'|@translate} {'ecard_error_email'|@translate}";
+				element.className += " ecard_error_input";
+				return false;
+			} else {
+				document.getElementById(element.id+'_error').innerHTML = '';
+				element.className = element.className.replace( /(?:^|\s)ecard_error_input(?!\S)/g , '');
+				return true;
+			}
+			break;
+		default:
+			return false;
+			break;
+	}
+}
+
+function ecard_checkForm(form) {
+	var subjectOK = ecard_checkField(form.ecard_subject, 0);
+	var messageOK = ecard_checkField(form.ecard_message, 0);
+	var senderNameOK = ecard_checkField(form.ecard_sender_name, 0);
+	var senderEMailOK = ecard_checkField(form.ecard_sender_email, 1);
+	var recipientNameOK = ecard_checkField(form.ecard_recipient_name, 0);
+	var recipientEMailOK = ecard_checkField(form.ecard_recipient_email, 1);
+	
+	if(subjectOK && messageOK && senderNameOK && senderEMailOK && recipientNameOK && recipientEMailOK)
+		return true;
+	else
+		return false;
+}
+{/literal}{/footer_script}
+
+<div style="display:none">
+	<div id="addECardForm">
+		<form method="post" onsubmit="return ecard_checkForm(this);">
+			<fieldset>
+				<legend>{'ecard_send_stage1'|@translate}</legend>
+				<div class="ecard_field">
+					<div class="ecard_error" id="ecard_subject_error"></div>
+					<div class="ecard_error" id="ecard_message_error"></div>
+					<span class="ecard_label">{'ecard_send_title'|@translate}<span class="ecard_mandatory_fields">*</span> :</span>
+					<span class="ecard_input_right"><input name="ecard_subject" type="text" id="ecard_subject" value="{$ecard.subject}" onfocus="ecard_clearDefaultText(this, '{$ecard.subject}');" title="{$ecard.subject}"></span>
+				</div>
+				<div class="ecard_field">
+					<span class="ecard_label">{'ecard_send_message'|@translate}<span class="ecard_mandatory_fields">*</span> :</span>
+					<span class="ecard_input_right"><textarea name="ecard_message" id="ecard_message" value="{$ecard.message}" onfocus="ecard_clearDefaultText(this, '{$ecard.message}');" title="{$ecard.message}">{$ecard.message}</textarea></span>
+				</div>
+			</fieldset>
+			<fieldset>
+				<legend>{'ecard_send_stage2'|@translate}</legend>
+				<div class="ecard_field">
+					<div class="ecard_error" id="ecard_sender_name_error"></div>
+					<div class="ecard_error" id="ecard_sender_email_error"></div>
+					<span class="ecard_label">{'ecard_send_exp'|@translate}<span class="ecard_mandatory_fields">*</span> :</span>
+					<span class="ecard_name"><input name="ecard_sender_name" type="text" id="ecard_sender_name" maxlength="100" value="{$ecard.sender_name}"></span>
+					<span class="ecard_email"><input name="ecard_sender_email" type="text" id="ecard_sender_email" maxlength="100" {$ecard.changemail}  value="{$ecard.sender_email}" onfocus="ecard_clearDefaultText(this, '{$ecard.sender_email}');" onblur="ecard_checkField(this, 1);"></span>
+				</div>
+				<div class="ecard_field">
+					<div class="ecard_error" id="ecard_recipient_name_error"></div>
+					<div class="ecard_error" id="ecard_recipient_email_error"></div>
+					<span class="ecard_label">{'ecard_send_dest'|@translate}<span class="ecard_mandatory_fields">*</span> :</span>
+					<span class="ecard_name"><input name="ecard_recipient_name" type="text" id="ecard_recipient_name" maxlength="100" value="{$ecard.recipient_name}" onfocus="ecard_clearDefaultText(this, '{$ecard.recipient_name}');"></span>
+					<span class="ecard_email"><input name="ecard_recipient_email" type="text" id="ecard_recipient_email" maxlength="100" value="{$ecard.recipient_email}" onfocus="ecard_clearDefaultText(this, '{$ecard.recipient_email}');" onblur="ecard_checkField(this, 1);"></span>
+				</div>
+			</fieldset>
+			<fieldset>
+				<legend>{'ecard_send_stage3'|@translate}</legend>
+				<div class="ecard_field">
+					<span class="ecard_label"><label for="ecard_copy">{'ecard_send_copy'|@translate} :</label></span>
+					<span><input type="checkbox" id="ecard_copy" name="ecard_copy" {$ecard.copy}/></span>
+				</div>
+				<div class="ecard_field">
+					<span class="ecard_label">{'ecard_send_method'|@translate} : </span>
+						<span>
+						{foreach from=$ecard_send_method item=ecard_send_method}
+							<input type="radio" name="ecard_send_method" id="ecard_send_method_{$ecard_send_method.id}" value="{$ecard_send_method.id}" {$ecard_send_method.selected}><label for="ecard_send_method_{$ecard_send_method.id}">{$ecard_send_method.name} </label>
+						{/foreach}
+					</span>
+				</div>
+				{if isset($ecard_validity)}
+					<div class="ecard_field">
+						<span class="ecard_label">{'ecard_validity_label'|@translate} :</span>
+						<span>
+							{foreach from=$ecard_validity item=ecard_validity}
+								<input type="radio" name="ecard_validity" id="ecard_validity_{$ecard_validity.id}" value="{$ecard_validity.id}" {$ecard_validity.selected}><label for="ecard_validity_{$ecard_validity.id}">{$ecard_validity.name} </label>
+							{/foreach}
+						</span>
+					</div>
+				{/if}
+			</fieldset>
+			<fieldset>
+				<legend>{'ecard_send_stage4'|@translate}</legend>
+				<div class="ecard_submit">
+					<input type="submit" name="ecard_submit" value="{'ecard_send'|@translate}" />
+				</div>
+			</fieldset>
+			<div>
+				<span class="ecard_mandatory_fields">* {'ecard_send_mandatory_fields'|@translate}</span>
+			</div>
+		</form>
+	</div>
 </div>
-</div>
-<p> {'ecard_send_link1'|@translate} , <a href="#" onclick="openbox('{'ecard_send_link3'|@translate}', 1)">{'ecard_send_link2'|@translate}</a>. <br>
+<p>
+	<a href="#" class="createECardOpen" title="{'ecard_send_link3'|@translate}">{'ecard_send_link1'|@translate}, {'ecard_send_link2'|@translate}</a>.
 </p>
Index: tensions/Piwecard/template/lightbox-form.css
===================================================================
--- /extensions/Piwecard/template/lightbox-form.css	(revision 19922)
+++ 	(revision )
@@ -1,51 +1,0 @@
-
-#filter
-{
-	display: none;
-	position: absolute;
-	top: 0%;
-	left: 0%;
-	width: 100%;
-	height: 100%;
-	background-color: #CCA;
-	z-index:10;
-	opacity:0.5;
-	filter: alpha(opacity=50);
-}
-
-
-#box 
-{
-	display: none;
-	position: absolute;
-	top: 15%;
-	left: 20%;
-	width: 550px;
-	height: 500px;
-	padding: 0px;
-	margin:0;
-	border: 1px solid black;
-	background-color: black;
-	z-index:101;
-	overflow: none;
-}
-
-#boxtitle
-{
-	position:absolute;
-	float:center;
-	top:0;
-	left:0;
-	width:550px;
-	height:20px;
-	padding:0;
-	padding-top:4px;
-	left-padding:8px;
-	margin:0;
-	border-bottom:4px solid #3CF;
-	background-color: #09c;
-	color:white;
-	text-align:center;
-}
-
-
