<script type="text/javascript">
	$(document).ready(function() {
		//$("#icon_id").msDropDown();
		
		$(document).keypress(function(e) { 
		if($('#assets_type_form_div').css("display") != "none" && $('#assets_type_form_div').css("display") != undefined){
			if (e.keyCode == 27) { 
				conf_dialog_assest_type_vtsloglog.dialog("open");
			}    
		}
	});
	});
	</script>
<?php if($this->form_model->assets_type_nm == ""){ ?>
<h3 class="title_black"><?php echo $this->lang->line("Create Assets Type"); ?></h3>
<?php }else{ ?>
<h3 class="title_black"><?php echo $this->lang->line("Update Assets Type"); ?></h3>
<?php } ?>
<?php $this->load->view('dashboard/system_messages'); ?>
<div id="assets_type_error" class="error" style="display:none"><?php echo $this->lang->line("Assets Type Already Exist"); ?>.!</div>
<div class="content toggle" align="center">
  <form id="frm_assets_type" method="post" action="<?php echo site_url($this->uri->uri_string()); ?>" onsubmit="return submitFormassets_type('<?php echo uri_assoc('id')?>')" enctype="multipart/form-data">
    <p id="error" class="addTips">* <?php echo $this->lang->line("Fields_are_mendatory"); ?></p>
    <table width="70%" align="center" class="formtable">
      <tbody>
        <tr>
          <td width="20%">
          <?php echo $this->lang->line("Asset Type Name"); ?>*</td>
          <td width="50%">
            <input type="text" name="assets_type_nm" id="assets_type_nm" class="text ui-widget-content ui-corner-all" value="<?php echo $this->form_model->assets_type_nm; ?>" onblur="check_assets_type(<?php echo uri_assoc('id')?>)"/></td>
        </tr>
         <tr>
          <td width="20%">
          <?php echo $this->lang->line("Comments"); ?></td>
          <td width="50%">
           <textarea name="comments" class="text ui-widget-content ui-corner-all"><?php echo $this->form_model->comments; ?></textarea>
		</td>
        </tr>
        <tr>
          <td align="center" colspan="2"><input type="submit" id="btn_assets_type_submit" value="<?php echo $this->lang->line('submit'); ?>" name="btn_assets_type_submit"/>
            &nbsp;&nbsp;
            <input type="button" id="btn_cancel" onclick="cancel_assets_type()" name="btn_cancel" value="<?php echo $this->lang->line("Back"); ?>" /></td>
        </tr>
      </tbody>
    </table>
  </form>
</div>
<script type="text/javascript">
$(document).ready(function() {
	jQuery("input:button, input:submit, input:reset").button();	
//	$("#assets_type_loading").dialog("close");
	$("#loading_top").css("display","none");
});

$("#loading_dialog").dialog("close");
$(".ddTitle").height(22);
$(".ddTitle img").height(22);
/*
var name = $("#name");
allFields = $([]).add(name);
tips = $("#error");*/
</script>