<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>

<xsl:template match="/">
	<html><head>

	<script language="javascript" type="text/javascript">
		function loadXSLDocument(selBox)
		{
			var strDocument = "xmlgenerator.csp?generator=XML.VisionWebRecordViewGenerator"
			strDocument += "&amp;page=SupplierLensDesignDetails&amp;sysexport=1&amp;GenerateCsp=1&amp;OBJSID=" + selBox.value;
			
			#server(..SetSessionVariable("Source Page",strDocument))#;
			#server(..SetSessionVariable("SupplierID",selBox.value))#;

			window.location.href = strDocument;
		}
		function downLoadMaterialCodes()
		{
			window.location.href = "xmlgenerator.csp?generator=XML.VisionWebRecordViewGenerator&amp;page=EMRMaterialCodes&amp;sysexport=1&amp;GenerateCsp=1";
		}
		function addChangeSupplier()
		{
			window.location.href = "xmlgenerator.csp?generator=XML.VisionWebRecordViewGenerator&amp;page=VisionWebSuppliers&amp;sysexport=1&amp;GenerateCsp=1";
		}
		function setSource()
		{
			var strDocument = "xmlgenerator.csp?generator=XML.VisionWebRecordViewGenerator"
			strDocument += "&amp;page=LensDesignSummary&amp;sysexport=1&amp;GenerateCsp=1";
			
			#server(..SetSessionVariable("Source Page",strDocument))#;
		}
		function doMessage(strMessage)
		{
			alert(strMessage);
		}
		function setGroup(textBox)
		{
			var ID=textBox.id;
			var strValue=textBox.value;
			var strError = #server(..SetProperties("VWLensType",ID,"Group",strValue))#;
			if (strValue != "" &amp;&amp; strError == "")
			{
				alert("Sucessfully set Group to " + strValue + ".");
			}
			else if (strValue == "" &amp;&amp; strError == "")
			{
				alert("Sucessfully cleared Group value.");
			}
			else
			{
				alert(strError);
			}
		}
	</script>
	<script arguments="strName:%String,strValue:%String" language="Cache" method="SetSessionVariable" returntype="%Boolean" type="text/Cache">
		Set %session.Data(strName) = strValue
		Quit 1
	</script>
	<script arguments="strName:%String" language="Cache" method="GetSessionVariable" returntype="%String" type="text/Cache">
		Set strValue = $Get(%session.Data(strName))
		Quit strValue
	</script>
	<script arguments="strClass:%String,ID:%Integer,strProperties:%String,strData:%String" language="Cache" method="SetProperties" returntype="%String" type="text/Cache">
		Set strError=""
		set bStatus=##class(BL.CacheRecordOb).SetProperties(strClass, ID, strProperties, strData, .strError)
		//Do DEBUG^%Serenji("##class(BL.CacheRecordOb).SetProperties(strClass, ID, strProperties, strData, .strError)")
		Quit strError
	</script>
	</head>
		<body onload="setSource()">
			<form id="form" name="form">
				<p>
					<table width="100%">
						<tbody>
							<tr>
								<td width="7%">
									<img hspace="0" src="OdPro.gif" align="baseline" border="0"/>
								</td>
								<td width="14%"/>
								<td colSpan="6" width="55%">
									<strong>
										<font face="Verdana" color="#008000" size="5">VisionWeb Lens Design Summary</font>
									</strong>
								</td>
							</tr>
							<tr>
								<td width="7%"/>
								<td width="14%"/>
								<td colSpan="6" width="55%"/>
							</tr>
							<tr>
								<td width="7%"/>
								<td width="18%">
									<p align="left">
										<font face="Verdana" color="#008000">
											<strong>Lab Supplier</strong>
										</font>
									</p>
								</td>
								<td colSpan="6" width="55%"/>
							</tr>
							<tr>
								<td width="7%"/>
								<td width="14%">
									<select onchange="loadXSLDocument(this)">
										<xsl:for-each select="Recordset/VWSupplier">
											<option>
												<xsl:attribute name="value"><xsl:value-of select="ID"/></xsl:attribute><xsl:value-of select="Name"/>
											</option>
										</xsl:for-each>
										<option selected="true"/>
									</select>
								</td>
								<td width="20%"/>
								<td width="17%">
									<p align="right">
										<strong>
											<font face="Verdana" color="#008000" size="2">Material Codes&#160; &#160;</font>
										</strong>
									</p>
								</td>
								<td width="17%">
									<p align="left">
										<button onclick="downLoadMaterialCodes()">
											<div align="center">Download</div>
										</button>
									</p>
								</td>
								<td width="15%">
									<p align="right">
										<strong>
											<font face="Verdana" color="#008000" size="2">VisionWeb Supplier&#160; &#160;</font>
										</strong>
									</p>
								</td>
								<td>
									<p align="left">
										<button onclick="addChangeSupplier()">Add/Change</button>
										<strong>
											<font face="Verdana" size="2"/>
										</strong>
									</p>
								</td>
								<td width="20%"/>
							</tr>
						</tbody>
					</table>
				</p>
				<p>
					<table width="100%">
						<tbody>
							<tr>
								<td width="4%"/>
								<td width="17%">
									<p align="center">
										<strong>
											<font face="Verdana" color="#008000" size="2">Description</font>
										</strong>
									</p>
								</td>
								<td>
									<p align="center">
										<strong>
											<font face="Verdana" color="#008000" size="2">VW Code</font>
										</strong>
									</p>
								</td>
								<td width="8%">
									<p align="center">
										<strong>
											<font face="Verdana" color="#008000" size="2">Group</font>
										</strong>
									</p>
								</td>
								<td width="8%">
									<p align="center">
										<strong>
											<font face="Verdana" color="#008000" size="2">Type</font>
										</strong>
									</p>
								</td>
								<td width="8%">
									<p align="center">
										<strong>
											<font face="Verdana" color="#008000" size="2">Geometry</font>
										</strong>
									</p>
								</td>
								<td colSpan="2" width="8%"/>
							</tr>
							<tr>
								<td width="4%"/>
								<td colSpan="2" width="17%"/>
								<td width="8%">
									<p align="center">
										<select>
											<option value="BI">BI</option>
											<option value="IN">IN</option>
											<option value="SV">SV</option>
											<option value="PR">PR</option>
											<option value="TR">TR</option>
											<option selected="true"/>
										</select>
									</p>
								</td>
								<td width="8%">
									<p align="center">
										<strong>
											<font face="Verdana" color="#008000" size="2">
												<select>
													<option value="CT">CT</option>
													<option value="EX">EX</option>
													<option value="FT">FT</option>
													<option selected="true"/>
												</select>
											</font>
										</strong>
									</p>
								</td>
								<td width="8%">
									<p align="center">
										<select>
											<option value="AS">AS</option>
											<option value="LE">LE</option>
											<option value="SP">SP</option>
											<option selected="true"/>
										</select>
									</p>
								</td>
								<td colSpan="2" width="8%">
									<p align="center">
										<font face="Verdana" color="#008000" size="2">
											<strong>Lens Materials</strong>
										</font>
									</p>
								</td>
							</tr>
							<xsl:for-each select="Recordset/VWLensType">
								<tr>
									<td width="4%"/>
									<td width="17%">
										<font face="Verdana" color="#000080" size="2">
											<strong>
												<xsl:value-of select="Description"/>
											</strong>
										</font>
									</td>
									<td width="8%">
										<p align="center">
											<font face="Verdana" color="#000080" size="2">
												<strong>
													<xsl:value-of select="VWCode"/>
												</strong>
											</font>
										</p>
									</td>
									<td width="8%">
										<p align="center">
											<font face="Verdana" color="#000080" size="2">
												<strong>
													<input type="text" style="text-align:center" onblur="setGroup(this)" size="2" onkeyup="this.value=this.value.toUpperCase();">
														<xsl:attribute name="id">
														<xsl:value-of select="ID"/></xsl:attribute>
														<xsl:if test="boolean(Group)">
															<xsl:attribute name="value"><xsl:value-of select="Group"/>
														</xsl:attribute></xsl:if>
													</input>
												</strong>
											</font>
										</p>
									</td>
									<td width="8%">
										<p align="center">
											<font face="Verdana" color="#000080" size="2">
												<strong>
													<xsl:value-of select="Type"/>
												</strong>
											</font>
										</p>
									</td>
									<td width="8%">
										<p align="center">
											<font face="Verdana" color="#000080" size="2">
												<strong>
													<xsl:value-of select="Geometry"/>
												</strong>
											</font>
										</p>
									</td>
									<td>
										<p align="center">
											<strong>
												<font face="Verdana" color="#000080" size="2">
													<a><xsl:attribute name="href">xmlgenerator.csp?generator=XML.VisionWebRecordViewGenerator&amp;page=LensMaterialDetails&amp;sysexport=1&amp;GenerateCsp=1&amp;OBJLDID=<xsl:value-of select="ID"/></xsl:attribute>Show</a>
												</font>
											</strong>
										</p>
									</td>
								</tr>
							</xsl:for-each>
						</tbody>
					</table>
				</p>
			</form>
		</body>
	</html>
