//选项卡函数
function showout(obj) {
  var objEle,showEle,ele,count,obj;
  ele = obj.parentNode;
  objEle = ele.getElementsByTagName("a");
  count = objEle.length;
  var showElementsName = ['showout1','showout2','showout3'];
  for(j=0;j<showElementsName.length;j++)
  {
  if(ele.getAttribute("id")==showElementsName[j])
  {
  for(i=0;i<count;i++)
  {
     var className = "show"+objEle[i].getAttribute("id");
	 var showEle = document.getElementById(className);
	   if(objEle[i] == obj)
	   {
	     showEle.style.display = "block";
		 objEle[i].className = "color_bc0001";
	   }
	   else 
	   {
	     showEle.style.display = "none";
		 objEle[i].className = "";
	   }
  }
  }
  }
}

//载入函数
function addOnload(newFunction) {
	var oldOnload = window.onload;
	
	if (typeof oldOnload == "function") {
		window.onload = function() {
			if (oldOnload) {
				oldOnload();
			}
			newFunction();
		}
	}
	else {
		window.onload = newFunction;
	} 
}	

function display(id,state) {
	var ele = document.getElementById(id);
	if(state=="show")
	{
		ele.style.display = "block";
	}
	if(state=="close")
	{
		ele.style.display = "none";
	}
}
		
//台协级联菜单
var where = new Array(31);
function comefrom(loca,group,path) { this.loca = loca; this.group = group; this.path = path; }
where[0]= new comefrom("请选择台协所属地区","","");
where[1] = new comefrom("北京","|北京台协会|北海台协会","|236257|236221");
where[2] = new comefrom("上海","|上海台协会|上海台协黄浦工委会|上海台协卢湾工委会|上海台协静安工委会|上海台协宝山工委会|上海台协长宁工委会|上海台协奉贤工委会|上海台协嘉定工委会|上海台协金山工委会|上海台协闵行工委会|上海台协南汇工委会|上海台协浦东工委会|上海台协普陀工委会|上海台协青浦工委会|上海台协虹口工委会|上海台协松江工委会|上海台协徐汇工委会|上海台协杨浦工委会","|236157|236286|236273|236276|236282|236274|236276|236277|236280|236272|236279|236275|236281|236278|235217|236285|236283|236284");
where[3] = new comefrom("天津","","");
where[4] = new comefrom("重庆","","");
where[5] = new comefrom("河北","|保定台协会|石家庄台协会|唐山台协会","|236263|236265|236232");
where[6] = new comefrom("河南","|郑州台协会","|236266");
where[7] = new comefrom("浙江","|杭州台协会|湖州台协会|嘉善台协会|嘉兴台协会|宁波台协会|绍兴台协会|台州台协会|温州台协会|义乌台协会","|236229|236204|236182|236205|236244|236206|236174|236203|236159");
where[8] = new comefrom("福建","|福州台协会|漳州台协会|泉州台协会|福清台协会|龙岩台协会|南平台协会|莆田台协会|三明台协会","|236253|236251|236262|236220|236171|236169|236252|236167");
where[9] = new comefrom("广东","|东莞台协会|佛山台协会|广州台协会|河源台协会|花都台协会|惠州台协会|江门五邑台协会|梅州台协会|清远台协会|汕头台协会|韶关台协会|深圳台协会|顺德台协会|阳江台协会|湛江台协会|肇庆台协会|镇江台协会|珠海台协会","|236254|236247|236260|236269|236256|236249|236231|236177|236241|236261|236175|236255|236210|236209|236211|236233|236270|236258");
where[10] = new comefrom("江苏","|常熟台协会|常州台协会|淮安台协会|江阴台协会|昆山台协会|南京台协会|南通台协会|苏州台协会|太仓台协会|泰州台协会|无锡台协会|吴江台协会|徐州台协会|盐城台协会|扬州台协会|张家港台协会","|236223|236224|236163|236226|236268|236230|235136|236246|236222|236207|236264|236208|236164|236181|236228|236173");
where[11] = new comefrom("湖南","|长沙台协会|张家界台协会","|236271|236185");
where[12] = new comefrom("湖北","|黄石台协会|武汉台协会|襄樊台协会|宜昌台协会","|236179|236259|236195|236187");
where[13] = new comefrom("江西","|赣州台协会|九江台协会","|236162|236267");
where[14] = new comefrom("贵州","|贵阳台协会","|236280");
where[15] = new comefrom("广西","|桂林台协会|南宁台协会|梧州台协会","|236240|236243|236212");
where[16] = new comefrom("安徽","|合肥台协会|芜湖台协会","|236202|236201");
where[17] = new comefrom("黑龙江","|哈尔滨台协会","|236165");
where[18] = new comefrom("吉林","|长春台协会|吉林台协会","|236250|236225");
where[19] = new comefrom("辽宁","|鞍山台协会|沈阳台协会","|236227|236242");
where[20] = new comefrom("山东","|荷泽台协会|济南台协会|临沂台协会|青岛台协会|泰安台协会|威海台协会|潍坊台协会|烟台台协会","|236198|236183|236172|236168|236245|236199|236196|236161");
where[21] = new comefrom("云南","|昆明台协会","|236248");
where[22] = new comefrom("山西","","");
where[23] = new comefrom("四川","|成都台协会|绵阳台协会","|236239|236176");
where[24] = new comefrom("宁夏","","");
where[25] = new comefrom("甘肃","|兰州台协会","|236178");
where[26] = new comefrom("青海","","");
where[27] = new comefrom("新疆","","");
where[28] = new comefrom("内蒙古","","");
where[29] = new comefrom("西藏","","");
where[30] = new comefrom("陕西","|西安台协会","|236160");
where[31] = new comefrom("海南","","");
where[32] = new comefrom("其他","","");
function select()
{
 with(document.creator.province) { var provinceName = options[selectedIndex].value; }
 for(i = 0;i < where.length;i++)
  {
   if (where[i].loca == provinceName)
   {
   var groupName = (where[i].group).split("|");
   var id = (where[i].path).split("|");
    //循环生成台协列表
    var list="";
    for(j = 1;j < groupName.length;j++)
    {
      list += "<span><a class='color_6a6969' href='http://www.hongxi.com/WebSite/company3/Default.asp?ID="+id[j]+"' target='_blank'>"+groupName[j]+"</a></span>";
    }
	list += "<div class='clear'></div>"; 
   break;
   }
  
  }
  
 document.getElementById("groupWraper").innerHTML=list;
}
//将城市加载到选择表单中
function init()
{
 with(document.creator.province)
 {
  length = where.length;
  for(k=0;k<where.length;k++)
   {
     options[k].text = where[k].loca; options[k].value = where[k].loca;
   }
  options[selectedIndex].text = where[0].loca; options[selectedIndex].value = where[0].loca;
 }
}
addOnload(init);












