//////////////////////////////////// 切换块TAB
function showcon(obj,ulid) {
	var o=document.getElementById(ulid);
   var c=o.childNodes;
   for(var i=0;i<c.length;i++){
	   if(typeof c[i] != "HTMLLIElement") {
		   if(c[i]==obj) {
		      c[i].className="on";
			  var liid = c[i].id;
			  if(typeof liid!="undefined" && liid!="") {
//				  alert("selected:"+c[i].id);
				  var con = document.getElementById("con_"+c[i].id);
				  if(typeof con!="undefined" && con!="") {
					  con.style.display="";
				  }
			  }
		   } else {
		      c[i].className="";
			  var liid = c[i].id;
			  if(typeof liid!="undefined" && liid!="") {
//				  alert(c[i].id);
				  var con = document.getElementById("con_"+c[i].id);
				  if(typeof con!="undefined" && con!="") {
					  con.style.display="none";
				  }
			  }
		   }
	   }
    }
}


//////////////////////////////////// 隐藏伸缩效果
/*
function getObject(objectId) {
    if(document.getElementById && document.getElementById(objectId)) {
    // W3C DOM
    return document.getElementById(objectId);
    } else if (document.all && document.all(objectId)) {
    // MSIE 4 DOM
    return document.all(objectId);
    } else if (document.layers && document.layers[objectId]) {
    // NN 4 DOM.. note: this won't find nested layers
    return document.layers[objectId];
    } else {
    return false;
    }
}

// 显示列表框
var hight = document.getElementById("eatwhat").offsetHeight;
function displayList(showdivid,imgid){    
          var h = getObject(showdivid).offsetHeight;  // 内容容器class_cnt1的初始高度（这时高度为：0）
          var max_h = hight; // 容器的最大高度
          
          var anim = function(){            
                    h += 30; // 每次递增50像素
                    //如果增加的高度开始超过容的最大高度
                    if(h >= max_h){ 
                    getObject(showdivid).style.height = hight+"px"; // 工期高度为125px(因为我们只希望容器这么高)
                    getObject(imgid).style.backgroundImage="url(images/8j_home_titleup.gif)";          
                    if(tt){window.clearInterval(tt);} // 
                    }
                    else{ // 如果增加中的容器高度没有超过125px
                getObject(showdivid).style.display="block"; // 让容器可见（这样我们才能够看到容器在增高的效果）
                getObject(showdivid).style.height = h + "px"; // 容器高度不断的以50px递增
                    }
            }
               
              var tt = window.setInterval(anim,2);  // 设置每2毫秒循环一次（每2毫秒，运行一次anim[容器的高度递减50px]）    
}

// 隐藏列表框

function hiddenList(showdivid,imgid){
       var h = getObject(showdivid).offsetHeight; 
           var anim = function(){
                 h -= 30; // 每次递减50像素
                 
                 if(h <= 5){
                 getObject(showdivid).style.display="none"; // 内容容器不可见（当容器高度小于5px）
                   getObject(imgid).style.backgroundImage="url(images/8j_home_titledown.gif)"; 
                   if(tt){window.clearInterval(tt);}
               }
               else{
                   getObject(showdivid).style.height = h + "px"; // // 容器高度不断的以50px递减 
               }
           }
             
           var tt = window.setInterval(anim,2); // 设置每2毫秒循环一次（每2毫秒，运行一次anim[容器的高度递减50px]）
}


function showClassList(showdivid,imgid){
   if(getObject(showdivid).style.display == "none"){ 
       displayList(showdivid,imgid); // 显示内容框
	   
	   if(showdivid!='eatwhat'){
	   		hiddenList('eatwhat','up_down1');
	   }
	   
	   	   if(showdivid!='whereEat'){
	   		hiddenList('whereEat','up_down2');
	   }
	   
	   	   if(showdivid!='health'){
	   		hiddenList('health','up_down3');
	   }
	   	   if(showdivid!='withfri'){
	   		hiddenList('withfri','up_down4');
	   }
	   	 
   }
   else{ 
         hiddenList(showdivid,imgid); // 隐藏内容框
     }
}
*/
//点击复制
 function copyToClipBoard(){
   var copy =  document.formcopy.copy.value;
   var clipBoardContent=copy
   clipBoardContent+='\r\n';
   clipBoardContent+=document.location;
   
   window.clipboardData.setData("Text",clipBoardContent);
   alert("你已复制成功!");
  }