﻿function killErrors() { 
        return true; 
        } 
        window.onerror = killErrors;

function setMenu(op)
{
    var str="";
    var left=0;            
    switch(op)
    {
        case "首页":
            left=200;
            str="<a href=\"/news/sc/daocheng\">稻城亚丁</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/jiuzhai\">神奇九寨</a>&nbsp;&nbsp;";            
            str+="<a href=\"/news/sc/tibet\">雪域西藏</a>&nbsp;&nbsp;";             
            str+="<a href=\"/news/sc/sgns\">四姑娘山</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/hailuogou\">海螺沟</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/emeishan\">峨眉山、乐山</a>&nbsp;&nbsp;";
        case "景区景点":
            left=50;
            str="<a href=\"/news/sc/daocheng\">稻城亚丁</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/jiuzhai\">神奇九寨</a>&nbsp;&nbsp;";            
            str+="<a href=\"/news/sc/tibet\">雪域西藏</a>&nbsp;&nbsp;";             
            str+="<a href=\"/news/sc/sgns\">四姑娘山</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/hailuogou\">海螺沟</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/emeishan\">峨眉山、乐山</a>&nbsp;&nbsp;";            
            break;
        case "线路超市":
            left=200;
            str="<a href=\"/news/province\">省内游</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/country\">国内游</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/chujing\">出境游</a>&nbsp;&nbsp;";
            break;
        case "特价酒店":
            left=50;
            str="<a href=\"/news/sc/daocheng\">稻城亚丁</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/jiuzhai\">神奇九寨</a>&nbsp;&nbsp;";            
            str+="<a href=\"/news/sc/tibet\">雪域西藏</a>&nbsp;&nbsp;";             
            str+="<a href=\"/news/sc/sgns\">四姑娘山</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/hailuogou\">海螺沟</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/emeishan\">峨眉山、乐山</a>&nbsp;&nbsp;";                   
            break;
        case "打折机票":
            left=50;
            str="<a href=\"/news/sc/daocheng\">稻城亚丁</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/jiuzhai\">神奇九寨</a>&nbsp;&nbsp;";            
            str+="<a href=\"/news/sc/tibet\">雪域西藏</a>&nbsp;&nbsp;";             
            str+="<a href=\"/news/sc/sgns\">四姑娘山</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/hailuogou\">海螺沟</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/emeishan\">峨眉山、乐山</a>&nbsp;&nbsp;";               
            break;
        case "出游地图":
            left=50;
            str="<a href=\"/news/sc/daocheng\">稻城亚丁</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/jiuzhai\">神奇九寨</a>&nbsp;&nbsp;";            
            str+="<a href=\"/news/sc/tibet\">雪域西藏</a>&nbsp;&nbsp;";             
            str+="<a href=\"/news/sc/sgns\">四姑娘山</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/hailuogou\">海螺沟</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/emeishan\">峨眉山、乐山</a>&nbsp;&nbsp;";               
            break;
        case "天下美食":
            left=50;
            str="<a href=\"/news/sc/daocheng\">稻城亚丁</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/jiuzhai\">神奇九寨</a>&nbsp;&nbsp;";            
            str+="<a href=\"/news/sc/tibet\">雪域西藏</a>&nbsp;&nbsp;";             
            str+="<a href=\"/news/sc/sgns\">四姑娘山</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/hailuogou\">海螺沟</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/emeishan\">峨眉山、乐山</a>&nbsp;&nbsp;";              
            break;
        case "快乐购物":
            left=50;
            str="<a href=\"/news/sc/daocheng\">稻城亚丁</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/jiuzhai\">神奇九寨</a>&nbsp;&nbsp;";            
            str+="<a href=\"/news/sc/tibet\">雪域西藏</a>&nbsp;&nbsp;";             
            str+="<a href=\"/news/sc/sgns\">四姑娘山</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/hailuogou\">海螺沟</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/emeishan\">峨眉山、乐山</a>&nbsp;&nbsp;";             
            break;
        case "旅游社区":
            left=50;
            str="<a href=\"/news/sc/daocheng\">稻城亚丁</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/jiuzhai\">神奇九寨</a>&nbsp;&nbsp;";            
            str+="<a href=\"/news/sc/tibet\">雪域西藏</a>&nbsp;&nbsp;";             
            str+="<a href=\"/news/sc/sgns\">四姑娘山</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/hailuogou\">海螺沟</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/emeishan\">峨眉山、乐山</a>&nbsp;&nbsp;";           
            break;
        case "旅游问吧":
            left=50;
            str="<a href=\"/news/sc/daocheng\">稻城亚丁</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/jiuzhai\">神奇九寨</a>&nbsp;&nbsp;";            
            str+="<a href=\"/news/sc/tibet\">雪域西藏</a>&nbsp;&nbsp;";             
            str+="<a href=\"/news/sc/sgns\">四姑娘山</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/hailuogou\">海螺沟</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/emeishan\">峨眉山、乐山</a>&nbsp;&nbsp;";            
            break;
        case "商务会议":
            left=50;
            str="<a href=\"/news/sc/daocheng\">稻城亚丁</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/jiuzhai\">神奇九寨</a>&nbsp;&nbsp;";            
            str+="<a href=\"/news/sc/tibet\">雪域西藏</a>&nbsp;&nbsp;";             
            str+="<a href=\"/news/sc/sgns\">四姑娘山</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/hailuogou\">海螺沟</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/emeishan\">峨眉山、乐山</a>&nbsp;&nbsp;";
            break;
        case "婚纱摄影":
            left=50;
            str="<a href=\"/news/sc/daocheng\">稻城亚丁</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/jiuzhai\">神奇九寨</a>&nbsp;&nbsp;";            
            str+="<a href=\"/news/sc/tibet\">雪域西藏</a>&nbsp;&nbsp;";             
            str+="<a href=\"/news/sc/sgns\">四姑娘山</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/hailuogou\">海螺沟</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/emeishan\">峨眉山、乐山</a>&nbsp;&nbsp;";
            break;
        case "旅游用车":
            left=50;
           str="<a href=\"/news/sc/daocheng\">稻城亚丁</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/jiuzhai\">神奇九寨</a>&nbsp;&nbsp;";            
            str+="<a href=\"/news/sc/tibet\">雪域西藏</a>&nbsp;&nbsp;";             
            str+="<a href=\"/news/sc/sgns\">四姑娘山</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/hailuogou\">海螺沟</a>&nbsp;&nbsp;";
            str+="<a href=\"/news/sc/emeishan\">峨眉山、乐山</a>&nbsp;&nbsp;";
            break;
    }
    document.getElementById("nav_down").innerHTML=str;
    document.getElementById("nav_down").style.paddingLeft=left+"px";
}
setMenu("首页");
function GetObj(objName){
	if(document.getElementById){
		return eval('document.getElementById("' + objName + '")');
	}else if(document.layers){
		return eval("document.layers['" + objName +"']");
	}else{
		return eval('document.all.' + objName);
	}
}
function s_chg(td_now)
{
    if(td_now.id=="s_td_3")//酒店
    {
        window.location.href="http://hotel.10trip.com";
        return;
    }
    if(td_now.id=="s_td_4")//机票
    {
        window.location.href="http://www.10trip.com/index.html#srh_ticket";
        return;
    }
    
	for(var i=1; i<10; i++){ eval("var s_td_" + i +"= GetObj('s_td_"+i+"')"); }
	s_td_1.className = s_td_2.className = s_td_3.className = s_td_4.className = s_td_5.className = s_td_6.className = s_td_7.className = s_td_8.className = s_td_9.className = "s_td_of";
	td_now.className = "s_td_on";
	var num = td_now.id.substring(5,6);//s_td_2 中的 2
	//alert(num);
	for(var j=1;j<10;j++)
    {        
        if(j==num)
            document.getElementById("f_div_"+j).style.display="block";
        else
            document.getElementById("f_div_"+j).style.display="none";
    }
}

