﻿// JScript source code
//Author:Wangwei,1365Car's develop Department developer
//Modified:2005-11-3 22:03

function writeMenu()
{
   //define variables
   //var thispage;
   var oSelectStyle="COLOR: #ae0019";  //if the page is selected,then use this style,else
   var oDefaultStyle="FILTER: DropShadow(Color=#FFFFFF, OffX=1, OffY=1, Positive=1); HEIGHT:15px";  //use this style
   var tempStyle1,tempStyle2,tempStyle3,tempStyle4,tempStyle5,tempStyle6,tempStyle7,tempStyle8,tempStyle9,tempStyle10,tempStyle11,tempStyle12,tempStyle13,tempStyle14,tempStyle15,tempStyle16;
   tempStyle1=tempStyle2=tempStyle3=tempStyle4=tempStyle5=tempStyle6=tempStyle7=tempStyle8=tempStyle9=tempStyle10=tempStyle11=tempStyle12=tempStyle13=tempStyle14=tempStyle15=tempStyle16=oDefaultStyle;  //temp Style to store the decided style 
   var tempClass="";
   var tempString="";  //use this variable to store the menu's HTML source code
   
   var sIndexLink = "/tjhtml/index.shtml";                                                    //首页
   var sNewsLink = "/tjhtml/news/index.shtml ";                                               //新闻频道
   var sDealerLink = "/tjhtml/dealershow/index.shtml";                                      //品牌商家  
   var sCarslibrary = "/tjhtml/carslibrary/index.shtml";                                      //车型图库  
   //var sQuotedLink = "/tjhtml/tj1365carquotedprice/index.shtml";
   var sQuotedLink = "/QuotedPrice/index.aspx";                    //车型报价
   //var sPortLink = "http://www.at188.com/cooperate/car1365/index.aspx";                 //口岸报价
   var sTeamLink = "/TeamBuy/Index.aspx";                                        //团购在线
   var sUsedLink = "/tjhtml/UsedCar/Index.shtml";                                       //二手车市
   var sBuyLink = "/tjhtml/buycar/Index.shtml";                                        //购车信息
   var sRentLink = "/tjhtml/RentCar/Index.shtml";                                     //汽车租赁
   //var sProloLink = "/Beauty/Index.aspx";                                    //品牌代言
   var sDecorLink = "/refit/index.aspx";     //"/tjhtml/refit/index.shtml";          //改装车

var sDecorate="/tjhtml/Decorate/"  //用品
   var sCommuLink = "http://community.1365car.tj.cn/default.aspx";                 //社区
var sVidoLink = "/tjhtml/shipin/index.shtml";                //视频
var sbbs="http://bbs.1365car.tj.cn/"//论坛
   //if(menuType=="ourpageLink"){ 
   tempString = "<font color='#d8d8d8'>"; 
   tempClass="white_yellowlink2"; //}
   //else if(menuType=="cooperatepageLink"){ tempString="<font color='#525157'>"; tempClass="graylink"; }
   //else { tempString=""; }
  
  if (typeof(thispage) == "undefined")
  {
	//var thispage = null;
	//tempStyle1 = oSelectStyle;
  }
 else
 {   switch(thispage)
     {
        case "Index"      : tempStyle1 = oSelectStyle; break;
        case "News"       : tempStyle2 = oSelectStyle; break;
        case "Dealer"     : tempStyle3 = oSelectStyle; break;
        case "Quoted"     : tempStyle4 = oSelectStyle; break;
        case "TeamBuy"    : tempStyle7 = oSelectStyle; break;
        case "UsedCar"    : tempStyle6 = oSelectStyle; break;
        case "BuyCar"     : tempStyle8 = oSelectStyle; break;
        case "RentCar"    : tempStyle9 = oSelectStyle; break;
        //case "Prolocutor" : tempStyle10 = oSelectStyle; break;
        case "Decorate"   : tempStyle11 = oSelectStyle; break;
        case "Carslibrary": tempStyle13 = oSelectStyle; break; 
        //case "Community"  : tempStyle12 = oSelectStyle; break;
        //default           : tempStyle = oDefaultStyle; break;
case "VidoLink"    : tempStyle14 = oSelectStyle; break;
case "sbbs"    : tempStyle15 = oSelectStyle; break;
case "Decorates": tempStyle16= oSelectStyle; break;
     }
  }

     tempString += "<a href='" + sIndexLink + "' class='" + tempClass + "' style='" + tempStyle1 + "'>首页</a>&nbsp;|&nbsp;<A href='" + sNewsLink + "' class='" + tempClass + "' style='" + tempStyle2 + "'>新闻频道</a>&nbsp;|&nbsp;" + "<a href='" + sDealerLink + "' class='" + tempClass + "' style='" + tempStyle3 + "'>品牌商家</a>&nbsp;|&nbsp; <A href='" + sCarslibrary + "' class='" + tempClass + "' style='" + tempStyle13 + "'>图库</a>&nbsp;|&nbsp; <A href='" + sQuotedLink + "' class='" + tempClass + "' style='" + tempStyle4 + "'>报价</a>&nbsp;|&nbsp; <A href='" + sVidoLink + "' class='" + tempClass + "' style='" + tempStyle14 + "'>视频</a>&nbsp;|&nbsp;<A href='" + sBuyLink + "' class='" + tempClass + "' style='" + tempStyle8 + "'>购车信息</a>&nbsp;|&nbsp;" + "<a href='" + sTeamLink + "' class='" + tempClass + "' style='" + tempStyle7 + "'>汽车团购</a>&nbsp;|&nbsp;<A href='" + sUsedLink + "' class='" + tempClass + "' style='" + tempStyle6 + "'>二手车市</a>&nbsp;|&nbsp;" + "<a href='" + sRentLink + "' class='" + tempClass + "' style='" + tempStyle9 + "'>租赁</a>&nbsp;|&nbsp;" + "<a href='" + sDecorate + "' class='" + tempClass + "' style='" + tempStyle16 + "'>用品</a>&nbsp;|&nbsp;" + "<a href='" + sDecorLink + "' class='" + tempClass + "' style='" + tempStyle11 + "'>改装车</a>&nbsp;|&nbsp;<A href='" + sCommuLink + "' class='" + tempClass + "' style='" + tempStyle12 + "'>社区</a>&nbsp;|&nbsp;<A href='" + sbbs + "' class='" + tempClass + "' style='" + tempStyle15 + "'>论坛</a>";
     tempString += "</font>";
     //if the menu Html source code is not null or empty ,then write the code to the page
     if(tempString!=null && tempString !="") document.writeln(tempString);   
}
