<%@  page pageEncoding="utf-8" contentType="text/html;charset=utf-8" import="com.novell.webaccess.common.JSPConduit, com.novell.emframe.dev.eMFrameUtils
                                                                             " %>
<%   JSPConduit c = JSPConduit.getJSPConduit(request);
   c.stringTable("DevResources");
   c.stringTable("BaseResources");
   c.stringTable("FwResources");
%>
<%@ taglib uri="/WEB-INF/iman.tld" prefix="iman" %>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/x.tld" prefix="x" %>


<HTML>
<HEAD>
<TITLE><%= c.string("CreateUser.CreateUserTitle") %></TITLE>
<LINK href="<%= c.getModulesUrl() + "/dev/css/hf_style.css" %>" rel="styleSheet" type="text/css">
<LINK href="<%= c.getModulesUrl() + "/dev/css/hf_message.css" %>" rel="stylesheet" type="text/css">
<jsp:include page='<%= c.getPath("dev/OSScripts_inc.jsp") %>' flush="true" />

<iman:uihandlerTools/>
<iman:pageScripts/>
<iman:eMFrameScripts/>
<iman:validateNumberScripts/>
<iman:mvedScripts mode="mvsel"/><%-- Always include for the description field --%>
<c:if test="${DeviceType=='browser'}">
      <iman:mvedScripts mode="mvie"/>
</c:if>
<iman:dialogScripts/>

<SCRIPT language="JavaScript" src="<%= c.getModulesUrl() + "/dev/javascripts/" %>ParseFileSystemString.js"></script>

<script language="JavaScript">
	dojo.require("dojo.lang.*");
	dojo.require("dojo.io.*");

