﻿/*
    当gwo选择框子option的其中一项时,出现的大框子. 包含几个图片. 
*/

var FrameShowbox_Extend = Class.create();
FrameShowbox_Extend.prototype = {

    initialize : function(container)
    {
        this.container = $(container);
        if(IEType() == "Microsoft")
        {
            this.container.className = 'frameshowbox_container';
        }
        else
        {
            this.container.className = 'frameshowbox_extend_container';
        }
        this.div_title = $C_DIV('','frameshowbox_extend_title',this.container);
        this.div_body = $C_DIV('','frameshowbox_body',this.container);
        
        this.div_content = $C_DIV('','frameshowbox_extend_content',this.div_body);
        this.div_price = $C_DIV('','frameshowbox_extend_price',this.div_body);  
    },
    
    show: function()
    {
        if(typeof(getSlide) != "undefined")
        {
            try
            {
                if(getSlide().slideState()=="play") 
                {
                    getSlide().setSlideState("stop");                
                    CurrentPlayStatus="play";
                }
            }catch(e){}
        }
        this.container.style.visibility = 'visible';    
    },
    
    hide: function()
    {
        if(typeof(getSlide) != "undefined")
        {
            try
            {
                if(CurrentPlayStatus=="play") 
                {
                    getSlide().setSlideState("play");
                    CurrentPlayStatus="";
                }
            }catch(e){}
        }
        this.container.style.visibility = 'hidden';
    },
    
    /*
        设置数据
        itemObject - ITEM数据
        foldername - 目录名称
    */
    setData : function( itemObject , foldername )
    {
        var data = itemObject;     
        //this.div_title.innerHTML = data.LongDescription;
        //this.div_price.innerHTML="Price:$"+ data.Price;
        //this.div_content.innerHTML=data.Description;
        var scrollPoint=getScroll();
        var currentTop=159;
        if(IEType() == "Microsoft")
        {
            currentTop=166;
        }
        if (scrollPoint.top>=currentTop)
        {
            this.container.style.top=scrollPoint.top+10+'px';
        }
        else
        {
            this.container.style.top =currentTop + "px";        
        }
    }
}