﻿function setTab(name,cursel,n){   
 for(i=1;i<=n;i++){   
  var menu=document.getElementById(name+i);   
  var con=document.getElementById("con_"+name+"_"+i);   
  menu.className=i==cursel?"hover":"";   
  con.style.display=i==cursel?"block":"none";   
 }   
}   

 function setonchange(me)
{
      if(me.options[me.selectedIndex].value!="")
          window.open(me.options[me.selectedIndex].value,"","","_blank");
          me.selectedIndex=0;
}

/*日期 begin*/
function RunGLNL(){ 
var today=new Date(); 
var d=new Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六"); 
var DDDD=(today.getYear()<100 ? 
today.getYear()+1900:today.getYear())+"年"+(today.getMonth()+1)+"月"+today.getDate()+"日"; 
DDDD = DDDD + " " + d[today.getDay()]; 
DDDD = DDDD+ " " + (CnDateofDateStr(today)); 
//DDDD = DDDD+ " " + SolarTerm(today); 
document.write(DDDD); 
} 
function DaysNumberofDate(DateGL){ 
return parseInt((Date.parse(DateGL)-Date.parse(DateGL.getYear()+"/1/1"))/86400000)+1; 
} 
function CnDateofDate(DateGL){ 
var CnData=new Array( 
0x16,0x2a,0xda,0x00,0x83,0x49,0xb6,0x05,0x0e,0x64,0xbb,0x00,0x19,0xb2,0x5b,0x00, 
0x87,0x6a,0x57,0x04,0x12,0x75,0x2b,0x00,0x1d,0xb6,0x95,0x00,0x8a,0xad,0x55,0x02, 
0x15,0x55,0xaa,0x00,0x82,0x55,0x6c,0x07,0x0d,0xc9,0x76,0x00,0x17,0x64,0xb7,0x00, 
0x86,0xe4,0xae,0x05,0x11,0xea,0x56,0x00,0x1b,0x6d,0x2a,0x00,0x88,0x5a,0xaa,0x04, 
0x14,0xad,0x55,0x00,0x81,0xaa,0xd5,0x09,0x0b,0x52,0xea,0x00,0x16,0xa9,0x6d,0x00, 
0x84,0xa9,0x5d,0x06,0x0f,0xd4,0xae,0x00,0x1a,0xea,0x4d,0x00,0x87,0xba,0x55,0x04 
); 
var CnMonth=new Array(); 
var CnMonthDays=new Array(); 
var CnBeginDay; 
var LeapMonth; 
var Bytes=new Array(); 
var I; 
var CnMonthData; 
var DaysCount; 
var CnDaysCount; 
var ResultMonth; 
var ResultDay; 
var yyyy=DateGL.getYear(); 
var mm=DateGL.getMonth()+1; 
var dd=DateGL.getDate(); 
if(yyyy<100) yyyy+=1900; 
if ((yyyy < 1997) || (yyyy > 2020)){ 
return 0; 
} 
Bytes[0] = CnData[(yyyy - 1997) * 4]; 
Bytes[1] = CnData[(yyyy - 1997) * 4 + 1]; 
Bytes[2] = CnData[(yyyy - 1997) * 4 + 2]; 
Bytes[3] = CnData[(yyyy - 1997) * 4 + 3]; 
if ((Bytes[0] & 0x80) != 0) {CnMonth[0] = 12;} 
else {CnMonth[0] = 11;} 
CnBeginDay = (Bytes[0] & 0x7f); 
CnMonthData = Bytes[1]; 
CnMonthData = CnMonthData << 8; 
CnMonthData = CnMonthData | Bytes[2]; 
LeapMonth = Bytes[3]; 
for (I=15;I>=0;I--){ 
CnMonthDays[15 - I] = 29; 
if (((1 << I) & CnMonthData) != 0 ){ 
CnMonthDays[15 - I]++;} 
if (CnMonth[15 - I] == LeapMonth ){ 
CnMonth[15 - I + 1] = - LeapMonth;} 
else{ 
if (CnMonth[15 - I] < 0 ){CnMonth[15 - I + 1] = - CnMonth[15 - I] + 1;} 
else {CnMonth[15 - I + 1] = CnMonth[15 - I] + 1;} 
if (CnMonth[15 - I + 1] > 12 ){ CnMonth[15 - I + 1] = 1;} 
} 
} 
DaysCount = DaysNumberofDate(DateGL) - 1; 
if (DaysCount <= (CnMonthDays[0] - CnBeginDay)){ 
if ((yyyy > 1901) && (CnDateofDate(new Date((yyyy - 1)+"/12/31")) < 0)){ 
ResultMonth = - CnMonth[0];} 
else {ResultMonth = CnMonth[0];} 
ResultDay = CnBeginDay + DaysCount; 
} 
else{ 
CnDaysCount = CnMonthDays[0] - CnBeginDay; 
I = 1; 
while ((CnDaysCount < DaysCount) && (CnDaysCount + CnMonthDays[I] < DaysCount)){ 
CnDaysCount+= CnMonthDays[I]; 
I++; 
} 
ResultMonth = CnMonth[I]; 
ResultDay = DaysCount - CnDaysCount; 
} 
if (ResultMonth > 0){ 
return ResultMonth * 100 + ResultDay;} 
else{return ResultMonth * 100 - ResultDay;} 
} 
/*function CnYearofDate(DateGL){ 
var YYYY=DateGL.getYear(); 
var MM=DateGL.getMonth()+1; 
var CnMM=parseInt(Math.abs(CnDateofDate(DateGL))/100); 
if(YYYY<100) YYYY+=1900; 
if(CnMM>MM) YYYY--; 
YYYY-=1864; 
return CnEra(YYYY)+"年"; 
} */
function CnMonthofDate(DateGL){ 
var CnMonthStr=new Array("零","正","二","三","四","五","六","七","八","九","十","十一","腊"); 
var Month; 
Month = parseInt(CnDateofDate(DateGL)/100); 
if (Month < 0){return "闰" + CnMonthStr[-Month] + "月";} 
else{return CnMonthStr[Month] + "月";} 
} 
function CnDayofDate(DateGL){ 
var CnDayStr=new Array("零", 
"初一", "初二", "初三", "初四", "初五", 
"初六", "初七", "初八", "初九", "初十", 
"十一", "十二", "十三", "十四", "十五", 
"十六", "十七", "十八", "十九", "二十", 
"廿一", "廿二", "廿三", "廿四", "廿五", 
"廿六", "廿七", "廿八", "廿九", "三十"); 
var Day; 
Day = (Math.abs(CnDateofDate(DateGL)))%100; 
return CnDayStr[Day]; 
} 
function DaysNumberofMonth(DateGL){ 
var MM1=DateGL.getYear(); 
MM1<100 ? MM1+=1900:MM1; 
var MM2=MM1; 
MM1+="/"+(DateGL.getMonth()+1); 
MM2+="/"+(DateGL.getMonth()+2); 
MM1+="/1"; 
MM2+="/1"; 
return parseInt((Date.parse(MM2)-Date.parse(MM1))/86400000); 
} 
/*function CnEra(YYYY){ 
var Tiangan=new Array("甲","乙","丙","丁","戊","己","庚","辛","壬","癸"); 
//var Dizhi=new Array("子(鼠)","丑(牛)","寅(虎)","卯(兔)","辰(龙)","巳(蛇)", 
//"午(马)","未(羊)","申(猴)","酉(鸡)","戌(狗)","亥(猪)"); 
var Dizhi=new Array("子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"); 
return Tiangan[YYYY%10]+Dizhi[YYYY%12]; 
} */
function CnDateofDateStr(DateGL){ 
if(CnMonthofDate(DateGL)=="零月") return "　请调整您的计算机日期!"; 
else return "农历：" + CnMonthofDate(DateGL) + CnDayofDate(DateGL); 
//"+CnYearofDate(DateGL)+ "
} 
function SolarTerm(DateGL){ 
var SolarTermStr=new Array( 
"小寒","大寒","立春","雨水","惊蛰","春分", 
"清明","谷雨","立夏","小满","芒种","夏至", 
"小暑","大暑","立秋","处暑","白露","秋分", 
"寒露","霜降","立冬","小雪","大雪","冬至"); 
var DifferenceInMonth=new Array( 
1272060,1275495,1281180,1289445,1299225,1310355, 
1321560,1333035,1342770,1350855,1356420,1359045, 
1358580,1355055,1348695,1340040,1329630,1318455, 
1306935,1297380,1286865,1277730,1274550,1271556); 
var DifferenceInYear=31556926; 
var BeginTime=new Date(1901/1/1); 
BeginTime.setTime(947120460000); 
for(;DateGL.getYear()<BeginTime.getYear();){ 
BeginTime.setTime(BeginTime.getTime()-DifferenceInYear*1000); 
} 
for(;DateGL.getYear()>BeginTime.getYear();){ 
BeginTime.setTime(BeginTime.getTime()+DifferenceInYear*1000); 
} 
for(var M=0;DateGL.getMonth()>BeginTime.getMonth();M++){ 
BeginTime.setTime(BeginTime.getTime()+DifferenceInMonth[M]*1000); 
} 
if(DateGL.getDate()>BeginTime.getDate()){ 
BeginTime.setTime(BeginTime.getTime()+DifferenceInMonth[M]*1000); 
M++; 
} 
if(DateGL.getDate()>BeginTime.getDate()){ 
BeginTime.setTime(BeginTime.getTime()+DifferenceInMonth[M]*1000); 
M==23?M=0:M++; 
} 
var JQ; 
if(DateGL.getDate()==BeginTime.getDate()){ 
JQ="　 今天是<font color='#FF9999'><b>"+SolarTermStr[M] + "</b></font>"; 
} 
else if(DateGL.getDate()==BeginTime.getDate()-1){ 
JQ="　 明天是<font color='#FF9999'><b>"+SolarTermStr[M] + "</b></font>"; 
} 
else if(DateGL.getDate()==BeginTime.getDate()-2){ 
JQ="　 后天是<font color='#FF9999'><b>"+SolarTermStr[M] + "</b></font>"; 
} 
else{ 
JQ=" " 
if(DateGL.getMonth()==BeginTime.getMonth()){ 
JQ+="　 本月"; 
} 
else{ 
JQ+="　 下月"; 
} 
JQ+=BeginTime.getDate()+"日"+"<font color='#FF9999'><b>"+SolarTermStr[M]+"</b></font>"; 
} 
return JQ; 
} 
function CAL() 
{} 
/*日期 over*/


