<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:xutil="xutil">

	<xsl:include href="amendmenteditortop.htm"/>

	<xsl:template name="amendformedit">
		<xsl:for-each select="/EDITOR/ROWSET/ROW[1]/*">
			<span id="fld_{name()}" style="display:none"><xsl:value-of select="text()"/></span>
		</xsl:for-each>
		<TABLE border="0" width="500" bgcolor="#E4E0D8"><TR>
			<xsl:variable name="idplus" select="number(./NUM)+1"/>
			<xsl:variable name="oddevenp" select="position() mod 2"/>
			<xsl:choose>
				<xsl:when test="//@table_name='IPCAMENDMENTS' or //@table_name='IPCAMENDMENTS2'">
					<TD class="buttoncolumns" width="32">
						<A name="modifyline"/>
						<IMG style="cursor:pointer;" alt="save amendment modification" src="{$admingiffolder}save.gif" onclick="javascript:saveForm('{$master_id}','{$rows}','{$master_id}','{$master_table_name}');"/>
						<br/>
						<IMG style="cursor:pointer;" alt="Save and send to discussion view" src="{$admingiffolder}loadin.gif" onclick="javascript:saveForm2('{$master_id}','{$rows}','{$master_id}','{$master_table_name}');"/>
						<IMG id="idImportButton" style="cursor:pointer;" alt="Import text" src="{$admingiffolder}import.gif" onclick="javascript:doImport();"/>
						<xsl:if test="/EDITOR/@master_table_name != ''">
							<br/><br/>
							<IMG style="cursor:pointer;" alt="close window" src="{$admingiffolder}back.gif" onclick="javascript:window.close();"/>
						</xsl:if>
					</TD>
					<TD width="100%">
						<xsl:call-template name="amendmenteditorformtop"/>
