//页面调查
var prox;
var proy;
var proxc;
var proyc;

var divId;

function show(id,ev){
    clearInterval(prox);
    clearInterval(proy);
    clearInterval(proxc);
    clearInterval(proyc);
    var o = document.getElementById(id);
    o.style.display = "block";
    o.style.width = "1px";
    o.style.height = "1px";
    
    divId = id;
    if(id == 'fd')
    {
        prox = setInterval(function(){openx(o,400)},10);
    }
    else if(id == 'divSize')
    {
        prox = setInterval(function(){openx(o,800)},10);
    }
    else if(id == 'divProductDetail')
    {
        prox = setInterval(function(){openx(o,710)},10);
    }
      else if(id == 'ProductDetaildiv')
    {
        prox = setInterval(function(){openx(o,780)},10);
    }
    
     
}
function openx(o,x){
    var cx = parseInt(o.style.width);
    if(cx < x){o.style.width = (cx + Math.ceil((x-cx)/5)) +"px";}
    else{clearInterval(prox);
        proy = setInterval(function(){
        if(divId == 'fd')
        {
            openy(o,300)
        }
        else if(divId == 'divSize')
        {
            openy(o,600)  
        }
        else if(divId == 'divProductDetail')
        {
            openy(o,450)  
        }
         else if(divId == 'ProductDetaildiv')
        {
            openy(o,560)  
        }
        },10);
    }
}    
function openy(o,y){
    var cy = parseInt(o.style.height);
    if(cy < y){o.style.height = (cy + Math.ceil((y-cy)/5)) +"px";}
    else{clearInterval(proy);}
}    
function closeed(id){
    clearInterval(prox);
    clearInterval(proy);
    clearInterval(proxc);
    clearInterval(proyc);
    var o = document.getElementById(id);
    if(o.style.display == "block"){proyc = setInterval(function(){closey(o)},10);}
    
    if(id == 'divProductDetail')
    {
        var bgDivObj = document.getElementById("bgDiv");
        bgDivObj.style.display="none";
    }
     if(id == 'ProductDetaildiv')
    {
        var bgDivObj = document.getElementById("bgDiv");
        bgDivObj.style.display="none";
    }
}
function closey(o){
    var cy = parseInt(o.style.height);
    if(cy > 0){o.style.height = (cy - Math.ceil(cy/5)) +"px";}
    else{clearInterval(proyc);proxc = setInterval(function(){closex(o)},10);}
}    
function closex(o){
    var cx = parseInt(o.style.width);
    if(cx > 0){o.style.width = (cx - Math.ceil(cx/5)) +"px";}
    else{clearInterval(proxc);	o.style.display = "none";}
}