<!--#include file="../../owFunctions/I_GeneralFunctions.asp"-->
<!--#include file="../header.asp"-->
<%
	'************************************************************************************
	'*																					*
	'*	MODIFICATION TO THIS SCRIPT OR ANY FILES INCLUDED WITH 							*
	'*		ONEWORLDSTORE IS DONE AT YOUR OWN RISK!										*
	'*	Product  : OneWorldStore														*
	'*	Version  : 9.0000																*
	'*	Modified : June 2004															*
	'*	Copyright:	Copyright (C) 2004 OneWorldStore.Com								*
	'*				Registration Number: 1024507										*
	'*				http://strategis.ic.gc.ca/											*
	'*																					*
	'************************************************************************************

	dim sSort, bRefresh, sSearch, sSearchText
	Dim sOptionGroupName
	
	sIDOptionGroup		= CONVERSION_SQLEncode2(request("idOptionGroup"),10)
	bRefresh			= Trim(Request("bRefresh"))
	sSort				= Trim(Request("sSort"))
	sSearch				= Trim(Request("sSearch"))
	sSearchText			= Trim(Request("sSearchText"))
	
	sSQLText = "SELECT * FROM OptionsGroups WHERE idOptionGroup = " & sIDOptionGroup
	Call DB_getFromDatabase(sSQLText, rsStoreData, "")
	If ( NOT rsStoreData.EOF ) Then
		sOptionGroupName	= rsStoreData("OptionGroupDesc")
		sType				= rsStoreData("Type")
		Call DB_closeRecordset(rsStoreData)
		%>
		<script type="text/javascript" src="../Script/fValConfig.js"></script>
		<script type="text/javascript" src="../Script/fValidate.js"></script>
		
		<script language = "javascript">
	
			<%If ( bRefresh = "TRUE" ) Then%>
			parent.owBodyTopNav.location="owBodyTopNav.asp?sPage=ModifyOptionGroups&sMessage=<%=Server.URLEncode(LANG_DT( "CHANGES_SAVED", "** Changes saved **" ))%>"
			<%Else%>
			parent.owBodyTopNav.location="owBodyTopNav.asp?sPage=ModifyOptionGroups"
			<%End If%>
			parent.owBodyFooter.location="owBodyFooter.asp?sAction=Null"
			
		</script>
		
		<style>
			input.owDisabled, select.owDisabled, textarea.owDisabled {
				border: 2px inset #FFFFFF;
				background-color: #BBBBBB;
			}
			.owDisabledContainerW {
				font-family: verdana, arial, helvetica, sans-serif;
				font-size: 10px;
				position: relative; left: 1px; top: 1px; color: #777777;
			}
			.owDisabledTextW {
				font-family: verdana, arial, helvetica, sans-serif;
				font-size: 10px;
				position: absolute; left: -1px; top: -1px; color: #DDDDDD;
			} 
		</style>
		
		<body onLoad = 'toForm()' style="font-family: Arial; font-size: 11px;" topmargin="0" leftmargin="0" bgcolor=C3DAF9>
		<form method="post" name="ModifyOptionGroups" action='owModifyOptionGroupsExec.asp'>
			<input type='hidden' name='sAction' value='ModifyOptionGroups'>
			<input type='hidden' name='sSort' value='<%=sSort%>'>
			<input type='hidden' name='sSearchText' value='<%=sSearchText%>'>
			<input type='hidden' name='sSearch' value='<%=sSearch%>'>
			<input type="hidden" name="idOptionGroup" value="<%=sIDOptionGroup%>">
			<table border="0" cellpadding="0" cellspacing="0" width="100%" style="padding:5px; FONT-WEIGHT: bold; FONT-SIZE: 11px; COLOR: #808080" bgcolor="#ffffff"><tr><td>
			<table border="0" cellpadding="0" cellspacing="0" width="100%" style="FONT-WEIGHT: bold; FONT-SIZE: 11px; COLOR: #808080" bgcolor="#ffffff">
				<tr>
					<td colspan=4 style='padding-top: 5px;'>
						<%=LANG_DT( "OPTION_GROUP_NAME", "Option Group Name (eg. ""Size"" or ""Color"", etc.)" )%>
					</td>
				</tr>
				<tr>
					<td colspan=4>
						<input type='text' name='sOptionGroupName' value='<%=sOptionGroupName%>' style='font-size: 18px' alt='blank'>
					</td>
				</tr>
				<tr>
					<td colspan=4>
						<span class="owDisabledContainerW"><%=LANG_DT( "OPTION_TYPESELECT", "Select Type" )%><font color="#FFFFFF" class="owDisabledTextW"><%=LANG_DT( "OPTION_TYPESELECT", "Select Type" )%></font></span><br>
						<select name='sType' class='owDisabled'>
							<option value='Dropdown'><%=LANG_DT( "OPTION_DROPDOWN", "Dropdown List" )%></option>
						</select>
					</td>
				</tr>
				<tr>
					<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
					<td colspan=3 style='padding-bottom: 2px; padding-top: 6px;'>
						<table border="0" cellpadding="0" cellspacing="0" width="100%" style="FONT-WEIGHT: bold; FONT-SIZE: 11px; COLOR: #808080" bgcolor="#ffffff">
							<%
							' no three-way left outer joins in Access
							' SELECT O.optionDescrip, O.priceToAdd, O.weight FROM Options O, Options_OptionsGroups OOG LEFT OUTER JOIN OptionsGroups OG ON OOG.idOptionGroup = OG.idOptionGroup WHERE O.idOption = OOG.idOption AND OG.idOptionGroup = 2
							sSQLText = "SELECT O.optionDescrip, O.priceToAdd, O.weight FROM Options O, OptionsGroups OG, Options_OptionsGroups OOG WHERE O.idOption = OOG.idOption AND OOG.idOptionGroup = OG.idOptionGroup AND OG.idOptionGroup = " & sIDOptionGroup
							Call DB_getFromDatabase(sSQLText, rsStoreData, "") 
							If ( NOT rsStoreData.EOF ) Then
								%>
								<tr>
									<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
									<td colspan=3 style='padding-bottom: 2px; padding-top: 6px; border-bottom: 1px solid 2A5CB2;'>
										<br>
										<%=LANG_DT( "OPTION_NAME", "Option (eg. ""small"", ""medium"", ""large"", ""XX-large"", ""XXX-large"", etc.):" )%>
									</td>
								</tr>
								<tr style='background: EAF1F9'>
									<td style='background:FFFFFF'>&nbsp;&nbsp;&nbsp;&nbsp;</td>
									<td>
										<%=LANG_DT( "OPTION_DESC", "Option Description" )%>
									</td>
									<td>
										<%=LANG_DT( "OPTION_AMTADD", "Amount to add (remove)" )%>
									</td>
									<td>
										<%=LANG_DT( "OPTION_WEIGHTADD", "Weight to add (remove)" )%>
									</td>
								</tr>
								<%
								While ( NOT rsStoreData.EOF )
									sOptionDescrip	= Trim(rsStoreData("optionDescrip"))
									sPriceToAdd		= Trim(rsStoreData("priceToAdd"))
									sWeight			= Trim(rsStoreData("weight"))
									%>
									<tr>
										<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
										<td>
											<%=sOptionDescrip%>
										</td>
										<td>
											<%=sPriceToAdd%>
										</td>
										<td>
											<%=sWeight%>
										</td>
									</tr>
									<%
									rsStoreData.MoveNext
								Wend
							End If
							Call DB_closeRecordset(rsStoreData)
							%>
							<tr>
								<td colspan=4>
									<hr size=1 color=2A5CB2>
									<%=LANG_DT( "OPTION_CLICKLINK", "Please click these links to:" )%>
									<ul>
										<li><%=Replace(LANG_DT( "OPTION_ASSIGNOPTIONS_LINK", "<a href='owListCurrentGroupAssignments.asp?idOptionGroup=1:'>Assign Options</a> (Assign options to this Option Group)" ), "1:", sIDOptionGroup)%>
										<li><%=LANG_DT( "OPTION_ADDOPTIONS_LINK", "<a href='owAddOptionsForm.asp'>Add Options</a> (Add new options to the system)" )%>
									</ul>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			</tr></td></table>

	<%
	Else
		Call DB_closeRecordset(rsStoreData)
		%>
		<script language = "javascript">
	
			parent.owBodyTopNav.location="owBodyTopNav.asp?sPage=ModifyOptionGroups&sMessage=<%=Server.URLEncode(LANG_DT( "OPTION_MISSINGGROUP", "** Missing Option Group! **" ))%>"
			location="owListOptionsGroup.asp?sSort=<%=sSort%>&sSearch=<%=sSearch%>&sSearchText=<%=sSearchText%>&idOptionGroup=<%=sIDOptionGroup%>";
			
		</script>
		<%
	End If
	
	%>      
<!--#include file="../footer.asp"-->