function AjaxGetBottomAd(){
	$.post("/ajax.php?t=3&d="+new Date(), {
		d: new Date()
	}, function(data) {
		if(data!=''){
				document.getElementById("php_bottomad").innerHTML = data; 
		}
	})
}

function AjaxGetMarqueeAd(){
	$.post("/ajax.php?t=1&d="+new Date(), {
		d: new Date()
	}, function(data) {
		if(data!=''){
				document.getElementById("demo1").innerHTML = data; 
				new Marquee("demo",2,1,368,260,20,0,0)
		}
	})
}

function AjaxGetText(id){
	$.post("/ajax.php?t="+ id +"&act=text&d="+new Date(), {
		d: new Date()
	}, function(data) {
		if(data!=''){
			$("#text"+id).html(data);
		}
	})
}



function AjaxGetGoodsHot(id,i){
	$.post("/goods.php?act=new2&gid="+ id +"&d="+new Date(), {
		d: new Date()
	}, function(data) {
		if(data!=''){
			$(".gimg"+id).html(data);
			if(i==1){
				if(data.indexOf('soldout')>=0){
					$("#buytable").hide();
				}	
			}
		}
	})
}

function AjaxGetOtherGoods(id){
	$.post("/ajax.php?act=other&gid="+ id +"&d="+new Date(), {
		d: new Date()
	}, function(data) {
		if(data!=''){
			$("#otherpro").html(data);
		}
	})
}

function AjaxGetMaxAd(){
	$.post("/ajax.php?t=2&d="+new Date(), {
		d: new Date()
	}, function(data) {
		if(data!=''){
				document.getElementById("TPL_ADVBANNER").innerHTML = data; 
		}
	})
}

function AjaxGetGoodsPic(id){
	$.post("/goods.php?gid="+ id  +"&d="+new Date(), {
		d: new Date()
	}, function(data) {
		if(data!=''){
				document.getElementById("TPL_GoodsPic").innerHTML = data; 
		}
	})
}

function AjaxGetAdd(){
	$.post("/ajax.php?t=5&d="+new Date(), {
		d: new Date()
	}, function(data) {
		if(data!=''){
				$("#add").attr("src",data);
		}
	})
}


function GetRequest()
{
var url = location.search; //获取url中"?"符后的字串
var theRequest = new Object();
if(url.indexOf("?") != -1)
{ 
  var str = url.substr(1);
    strs = str.split("&");
  for(var i = 0; i < strs.length; i ++)
    { 
     theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
    }
}
return theRequest;
}