function OnSubmit(){
   var objText= document.getElementById("key");
   var objText_Value = objText.value;
   window.open("Search.aspx?ResourceId="+escape(objText_Value)); 
}




function select() 
{ 
var x = [35]; 
x[0]=""; 
x[1]="北京,东城,西城,崇文,宣武,朝阳,丰台,石景山,海淀,门头沟,房山,通州,顺义,昌平,大兴,平谷,怀柔,密云,延庆"; 
x[2]="上海,黄浦,卢湾,徐汇,长宁,静安,普陀,闸北,虹口,杨浦,闵行,宝山,嘉定,浦东,金山,松江,青浦,南汇,奉贤,崇明"; 
x[3]="天津,和平,东丽,河东,西青,河西,津南,南开,北辰,河北,武清,红挢,塘沽,汉沽,大港,宁河,静海,宝坻,蓟县,大邱庄"; 
x[4]="重庆,万州,涪陵,渝中,大渡口,江北,沙坪坝,九龙坡,南岸,北碚,万盛,双挢,渝北,巴南,黔江,长寿,綦江,潼南,铜梁,大足,荣昌,壁山,梁平,城口,丰都,垫江,武隆,忠县,开县,云阳,奉节,巫山,巫溪,石柱,秀山,酉阳,彭水,江津,合川,永川,南川"; 
x[5]="石家庄,邯郸,邢台,保定,张家口,承德,廊坊,唐山,秦皇岛,沧州,衡水"; 
x[6]="太原,大同,阳泉,长治,晋城,朔州,吕梁,忻州,晋中,临汾,运城"; 
x[7]="呼和浩特,包头,乌海,赤峰,呼伦贝尔盟,阿拉善盟,哲里木盟,兴安盟,乌兰察布盟,锡林郭勒盟,巴彦淖尔盟,伊克昭盟"; 
x[8]="沈阳,大连,鞍山,抚顺,本溪,丹东,锦州,营口,阜新,辽阳,盘锦,铁岭,朝阳,葫芦岛"; 
x[9]="长春,吉林,四平,辽源,通化,白山,松原,白城,延边"; 
x[10]="哈尔滨,齐齐哈尔,牡丹江,佳木斯,大庆,绥化,鹤岗,鸡西,黑河,双鸭山,伊春,七台河,大兴安岭"; 
x[11]="南京,镇江,苏州,南通,扬州,盐城,徐州,连云港,常州,无锡,宿迁,泰州,淮安"; 
x[12]="杭州,宁波,温州,嘉兴,湖州,绍兴,金华,衢州,舟山,台州,丽水"; 
x[13]="合肥,芜湖,蚌埠,马鞍山,淮北,铜陵,安庆,黄山,滁州,宿州,池州,淮南,巢湖,阜阳,六安,宣城,亳州"; 
x[14]="福州,厦门,莆田,三明,泉州,漳州,南平,龙岩,宁德"; 
x[15]="南昌市,景德镇,九江,鹰潭,萍乡,新馀,赣州,吉安,宜春,抚州,上饶"; 
x[16]="济南,青岛,淄博,枣庄,东营,烟台,潍坊,济宁,泰安,威海,日照,莱芜,临沂,德州,聊城,滨州,菏泽,博兴"; 
x[17]="郑州,开封,洛阳,平顶山,安阳,鹤壁,新乡,焦作,濮阳,许昌,漯河,三门峡,南阳,商丘,信阳,周口,驻马店,济源"; 
x[18]="武汉,宜昌,荆州,襄樊,黄石,荆门,黄冈,十堰,恩施,潜江,天门,仙桃,随州,咸宁,孝感,鄂州"; 
x[19]="长沙,常德,株洲,湘潭,衡阳,岳阳,邵阳,益阳,娄底,怀化,郴州,永州,湘西,张家界"; 
x[20]="广州,深圳,珠海,汕头,东莞,中山,佛山,韶关,江门,湛江,茂名,肇庆,惠州,梅州,汕尾,河源,阳江,清远,潮州,揭阳,云浮"; 
x[21]="南宁,柳州,桂林,梧州,北海,防城港,钦州,贵港,玉林,南宁地区,柳州地区,贺州,百色,河池"; 
x[22]="海口,三亚"; 
x[23]="成都,绵阳,德阳,自贡,攀枝花,广元,内江,乐山,南充,宜宾,广安,达川,雅安,眉山,甘孜,凉山,泸州"; 
x[24]="贵阳,六盘水,遵义,安顺,铜仁,黔西南,毕节,黔东南,黔南"; 
x[25]="昆明,大理,曲靖,玉溪,昭通,楚雄,红河,文山,思茅,西双版纳,保山,德宏,丽江,怒江,迪庆,临沧"; 
x[26]="拉萨,日喀则,山南,林芝,昌都,阿里,那曲"; 
x[27]="西安,宝鸡,咸阳,铜川,渭南,延安,榆林,汉中,安康,商洛"; 
x[28]="兰州,嘉峪关,金昌,白银,天水,酒泉,张掖,武威,定西,陇南,平凉,庆阳,临夏,甘南"; 
x[29]="银川,石嘴山,吴忠,固原"; 
x[30]="西宁,海东,海南,海北,黄南,玉树,果洛,海西"; 
x[31]="乌鲁木齐,石河子,克拉玛依,伊犁,巴音郭勒,昌吉,克孜勒苏柯尔克孜,博 尔塔拉,吐鲁番,哈密,喀什,和田,阿克苏"; 
x[32]="香港,"; 
x[33]="澳门,"; 
x[34]="台北,高雄,台中,台南,屏东,南投,云林,新竹,彰化,苗栗,嘉义,花莲,桃园,宜兰,基隆,台东,金门,马祖,澎湖"; 

var citys=x[document.getElementById("Province").value].split(","); 
for(var i=0;i<citys.length;i++) 
document.getElementById("City").options[i]=new Option(citys[i],citys[i]); 
   
var provinces=",北京,上海,天津,重庆, 河北,山西,内蒙古,辽宁,吉林,黑龙江,江苏,浙江,安徽,福建,江西,山东,河南,湖北,湖南,广东,广西,海南,四川,贵州,云南,西藏,陕西,甘肃,宁夏,青海,新疆,香港,澳门,台湾"; 
var province = provinces.split(","); 
document.getElementById("Province1").value = province[document.getElementById("Province").value]; 
document.getElementById("City1").value = document.getElementById("City").value; 
} 
function result() 
{ 
document.getElementById("City1").value = document.getElementById("City").value; 
} 



