﻿//显示分类列表
function showNext(sid,obj)
{ 
  if(sid==null || sid=="" || sid.length<1)return;
  var slt =document.getElementById('ddl2');
  var v = Controls_header.getNextClass(sid).value; // 类的名称
  	     
  if (v != null)
  {      
      if(v != null && typeof(v) == "object" && v.Tables != null)
	  {		
         slt.length = 0;	 
         //slt.options.add(new Option("===请选择车型===",""));        
         var fac="";		         		        			
	     for(var i=0; i<v.Tables[0].Rows.length; i++)
	     {
	         var tempfac = v.Tables[0].Rows[i].Factory;
		     var txt = v.Tables[0].Rows[i].CarName; //这个地方需要注意区分大小写
		     var vol = v.Tables[0].Rows[i].Id; //跟dataset表的列名称要一致
		     if(fac!=tempfac)
		     {slt.options.add(new Option("=== "+tempfac+" ===","0"));
		        fac=tempfac;
		     }		     	     
		     slt.options.add(new Option(txt,vol));
	     }
	  }
   }	
   return;
}


function checkbrand(selectid,url){
    var url;
    if(document.getElementById(selectid) != null){
        
        if (document.getElementById(selectid).value=="0"){
            alert("选择车型品牌");
            
        }else{
            url=url + document.getElementById(selectid).value;
            window.open(url);
            return;
        }
    }
}

function Encodecheckbrand(selectid,url){
    var url;
    if(document.getElementById(selectid) != null){
        
        if (document.getElementById(selectid).value=="0"){
            alert("选择车型品牌");
            
        }else{
            url=url + Getbase64encode(document.getElementById(selectid).value);
            window.location.href=url;
            return;
        }
    }
}

function Encodecheckprice(rel,url){
    var url;
    url=url + Getbase64encode(rel);
    window.location.href=url;
    return;
}


function OnshowMenu()
{     
    var obj01=document.getElementById("mymenu_menu");
    var obj02=document.getElementById("mymenu");
    obj01.style.position="absolute";
    //obj01.style.z-index="999";
    //obj01.style.clip="rect(auto, auto, auto, auto)";
    obj01.style.left="360px";
    obj01.style.top="22px";
    obj01.style.display="block";
}

function OnshowMenuOut()
{
    var obj01=document.getElementById("mymenu_menu");
    var obj02=document.getElementById("mymenu");   
    obj01.style.display="none";
}
