	/*
	window.onload = function()
	{
		var lis = document.getElementById('cssdropdown').getElementsByTagName('li');
		for(i = 0; i < lis.length; i++)
		{
			var li = lis[i];
			if (li.className == 'headlink')
			{
				li.onmouseover = function() { 
				          if(this.getElementsByTagName('ul').length > 0){
                    this.getElementsByTagName('ul').item(0).style.display = 'block'; 
                  }
        }
				li.onmouseout = function() { 
                  if(this.getElementsByTagName('ul').length > 0){
                    this.getElementsByTagName('ul').item(0).style.display = 'none';
                  }  
         }
			}
		}
	}
	*/
	/* or with jQuery:*/
	$(function(){
		$('#cssdropdown li').hover(
			function() { $('ul', this).css('display', 'block'); },
			function() { $('ul', this).css('display', 'none'); });
	});
	/**/
// 用于高亮列表项
;(function($){
		   $.fn.jHighlight=function(options){
			   var settings={
				   highlightClass:""
				   }
			   var op=$.extend(settings,options);
			   var $this=$(this);
			   
			   
			   return $this.hover(
				   function(){
					   $(this).addClass(op.highlightClass);
					   },
				   function(){
					   $(this).removeClass(op.highlightClass);
					   }
				   )
			   }
		   
		   })( jQuery );	

$(function(){
	$(".categoriesintro img.title").load(function(){
		$(".categoriesintro .subtitle").width((998-$(".categoriesintro img.title").width()-700-17-40)+"px")
	})
	$("#homeform").submit(function(){
		var keyword 	= $("#keyword").val(); 
		if (keyword==''){
			alert('请输入要搜索的产品型号');
			return false;
		}
		if (keyword.length<3){
			alert('输入型号必须为3位数');
			return false;
		}
	return true;
	});
})

//改变图片大小
function resizepic(thispic)
{
	if(thispic.width>680) thispic.width=680;
}

//无级缩放图片大小

function bbimg(o)
{
	var zoom=parseInt(o.style.zoom, 10)||100;
	zoom+=event.wheelDelta/12;
	if (zoom>0) o.style.zoom=zoom+'%';
	return false;
}