//show tags
function showTags(o)
{            
    var id = o.id;            
    var ary_id = ["pro","country","foreign","hotel","ticket","car"];
    for(var i=0;i<ary_id.length;i++)
    {
        if(ary_id[i]==id)
        {
            document.getElementById(ary_id[i]).style.borderBottom="none";
            document.getElementById(ary_id[i]).style.color="#ff0000";            
            document.getElementById(ary_id[i]).style.background="#f3ffef url(images/tags_t_bj_select.gif)";
            document.getElementById(ary_id[i]+"_con").style.display="block";            
            //var len = (i+1)*117;
            //alert(len);
            //document.getElementById("in_scroll").style.width = len+"px";
        }
        else
        {
            document.getElementById(ary_id[i]).style.color="#010101";
            document.getElementById(ary_id[i]).style.borderBottom="solid 1px #98bbff";
            document.getElementById(ary_id[i]).style.background="#f3ffef url(images/tags_t_bj.gif)";
            document.getElementById(ary_id[i]+"_con").style.display="none";
        }        
    }
}
function showTags_d1(o,op)
{            
    var id = o.id;            
    var ary_id = ["shequ","picture","lushu","map"];
    if(op==1)
        ary_id = ["shequ","picture","lushu","map"];
    else if(op==2)
        ary_id = ["photos","meinv","jifen","zutuan"];
    else
        ary_id = ["shop","meishi","sight"];
        
    for(var i=0;i<ary_id.length;i++)
    {
        if(ary_id[i]==id)
        {
            document.getElementById(ary_id[i]).style.borderBottom="none";
            document.getElementById(ary_id[i]).style.background="#ffffff";
            document.getElementById(ary_id[i]+"_con").style.display="block";
        }
        else
        {
            document.getElementById(ary_id[i]).style.borderBottom="solid 1px #9ec9ec";
            document.getElementById(ary_id[i]).style.background="#d1e7fc";
            document.getElementById(ary_id[i]+"_con").style.display="none";
        }
    }
}


function so_ck_1(obj)
{
    if(document.getElementById(obj).value.length<1)
    {
        alert("请输入景点关键字，如：\n\n九寨、黄龙、稻城亚丁、乐山、峨眉山、四姑娘山....");
        document.getElementById(obj).focus();
        return true;
    }
    return true;
}
function so_ck_2(obj)
{
    if(document.getElementById(obj).value.length<1)
    {
        alert("请输入行程关键字，如：\n\n九寨、黄龙、稻城亚丁、乐山、峨眉山、四姑娘山....");
        document.getElementById(obj).focus();
        return true;
    }
    return true;
}
function so_ck_3(obj)
{
    {
    if(document.getElementById(obj).value.length<1)
    {
        alert("请输入行程关键字，如：\n\n九寨、黄龙、稻城亚丁、乐山、峨眉山、四姑娘山....");
        document.getElementById(obj).focus();
        return true;
    }
    return true;
}
}
function so_ck_4(obj){return false;}
function so_ck_5(obj){return false;}
function so_ck_6(obj){return false;}
function so_ck_7(obj){return false;}
function so_ck_8(obj){return false;}
function so_ck_9(obj){return false;}