var ENABLED_COLOR = "white";
var DISABLED_COLOR = "#EFEEE9";

      function parseHomeDirectory(controlName, resultsArray)
      {
      		var volumeObject = getVolumeObject(resultsArray[0]);
            document.CreateUserForm.elements[controlName].value = volumeObject;
      	  	var fileSystemPath = getFileSystemPath(resultsArray[0]);
      	  	var pathName = document.CreateUserForm.CreateUserName.value
      	  	
      	  	if((fileSystemPath.length ==  0) && (pathName.length ==  0))
      	  	{
      	  		fileSystemPath = "\\";
      	  	}
      	  	else
      	  	{
      	  		if(fileSystemPath.length ==  0)
      	  		{
      	  			fileSystemPath = pathName;
      	  		}
      	  		else
      	  		{
      	  			fileSystemPath = fileSystemPath + "\\" + pathName;
      	  		}
      	  	}
      	  	
      	  	document.CreateUserForm.elements["pathname"].value = fileSystemPath;
      }

	function setMultiValues()
	{
      document.CreateUserForm.p_title.value = mvGetValuesAsPack("title");
      document.CreateUserForm.p_location.value = mvGetValuesAsPack("location");
      document.CreateUserForm.p_department.value = mvGetValuesAsPack("department");
      document.CreateUserForm.p_telephone.value = mvGetValuesAsPack("telephone");
      document.CreateUserForm.p_faxnumber.value = mvGetValuesAsPack("faxnumber");
      document.CreateUserForm.p_emailaddress.value = mvGetValuesAsPack("emailaddress");
      document.CreateUserForm.p_description.value = mvGetValuesAsPack("description");
   }

   function addOption(controlName, result)
   {
      alert("result = " + result);
   }

   function checkCreateUserNullInput()
   {
      var strContainerInput = document.CreateUserForm.CreateUserContext.value;
      var strUserNameInput = document.CreateUserForm.CreateUserName.value;
      var strSurnameInput = document.CreateUserForm.CreateUserSurName.value;
      if ((null == strContainerInput) || (0 == strContainerInput.length))
      {
         alert("<%= c.string("CreateUser.InvalidContext") %>");
         return false;
      }
      if ((null == strUserNameInput) || (0 == strUserNameInput.length))
      {
         alert("<%= c.string("CreateUser.InvalidUserName") %>");
         return false;
      }
      if ((null == strSurnameInput) || (0 == strSurnameInput.length))
      {
         alert("<%= c.string("CreateUser.InvalidSurName") %>");
         return false;
      }
      if (document.CreateUserForm.edirpassword.value != document.CreateUserForm.retypepassword.value)
	   {
	  	   alert("<%= c.string("CreateUser.PassDontMatch") %>");
		   document.CreateUserForm.edirpassword.focus();
		   return false;
	   }
      if (document.CreateUserForm.simplepassword.value != document.CreateUserForm.retypesimplepassword.value)
	   {
	  	   alert("<%= c.string("SimplePassword.SimplePassDontMatch") %>");
		   document.CreateUserForm.simplepassword.focus();
		   return false;
	   }

      if (document.CreateUserForm.enablecreatedir.checked == true)
      {
         if ((null == document.CreateUserForm.volumename.value) || (0 == document.CreateUserForm.volumename.value.length))
         {
            alert("<%= c.string("CreateUser.InvalidVolume") %>");
            return false;
         }
         if ((null == document.CreateUserForm.pathname.value) || (0 == document.CreateUserForm.pathname.value.length))
         {
            alert("<%= c.string("CreateUser.InvalidPath") %>");
            return false;
         }
      }
      
      if (document.CreateUserForm.enablecopyfromuser.checked == true)
      {
         if ((null == document.CreateUserForm.copyfromusername.value) || (0 == document.CreateUserForm.copyfromusername.value.length))
         {
            alert("<%= c.string("CreateUser.InvalidTemplate") %>");
            return false;
         }
      }

      if (document.CreateUserForm.edirpassword.value.length == 0)
	   {
         activateImanDialog('checkPassword');
         return false;

         <%--  var message = "<%= c.toScript(c.string("CreateUser.PasswordAlert")) %>";--%>
         <%--  if (!confirm(message))--%>
         <%--  {--%>
         <%--     document.CreateUserForm.edirpassword.focus();--%>
         <%--     return false;--%>
         <%--  }--%>
	   }
      
      return true;
   }


   function setFocusToFormElement()
   {
      // added for Object View
      if ("<%= c.var("OS.ReturningToAnchor") %>"!="true")    //haven't entered a value from OS
      {
         document.CreateUserForm.CreateUserContext.value = "<iman:toScript><%=eMFrameUtils.getSingleTarget(request)%></iman:toScript>";
      }

      if ((document.CreateUserForm.copyfromusername.value.length > 0))
      {
    	  	document.CreateUserForm.enablecopyfromuser.checked = true;
	  	   document.CreateUserForm.copyfromusername.disabled = false;
	  	   document.CreateUserForm.copyfromusername.style.backgroundColor = ENABLED_COLOR;
      }
      else
      {
  	  	   document.CreateUserForm.enablecopyfromuser.checked = false;
	  	   document.CreateUserForm.copyfromusername.disabled = true;
	  	   document.CreateUserForm.copyfromusername.style.backgroundColor = DISABLED_COLOR;
      }

      if ((document.CreateUserForm.volumename.value.length > 0))
      {
    	  	document.CreateUserForm.enablecreatedir.checked = true;
	  	   document.CreateUserForm.volumename.disabled = false;
	  	   document.CreateUserForm.volumename.style.backgroundColor = ENABLED_COLOR;
	  	   document.CreateUserForm.pathname.disabled = false;
	  	   document.CreateUserForm.pathname.style.backgroundColor = ENABLED_COLOR;
      }
      else
      {
  	  	   document.CreateUserForm.enablecreatedir.checked = false;
	  	   document.CreateUserForm.volumename.disabled = true;
	  	   document.CreateUserForm.volumename.style.backgroundColor = DISABLED_COLOR;
	  	   document.CreateUserForm.pathname.disabled = true;
	  	   document.CreateUserForm.pathname.style.backgroundColor = DISABLED_COLOR;
      }

		document.CreateUserForm.CreateUserName.focus();

      // added for simple password
      if (document.CreateUserForm.CreateUserContext.value.length == 0)
      {
         document.CreateUserForm.enableUniversalPassword.value = 'false';
         document.CreateUserForm.enableUniversalPassword.disabled = true;
         document.CreateUserForm.enableUniversalPassword.style.backgroundColor = DISABLED_COLOR;
      }
   }

   function setTheValue(control)
   {
   	with(document.CreateUserForm)
		{
  			control = eval(control);
   	  		if (control.checked == true)
	  		{
				control.value = 'true';
			}
			else
			{
				control.value = 'false';
			}
		}
   }

   function enableTemplate(control)
   {
   	with(document.CreateUserForm)
		{
  			control = eval(control);
         if (control.checked == true)
	  		{
				control.value = 'true';
		  		copyfromusername.disabled = false;
				copyfromusername.style.backgroundColor = ENABLED_COLOR;
			}
			else
			{
				//assume if the template name is there, we need to
				//clear out the values populated by the template
	            if(copyfromusername.value.length != 0)
	            {
	               mvLoadFromPack("description", pack(new Array()));
	               mvLoadFromPack("title", pack(new Array()));
	               mvLoadFromPack("location", pack(new Array()));
	               mvLoadFromPack("department", pack(new Array()));
	               mvLoadFromPack("telephone", pack(new Array()));
	               mvLoadFromPack("faxnumber", pack(new Array()));
	               mvLoadFromPack("emailaddress", pack(new Array()));
	               
	               volumename.disabled = true;
				   volumename.value = "";
				   volumename.style.backgroundColor = DISABLED_COLOR;
	               pathname.disabled = true;
				   pathname.value = "";
				   pathname.style.backgroundColor = DISABLED_COLOR;
				   enablecreatedir.checked = false;
	            }
				control.value = 'false';
			  	copyfromusername.disabled = true;
				copyfromusername.value = "";
				copyfromusername.style.backgroundColor = DISABLED_COLOR;
			}
		}
   }

	function checkDefaultKey(evt)
   {
   	<% if (c.var("Browser.name").equals("NSN")) { %>
         return true;
		<% } %>

      var keyCode = evt.which ? evt.which : evt.keyCode;
      // 13 is the Enter key code
      if (keyCode == 13)
      {
         if (checkCreateUserNullInput())
         {
            submitForm();
            return false;
         }
      }
      return true;
   }

   function CopyCheckedOS()
   {
      return document.CreateUserForm.enablecopyfromuser.checked;
   }

   function CreateDirCheckedOS()
   {
      return document.CreateUserForm.enablecreatedir.checked;
   }

   function enableDirectory(control)
   {
   	with(document.CreateUserForm)
		{
  			control = eval(control);
         if (control.checked == true)
	  		{
				control.value = 'true';
		  		volumename.disabled = false;
				volumename.style.backgroundColor = ENABLED_COLOR;

		  		pathname.disabled = false;
				pathname.style.backgroundColor = ENABLED_COLOR;
            document.CreateUserForm.pathname.value = document.CreateUserForm.CreateUserName.value;
			}
			else
			{
				control.value = 'false';
			  	volumename.disabled = true;
				volumename.value = "";
				volumename.style.backgroundColor = DISABLED_COLOR;

            pathname.disabled = true;
				pathname.value = "";
				pathname.style.backgroundColor = DISABLED_COLOR;
			}
		}
   }

   function enableSimplePassword(control)
   {
      with(document.CreateUserForm)
		{
  			control = eval(control);
         if (control.value != " " && control.value.length>0)
	  		{
				enableUniversalPassword.value = 'true';
		  		enableUniversalPassword.disabled = false;
				enableUniversalPassword.style.backgroundColor = ENABLED_COLOR;
         }
      }
   }

   function enableSimplePasswordCallBack(control, results)
   {
      with(document.CreateUserForm)
		{
         control = eval(control);
         control.value = results[0];
         enableSimplePassword(control);
      }
   }


   // this is called from GetTemplateHomeDirectoryExchanger.jsp
   function getTemplateHomeDirectory(error, volume, path, title, location, department, telephone, faxnumber, emailaddress, description)
   {
      // if there is an error don't do anything with it, we don't care if there is no home directory
      if(error != '')
      {
         return;
      }

      if (volume.length != 0)
      {
         document.CreateUserForm.volumename.value = volume;
         document.CreateUserForm.enablecreatedir.checked = true;
         enableDirectory(document.CreateUserForm.enablecreatedir);
      }
      if (path.length != 0)
      {
         document.CreateUserForm.pathname.value = "\\" + path + "\\" + document.CreateUserForm.CreateUserName.value;
      }

      if(description.length != 0)
      {
      	 mvLoadFromPack("description",description);
      }
      
      if (volume.length == 0)
      {
         document.CreateUserForm.volumename.value = "";
         document.CreateUserForm.pathname.value = "";
         document.CreateUserForm.enablecreatedir.checked = false;
         document.CreateUserForm.volumename.style.backgroundColor = DISABLED_COLOR;
         document.CreateUserForm.pathname.style.backgroundColor = DISABLED_COLOR;
      }

      if(title.length != 0)
      {
       	 mvLoadFromPack("title",title);
      }

      if(location.length != 0)
      {
         mvLoadFromPack("location",location);
      }

      if(department.length != 0)
      {
         mvLoadFromPack("department",department);
      }

      if(telephone.length != 0)
      {
         mvLoadFromPack("telephone",telephone);
      }

      if(faxnumber.length != 0)
      {
      	mvLoadFromPack("faxnumber",faxnumber);
      }

      if(emailaddress != 0)
      {
         mvLoadFromPack("emailaddress",emailaddress);
      }

   }


   function goGetTemplateHomeDirectory(controlName, templateObj)
   {
      // The callback from search
      if ((null == templateObj[0]) || (0 == templateObj[0].length))
      {
         return;
      }
      document.CreateUserForm.copyfromusername.value = toScript(templateObj[0]);

      // this will call into the java code GetTemplateHomeDirectoryTask.java to send data back to exchanger
      window.upExchanger = new exchanger("exchangerFrame");
      upExchanger.sendData("webacc?taskId=fw.GetTemplateHomeDirectory&merge=base.GetTemplateHomeDirectoryExchanger&error=base.GetTemplateHomeDirectoryExchanger&HomeDirectoryTemplateObject=" + urlEncode(templateObj[0]));
   }


   function goGetTypedHomeDirectory()
   {
      // just call goGetTemplateHomeDirectory()
      templateObj = new Array(1);
      templateObj[0] = document.CreateUserForm.copyfromusername.value;
      goGetTemplateHomeDirectory("document.CreateUserForm.copyfromusername", templateObj);
   }


   function populateFullName()
   {
   	delim = '';
      if(document.CreateUserForm.firstname.value.length > 0)
      {
      	 delim = ' ';
      }
      document.CreateUserForm.fullname.value = document.CreateUserForm.firstname.value +delim+document.CreateUserForm.CreateUserSurName.value;
   }
   
   function handleAjaxResponse(type, data, evt){
   iman.debug("Success:  haldleAjaxResponse. type= "+type+"  data="+data+"  evt="+evt);
   if(data.indexOf("success")>=0){
   	returnForSuccessConfirmation();
   }else{
   	displayErrorInPage(data);
   }
   }

	function returnForSuccessConfirmation(){
		iman.debug("CrtUserAcct:returnForSuccessConfirmation called");
		document.CreateUserForm.nextState.value="getSuccessMsg";
		document.CreateUserForm.submit();
	}
	
	function displayErrorInPage(data){
		iman.debug("CrtUserAcct:displayErrorInPage called");
		var errorMessageDiv = document.getElementById("errorMessageDiv");
		iman.debug("CrtUserAcct:displayErrorInPage setting errorMessageDiv.innerHTML");
		errorMessageDiv.innerHTML=data;
		iman.debug("CrtUserAcct:displayErrorInPage setting errorMessageDiv.style.display to inline");
		errorMessageDiv.style.display="inline";
		document.CreateUserForm.nextState.value="doCreateUser";
	}

	function submitFormFromForm()
	{
		iman.debug("CrtUserAcct:submitFormFromForm called");
		if(checkCreateUserNullInput()){
			submitForm();
		}
		return false;
	}
   
   function submitForm()
   {
		iman.debug("CrtUserAcct:submitForm called");
      	setMultiValues();
      //document.CreateUserForm.submit();
      // form via ajax
 		bindArgs = {
    	url:  document.CreateUserForm.action,
      	error: function(type, data, evt){iman.debug("Error:  Unable to submit ajax form post. type= "+type+"  data="+data+"  evt="+evt);  },
    	load: handleAjaxResponse,
    	mimetype:   "text/html",
    	formNode:   document.CreateUserForm
   	};
   var req = dojo.io.bind(bindArgs);
   }


