<div class="box">
<form id="fmNodeAdd" name="fmNodeAdd" method="post" MxAttribut="action:urlAction">
	<fieldset class="fieldset">		
		<legend><mx:text id="etape1"/><mx:text id="generalInformation"/></legend>
			<div class="field">
				<label class="require">(*) <mx:text id="NodeEntry_name"/></label>
			<mx:bloc id="lang">
				<mx:image id="pictoLanguage"/>
				<mx:formField id="NodeEntry_name"/>
			</mx:bloc id="lang">
			</div>
	</fieldset>	
	<fieldset class="fieldset">	
		<legend><mx:text id="etape2"/><mx:text id="briquesList"/> (<a href="javascript:void(0);" onclick="setCheckOptions('fmNodeAdd', 'class_id[]'); return false;"><mx:text id="selectall"/></a>)</legend>

			<mx:bloc id="actionAdminClass">
				<div class="boxcheck"><label><mx:text id="className"/></label><mx:checker id="classId"/></div>
			</mx:bloc id="actionAdminClass">

	</fieldset>
	<fieldset class="fieldset">	
		<legend><mx:text id="etape3"/><mx:text id="user_admin"/></legend>

		<fieldset class="fieldset">
			<legend><mx:text id="formUser1"/></legend>
			<div>
			<div class="fieldshort"><label class="require">(*) <mx:text id="user_title"/></label><mx:select id="user_title"/></div>
			<div class="field"><label for="firstname" class="require">(*) <mx:text id="user_first_name"/></label><mx:formField id="user_first_name" id="firstname"/></div>
			<div class="field"><label for="lastname" class="require">(*) <mx:text id="user_last_name"/></label><mx:formField id="user_last_name" id="lastname"/></div>
			<div class="field"><label for="user_login" class="require">(*) <mx:text id="user_login"/></label><mx:formField id="user_login" id="user_login"/></div>
			<div class="field"><label for="user_password" class="require">(*) <mx:text id="user_password"/></label><mx:formField id="user_password" id="user_password"/></div>
			<div class="field"><label for="user_password2" class="require">(*) <mx:text id="user_password2"/></label><mx:formField id="user_password2" id="user_password2"/></div>
			</div>
		</fieldset>
		
		<fieldset class="fieldset">
			<legend><mx:text id="formUser2"/></legend>
			<div>
			<div class="field"><label for="postaladdress" class="require">(*) <mx:text id="user_postal_address"/></label><mx:formField id="user_postal_address" id="postaladdress" rows="2" cols="5" class="textareacomm"/></div>
			<div class="field"><label for="postalcode" class="require">(*) <mx:text id="user_postal_code"/></label><mx:formField id="user_postal_code" id="postalcode"/></div>	
			<div class="field"><label for="city" class="require">(*) <mx:text id="user_city"/></label><mx:formField id="user_city" id="city"/></div>
			<div class="field"><label for="country"><mx:text id="user_country"/></label><mx:formField id="user_country" id="country"/></div>
			<div class="field"><label for="state" class="require">(*) <mx:text id="user_state"/></label><mx:formField id="user_state" id="state"/></div>
			<div class="field"><label for="mail" class="require"> (*) <mx:text id="user_mail"/></label><mx:formField id="user_mail" id="mail"/></div>
			<div class="field"><label for="tel" class="require"> (*)  <mx:text id="user_tel"/></label><mx:formField id="user_tel" id="tel"/></div>	
			<div class="field"><label for="fax"><mx:text id="user_fax"/></label><mx:formField id="user_fax" id="fax"/></div>
			</div>
		</fieldset>

		<fieldset class="fieldset">
			<legend><mx:text id="formUser3"/></legend>
			<div>
			<div class="field"><label for="organisation"><mx:text id="user_organisation"/></label><mx:formField id="user_organisation" id="organisation"/></div>
			<div class="field"><label for="comment"><mx:text id="user_comment"/></label><mx:formField id="user_comment" id="comment" rows="2" cols="5" class="textareacomm"/></div>
			</div>
		</fieldset>
	</fieldset>

	<fieldset class="fieldset">
		<legend><mx:text id="formUser4"/></legend>
		<div>
		<div class="field"><label for="template"><mx:text id="TxtTemplateAdmin"/></label><mx:select id="TEMPLATE_ADMIN"  id="template" onchange="javascript:imgTemplate();"/></div>
		<div class="field"><img name="pictoTemplate" id="pictoTemplate" src="data/template/default/preview.png" mXattribut="alt:previewtemplate" class="preview" /></div>
		</div>
	</fieldset>

	<fieldset class="fieldset">
		<legend><mx:text id="etape4"/></legend>

		<div class="action"><input type="submit" id="valid" onclick="javascript:Valid_register('fmNodeAdd','class_id[]')" mXattribut="value:BtnValid" class="add"/></div>
	</fieldset>

	<div class="info">(*) : <mx:text id="obligatorydata"/></div>
</form>
</div>
<script src="data/javascript/functions.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
/**
  * Validation Action of actionNodeAdd
  *
  * @param   string   the form name
  * @param   string   the element name
  * @return  boolean  true for submit form
  */
function Valid_register(the_form,the_field)
{
  var objectform = document.forms[the_form];
  var nbr = objectform.length;
  var flag = 0;

	for (z=0 ; z < nbr; z++)
	{
		  if (objectform.elements[z].checked == true && objectform.elements[z].name == the_field)
		  {
		  	flag=1;
		  }
	}

	if (flag == 0)
	{
		alert('<mx:text id="selectbriques"/>');
		return false;
	}

	objectform.submit();
}
function imgTemplate()
{
	if (document.getElementById)
	{
		if (document.getElementById("fmNodeAdd"))
		{
			var obj=document.getElementById("template"); //configObject.template[]

			document.getElementById("pictoTemplate").src="data/template/"+obj.options[(obj.selectedIndex)].value+"/preview.png";
		}
	}
	// cas ie 5.5
	else if (document.all)
	{
		if (document.all["fmNodeAdd"])
		{
			var obj=document.all["template"]; //configObject.template[]

			document.all["pictoTemplate"].src="data/template/"+obj.options[(obj.selectedIndex)].value+"/preview.png";
		}
	}	
}
imgTemplate();
//-->
</script>