
var nowMT=-36;
var tagMT=0;
var adobj; 
var opendiv; 
var closdiv; 
var addfunc; 
var handobj; 
var reducefunc;         
var speed=2;
function showtopad(){
adobj=document.getElementById("bigad");
opendiv=document.getElementById("opendiv");
closdiv=document.getElementById("closdiv");
if (nowMT<=0){
adobj.style.display="block";
addfunc=setInterval("addheight()",1);
} 
} 
function closetopad(){
//alert(nowMT);
if (nowMT<=speed){
callreduceheight();
if (typeof(handobj)=="number"){
clearTimeout(handobj);
}
} 
} 
function addheight(){
nowMT+=speed;
if (nowMT>tagMT){
clearInterval(addfunc);
//handobj=setTimeout("callreduceheight()",5000);
return;
}
adobj.style.marginTop=nowMT+"px";
//adobj.style.height=nowheight+"px";
//nowheight+=speed; 
//if (nowheight>maxheight){
//clearInterval(addfunc);
//handobj=setTimeout("callreduceheight()",5000);
//return;
//}
//adobj.style.height=nowheight+"px";
} 
function callreduceheight(){
reducefunc=setInterval("reduceheight()",1);
} 
function reduceheight(){
adobj.style.marginTop=nowMT+"px";
nowMT-=speed;
if (nowMT<=-36){
clearInterval(reducefunc);
adobj.style.display="none";
return;
}
//adobj.style.height=nowheight+"px";
//nowheight-=speed;
//if (nowheight<=0){
//clearInterval(reducefunc);
//adobj.style.display="none";
//opendiv.style.display="block";
//return;
//}
}
//</script>
//<script type="text/javascript">
/* promotion */
/*
function changeImg(){
var myArrayA=new Array(2)
myArrayA[0]="$imageServer.getURI('pics/sys/index/character_a.gif')";myArrayA[1]="$imageServer.getURI('pics/sys/index/character_b.gif')";
var myArrayB=new Array(2)
myArrayB[0]="$imageServer.getURI('pics/sys/index/slogan_a.gif')";myArrayB[1]="$imageServer.getURI('pics/sys/index/slogan_b.gif')";
var character=document.getElementById("character");
var slogan=document.getElementById("slogan");
index=Math.floor(Math.random() * myArrayB.length);
slogan.src=myArrayB[index];
character.src=myArrayA[index];  
}
if(window.attachEvent)
{
window.attachEvent("onload",changeImg);
}
else
{
window.addEventListener("load",changeImg,false);
}
*/
/* news */
var sl_i=6;
$("#news ul li").hide();
$("#news ul li").eq(0).show();
var sI=setInterval("sl()",5000);
function sl(sl_q){
if(sI)
{
  clearInterval(sI);
}
sI=setInterval("sl()",5000);
if (sl_q==null)
{
/*
alert('undefined');
*/
sl_j=sl_i%5;
/*
sl_i=sl_q+6;
sl_j=sl_i%5;
*/
}
else{
/*
alert(sl_q);
*/
sl_i=sl_q+6;
sl_j=sl_i%5;
/*
sl_j=sl_i%5;
*/
}
$("#news ul li").hide();
$("#news ul li").eq(sl_j).show("slow");
$("#news ol li a").removeClass("active");
$("#news ol li a").eq(sl_j).addClass("active");
sl_i++;
}
/*sI=setInterval("sl()",5000);*/
/*
$("#news ol li a").click(function(){
window.clearInterval(sI);
sl(this.rel);
});
*/
<!--
//定义菜单级数，菜单ID数组，菜单对应字段数组
var MenuIdArr,MenuFieldArr,MenuClass
MenuIdArr= new Array()
MenuFieldArr=new Array()
MenuClass=3

MenuIdArr[1]="country"
MenuIdArr[2]="province"
MenuIdArr[3]="city"

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->

function dopages(p){        
		var posts = "country=&province=&city=&type=&pg="+p;
        var url = ajaxurl('jmazon_index.php');
        function func(){
            getResult_list('dopages');
        };
        sendRequest(url,posts,func);
}
function ajaxurl(adDiv){
        var baseurl = "/zh-CN/inc/" + adDiv;
        return baseurl;        
        }