</script>
</HEAD>

<BODY TEXT="#000000" LINK="#000000" VLINK="#000000" ALINK="#000000" bgcolor="#FFFFFF" onLoad="returnFromOS();setFocusToFormElement();">
<form name="CreateUserForm" method=post action="webacc" onSubmit="javascript:return(submitFormFromForm());">
   <input type=hidden name="taskId" value="<%= c.var("taskId") %>">
   <input type=hidden name="merge" value="dev.GenConf">
   <input type=hidden name="error" value="dev.GenErr">
   <input type=hidden name="User.context" value="<%= c.var("User.context") %>">
   <input type=hidden name="nextState" value="doCreateUser">
   <input type=hidden name="SelectedClass" value="<%= c.var("SelectedClass") %>">
   <input type=hidden name="TranslatedClass" value="<%= c.var("TranslatedClass") %>">
   <input type=hidden name="GifName" value="<%= c.var("GifName") %>">
   <input type=hidden name="targetNames" value="<%= c.var("targetNames") %>">

<TABLE style="height:100%; width:100%" border="0" cellspacing="0" cellpadding="0">
<tr><td>

   <% c.set("TaskHeader.title", JSPConduit.formatMessage(c.string("Creator.Create"), new String[]{c.var("TranslatedClass")}));
      c.set("TaskHeader.iconUrl", c.plus("dir/", c.var("GifName")));
      c.set("TaskHeader.iconAlt", c.var("TranslatedClass"));
      c.set("TaskHeader.helpFile", "base/crtuseracct.html");
      c.set("SimplePassword.formName", "document.CreateUserForm");
      c.set("SimplePassword.contextControlName", "document.CreateUserForm.CreateUserContext");
      c.set("SimplePassword.dsPasswordControlName", "document.CreateUserForm.edirpassword");
   %>
   <jsp:include page='<%= c.getPath("dev/TaskHeader_inc.jsp") %>' flush="true" />

