

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>创建广告</title>
<style>
<!--
.zt0 	{background-color:#E0E0E0;color:#5E5E5E;}
-->
</style>
</head>
<script language="javascript">

function xxx(id){
	if (id==1){alert('广告审核中，请稍侯！\n\n广告审核后才可以发布');}
	if (id==2){alert('此广告已经通过审核，不能编辑！');}
	if (id==3){alert('此广告未通过审核，请编辑后等待审核！');}
}
function sxsj(){
	var xx;
	window.location="index.aspx";
}
function zt(){
	var x1 = document.getElementsByTagName("ra1_0");
	document.forms[0].ra1_0.onclick=function(){pdzt();}
	document.forms[0].ra1_1.onclick=function(){pdzt();}
	document.forms[0].ra2_0.onclick=function(){pdzt();}
	document.forms[0].ra2_1.onclick=function(){pdzt();}
	document.forms[0].idt1.onkeyup=function(){this.value=this.value.replace(/[\x00-\xff]/g,'');X_zs.innerHTML='占用'+this.value.length+'格'}
	pdzt();
}

function pdzt(){
	if (document.forms[0].ra1_0.checked==true){
		document.forms[0].ra2_1.disabled="disabled";
		if (document.forms[0].ra2_1.checked==true){
			alert("免费广告不能选择图片形式！");
			document.forms[0].ra2_0.checked=true;
			di0.style.display="none";di2.style.display="none";di1.style.display="block";
		}
	}
	if (document.forms[0].ra1_1.checked==true){
		document.forms[0].ra2_1.disabled="";
	}
	if (document.forms[0].ra2_0.checked==true){di0.style.display="none";di2.style.display="none";di1.style.display="block";}
	if (document.forms[0].ra2_1.checked==true){di0.style.display="none";di1.style.display="none";di2.style.display="block";}
	if (document.forms[0].ra1_0.checked==true && document.forms[0].ra2_0.checked==true){
		document.forms[0].idt2.value="http://w2w2w2w2.ys168.com";
		document.forms[0].idt2.readonly=true;
		document.forms[0].idt2.onclick=function(){alert("免费广告的链接地址只能为空间地址！");}
		document.forms[0].idt2.className="zt0";
	}else{
		document.forms[0].idt2.readonly=false;
		document.forms[0].idt2.onclick=function(){}
		document.forms[0].idt2.className="zt1";
	}
}

function xztp(){
	var fhjgg;

	try{
		fhjgg=window.showModalDialog("picxz.htm",1216127,"dialogWidth:570px; dialogHeight:450px; center:yes;status:no;scroll:auto");
	}catch(error){alert("出错！(由于您的浏览器不充许弹出窗口)");} finally {}	
	if(!fhjgg) return;
	document.forms[0].idt4.value=fhjgg;
	document.getElementById("xstp").src =fhjgg;
}
function check(){
	if(document.forms[0].ra1_0.checked==false && document.forms[0].ra1_1.checked==false){alert("请选择广告类型。");return false;}
	if(document.forms[0].ra2_0.checked==false && document.forms[0].ra2_1.checked==false){alert("请选择广告形式。");return false;}
	if(document.forms[0].idt3.value.length>35){alert("悬停提示不得超过３５个字符。");return false;}
	if(document.forms[0].ra2_0.checked==true){
		if(document.forms[0].idt1.value==""){alert("请填写广告显示内容。");return false;}
		if(document.forms[0].ra1_0.checked==true){
			if(document.forms[0].idt1.value.length>2){alert("免费文字广告内容不能超过2个字符。");return false;}
		}
	}
	if(document.forms[0].ra2_1.checked==true){
		if(document.forms[0].idt4.value=="/ht/images/tpxz.gif"){alert("请选择广告图片。");return false;}
	}
	if(document.forms[0].idt2.value==""){alert("请填写广告链接地址。");return false;}
	return true;
}
//删除
function del(bh){
	if (confirm('请确认是否删除此广告')){
		document.forms[0].idscbh.value=bh;
		document.forms[0].busc.click();
	}
}
window.onload = function() {
	zt();
	
}
</script>

<body>

<form id="_ctl0" name="_ctl0" method="post" action="http://ys168.com/ysad/index.aspx">
	<div id="ysm">
		<div id="ysright">
			<h3>创建广告</h3>
			<div class="ysdb2">
				<table id="table1">
					<tr>
						<td class="tdbt" width="80">广告类型</td>
						<td>
						<table id="table2" style="width: 180px; border-collapse: collapse; border: 0px none" border="0">
							<tr>
								<td style="border: 0px none; padding: 0">
								<input id="ra1_0" type="radio" CHECKED value="免费广告" name="ra1"><label for="ra1_0">免费广告</label></td>
								<td style="border: 0px none; padding: 0">
								<input id="ra1_1" type="radio" value="付费广告" name="ra1"><label for="ra1_1">付费广告</label></td>
							</tr>
						</table>
						</td>
					</tr>
					<tr>
						<td class="tdbt">广告形式</td>
						<td>
						<table id="table3" style="width: 180px; border-collapse: collapse; border: 0px none" border="0">
							<tr>
								<td style="border: 0px none; padding: 0">
								<input id="ra2_0" type="radio" CHECKED value="文字广告" name="ra2"><label for="ra2_0">文字广告</label></td>
								<td style="border: 0px none; padding: 0">
								<input id="ra2_1" disabled type="radio" value="图片广告" name="ra2"><label for="ra2_1">图片广告</label></td>
							</tr>
						</table>
						</td>
					</tr>
					<tr>
						<td class="tdbt">显示内容</td>
						<td>
						<div id="di0" style="display: none; height: 65px; padding-top: 20px">
							<span id="ysts2">请先选择广告形式！</span> </div>
						<div id="di1" style="display: block; height: 65px">
							<!--文字--><input id="idt1" name="idt1">
							<font id="X_zs" color="blue"></font>
							<ul class="yslb2">
								<li>此处只能输入全角字符，请打开输入法的全角状态 
								</li>
								<li>如ABC12应为ＡＢＣ１２ </li>
							</ul>
						</div>
						<div id="di2" style="display: none; height: 65px; padding-top: 5px">
							<!--图片--><a href="javascript:xztp();">
							<img id="xstp" height="50" src="images/tpxz.gif" width="60" border="1"></a>
							<input style="width: 100px" onclick="xztp();" type="button" value="选择Ｅ盘内图片">
							<input id="idt4" type="hidden" value="/ht/images/tpxz.gif" name="idt4">
						</div>
						</td>
					</tr>
					<tr>
						<td class="tdbt">链接地址</td>
						<td>
						<input class="zt0" id="idt2" style="width: 300px" value="http://w2w2w2w2.ys168.com" name="idt2" readonly="true"></td>
					</tr>
					<tr>
						<td class="tdbt">悬停提示</td>
						<td><input id="idt3" name="idt3"> 当鼠标悬停在广告上时会出现此提示 </td>
					</tr>
				</table>
				<p style="padding-left: 100px"><span id="yhztxs2"></span>
				<input id="butj" onclick="return check();" type="submit" value="创建广告" name="butj"></p>
				<p>　</div>
		</div>
	</div>
</form>

</body>

</html>
</body></html>