/*************************************************
* 视频 v1.1 xb 2008.10.28
*************************************************/ 
var VideoPopControl = Class.create();
Object.extend(VideoPopControl.prototype, ControlBase.prototype);

Object.extend(VideoPopControl.prototype,{
    _loadUI : function(){
        this.LoadUI('VideoPopControl');
    },
    _loadComplete : function(){
        this.$('btnClose').onclick = this.ClosePop.bind(this);
        this.onLoadComplete();
    },
    CID : 0,
    IsMove : false,
    CopyMsg : '复制好了，发给我的QQ/MSN好友分享吧！',
    ShowPop : function(id,title,ismove){
		this.CID = id;
        if(ismove){
            this.IsMove = true;
        }else{
            this.IsMove = false;
        }
//        if(this.CID!=id){
//            this.$('divLoading').style.display='none';
//			this.$('Name_h3').innerHTML = "加载中...";//标题
//            this.Show();
//        }else{
            this.$('divLoading').style.display='none';
			this.$('Name_h3').innerHTML = unescape(title)+" <a href=\"http://360.ks.js.cn\" target=\"_blank\">更多全景>></a>";//标题
			//this.$('VirID').value = id;//标题
			this.$('LeftNav').innerHTML = "<OBJECT id=VrShow height=230 width=420 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><PARAM NAME=_cx VALUE=11113><PARAM NAME=_cy VALUE=6085><PARAM NAME=FlashVars VALUE=domain=domain.xml&config=http://360.ks.js.cn/api/VShow.aspx?VID="+id+"><PARAM NAME=Movie VALUE=main.swf><PARAM NAME=Src VALUE=main.swf><PARAM NAME=WMode VALUE=Window><PARAM NAME=Play VALUE=-1><PARAM NAME=Loop VALUE=-1><PARAM NAME=Quality VALUE=High><PARAM NAME=SAlign VALUE=LT><PARAM NAME=Menu VALUE=-1><PARAM NAME=Base VALUE=><PARAM NAME=AllowScriptAccess VALUE=><PARAM NAME=Scale VALUE=NoScale><PARAM NAME=DeviceFont VALUE=0><PARAM NAME=EmbedMovie VALUE=0><PARAM NAME=BGColor VALUE=><PARAM NAME=SWRemote VALUE=><PARAM NAME=MovieData VALUE=><PARAM NAME=SeamlessTabbing VALUE=1><PARAM NAME=Profile VALUE=0><PARAM NAME=ProfileAddress VALUE=><PARAM NAME=ProfilePort VALUE=0><PARAM NAME=AllowNetworking VALUE=all><PARAM NAME=AllowFullScreen VALUE=true></OBJECT>";
            this.Show();
            return;
       // }
        
		
//		//this.$('VirID').value = id;
//        //var url=this.Config.EDataCenterUrl + 'CommMap5.0/ThemeMaps.aspx?domain='+this.Config.Domain+'&l='+this.Config.Language+'&req=4&id='+id;
//		var url="http://map2.kunshan.tv/API/ThemeMaps.aspx?VID="+id;
//        ENetwork.DownloadScript(url,this.LoadPopData.bind(this));
//         
		 

    },
    LoadPopData : function(){
//        alert();
//		if(_ThemeInfo.ThemeInfoDeatil[0]){
//            var o = _ThemeInfo.ThemeInfoDeatil[0];
//            
//            //兼容地图初始定位移动
//            if(this.IsMove){
//                MoveTo(o.X*1 + vM.GetMapPos(170), o.Y*1, true);
//                vM.moveEntity(this.ID, o.X*1, o.Y*1);
//            }
//			
//            //this.$('Name_h3').innerHTML = "视频";//标题
//			this.$('Name_h3').innerHTML = o.BCC_CompanyName;//标题
//            //this.$('divContent').innerHTML = o.BCC_Remark;//内容
//            
//            this.$('divLoading').style.display='none';
//
//        }
    },
    /*直接显示Pop内容*/
    ShowPopData : function(x,y,title,content){
        this.$('Name_h3').innerHTML = title;
        this.$('divContent').innerHTML = content;
        MoveTo(x*1 + vM.GetMapPos(170), y*1, true);
        vM.moveEntity(this.ID, x*1, y*1);
        this.$('divLoading').style.display='none';
        this.Show();
    },
    ClosePop : function(){
        this.Hide();
    }
});