</xsl:template>

</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2007. Progress Software Corporation. All rights reserved.

<metaInformation>
	<scenarios>
		<scenario default="yes" name="LensDesignSummary" userelativepaths="yes" externalpreview="no" url="LensDesignSummary.xml" htmlbaseurl="" outputurl="" processortype="internal" useresolver="yes" profilemode="0" profiledepth="" profilelength=""
		          urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal"
		          customvalidator="">
			<advancedProp name="sInitialMode" value=""/>
			<advancedProp name="bXsltOneIsOkay" value="true"/>
			<advancedProp name="bSchemaAware" value="true"/>
			<advancedProp name="bXml11" value="false"/>
			<advancedProp name="iValidation" value="0"/>
			<advancedProp name="bExtensions" value="true"/>
			<advancedProp name="iWhitespace" value="0"/>
			<advancedProp name="sInitialTemplate" value=""/>
			<advancedProp name="bTinyTree" value="true"/>
			<advancedProp name="bWarnings" value="true"/>
			<advancedProp name="bUseDTD" value="false"/>
			<advancedProp name="iErrorHandling" value="fatal"/>
		</scenario>
	</scenarios>
	<MapperMetaTag>
		<MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no">
			<SourceSchema srcSchemaPath="LensDesignSummary.xml" srcSchemaRoot="Recordset" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/>
		</MapperInfo>
		<MapperBlockPosition>
			<template match="/">
				<block path="html/body/p/table/tbody/tr[3]/td[1]/select/xsl:for-each" x="379" y="264"/>
				<block path="html/body/p[1]/table/tbody/xsl:for-each" x="339" y="264"/>
			</template>
		</MapperBlockPosition>
		<TemplateContext></TemplateContext>
		<MapperFilter side="source"></MapperFilter>
	</MapperMetaTag>
</metaInformation>
-->