// JavaScript Document
function ProXxtitleul(ID){
	document.getElementById("Pro_1").className = '';	
	document.getElementById("Pro_2").className = '';	
	document.getElementById("Pro_3").className = '';	
	document.getElementById("Pro_"+ID).className='proXxtitledivXian';	
	$.ajax({
		type: "POST",
		url: "AjaxProlist.php",
		data: "ID="+ID,
		success:function(response){
			$('#proXxtitleul').html(response);
		}
	});
}

function IndexProduct(str){
document.getElementById("Ajax_1").className='AjaxTitle';
document.getElementById("Ajax_2").className='AjaxTitle';
document.getElementById("Ajax_3").className='AjaxTitle';
document.getElementById("Ajax_"+str).className='AboutUsTitle';

	$.ajax({
		type: "POST",
		url: "Ajaxindex.asp",
		data: "ID="+str,
		success:function(response){
			$('#AjaxIndex').html(response);
		}
	}); 
}

//购物车
function AddBag(ID,UserID,Size,Price,ProPic)
{
	if(Size !=""){
	Size = $("#SizeAdd").val();	
	}else{
	Size='xx';
	}
	if (UserID==""){
	window.location.href="login.php"	
	}
	//alert("ID="+ID+"&UserID="+UserID+"&Size="+Size+"&Price="+Price);
	$.ajax({
		type: "POST",
		url: "buyShop.php",
		data: "ID="+ID+"&UserID="+UserID+"&Size="+Size+"&Price="+Price+"&ProPic="+ProPic,
		success:function(response){
			$('#Buylist').html(response);
		}
	});
}

function ChangeRowBg(RowID,RowBgColor){
		document.getElementById(RowID).style.backgroundColor = RowBgColor ;
}


function ChangeNumber(BasketID,Numbers){
	document.all.BasketID.value = BasketID;
	document.all.Change_Numbers.value = Numbers;
	document.Basket.submit();
}

function dropDownMenus(nums){
	if (nums==1){
		document.getElementById("navlists").style.display="";	
	}
	if (nums==2){
		document.getElementById("navlists").style.display="none";	
	}
}

function changenum(ID,num)
{
	if(num==0)
	{
		alert('Not less than shopping quantity 0');
		document.getElementById("ProNum").focus();
		return false;
	}
	else 
	{
		location.href="changenum.php?ID="+ID+"&num="+num+"";
	}
}
