
//行业类别JS文件<!--刘建元 2004-08-26 09:43:47-->
var callingsCount;
callings = new Array();
callingsCount=66;
//定义数组
callings[0]= new Array("2","计算机软件","Computer Software");
callings[1]= new Array("3","计算机硬件","Computer Hardware");
callings[2]= new Array("42","计算机服务业(系统、维护、设备管理等)","Computer Services");
callings[3]= new Array("1","互联网、电子商务","Internet,E-Commerce");
callings[4]= new Array("43","网络游戏","Online games");
callings[5]= new Array("5","通讯、电信、网络设备","Communication,Telecom,Network equipment ");
callings[6]= new Array("37","通信、电信运营、增值服务","Communications,Telecom operators,Value-added services");
callings[7]= new Array("4","电子、微电子技术、集成电路","Electrical,Micro-electronics,");
callings[8]= new Array("15","仪器仪表、电工设备、工业自动化","Apparatus,Electric Devices");
callings[9]= new Array("44","银行","Banking");
callings[10]= new Array("45","证券","Securities");
callings[11]= new Array("46","保险","Insurance");
callings[12]= new Array("22","其他金融活动","Other Financial Activities");
callings[13]= new Array("8","贸易、商务、进出口","Trading,Commerce,Imports and Exports");
callings[14]= new Array("7","批发零售","Wholesale and Retail");
callings[15]= new Array("19","快速消费品","Fast consumable");
callings[16]= new Array("20","纺织品业(服饰、鞋类、家纺用品…)","Textile industry");
callings[17]= new Array("47","皮革业(家私、造鞋、皮具…)","Leather industry");
callings[18]= new Array("48","木、竹、藤、棕、草制品","Wood,Bamboo,Cane,Palm,Grass products");
callings[19]= new Array("49","橡胶、塑料制品","Rubber,Plastic products");
callings[20]= new Array("6","家具、家电、工艺品、玩具","Furniture,Household appliances,Handicrafts,Toys");
callings[21]= new Array("50","珠宝、首饰、钟表","Jewellery,Watches ");
callings[22]= new Array("51","农副食品加工","Agro-food processing");
callings[23]= new Array("52","造纸及纸制品","Paper and Paper products ");
callings[24]= new Array("27","办公设备、文化体育休闲用品","OA Devices,Culture Articles,Sports and Leisure goods");
callings[25]= new Array("13","机械制造、机电设备、重工业","Machine-building,Machine,Heavy industry");
callings[26]= new Array("14","汽车、摩托车及零配件","Automobile,Motorcycle and Fittings");
callings[27]= new Array("29","其它生产、制造、加工","Other Production,Manufacturing,Processing");
callings[28]= new Array("23","建筑施工与工程","Construction and Engineering");
callings[29]= new Array("24","建筑安装","Construction and Installation ");
callings[30]= new Array("53","家居、室内设计、装潢","Home,Interior design,Decoration");
callings[31]= new Array("39","房地产开发","Real estate development");
callings[32]= new Array("54","物业管理、商业中心","Property management,Commercial center");
callings[33]= new Array("18","公关、文化传播、会展","Pr,Cultural diffusion,Exhibition ");
callings[34]= new Array("38","媒体、影视制作、艺术","Media,Film and television production,Arts");
callings[35]= new Array("17","文字出版","Text Publishing");
callings[36]= new Array("16","广告业","Advertising");
callings[37]= new Array("28","印刷、包装","Printing,Packaging");
callings[38]= new Array("12","生物工程、制药","Biotechnology,Pharmaceutical");
callings[39]= new Array("31","医疗、护理、保健、卫生服务","Medical,Nursing,Health,Health services");
callings[40]= new Array("26","旅游业","Tourism");
callings[41]= new Array("40","住宿和餐饮业","Accommodation and Catering Services");
callings[42]= new Array("55","文化、体育和娱乐业","Culture,Sports and Entertainment");
callings[43]= new Array("56","美容","Hairdressing");
callings[44]= new Array("57","生活服务","Life service");
callings[45]= new Array("11","石油、化工、地质","Petroleum,Chemical,Geological");
callings[46]= new Array("9","电力、电气、水利","Power,Electrical,Water conservancy");
callings[47]= new Array("10","能源、矿产","Energy,Mineral");
callings[48]= new Array("58","采掘、冶炼","Mining,Smelting");
callings[49]= new Array("59","原材料及加工","Raw materials and processing");
callings[50]= new Array("25","交通、运输、物流","Traffic,Transport,Logistics");
callings[51]= new Array("60","航天、航空","Aerospace,Aviation");
callings[52]= new Array("21","咨询与调查业（顾问、企业管理、知识产权）","Consulting and Investigation industry");
callings[53]= new Array("36","法律服务","Legal services");
callings[54]= new Array("61","知识产权服务","Intellectual Property services");
callings[55]= new Array("32","人才交流、中介服务","Talent exchange,Intermediary services");
callings[56]= new Array("62","租赁业","Rental industry");
callings[57]= new Array("30","教育、培训","Education,Training");
callings[58]= new Array("63","学术、科研院所","Academic,Research institutes");
callings[59]= new Array("33","协会、社团","Association,Community ");
callings[60]= new Array("41","政府公用事业、社区服务","Government utilities,Community service");
callings[61]= new Array("34","农、林、牧、渔业","Agriculture,Forestry,Animal husbandry,Fishery");
callings[62]= new Array("64","环保","Environmental ");
callings[63]= new Array("65","国际组织","International Organizations");
callings[64]= new Array("66","多元化业务集团","Diversified Business Group");
callings[65]= new Array("35","其他","Others");

