/*
 * Ext JS Library 2.0.2
 * Copyright(c) 2006-2008, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */

    var win;
	


Ext.onReady(function(){


    
    var button = Ext.get('show-btn');

    button.on('click', function(){

        // create the window on the first click and reuse on subsequent clicks
        if(!win){
            win = new Ext.Window({
                el:'hello-win',
                layout:'fit',
                width:460,
                height:395,
                closeAction:'hide',
                plain: true,
		modal: true,
		resizable: false
            });
        }
        win.show(this);

      win.on('show', function(){
        document.getElementById('regForm').innerHTML = '<object width="445" height="364"><param name="movie" value="http://www.youtube-nocookie.com/v/N-p7_-7Drd0&hl=en_US&fs=1&color1=0xe1600f&color2=0xfebd01&border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube-nocookie.com/v/N-p7_-7Drd0&hl=en_US&fs=1&color1=0xe1600f&color2=0xfebd01&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="445" height="364"></embed></object>';
      }
    );
     win.on('hide',function() {            
            document.getElementById('regForm').innerHTML = ' ';
	 });

    });

});
