// JavaScript Document

function ShowSub(id_num,num){ 
	for(var i = 0;i <= 9;i++){
		if(GetObj("S_Menu_" + id_num + i)){GetObj("S_Menu_" + id_num + i).className = 'link';}
		if(GetObj("S_Cont_" + id_num + i)){GetObj("S_Cont_" + id_num + i).style.display = 'none';}
	}
	if(GetObj("S_Menu_" + id_num + num)){GetObj("S_Menu_" + id_num + num).className = 'hover';}
	if(GetObj("S_Cont_" + id_num + num)){GetObj("S_Cont_" + id_num + num).style.display = 'block';}
}
function GetObj(objName){
	if(document.getElementById){
		return eval('document.getElementById("' + objName + '")');
	}else{
		return eval('document.all.' + objName);
	}
}

function AShowSub(id_num,num){ 
	for(var i = 0;i <= 9;i++){
		if(GetObj("AS_Menu_" + id_num + i)){GetObj("AS_Menu_" + id_num + i).className = 'link';}
		if(GetObj("AS_Cont_" + id_num + i)){GetObj("AS_Cont_" + id_num + i).style.display = 'none';}
	}
	if(GetObj("AS_Menu_" + id_num + num)){GetObj("AS_Menu_" + id_num + num).className = 'hover';}
	if(GetObj("AS_Cont_" + id_num + num)){GetObj("AS_Cont_" + id_num + num).style.display = 'block';}
}
function GetObj(objName){
	if(document.getElementById){
		return eval('document.getElementById("' + objName + '")');
	}else{
		return eval('document.all.' + objName);
	}
}


	
/*****************/
window.onload = function(){
	var nowDate = new Date();
	var str = nowDate.getFullYear()+"-"+(nowDate.getMonth() + 1)+"-"+nowDate.getDate()+" "+nowDate.getHours()+":"+nowDate.getMinutes()+":"+nowDate.getSeconds();
	document.getElementById("tgShowTime").value=str;
	document.getElementById("txtShowTime").value=str;
	var oH2 = document.getElementsByClassName("more-btn")[0];
	var oUl = document.getElementsByClassName("kj")[0];
	oH2.onclick = function ()
	{
		 var style = oUl.style;
		 style.height = style.height == "auto" ? "" : "auto";
		 oH2.className = style.display == "more-btn" ? "more-btn" : "more-onk"
	}
}

$(document).ready(function()
{
//验证
$('#complain').submit(function ()
{
if($('#name').val()==""){
$('#name').focus();
alert("用户名不能为空！");
return false;
}
if($('#tell').val()=="")
{
$('#tell').focus();
alert("联系电话不能为空！");
return false;
}
if($('#dizhi').val()=="")
{
$('#dizhi').focus();
alert("地址不能为空！");
return false;
}
if($('#renshu').val()==""){
$('#renshu').focus();
alert("人数不能为空！");
return false;
}
if($('#qq').val()=="")
{
$('#qq').focus();
alert("联系QQ不能为空！");
return false;
}
})
});