﻿//DIV自动适增
<!--
//window.onload=window.onresize=function(){
function OnresSize(){
if(document.getElementById("mbox").clientHeight<document.getElementById("fbox").clientHeight){
document.getElementById("mbox").style.height=document.getElementById("fbox").offsetHeight+"px";
}
else{
document.getElementById("fbox").style.height=document.getElementById("mbox").offsetHeight+"px";
}
}


//大类添加
function changensort(sortname,selectobj){ //更改小类选项(大类的onChange事件)  大类名称,小类对象
    selectobj.length=1;
    selectobj.options[0]=new Option('-所有-','');
	for (var i=0;i < nSortJS.length; i++){
		if(nSortJS[i][1] == sortname && nSortJS[i][0]!="")
		{
			selectobj.options[selectobj.length] = new Option(nSortJS[i][2],nSortJS[i][0]);
		}
	}
}

function addsort(strSort,selectobj){ //添加大类  大类名称,对象名称
	for (var i=0;i < SortJS.length; i++){
    	if(strSort==SortJS[i][0])
        {
        	selectobj.options[selectobj.length] = new Option(SortJS[i][1],SortJS[i][0],true,true);//text,value,焦点,选中
        }
        else
        {
        	selectobj.options[selectobj.length] = new Option(SortJS[i][1],SortJS[i][0],false,false);
        }
	}
}
    
function selectednsort(sortname,nsortname,keyword,selectobj){	//大类，小类,关键字，对象名称
	if(sortname == "")	
		return;		
	
    selectobj.length=1;
    selectobj.options[0]=new Option('-所有-','');
	for (var i=0;i < nSortJS.length; i++){
		if(nSortJS[i][1] == sortname && nSortJS[i][0]!="")
		{
			if(nSortJS[i][0] == nsortname)
			{
				selectobj.options[selectobj.length] = new Option(nSortJS[i][2],nSortJS[i][0],true,true);
			}
			else
			{
				selectobj.options[selectobj.length] = new Option(nSortJS[i][2],nSortJS[i][0],false,false);
			}
		}
	}
	
	if(keyword != "")	
		form1.keyword.value = keyword;
}

//自动增加产品列表
//window.onload=window.onresize=function()
function funShowList()
{
	for(var i=0;i<SortListJS.length;i++)
	{
		document.getElementById('ulShowList').innerHTML += "<li class=News_Font_0"+ SortListJS[i][0] +"><a href=/ProShow.aspx?sort="+ SortListJS[i][1] +">"+ SortListJS[i][2] +"</a></li>";
	}
}


//在线留言表单验证
function CheckFormWent()
{
	if(document.form2.txtTitle.value == "")
	{
		alert('在线留言标题不能为空！')
		document.form2.txtTitle.focus();
		return false;
	};
	if(document.form2.txtContent.value == "")
	{
		alert('在线留言内容不能为空！')
		document.form2.txtContent.focus();
		return false;
	};
}

//完整留言表单验证
function CheckFormCC()
{
	if(document.cc.CompanyName.value == "")
	{
		alert('在线留言公司名称不能为空！')
		document.cc.CompanyName.focus();
		return false;  
	};
	if(document.cc.UserName.value == "")
	{
		alert('在线留言联系人不能为空！')
		document.cc.UserName.focus();
		return false;
	};
	if(document.cc.Tel.value == "")
	{
		alert('在线留言联系方式不能为空！')
		document.cc.Tel.focus();
		return false;
	};
	if(document.cc.Title.value == "")
	{
		alert('在线留言反馈主题不能为空！')
		document.cc.Title.focus();
		return false;
	};
	if(document.cc.Content.value == "")
	{
		alert('在线留言内容不能为空！')
		document.cc.Content.focus();
		return false;
	};
}


-->
