/*
 * Ext JS Library 2.0 Alpha 1
 * Copyright(c) 2006-2007, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */

Ext.onReady(function(){
    var win;
    var video_icon = Ext.get('show-video');
//    var call_icon = Ext.get('show-call');	
    var preview_icon = Ext.get('preview_session');

    video_icon.on('click', function(){
        // create the window on the first click and reuse on subsequent clicks
            win = new Ext.Window({
                //el:'video-win',
                layout:'fit',
                width: 673,
                height:450,
                shadow: true,
                
				html: '<IFRAME SRC="/EddieVideo1.html" WIDTH=660 HEIGHT=400></IFRAME>',

                buttons: [{
                    text: 'Close',
                    handler: function(){
                        win.close();
                    }
                }]
            });
       win.show(this);
    });

/*	
    call_icon.on('click', function(){
        // create the window on the first click and reuse on subsequent clicks
            win = new Ext.Window({
                //el:'video-win',
                layout:'fit',
                width:475,
                height:320,
                shadow: true,
                
				html: '<div class="main-registration"><h1 class=block>Call Registration Form</h1><p>Learn how evolving market conditions, including the subprime mortgage meltdown, are impacting the demand for seller-financing with this conference call. Eddie Speed will be discussing his latest strategies and tips for maximizing your profits with notes!</p><div class="contactform"><form method="post" action="javascript:insert()" method="post"><input type="hidden" name="call_date" value="Thursday, October 25th" id="call_date"><input type="hidden" name="call_time" value="5 pm East, 2 pm West" id="call_time"><fieldset><legend>&nbsp;YOUR INFO&nbsp;</legend><p><label for="contact_name" class="left">Name:</label><input type="text" name="callername" id="callername" class="field" value="" tabindex="1" /></p><p><label for="contact_phone" class="left">Phone:</label><input type="text" name="phone" id="phone" class="field" value="" tabindex="2" /></p><p><label for="contact_email" class="left">Email:</label><input type="text" name="email" id="email" class="field" value="" tabindex="2" /></p><p><label class="center"><input type="checkbox" name="send-reports-call" id="send-reports-call" value="send-reports" tabindex="5"> <i>Send Bonus Special Reports on Success in Notes</i></label></p>                              </fieldset>            </form>          </div><div id="insert_response" style="color:red;font-size:120%;font-weight:bold;"></div></p></div>',

                buttons: [{
		    text: 'Submit',
		    handler: function(){
			insert();
			}
		    } , {
                    text: 'Close',
                    handler: function(){
                        win.close();
                    }
                }]
            });
       win.show(this);
    });
*/

    preview_icon.on('click', function(){
        // create the window on the first click and reuse on subsequent clicks
            win = new Ext.Window({
                //el:'video-win',
                layout:'fit',
                width:475,
                height:350,
                shadow: true,
                
				html: '<div class="main-registration"><h1 class=block>Free Session!</h1><p>Try our <b>Real Estate Note Basics</b> session on us! Simply fill out this form and select your password to create your free e-learning account. We\'ll then email you the login information so you can start the session immediately!<br><div class="contactform"><form method="post" action="javascript:insert_preview()" method="post"><fieldset><legend>&nbsp;YOUR INFO&nbsp;</legend><p><label for="first_name" class="left">First Name:</label><input type="text" name="first_name" id="first_name" class="field" value="" tabindex="1" /></p><p><label for="last_name" class="left">Last Name:</label><input type="text" name="last_name" id="last_name" class="field" value="" tabindex="2" /></p><p><label for="email" class="left">Email:</label><input type="text" name="email" id="email" class="field" value="" tabindex="3" /></p><p><label for="passwd" class="left">Create Password:</label><input type="password" name="passwd" id="passwd" class="field" value="" tabindex="4" /></p><!--p><label for="phone" class="left">Phone:</label><input type="text" name="phone" id="phone" class="field" value="" tabindex="5" /></p--><p>&nbsp;</p><p><label class="center"><input type="checkbox" name="send-reports" id="send-reports" value="send-reports" tabindex="6"> <i>Send Bonus Special Reports on Success in Notes</i></label></p>                              </fieldset>            </form>          </div><div id="insert_preview_response" style="color:red;font-size:120%;font-weight:bold;"></div></p></div>',

                buttons: [{
		    text: 'Submit',
		    handler: function(){
			insert_preview();
			}
		    } , {
                    text: 'Close',
                    handler: function(){
                        win.close();
                    }
                }]
            });
       win.show(this);
    });


});
