<!--#include file="edit/fonts.asp" -->
<link rel="stylesheet" href="../inc/css/admin_style.css" type="text/css">
<body topmargin="10" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<div id="font" style="display:none">
<%font()%>
</div>
<div id="size" style="display:none">
<%size()%>
</div>
<div id="color" style="display:none">
<%color()%>
</div>
<%
dim c
c=request.form(request("back"))
c=split(c,";")

function getitem(n)
dim c_t
dim ok
ok=0

getitem="N/A"

for i_e=0 to ubound(c)-1
	c_t=split(c(i_e),":")
	
	if instr(1,c_t(0),n)>0 then
		getitem=c_t(1)
		ok=1
		exit for
	end if
	
next

if getitem="N/A" then getitem="继承上级栏目样式"

end function
%>
<form name=styles method=post onsubmit="styles_submit();">
<div >
	<table cellpadding="6" cellspacing="6" width="100%" height="30" align=center style='border:0px solid #ebebeb' >
	
	
		<tr>
			<td  width="48%" align=center>
            <fieldset style="width: 260px; height: 105px; border: 1px dotted #5E8FB0; padding: 2px; line-height:35px">
			<table cellpadding="0" cellspacing="0" width="100%" height="100">
				<!-- MSTableType="nolayout" -->
				<tr>
					<td height="30" width="33%" align="right">
					<img border="0" src="Images/bul_arrow1[1].gif" width="3" height="5" align="middle" hspace="5">字体样式：</td>
					<td height="30" width="67%" align="left">&nbsp;<select name=font_f type= text >
				    <option value='<%=getitem("font-family")%>' selected><%=getitem("font-family")%></option>
				    <script>document.write( document.getElementById("font").innerHTML);</script>
				    </select></td>
				</tr>
				<tr>
					<td height="30" width="33%" align="right">
					<img border="0" src="Images/bul_arrow1[1].gif" width="3" height="5" align="middle" hspace="5">字体大小：</td>
					<td height="30" width="67%" align="left">&nbsp;<select name=font_s >
				    <option value='<%=getitem("font-size")%>' selected><%=getitem("font-size")%></option>
				    <script>document.write( document.getElementById("size").innerHTML);</script>
				    </select></td>
				</tr>
				<tr>
					<td height="30" width="33%" align="right">
					<img border="0" src="Images/bul_arrow1[1].gif" width="3" height="5" align="middle" hspace="5">字体颜色：</td>
					<td height="30" width="67%" align="left">&nbsp;<select name=font_c >
				    <option value='<%=getitem("color")%>' selected style="background-color:<%=getitem("color")%>;"><%=getitem("color")%></option>
				    <script>document.write( document.getElementById("color").innerHTML);</script>
				    </select></td>
				</tr>
			</table>
			</fieldset>
			</td>
	</tr>
		<tr>
			<td  width="48%" align=center>
            <fieldset style="width: 260px; height: 105px; border: 1px dotted #5E8FB0; padding: 2px; line-height:35px">
			<table cellpadding="0" cellspacing="0" width="100%" height="100">
				<!-- MSTableType="nolayout" -->
				<%
				if getitem("border")="继承上级栏目样式" then
				%>
				<tr>
					<td height="30" width="33%" align="right">
					<img border="0" src="Images/bul_arrow1[1].gif" width="3" height="5" align="middle" hspace="5">边框大小：</td>
					<td height="30" width="67%" align="left">&nbsp;<select name=b_s >
				    <option value='继承上级栏目样式' selected>继承上级栏目样式</option>
				    <script>document.write(document.getElementById("size").innerHTML);</script>
				    </select></td>
				</tr>
				<tr>
					<td height="30" width="33%" align="right">
					<img border="0" src="Images/bul_arrow1[1].gif" width="3" height="5" align="middle" hspace="5">边框颜色：</td>
					<td height="30" width="67%" align="left">&nbsp;<select name=b_c >
				    <option value='继承上级栏目样式' selected>继承上级栏目样式</option>
				    <script>document.write( document.getElementById("color").innerHTML);</script>
				    </select></td>
				</tr>
				<%
				else
					if instr(1,getitem("border"),"solid")=0 then
					%>
					<input type=hidden name=b_s value="">
					<input type=hidden name=b_c value=<%=getitem("border")%>>
					<%
					else

						if split(getitem("border"),"solid")(0)="" then
						bor_0="继承上级栏目样式"
						else
						bor_0=split(getitem("border"),"solid")(0)
						end if
						
						if split(getitem("border"),"solid")(1)="" then
						bor_1="继承上级栏目样式"
						else
						bor_1=split(getitem("border"),"solid")(1)
						end if
						
						%>
						<tr>
							<td height="30" width="33%" align="right">
							<img border="0" src="Images/bul_arrow1[1].gif" width="3" height="5" align="middle" hspace="5">边框大小：</td>
							<td height="30" width="67%" align="left">&nbsp;<select name=b_s >
						    <option value='<%=bor_0%>' selected>
						    <%=bor_0%></option>
						    <script>document.write(document.getElementById("size").innerHTML);</script>
						    </select></td>
						</tr>
						<tr>
							<td height="30" width="33%" align="right">
							<img border="0" src="Images/bul_arrow1[1].gif" width="3" height="5" align="middle" hspace="5">边框颜色：</td>
							<td height="30" width="67%" align="left">&nbsp;<select name=b_c >
						    <option value=<%=bor_1%>  style="background-color:<%=bor_1%>;" selected>
						    <%=bor_1%></option>
						    <script>document.write( document.getElementById("color").innerHTML);</script>
						    </select></td>
						</tr>
					<%
					end if
				end if
			    %>
				<tr>
					<td height="30" width="33%" align="right">
					<img border="0" src="Images/bul_arrow1[1].gif" width="3" height="5" align="middle" hspace="5">背景颜色：</td>
					<td height="30" width="67%" align="left">&nbsp;<select name=bg_c >
				    <option value='<%=getitem("bgcolor")%>' selected style="background-color:<%=getitem("bgcolor")%>;"><%=getitem("bgcolor")%></option>
				    <script>document.write( document.getElementById("color").innerHTML);</script>
				    </select></td>
				</tr>
			</table>
			</fieldset>
			</td>
	</tr>
	<tr>
	<td align=right height="20">
	<p align="center">
	<input type=button onclick="styles_submit();" value='提 交'>
	<input type=reset value='重置' >
	</td>
	</tr>
		
	</table>