<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class=smalltext align="right"><font color="#c82727">*=<%= c.string("CreateUser.Rquired") %></font></td>
  </tr>
</TABLE><BR>
</td></tr>

<tr style="height:100%;width:100%"><td>
<div align="left" id="junk" style="text-indent:2; display:block; width:100%;<% if (c.var("Browser.name").equals("MSIE")) { %> height:100%; <%} %> overflow-y:auto;" >
			<div id="errorMessageDiv" class="message" style="display: none; width: 80%">
				<% /* errorMessageDiv will be dynamically added if a error message is encountered*/ %>
			</div>

<TABLE width="100%" border="0" cellspacing="0" cellpadding="3">
  <tr>
    <td class=mediumtext nowrap><%= c.string("CreateUser.UserName") %><font color="#c82727"> *</font></td>
    <td><input type="text" name="CreateUserName" size="<%= c.string("UI.textboxSize") %>" maxlength="64" onkeypress="return checkDefaultKey(event)"></td>
  </tr>
  <tr>
    <td class=mediumtext nowrap><%= c.string("CreateUser.FirstName") %></td>
    <td class=smalltext2d><input type="text" name="firstname" size="<%= c.string("UI.textboxSize") %>" maxlength="32" onChange="populateFullName()" onkeypress="return checkDefaultKey(event)"></td>
  </tr>
  <tr>
    <td class=mediumtext nowrap><%= c.string("CreateUser.LastName") %><font color="#c82727"> *</font></td>
    <td><input type="text" name="CreateUserSurName" size="<%= c.string("UI.textboxSize") %>" maxlength="64" onChange="populateFullName()" onkeypress="return checkDefaultKey(event)"></td>
  </tr>
  <tr>
    <td class=mediumtext nowrap><%= c.string("ModifyUser.FullName") %></td>
    <td class=smalltext2d><input type="text" name="fullname" size="<%= c.string("UI.textboxSize") %>" maxlength="127" onkeypress="return checkDefaultKey(event)"></td>
  </tr>
  <tr>
      <td class=mediumtext nowrap><%= c.string("CreateUser.Context") %><font color="#c82727"> *</font></td>
      <td nowrap>
         <input type="text" name="CreateUserContext" size="<%= c.string("UI.textboxSize") %>" maxlength="256" onchange="enableSimplePassword(this);" onkeypress="return checkDefaultKey(event)">
         <% c.set("OS.TypeFilter", c.var("CreatorSearchFilter"));
            c.set("OS.Control", "CreateUserContext");
            c.set("OS.CallBack", "enableSimplePasswordCallBack");
            c.set("OS.History", "true"); %>
         <jsp:include page='<%= c.getPath("dev/OS_inc.jsp") %>' flush="true" />
      </td>
  </tr>

  <tr>
    <td colspan="2"><hr noshade size="1"></td>
  </tr>
  <tr>
    <td class=mediumtext nowrap><%= c.string("CreateUser.Password") %></td>
    <td class=smalltext2d><input type=password name="edirpassword" size="<%= c.string("UI.textboxSize") %>" maxlength="127" onkeypress="return checkDefaultKey(event)"></td>
  </tr>
  <tr>
    <td class=mediumtext nowrap><%= c.string("CreateUser.RetypePassword") %></td>
    <td class=smalltext2d><input type=password name="retypepassword" size="<%= c.string("UI.textboxSize") %>" maxlength="127" onkeypress="return checkDefaultKey(event)"></td>
  </tr>
  <tr>
    <td colspan="2" class="smalltext2d"><%= c.string("CreateUser.PasswordNote") %></td>
  </tr>

  <tr>
    <td colspan="2"><hr noshade size="1"></td>
  </tr>

  <jsp:include page='<%= c.getPath("base/SetSimplePassword_inc.jsp") %>' flush="true" />

  <tr>
    <td colspan="2"><hr noshade size="1"></td>
  </tr>

    <tr>
      <td class="mediumtext" colspan="3">
        <input type="checkbox" name="enablecopyfromuser" value="checkbox" onClick='enableTemplate(this.name)' onkeypress="return checkDefaultKey(event)">&nbsp;<%= c.string("CreateUser.CopyUser") %>
      </td>
    </tr>
    <tr>
      <td class="mediumtext" nowrap>&nbsp;</td>
      <td>
        &nbsp;<input type="text" name="copyfromusername" size="<%= c.string("UI.textboxSize") %>" maxlength="256" onchange="goGetTypedHomeDirectory()" onkeypress="return checkDefaultKey(event)">
        <% c.set("OS.TypeFilter", "User,Template");
           c.set("OS.InitialContext", c.var("targetNames"));
           c.set("OS.Control", "copyfromusername");
           c.set("OS.IsOSAllowed", "CopyCheckedOS");
           c.set("OS.CallBack", "goGetTemplateHomeDirectory");
           c.set("OS.History", "true"); %>
        <jsp:include page='<%= c.getPath("dev/OS_inc.jsp") %>' flush="true" />
      </td>
    </tr>

  <tr>
    <td colspan="2"><hr noshade size="1"></td>
  </tr>

  <tr>
    <td class="mediumtext" colspan="3">
      <input type="checkbox" name="enablecreatedir" value="checkbox" onClick='enableDirectory(this.name)' onkeypress="return checkDefaultKey(event)">&nbsp;<%= c.string("CreateUser.CreateDir") %>
    </td>
  </tr>
  <tr>
    <td class=mediumtext nowrap><%= c.string("CreateUser.Volume") %></td>
    <td>
      <input type="text" name="volumename" size="<%= c.string("UI.textboxSize") %>" maxlength="256" onkeypress="return checkDefaultKey(event)">
      <% c.set("OS.TypeFilter", "Volume,Directory" );
         c.set("OS.InitialContext", c.var("targetNames"));
         c.set("OS.Control", "volumename");
         c.set("OS.IsOSAllowed", "CreateDirCheckedOS");
         c.set("OS.History", "true");
         c.set("OS.CallBack", "parseHomeDirectory"); %>
         
      <jsp:include page='<%= c.getPath("dev/OS_inc.jsp") %>' flush="true" />
    </td>
  </tr>
  <tr>
    <td class=mediumtext nowrap><%= c.string("CreateUser.Path") %></td>
    <td class=smalltext2d><input type=text name="pathname" size="<%= c.string("UI.textboxSize") %>" maxlength="128" onkeypress="return checkDefaultKey(event)"></td>
  </tr>

  <tr>
    <td colspan="2" class="smalltext2d"><%= c.string("CreateUser.CreateDirNote") %></td>
  </tr>


  <tr>
    <td colspan="2"><hr noshade size="1"></td>
  </tr>

  <%-- ----- --%>
   <%-- Title --%>
   <%-- ----- --%>
   <TR>
     <td class=mediumtext nowrap><%= c.string("CreateUser.Title") %></td>
     <TD>
     	<INPUT type="hidden" name="p_title" />
        <iman:mved maxLength="64" enforceUnique="true" ignoreCase="true" minLength="1" name="title"  />
     </TD>
   </TR>

   <%-- - --%>
   <%-- L --%>
   <%-- - --%>
   <TR>
     <td class=mediumtext nowrap><%= c.string("CreateUser.Location") %></td>
      <TD>
      	<INPUT type="hidden" name="p_location" />
         <iman:mved maxLength="128"enforceUnique="true" ignoreCase="true" minLength="1" name="location"  />
      </TD>
   </TR>

   <%-- -- --%>
   <%-- OU --%>
   <%-- -- --%>
   <TR>
      <td class=mediumtext nowrap><%= c.string("CreateUser.Department") %></td>
      <TD>
      	<INPUT type="hidden" name="p_department" />
         <iman:mved maxLength="64" enforceUnique="true" ignoreCase="true" minLength="1" name="department"  />
      </TD>
   </TR>
   <%-- ---------------- --%>
   <%-- Telephone Number --%>
   <%-- ---------------- --%>
   <TR>
     <td class=mediumtext nowrap><%= c.string("CreateUser.Telephone") %></td>
      <TD>
      	<INPUT type="hidden" name="p_telephone" />
          <iman:mved maxLength="64" enforceUnique="true" name="telephone"  />
      </TD>
   </TR>
   <%-- -------------------------- --%>
   <%-- Facsimile Telephone Number --%>
   <%-- -------------------------- --%>
   <TR>
      <td class=mediumtext nowrap><%= c.string("CreateUser.FaxNumber") %></td>
      <TD>
      	<INPUT type="hidden" name="p_faxnumber" />
        <iman:mved maxLength="64" enforceUnique="true" name="faxnumber"  />
      </TD>
   </TR>
   <%-- ---------------------- --%>
   <%-- Internet EMail Address --%>
   <%-- ---------------------- --%>
   <TR>
      <td class=mediumtext nowrap><%= c.string("CreateUser.EmailAddress") %></td>
      <TD>
      <INPUT type="hidden" name="p_emailaddress" />
         <iman:mved maxLength="64" enforceUnique="true" ignoreCase="true" name="emailaddress" />
      </TD>
   </TR>
   <%-- ----------- --%>
   <%-- Description --%>
   <%-- ----------- --%>
   <TR>
      <td class=mediumtext nowrap><%= c.string("CreateUser.Description") %></td>
      <TD>
         <INPUT type="hidden" name="p_description" />
         <c:set var="MVStringEditor_bigEditBox" value="true" scope="request"/>
         <iman:mved mode="mvsel" maxLength="1024" enforceUnique="true" ignoreCase="true" minLength="1" name="description" biggerBox="true" size="4"/>
      </TD>
   </TR>