<!--						<TABLE border="0"><TR><xsl:call-template name="newAmFields_form"/></TR></TABLE>-->
					</TD>
				</xsl:when>
				<xsl:when test="//@table_name='IPCPROJECTS' and /EDITOR/@master_table_name='IPCSESSIONS'">
					<xsl:call-template name="modifyBoxProjectFromSession"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:call-template name="modifyBox"/>
				</xsl:otherwise>
			</xsl:choose>
			<xsl:for-each select="./*">
				<xsl:variable name="notMergeAm">
					<xsl:call-template name="notMergeAm_form">
						<xsl:with-param name="colName" select="name(.)"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:if test="not(//@table_name='IPCAMENDMENTS' or //@table_name='IPCAMENDMENTS2')">
					<xsl:choose>
					<xsl:when test="//@table_name='IPCPROJECTS' and //@master_table_name='IPCSESSIONS'">
						<xsl:if test="name(.)='PROJ_PROJECT'">
						<TD>
							<xsl:call-template name="isComboColumn">
								<xsl:with-param name="colName" select="'ASSIGNPROJECT'"/>
								<xsl:with-param name="type" select="'_mod'"/>
							</xsl:call-template>
						</TD>
						</xsl:if>
					</xsl:when>
					<xsl:otherwise>
						<xsl:variable name="isWrite">
							<xsl:call-template name="isWriteColumn">
								<xsl:with-param name="colName" select="name(.)"/>
								<xsl:with-param name="colValue" select="."/>
							</xsl:call-template>
						</xsl:variable>
						<xsl:if test="not($isWrite='false')">
							<TD><xsl:if test="not(/EDITOR/@frame_position='editor' and name(.)='LOADED')">
								<xsl:call-template name="isComboColumn">
									<xsl:with-param name="colName" select="name(.)"/>
									<xsl:with-param name="type" select="'_mod'"/>
								</xsl:call-template>
								</xsl:if>
							</TD>
						</xsl:if>
					</xsl:otherwise></xsl:choose>
				</xsl:if>
			</xsl:for-each>
			<xsl:choose>
				<xsl:when test="//@table_name='IPCPROJECTS' and not(//@master_table_name='IPCSESSIONS')">
					<TD>
						<xsl:attribute name="width">
							<xsl:call-template name="getColumnWidth">
								<xsl:with-param name="colName" select="'IPCPROJECTSBUTTONS'"></xsl:with-param>
							</xsl:call-template>
						</xsl:attribute>
					</TD>
				</xsl:when>
				<xsl:when test="//@table_name='IPCSESSIONS'">
					<TD>
						<xsl:attribute name="width">
							<xsl:call-template name="getColumnWidth">
								<xsl:with-param name="colName" select="'IPCSESSIONSBUTTONS'"></xsl:with-param>
							</xsl:call-template>
						</xsl:attribute>
					</TD>
				</xsl:when>
				<xsl:when test="//@table_name='IPCAMENDMENTS' or //@table_name='IPCAMENDMENTS2'">
				</xsl:when>
				<xsl:otherwise>
				</xsl:otherwise>
			</xsl:choose>
		</TR></TABLE>
		<xml id="idEditorIsle">
			<EDITOR mode="x" table_name="IPCAMENDMENTS" frame_position="browser">
				<ORDERBY/>
				<FILTER/>
				<MASTER>
					<ROW>
					</ROW>
				</MASTER>
				<ROWSET>
					<ROW>
					</ROW>
				</ROWSET>
			</EDITOR>
		</xml>
		<xml id="idTransferIsle">
			<EDITOR mode="delete" table_name="IPCAMENDMENTS" frame_position="browser">
				<ROWSET>
					<ROW>
						<XMLS>
						</XMLS>
					 </ROW>
				</ROWSET>
			</EDITOR>
		</xml>
		<xml id="idCleanSkeleton" src="{$href}clearskeleton.xsl"></xml>
		<xml id="idXSLIsle" src="{$href}admininterface.xsl"></xml>
		<xml id="idIPCXSLIsle" src="{$href}ipcentry.xsl"></xml>
		<span id="idEditorBox"></span>
	</xsl:template>

	<xsl:template name="newAmFields_form">
		<tr><td width="250"><table border="0">
		<xsl:for-each select="./*[position() &lt; 18]">
			<xsl:variable name="notMergeAm">
				<xsl:call-template name="notMergeAm_form">
					<xsl:with-param name="colName" select="name(.)"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:if test="$notMergeAm='true'">
				<xsl:variable name="isWrite">
					<xsl:call-template name="isWriteColumn">
						<xsl:with-param name="colName" select="name(.)"/>
						<xsl:with-param name="colValue" select="."/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:if test="not($isWrite='false')">
					<TR class="row{oddevenp}"><TD>
						<xsl:call-template name="isComboColumn">
							<xsl:with-param name="colName" select="name(.)"/>
							<xsl:with-param name="type" select="'_newAmendment'"/>
							<xsl:with-param name="value" select="''"/>
							<xsl:with-param name="showlabel" select="1"/>
						</xsl:call-template>
					</TD></TR>
				</xsl:if>
			</xsl:if>
		</xsl:for-each>
		</table></td>
		<td valign="top" width="250"><table border="0">
		<xsl:for-each select="./*[position() > 17]">
			<xsl:variable name="notMergeAm">
				<xsl:call-template name="notMergeAm_form">
					<xsl:with-param name="colName" select="name(.)"/>
				</xsl:call-template>
			</xsl:variable>
			<xsl:if test="$notMergeAm='true'">
				<xsl:variable name="isWrite">
					<xsl:call-template name="isWriteColumn">
						<xsl:with-param name="colName" select="name(.)"/>
						<xsl:with-param name="colValue" select="."/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:if test="not($isWrite='false')">
					<TR class="row{oddevenp}"><TD>
						<xsl:call-template name="isComboColumn">
							<xsl:with-param name="colName" select="name(.)"/>
							<xsl:with-param name="type" select="'_newAmendment'"/>
							<xsl:with-param name="value" select="''"/>
							<xsl:with-param name="showlabel" select="1"/>
						</xsl:call-template>
					</TD></TR>
				</xsl:if>
			</xsl:if>
		</xsl:for-each>
		<xsl:for-each select="./*">
			<TR class="row{oddevenp}"><TD>
				<xsl:variable name="canChange">
					<xsl:call-template name="canChangeNewAmendment">
						<xsl:with-param name="colName" select="name(.)"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:variable name="MergeAm">
					<xsl:call-template name="MergeAm">
						<xsl:with-param name="colName" select="name(.)"/>
					</xsl:call-template>
				</xsl:variable>
				<xsl:if test="$canChange='true' and $MergeAm='true'">
					<xsl:variable name="spanname">
						<xsl:value-of select="name(.)"/>_newAmendment</xsl:variable>
<!--					<span id="{$spanname}">-->
						<span id="{name(.)}_newAmendment_label" style="width:100px">
							<xsl:call-template name="getColumnName">
								<xsl:with-param name="colName" select="name(.)"/>
								<xsl:with-param name="colValue" select="."/>
							</xsl:call-template>
						</span>
				
						<xsl:call-template name="isComboColumn">
							<xsl:with-param name="colName" select="name(.)"/>
							<xsl:with-param name="type" select="'_newAmendment'"/>
							<xsl:with-param name="value" select="''"/>
						</xsl:call-template>
<!--					</span>-->
				</xsl:if>
			</TD></TR>
		</xsl:for-each>
		</table></td></tr>
	</xsl:template>

</xsl:stylesheet><!-- Stylus Studio meta-information - (c)1998-2003 Copyright Sonic Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="file://c:\temp\data.xml" htmlbaseurl="" outputurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
</metaInformation>
-->