// JavaScript Document

function changelx(one,object_xz,object_zd)
    	{
			//alert(one);
			var xz=object_xz;
			var zd=object_zd;
			
			 zd.length = 0;
			 xz.length = 0; 
			zd.options[0] = new Option('--不限--','');
			  xz.options[0] = new Option('--不限--','');
			//var lx=lx;
			var i,j;
			var x=new Array();
			var l=0;
			var forxz=0;
			var isxz=true;
				for (i=0;i <onecount; i++)
					{
						if (subcat[i][2] == one)
						{ 
							zd.options[zd.length] = new Option(subcat[i][0], subcat[i][3]);
							
						}
						
					}
					
				for(j=0;j<subxz.length;j++)
				{
				
					if (subxz[j][2] == one)
						{ 
							
								xz.options[xz.length] = new Option(subxz[j][0], subxz[j][1]);	
									//alert(subxz[j][2]);
								
							
						}
				}
        
    	}    
		function changexz(xz,lx,object_zd)
    	{
			//alert(one);
			var zd=object_zd;
			 zd.length = 0;
			 zd.options[0] = new Option('--不限--','');			 
				//var lx=lx;
				var i;
				for (i=0;i < onecount; i++)
					{
						if (subcat[i][2] == lx&&subcat[i][4]==xz)
						{ 
						zd.options[zd.length] = new Option(subcat[i][0], subcat[i][3]);
							
						}
						
					}
        
    	}    

var flag=false; 
function DrawImage(ImgD,wh){ 
 var image=new Image(); 
 image.src=ImgD.src;
 if(image.width>0 && image.height>0){ 
  flag=true; 
  if(image.width/image.height>= wh/wh){ 
   if(image.width>wh){
    ImgD.width=wh; 
    ImgD.height=(image.height*wh)/image.width; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
   
  } 
  else{ 
   if(image.height>wh){
    ImgD.height=wh; 
    ImgD.width=(image.width*wh)/image.height; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
 
  } 
 }
}

function flew(url){
window.open(url,"","toolbar=no,location=no,directiories=no,menubar=no,status=no,scrollbars=yes,resizable=no,width=500,height=400,left=300,top=200");
}

function isNumber(s) //数字判断函数
        {
                var digits = "0123456789";
                var i = 0;
                var sLength = s.length;

                while ((i < sLength))
                {
                        var c = s.charAt(i);
                        if (digits.indexOf(c) == -1) return false;
                        i++;
                }

                return true;
 }
