// 综合应用JS程序
// VisionWeb.com.cn 齐客，2011-01-26

// 容错代码屏蔽
function killErrors() {
return true;
}
window.onerror = killErrors;

function SlyarErrors() { 
	return true;
} 
window.onerror = SlyarErrors;

// 旅游热榜
		var obig=document.getElementById("hotlist");
        function selectTag(showContent,selfObj){
                   var tag = document.getElementById("s_tags").getElementsByTagName("li");
          var taglength = tag.length;
          for(i=0; i<taglength; i++){
            tag[i].className = "";
          }
          selfObj.parentNode.className = "selectTag";
          for(i=0; j=document.getElementById("tagContent"+i); i++){
            j.style.display = "none";
          }
          document.getElementById(showContent).style.display = "block";
        }
	var x=0;
	function scrollTag(){
	var tags=document.getElementById("s_tags").getElementsByTagName("a");
		if(x<3){x=x+1}
		else
		x=0;
          var tag = document.getElementById("s_tags").getElementsByTagName("li");
          var taglength = tag.length;
          for(i=0; i<taglength; i++){
            tag[i].className = "";
          }
	  tags[x].parentNode.className = "selectTag";
	  for(i=0; j=document.getElementById("tagContent"+i);i++){
		 j.style.display="none";
		  }
		  document.getElementById("tagContent"+x).style.display="block";
		}
		var scrolll=setInterval(scrollTag,6000);
		function zhuan(){
		clearInterval(scrolll);
		}
		function jixu(){
		scrolll=setInterval(scrollTag,6000);
		}

// 旅游门票
function g(o){return document.getElementById(o);}
function TicmpLi(n){
for(var i=1;i<=9;i++){g('ticmp_'+i).className='ticmpnormal';g('ticmpc_0'+i).className='undis';}g('ticmpc_0'+n).className='dis';g('ticmp_'+n).className='ticmphover';
}
//如果有N个标签,就将i<=N;
//如果要做成点击后再转到请将<li>中的onmouseover 改成 onclick;



// 旅游图片
jQuery(function(jq){
  var cls = 'list_hover';
  jq('#hdphoto > .hdp_t')
  .find(' > span').hover(function(){
    jq(this).addClass(cls).find('b').stop().animate({'bottom':0}, 240);
  }, function(el){
    el = jq(this).removeClass(cls).find('b');//下文用到，不要省略el
    el.stop().animate({'bottom': -(el[0].offsetHeight)}, 300);
  }).end()
  .find('> div:first').hover(function(){
    jq(this).addClass(cls);
  }, function(){
    jq(this).removeClass(cls);
  });
});

// 复制本页地址
function CopyURL(){var myHerf=top.location.href;var title=document.title;if(window.clipboardData){var tempCurLink=myHerf;var ok=window.clipboardData.setData("Text",tempCurLink);if(ok)document.getElementById("tishi").innerHTML = "<span class='f_d_red'>复制成功，粘贴发送</span>";}else{alert("对不起，目前此功能只支持IE，请直接复制地址栏的地址！");}}

// W3C收藏夹代码JS部分
function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

// 文章字号调整部分
function doZoom(size){
	document.getElementById('zoom').style.fontSize=size+'px'
}
// 打开关闭层
function OpenDIV(nodeObject){
 var obj = document.getElementById(nodeObject);
 if (obj.style.display == '' || obj.style.display == 'inline') {
  obj.style.display = 'none';
 } else {
  obj.style.display = 'inline';
 }
}

//超链接无虚线框处
$(document).ready(function(){
	$("a").focus( 
		function () { 
			$(this).blur(); //得到焦点与失去焦点效果一致
		}
	 )
})

