$.get("inc/getarea.php",{user:user,l:ver,random:Math.random()},function(data){
	$('select.area').each(function(){
		$(this).html(data);
		var mod=$(this).parents(".control").attr('id');
		key=$(this).attr('key');	
		if (key!='')
		{
			var obj=this;
			//为了兼容ie6的写法;TNND  BT ............................
			setTimeout(function(){
			$(obj).val(key);
			selectclick($(obj).attr("id"),key);
			mno=$(obj).find("option:selected").attr("value");
			areachange(mno,mod);
			},1);
		}
	});
});
$('.area').change(function(){
	var mno=$(this).find("option:selected").attr("value");
	var module=$(this).parents(".control").attr('id');
	areachange(mno,module);
});
if (accordionpanel!=0)
{
	$('.accordion').accordion( 'activate' , accordionpanel );
}
function areachange(makeno,module){
	writeCookie(module+'_area',makeno,24);
	var mode=module;
	$.get("inc/getmake.php",{area:makeno,user:user,l:ver,random:Math.random()},function(data){
		$('select.make').each(function(){
			$(this).html(data);
			key=$(this).attr('key');
			if (key!='')
			{
				var obj=this;
				//为了兼容ie6的写法;TNND  BT ............................
				setTimeout(function(){
				$(obj).val(key);
				selectclick($(obj).attr("id"),key);
				mno=$(obj).find("option:selected").attr("value");
				makechange(mno,mode);
				},1);
			}
		});
	});
}

$("img.checkthis").click(function(){
	id=$(this).attr("value");
	//alert($(this).attr("checked"));
	if ($(this).attr("src")=='images/check_cn.gif'||$(this).attr("src")=='images/check_en.gif')
	{
		writeCookie('pro_'+id,'1',24);			
		$(this).attr("src",'images/checked.gif');
	}
	else
	{
		writeCookie('pro_'+id,'0',0);
		if (ver=='cn')
			lang='cn';
		else
			lang='en';
		$(this).attr("src",'images/check_'+lang+'.gif');
	}
});