</TABLE>
</div>
</td></tr><tr><td>&nbsp;</td></tr>

<tr><td>
<jsp:include page='<%= c.getPath("dev/Bar_inc.jsp") %>' flush="true" />
<c:choose>
<c:when test="${PartHandler_showWizard}">
<INPUT type=image name="Previous" alt="<%= c.string("Button.Previous.alt") %>" src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.Previous.image") %>" border=0 ><INPUT type=image name="Next" alt="<%= c.string("Button.Next.alt") %>" src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.Next.image") %>" border=0 ><INPUT type=image name="Create" alt="<%= c.string("Button.Create.alt") %>" src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.OK.image") %>" border=0 >&nbsp;<iman:cancelBtn/>
</c:when>
<c:otherwise>
<INPUT type=image name="Create" alt="<%= c.string("Button.Create.alt") %>" src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.OK.image") %>" border=0 >&nbsp;<iman:cancelBtn/>
</c:otherwise>
</c:choose>
<jsp:include page='<%= c.getPath("dev/OSFooter_inc.jsp") %>' flush="true" />
</td></tr>

</TABLE>

   <%-- -------------------------- --%>
   <%-- pop up dialog for password --%>
   <%-- -------------------------- --%>
   <iman:dialog id="checkPassword" title='<%= c.string("CreateUser.PasswordPopupTitle") %>' width="400" height="190" dialogColor="efeeec" titleBarColor="458ab9">
      <div class="marginleft1 instructions"><b><%= c.string("CreateUser.PasswordPopupInstruction") %></b></div>
      <div class="marginleft2 margintop3"><input type="radio" name="blankPassword" value="true" checked="checked"><label><%= c.string("CreateUser.PasswordPopupBlankPassword") %></label></div>
      <div class="marginleft2 margintop1"><input type="radio" name="blankPassword" value="false" ><label><%= c.string("CreateUser.PasswordPopupNoPassword") %></label></div>
      <div style="text-align: center; margin-top: 2em"><A href="#" onclick="javascript:deactivateImanDialog('checkPassword');submitForm();"> <img class="margin5r" name="OK"  alt="<%= c.string("Button.OK.alt") %>" src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.OK.image") %>" border=0 ></A>&nbsp;<A href="#" onClick="javascript:deactivateImanDialog('checkPassword');return false"><img class="margin5r" name="Cancel" alt="<%= c.string("Button.Cancel.alt") %>" src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.Cancel.image") %>" border=0 ></A></div>
   </iman:dialog>
</form>
</body>
</html>
