<%@  page pageEncoding="utf-8" contentType="text/html;charset=utf-8" %>
<%@ taglib uri="/WEB-INF/iman.tld" prefix="iman" %>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ page import="com.novell.emframe.dev.eMFrameUtils" %>
<%@ page import="com.novell.emframe.fw.FwUtils" %>
<iman:stringtable bundle="FwResources"/>
<iman:stringtable bundle="DevResources"/>

<HTML>
<HEAD>
   <LINK rel="stylesheet" href="<c:out value="${ContextPath}" />/portal/modules/dev/css/hf_style.css">
   <SCRIPT>
	  
	  var mvse;
	  var command;
      
	  function onInit()
	  {
	  	mvse = opener.mv<c:out value="${param.mved}"/>;
	  	command = "<c:out value="${param.command}"/>";
	  	dataBox = document.getElementById("data");
	  	
		if(command == "edit")
		{
			dataBox.value = mvse.m_sel[mvse.m_sel.selectedIndex].value;
		}
		dataBox.focus();
	  	
	  }
   
      function onExit()
      {
         var text = document.getElementById("data").value;
         if(command == "edit")
         {
               if (text!=null && text.length>0)
               {
                  opener.mvselSetValueForEdit(mvse, text)
               }
         }
         else
         {
               opener.mvselAdd(mvse, text);
		 }

         opener.mvselOnChange(mvse);
         window.close();
      } 
	
   </SCRIPT>
</HEAD>

<BODY onLoad="onInit();">
<FORM name="form">
   <iman:taskHeader title="${param.prompt}"/><BR>
   <TEXTAREA rows="7" cols="30" id="data" name="data"></TEXTAREA><BR><BR>
   
   <iman:bar/>
   <iman:button key="OK" onClick="onExit();"/>
   <iman:button key="Cancel" onClick="window.close()"/>
</FORM>
</BODY>
</HTML>