//输出选项
function writeCallings()
{
    with(document)
    {
        for (var i=0; i<callingsCount; i++)
            write("<option value='"+callings[i][0]+"'>"+callings[i][1]+"</option>");
    }
}

//添加方法
function append_selected_item(obj1, obj2)
{
    var len, txt, val;
    if(typeof(obj1.options[obj1.selectedIndex])=="unknown")
    {
        alert("系统提示:请选择您想要添加的资料项!");
        obj1.focus();
        return;
    }

    //clear_list(obj1, obj2);

    //取长度
    len = obj2.length;
    if (len>2)
    {
        alert("您已经添加了三项,不能更添加了!");
        return;
    }

    //生成一个新元素
    var opt = document.createElement("OPTION");
    opt.text = obj1.options[obj1.selectedIndex].text;
    opt.value = obj1.options[obj1.selectedIndex].value;

    if (len==0)
    {
        try{
			obj2.add(opt);
		}catch(e){
			obj2.add(opt,null);
		}
        document.thisForm.calling1.value = opt.value; //应先检测对象有无存在
        return;
    }

    //先清原值
    document.thisForm.calling1.value = '';
    document.thisForm.calling2.value = '';
    document.thisForm.calling3.value = '';

    //检查有无重复项
    for(i=0; i<obj2.length; i++)
    {
        txt = obj2.options[i].text;
        val = obj2.options[i].value;
        //提前传值
        if (i==0) document.thisForm.calling1.value = obj2.options[0].value;
        if (i==1) document.thisForm.calling2.value = obj2.options[1].value;
        if (i==2) document.thisForm.calling3.value = obj2.options[2].value;

        //检测值(说明选了不限:不再添加)
        if (val=='0'||val=='') { alert('您已经选择了行业类别不限.'); return; }

        //说明该项已被选择,不再操作
        if (opt.value==val)  { alert('您已经选择该项.'); return; }
    }

    //说明选了不限,但已经选有明细项,不能添加成功(有)
    if (opt.value=='0'||opt.value=='')
    {
        alert('您已经选择了该项所在的类别中的子项.');
        return;
    }

    //增加这一选项,并给hidden传值.
	try{
	    obj2.add(opt);
	}catch(e){
		obj2.add(opt,null);
	}
    //仅为新增项
    if (len==0) document.thisForm.calling1.value = obj2.options[0].value;
    if (len==1) document.thisForm.calling2.value = obj2.options[1].value;
    if (len==2) document.thisForm.calling3.value = obj2.options[2].value;
}

//移除选项
function remove_selected_item(obj)
{
    if(typeof(obj.options[obj.selectedIndex])=="unknown")
    {
        alert("系统提示:请选择您想要移除的资料项!");
        obj.focus();
    }

    if (obj.selectedIndex>-1)
    {
        obj.remove(obj.selectedIndex);

        //先清原值
        document.thisForm.calling1.value = '';
        document.thisForm.calling2.value = '';
        document.thisForm.calling3.value = '';
    }

    //重新置参数
    for(i=0; i<obj.length; i++)
    {
        if (i==0) document.thisForm.calling1.value = obj.options[0].value;
        if (i==1) document.thisForm.calling2.value = obj.options[1].value;
        if (i==2) document.thisForm.calling3.value = obj.options[2].value;
    }
}


//添加方法
function clear_list(obj1, obj2)
{
    var len, txt, val;
    //选中,并且两个都是列表
    if (typeof(obj1.options[obj1.selectedIndex])=="unknown")  return;
    if (typeof(obj2)!="object") return;

    //取长度(无数据退出)
    len = obj2.length;
    if (len==0) return;

    //生成一个新元素
    txt = obj1.options[obj1.selectedIndex].text;
    val = obj1.options[obj1.selectedIndex].value;

    //检查添加的数据是否是不限:是:清除目标列表数据;否:下一步
    if (val=='' || val=='0')
    {
        for (var i=len-1; i>-1; i--) { obj2.remove(i); }
    }
    else
    {
        val = obj2.options[0].value;
        if (val=='' || val=='0') obj2.remove(0);
    }
}

//<!--lijoy 2004-09-09 10:26:39--><!--lijoy 2004-09-09 10:27:17-->
