

	function selectnav(num){
		for(var i=1;i<8;i++){
			document.getElementById("navitem"+i).className = "navitemno";
			document.getElementById("navfont"+i).className = "navitemno";
		}
		document.getElementById("navitem"+num).className = "navitemyes";
		document.getElementById("navfont"+num).className = "lanse";
	}

	function selectcontent(num,type){
		for(var i=1;i<=type;i++){
			document.getElementById("content"+i).style.display = "none";
			document.getElementById("qiehuantd"+i).style.background="url(../images/qiehuan2.jpg)";
			document.getElementById("qiehuanfont"+i).className = "qiehuanfontno";
		}
		document.getElementById("content"+num).style.display = "block";
		document.getElementById("qiehuantd"+num).style.background="url(../images/qiehuan1.jpg)";
		document.getElementById("qiehuanfont"+num).className = "qiehuanfontyes";
	}

	var pmtiertwolinktimeout = new Array;
	function pmtiertwolinkshow(pmlinkindex) {
		if (pmtiertwolinktimeout[pmlinkindex] != null) {
			clearTimeout(pmtiertwolinktimeout[pmlinkindex]);
		}
		document.getElementById("pmtiertwosublist_"+ pmlinkindex).style.visibility = "visible";
	}
	
	function pmtiertwolinkhide(pmlinkindex) {
		if (pmtiertwolinktimeout[pmlinkindex] != null) {
			clearTimeout(pmtiertwolinktimeout[pmlinkindex]);
		}
		pmtiertwolinktimeout[pmlinkindex] = setTimeout("document.getElementById('pmtiertwosublist_" + pmlinkindex + "').style.visibility = 'hidden'", 500);
	}
	
	function checkformdata() {

		if (document.messageform.username.value == "") {
			alert("请填写联系人！");
			document.messageform.username.focus();
			document.messageform.username.select();
			return false;
		}


		if (document.messageform.phone.value == "") {
			alert("请填写固定电话或手机号！");
			document.messageform.phone.focus();
			document.messageform.phone.select();
			return false;
		}
		else
		{
			var formMap  = DWRUtil.getValues("messageform"); 
         	DwrProductMessage.saveProductMessage(result,formMap); 
		}
	}	
	
	function result(data)
        {
   			alert("留言成功");
        }
		
		
		
		
		
		function checkphoneformdata() {

		if (document.phoneform.username.value == "") {
			alert("请填写机主姓名！");
			document.phoneform.username.focus();
			document.phoneform.username.select();
			return false;
		}

		if (document.phoneform.address.value == "") {
			alert("请填写详细地址！");
			document.phoneform.address.focus();
			document.phoneform.address.select();
			return false;
		}
		
		if (document.phoneform.number.value == "") {
			alert("请填写证件号码！");
			document.phoneform.number.focus();
			document.phoneform.number.select();
			return false;
		}
		
		if (document.phoneform.contact.value == "") {
			alert("请填写联系人！");
			document.phoneform.contact.focus();
			document.phoneform.contact.select();
			return false;
		}
		if (document.phoneform.phone.value == "") {
			alert("请填写固定电话或手机号！");
			document.phoneform.phone.focus();
			document.phoneform.phone.select();
			return false;
		}
		if (document.phoneform.tongxinaddress.value == "") {
			alert("请填写通信地址！");
			document.phoneform.tongxinaddress.focus();
			document.phoneform.tongxinaddress.select();
			return false;
		}
		
		if (document.phoneform.postcode.value == "") {
			alert("请填写邮政地址！");
			document.phoneform.postcode.focus();
			document.phoneform.postcode.select();
			return false;
		}
		if (document.phoneform.phonecode.value == "") {
			alert("请填写附近电话局号！");
			document.phoneform.phonecode.focus();
			document.phoneform.phonecode.select();
			return false;
		}
		else
		{
			var check_box=document.getElementsByName("capability_temp");
			var str="",temp_i=0;
			for(var i=0;i<check_box.length;i++)
			{
				if(check_box[i].checked)
				{
					if(temp_i==0)
					{
						str+=check_box[i].value;
						temp_i++;
					}
					else
					{
						str+=","+check_box[i].value;
					}
				}
			}
			document.phoneform.capability.value=str;
			var formMap  = DWRUtil.getValues("phoneform"); 
         	DwrProductMessage.savePhoneProductMessage(phoneResult,formMap); 
		}
	}	
	function phoneResult(data)
        {
   			alert("申请成功");
        }
	
	