// JavaScript Document var dynamicLoading = { css: function(path){ if(!path || path.length === 0){ throw new Error('argument "path" is required !'); } var head = document.getElementsByTagName('head')[0]; var link = document.createElement('link'); link.href = path; link.rel = 'stylesheet'; link.type = 'text/css'; head.appendChild(link); }, js: function(path){ if(!path || path.length === 0){ throw new Error('argument "path" is required !'); } var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); script.src = path; script.type = 'text/javascript'; head.appendChild(script); } } dynamicLoading.css("http://daohang.hunan.gov.cn/images/floatDiv.css"); dynamicLoading.css("http://daohang.hunan.gov.cn/images/2015tj_wp_logincommon.css"); dynamicLoading.js("http://daohang.hunan.gov.cn/images/2015tj_wp_logincommon.js"); var scripts = document.getElementsByTagName("script"); var scriptArgs = scripts[ scripts.length - 1 ].src.substr(scripts[ scripts.length - 1 ].src.lastIndexOf("?")); //console.log(scripts[ scripts.length - 1 ].src); var getCoords = function(el){ var box = el.getBoundingClientRect(), doc = el.ownerDocument, body = doc.body, html = doc.documentElement, clientTop = html.clientTop || body.clientTop || 0, clientLeft = html.clientLeft || body.clientLeft || 0, top = box.top + (self.pageYOffset || html.scrollTop || body.scrollTop ) - clientTop, left = box.left + (self.pageXOffset || html.scrollLeft || body.scrollLeft) - clientLeft return { 'top': top, 'left': left }; }; function GetQueryString(name) { var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); var r = scriptArgs.substr(1).match(reg); if(r!=null)return unescape(r[2]); return null; } //alert(scriptArgs+"///"+GetQueryString("id")); var topColor = "#"+GetQueryString("tc"); var midColor = "#"+GetQueryString("mc"); var chlColor = "#"+GetQueryString("cc"); var textColor = "#"+GetQueryString("ttc"); var siteId = parseInt(GetQueryString("id"),10); var dposition = parseInt(GetQueryString("p"),10); var isfgw = parseInt(GetQueryString("fgw"),10); //alert(dposition); if(topColor=="#"||topColor=="#null") topColor = "#556fb5"; if(midColor=="#"||midColor=="#null") midColor = "#556fb5"; if(chlColor=="#"||chlColor=="#null") chlColor = "#556fb5"; if(textColor=="#"||textColor=="#null") {textColor = "";}else{textColor = "color:"+textColor;} //alert(topColor+"::::::"+midColor); //console.log((document.documentElement||document.body).scrollWidth); //console.log(dposition); var extendsString = [ "",//1 "",//2 "",//3 "",//4 " | 旧版网站",//5 "",//6 "",//7 " | 扶贫OA",//8 "",//9 "",//10 "",//11 "",//12 "",//13 "",//14 "",//15 "",//16 "",//17 "| 微门户 ",//18 "",//19 "",//20 "",//21 "",//22 "",//23 "",//24 "",//25 "",//26 "",//27 "",//28 " | 水利邮箱",//29 "",//30 " | 我要投稿",//31 "",//32 "",//33 "",//34 "",//35 "",//36 "",//37 "",//38 "| 后台入口",//39 "",//40 "| 网站地图",//41 "",//42 "",//43 "",//44 "",//45 "",//46 "",//47 "",//48 " | 电子邮箱系统",//49 " | 统计邮箱 | RSS订阅 | 网站导航|English",//50 "",//51 "",//52 " | 举报投诉 12312",//53 "",//54 "",//55 ""//56 ]; var topPositionX = 0; var iiii=0; function countTop(){ var windowWidth = (document.documentElement||document.body).scrollWidth; topPositionX = windowWidth/2 + dposition; //console.log(topPositionX); var tobj = document.getElementById("topSystemBtn_id"); tobj.style.left = topPositionX+"px"; var obj = document.getElementById("div_topSystem_id"); obj.style.right = (windowWidth - getCoords(tobj).left - tobj.offsetWidth) + "px"; obj.style.top = (tobj.offsetHeight) + "px"; var lobj = document.getElementById("comm_topLink_id"); lobj.style.right = (windowWidth - tobj.offsetLeft + 20) + "px"; //lobj.style.left = (topPositionX - lobj.offsetWidth - 15) + "px"; } function countMid(){ try{ var mbtn = document.getElementById("midSystemBtn_id"); var mobj = document.getElementById("div_midSystem_id"); mobj.style.left = ( getCoords(mbtn).left ) + "px"; mobj.style.top = ( getCoords(mbtn).top + mbtn.offsetHeight) + "px"; }catch(o){} } function countPosition(){ countTop(); countMid(); } /* var systemDatas = [ {id:1,name:'湖南审计厅',url:'http://hnsjt.hunan.gov.cn/',color:'#C00',isenable:true}, {id:2,name:'湖南法制办',url:'http://fzb.hunan.gov.cn/',color:'#0C0',isenable:true} ]; var xxgkDatas = [ {id:1,name:'湖南审计厅',url:'http://hnsjt.hunan.gov.cn/',color:'#C00',isenable:true}, {id:2,name:'湖南法制办',url:'http://fzb.hunan.gov.cn/',color:'#0C0',isenable:false} ]; */ var systemDatas = [ {id:1,name:'省发展和改革委员会',url:'http://fgw.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省教育厅',url:'http://jyt.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省科学技术厅',url:'http://kjt.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省经济和信息化委员会',url:'http://sjxw.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省民族宗教事务委员会',url:'http://mzw.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省公安厅',url:'http://www.hnga.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省民政厅',url:'http://mzt.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省司法厅',url:'http://sft.hunan.gov.cn',color:'#C00',isenable:true} ,{id:1,name:'省财政厅',url:'http://www.hnczt.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省人力资源和社会保障厅',url:'http://www.hnrst.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省国土资源厅',url:'http://www.gtzy.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省环境保护厅',url:'http://www.hbt.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省住房和城乡建设厅',url:'http://zjt.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省交通运输厅',url:'http://www.hnjt.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省水利厅',url:'http://www.hnwr.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省农业委员会',url:'http://agri.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省林业厅',url:'http://www.hnforestry.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省商务厅',url:'http://www.hunancom.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省文化厅',url:'http://wht.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省卫生计生委',url:'http://wjw.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省审计厅',url:'http://sjt.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省政府外事侨务办',url:'http://wqb.hunan.gov.cn',color:'#C00',isenable:true} ,{id:1,name:'省国资委',url:'http://gzw.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省工商行政管理局',url:'http://gsj.hunan.gov.cn',color:'#C00',isenable:true} ,{id:1,name:'省质量技术监督局',url:'http://zjj.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省新闻出版广电局',url:'http://xwcbgd.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省体育局',url:'http://www.sports.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省安全生产监督管理局',url:'http://www.hunansafety.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省统计局',url:'http://www.hntj.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省旅游发展委员会',url:'http://lfw.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省粮食局',url:'http://lsj.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省机关事务管理局',url:'http://www.hnhq.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省政府法制办',url:'http://fzb.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省政府金融办',url:'http://jrb.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省人防办',url:'http://rfb.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省政府参事室',url:'http://www.hnscss.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省食品药品监督管理局',url:'http://fda.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省监狱管理局',url:'http://hnjyj.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省档案局',url:'http://sdaj.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'湖南省供销合作总社',url:'http://gxhzs.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省政府发展研究中心',url:'http://fzyj.hunan.gov.cn',color:'#C00',isenable:true} ,{id:1,name:'湖南省地方志',url:'http://dfz.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省知识产权局',url:'http://ipo.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省有色金属管理局',url:'http://www.hnys.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省移民开发局',url:'http://hnymj.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省扶贫办',url:'http://hnsfpb.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省核工业地质局',url:'http://hgydzj.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省地勘局',url:'http://hndk.hunan.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省中医药管理局',url:'http://www.hntcm.gov.cn/',color:'#C00',isenable:true} ,{id:1,name:'省煤田地质局',url:'http://mtdzj.hunan.gov.cn',color:'#C00',isenable:true} ,{id:1,name:'省有色地勘局',url:'http://ysdk.hunan.gov.cn/',color:'#C00',isenable:true} ]; var xxgkDatas = [ {id:1,name:'省发展和改革委员会',url:'http://fgw.hunan.gov.cn/xxgk_70899/',color:'#C00',isenable:true} ,{id:1,name:'省教育厅',url:'http://jyt.hunan.gov.cn/sjyt/xxgk/" target=',color:'#C00',isenable:true} ,{id:1,name:'省科学技术厅',url:'http://kjt.hunan.gov.cn/xxgk/',color:'#C00',isenable:true} ,{id:1,name:'省经济和信息化委员会',url:'http://sjxw.hunan.gov.cn/xxgk_71033/',color:'#C00',isenable:true} ,{id:1,name:'省民族宗教事务委员会',url:'http://mzw.hunan.gov.cn/xxgk_71281/',color:'#C00',isenable:true} ,{id:1,name:'省公安厅',url:'http://www.hnga.gov.cn/channel/9/index.html" target=',color:'#C00',isenable:true} ,{id:1,name:'省民政厅',url:'http://mzt.hunan.gov.cn/xxgk/',color:'#C00',isenable:true} ,{id:1,name:'省司法厅',url:'http://sft.hunan.gov.cn/xxgk_71079/',color:'#C00',isenable:true} ,{id:1,name:'省财政厅',url:'http://www.hnczt.gov.cn/xxgk/',color:'#C00',isenable:true} ,{id:1,name:'省人力资源和社会保障厅',url:'http://www.hnrst.gov.cn/xxgk',color:'#C00',isenable:true} ,{id:1,name:'省国土资源厅',url:'http://www.gtzy.hunan.gov.cn/xxgk/',color:'#C00',isenable:true} ,{id:1,name:'省环境保护厅',url:'http://www.hbt.hunan.gov.cn/new/index.html',color:'#C00',isenable:false} ,{id:1,name:'省住房和城乡建设厅',url:'http://zjt.hunan.gov.cn/xxgk/',color:'#C00',isenable:true} ,{id:1,name:'省交通运输厅',url:'http://www.hnjt.gov.cn/xxgk/',color:'#C00',isenable:true} ,{id:1,name:'省水利厅',url:'http://www.hnwr.gov.cn/xxgk/',color:'#C00',isenable:true} ,{id:1,name:'省农业委员会',url:'http://agri.hunan.gov.cn/xxgk/',color:'#C00',isenable:true} ,{id:1,name:'省林业厅',url:'http://www.hnforestry.gov.cn/xxgk_71167/',color:'#C00',isenable:true} ,{id:1,name:'省商务厅',url:'http://www.hunancom.gov.cn/hnswt/xxgk/',color:'#C00',isenable:true} ,{id:1,name:'省文化厅',url:'http://wht.hunan.gov.cn/xxgk/',color:'#C00',isenable:true} ,{id:1,name:'省卫生计生委',url:'http://wjw.hunan.gov.cn/xxgk/',color:'#C00',isenable:true} ,{id:1,name:'省审计厅',url:'http://sjt.hunan.gov.cn/xxgk_71228/',color:'#C00',isenable:true} ,{id:1,name:'省政府外事侨务办',url:'http://wqb.hunan.gov.cn/xxgk/',color:'#C00',isenable:true} ,{id:1,name:'省国资委',url:'http://gzw.hunan.gov.cn/xxgk_71571/',color:'#C00',isenable:true} ,{id:1,name:'省工商行政管理局',url:'http://gsj.hunan.gov.cn/xxgk" target=',color:'#C00',isenable:true} ,{id:1,name:'省质量技术监督局',url:'http://zjj.hunan.gov.cn/xxgk',color:'#C00',isenable:true} ,{id:1,name:'省新闻出版广电局',url:'http://xwcbgd.hunan.gov.cn/xxgk/',color:'#C00',isenable:true} ,{id:1,name:'省体育局',url:'http://www.sports.gov.cn/xxgk/',color:'#C00',isenable:true} ,{id:1,name:'省安全生产监督管理局',url:'http://www.hunansafety.gov.cn/xxgk/',color:'#C00',isenable:true} ,{id:1,name:'省统计局',url:'http://www.hntj.gov.cn/xxgk" target="_blank',color:'#C00',isenable:true} ,{id:1,name:'省旅游发展委员会',url:'http://lyj.hunan.gov.cn/xxgk_71423/',color:'#C00',isenable:true} ,{id:1,name:'省粮食局',url:'http://www.hunangrain.gov.cn/xxgk/',color:'#C00',isenable:true} ,{id:1,name:'省机关事务管理局',url:'http://www.hnhq.gov.cn/xxgk/" target="_blank',color:'#C00',isenable:true} ,{id:1,name:'省政府法制办',url:'http://fzb.hunan.gov.cn/xxgk_70702/',color:'#C00',isenable:true} ,{id:1,name:'省政府金融办',url:'http://jrb.hunan.gov.cn/xxgk_71626/',color:'#C00',isenable:true} ,{id:1,name:'省人防办',url:'http://rfb.hunan.gov.cn/xxgk_70641/',color:'#C00',isenable:true} ,{id:1,name:'省政府参事室',url:'http://www.hnscss.gov.cn/xxgk/',color:'#C00',isenable:true} ,{id:1,name:'省食品药品监督管理局',url:'http://fda.hunan.gov.cn/xxgk_71325/',color:'#C00',isenable:true} ,{id:1,name:'省监狱管理局',url:'http://hnjyj.hunan.gov.cn/xxgk/" target="_blank',color:'#C00',isenable:true} ,{id:1,name:'省档案局',url:'http://sdaj.hunan.gov.cn/xxgk_70959/',color:'#C00',isenable:true} ,{id:1,name:'湖南省供销合作总社',url:'http://gxhzs.hunan.gov.cn/xxgk/',color:'#C00',isenable:true} ,{id:1,name:'省政府发展研究中心',url:'http://fzyj.hunan.gov.cn/xxgk/" target="_blank',color:'#C00',isenable:true} ,{id:1,name:'湖南省地方志',url:'http://dfz.hunan.gov.cn/xxgk_71525/',color:'#C00',isenable:true} ,{id:1,name:'省知识产权局',url:'http://ipo.hunan.gov.cn/xxgk/',color:'#C00',isenable:true} ,{id:1,name:'省有色金属管理局',url:'http://www.hnys.gov.cn/xxgk/" target="_blank">'+systemDatas[i].name+''; } //添加头部按钮 var topSystemBtn = document.createElement("div"); topSystemBtn.id="topSystemBtn_id"; topSystemBtn.setAttribute("style","background-color:"+topColor+";"); topSystemBtn.style.backgroundColor=topColor; topSystemBtn.innerHTML="省直窗口"; document.body.appendChild(topSystemBtn); //添加头部站点列表 var div_topSystem = document.createElement("div"); div_topSystem.setAttribute("style", "background:"+ midColor +";display:none;"); div_topSystem.style.backgroundColor = midColor; div_topSystem.style.display = "none"; div_topSystem.id="div_topSystem_id"; div_topSystem.innerHTML = '