function showTabA(tPre, cPre, num, curClass, commClass, tabCount) {
	for(var i=0;i<tabCount;i++){
		// 这里通过判断传进的参数的值是否和i相等，相等则将该div的display设置为空，并设定样式为curClass，即可见
		// 否则设置display为none，即不可见，TAB样式为则更改为commClass
		var j = i+1;
		if(num==i){ 
			document.getElementById(tPre+i).className=curClass;
			document.getElementById(cPre+i).style.display='';
			location=window.location.pathname+"?lx="+j+"&xj=0";

		}else{
			document.getElementById(tPre+i).className=commClass;
			document.getElementById(cPre+i).style.display='none'; 
		}
	}
}

function showTab(tPre, cPre, num, curClass, commClass, tabCount) {
	for(var i=0;i<tabCount;i++){
		// 这里通过判断传进的参数的值是否和i相等，相等则将该div的display设置为空，并设定样式为curClass，即可见
		// 否则设置display为none，即不可见，TAB样式为则更改为commClass
		if(num==i){ 
			document.getElementById(tPre+i).className=curClass;
			document.getElementById(cPre+i).style.display='';

		}else{
			document.getElementById(tPre+i).className=commClass;
			document.getElementById(cPre+i).style.display='none'; 
		}
	}
}

function showTabB(tPre,vPre,cPre, num, curClass, commClass, tabCount) {
	for(var i=0;i<tabCount;i++){
		// 这里通过判断传进的参数的值是否和i相等，相等则将该div的display设置为空，并设定样式为curClass，即可见
		// 否则设置display为none，即不可见，TAB样式为则更改为commClass
		if(num==i){ 
			document.getElementById(tPre+i).className=curClass;
			document.getElementById(vPre+i).style.display='';
			document.getElementById(cPre+i).style.display='';

		}else{
			document.getElementById(tPre+i).className=commClass;
			document.getElementById(vPre+i).style.display='none'; 
			document.getElementById(cPre+i).style.display='none'; 
		}
	}
}

function showTabC(tPre, cPre, num, curClass, commClass, tabCount) {
	for(var i=0;i<tabCount;i++){
		// 这里通过判断传进的参数的值是否和i相等，相等则将该div的display设置为空，并设定样式为curClass，即可见
		// 否则设置display为none，即不可见，TAB样式为则更改为commClass
		var j = i;
		if(num==i){ 
			document.getElementById(tPre+i).className=curClass;
			document.getElementById(cPre+i).style.display='';
			location=window.location.pathname+"?ID="+j;

		}else{
			document.getElementById(tPre+i).className=commClass;
			document.getElementById(cPre+i).style.display='none'; 
		}
	}
}