</div>
</form>
<script language=javascript defer>
function styles_submit(){
var c;
c="";

if(styles.font_f.value!='继承上级栏目样式' && styles.font_f.value!='') c=c+"font-family:"+styles.font_f.value+";";
if(styles.font_s.value!='继承上级栏目样式' && styles.font_s.value!='') c=c+"font-size:"+styles.font_s.value+";";
if(styles.font_c.value!='继承上级栏目样式' && styles.font_c.value!='') c=c+"color:"+styles.font_c.value+";";

if(styles.b_s.value!='继承上级栏目样式' && styles.b_s.value!='') 
c=c+"border:"+styles.b_s.value.replace("pt","px").replace(" ","")+" solid "+styles.b_c.value.replace(" ","")+";";
else{
if(styles.b_s.value=='')
c=c+"border:"+styles.b_c.value+";";
}

if(styles.bg_c.value!='继承上级栏目样式' && styles.bg_c.value!='继承上级栏目样式') c=c+"background-color:"+styles.bg_c.value+";";

window.opener.document.object_style.<%=request("back")%>.value=c;
window.opener.focus();
window.opener.document.getElementById("<%=request("back")+"_open"%>").style.display="";
window.opener.document.object_style.<%=request("back")%>.focus();
window.close();
}
</script>