省直单位

    '; document.body.appendChild(div_topSystem); document.getElementById("unitlist").innerHTML=topList; //添加登录按钮、简繁、无障碍等功能区 fffstr = ''; if(isfgw==1)fffstr=" | 旧版网站"; var topFuncLink = '\ \ ' var newDiv = document.createElement("div"); newDiv.className="h-login"; newDiv.innerHTML=topFuncLink; document.body.appendChild(newDiv); var linkDiv = document.createElement("div"); linkDiv.className = 'comm_topLink'; linkDiv.id = 'comm_topLink_id'; var departmentEmail =""; //设置各单位的邮箱 if(siteId==1){ departmentEmail ="政务邮箱"; } else if(siteId==6){ departmentEmail="政务邮箱"; }else if(siteId==36){ departmentEmail=""; }else{ departmentEmail="政务邮箱"; } linkDiv.innerHTML = ' |\ 繁體中文|'+ departmentEmail + '|无障碍通道'+extendsString[siteId-1]+fffstr; linkDiv.setAttribute("style",textColor); document.body.appendChild(linkDiv); //头部鼠标经过事件注册 var t_top = 0; var t_mid = 0; topSystemBtn.onmouseover=function(){ clearTimeout(t_top); var obj=document.getElementById("div_topSystem_id"); if(obj.style.display=="none"){ obj.style.display="block"; } document.getElementById("topSystemBtn_id").className="topSystemBtn_hover"; } topSystemBtn.onmouseout=function(){ t_top = setTimeout('hiddenTopSystem()',100); } function hiddenTopSystem(){ var obj=document.getElementById("div_topSystem_id"); obj.style.display="none"; document.getElementById("topSystemBtn_id").className=""; } div_topSystem.onmouseout=function(){ t_top = setTimeout('hiddenTopSystem()',100); } div_topSystem.onmouseover=function(){ clearTimeout(t_top); } function hiddenMidSystem(){ var obj=document.getElementById("div_midSystem_id"); obj.style.display="none"; document.getElementById("midSystemBtn_id").className=""; } $(document).ready(function(e) { //栏目切换导航添加 var midList = ''; var channelName = '信息公开'; var midDatas = xxgkDatas; var genDiv = null; if(document.getElementById("xxgk_midNav")){ midDatas = xxgkDatas; channelName = "信息公开"; genDiv = document.getElementById("xxgk_midNav"); }else if(document.getElementById("bsfw_midNav")){ midDatas = bsfwDatas; channelName = "办事服务"; genDiv = document.getElementById("bsfw_midNav"); }else if(document.getElementById("hdjl_midNav")){ midDatas = hdjlDatas; channelName = "互动交流"; genDiv = document.getElementById("hdjl_midNav"); } for(var i=0;i'+midDatas[i].name+''; } //添加中间按钮 var midSystemBtn = document.createElement("div"); midSystemBtn.id="midSystemBtn_id"; midSystemBtn.setAttribute("style","background-color:"+chlColor+";"); midSystemBtn.style.backgroundColor=chlColor; midSystemBtn.innerHTML="省直部门"+channelName; if(null != genDiv){ genDiv.appendChild(midSystemBtn); //添加中间频道列表 var div_midSystem = document.createElement("div"); div_midSystem.setAttribute("style", "background:"+ chlColor +";display:none;"); div_midSystem.style.backgroundColor = chlColor; div_midSystem.style.display = "none"; div_midSystem.id="div_midSystem_id"; div_midSystem.innerHTML = '
      '; document.body.appendChild(div_midSystem); document.getElementById("midunitlist").innerHTML=midList; //中部鼠标经过事件注册 midSystemBtn.onmouseover=function(){ clearTimeout(t_mid); var obj=document.getElementById("div_midSystem_id"); if(obj.style.display=="none"){ obj.style.display="block"; } document.getElementById("midSystemBtn_id").className="midSystemBtn_hover"; } midSystemBtn.onmouseout=function(){ t_mid = setTimeout('hiddenMidSystem()',100); } div_midSystem.onmouseout=function(){ t_mid = setTimeout('hiddenMidSystem()',100); } div_midSystem.onmouseover=function(){ clearTimeout(t_mid); } } }); countPosition(); window.onresize=countPosition; setInterval("countPosition()",100); //漂浮图片