    Ext.onReady(function(){
/*
setTimeout(function(){
        Ext.get('loading').remove();
        Ext.get('loading-mask').fadeOut({remove:true});
    }, 250);
*/		 
		 new Ext.ToolTip({
        target: 'hideit',
				width:135,
        html: '<table><tr><td><img src="icons/application_side_contract.png" width="16" height="16"border="0"></td><td><font size="1">Close Side Panel</font></td></tr></table>'
    });

        //Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
        Ext.QuickTips.init();
				
	 // This is a shared function that simulates a load action on a StatusBar.
    // It is reused by most of the example panels.
    var loadFn = function(btn, statusBar){
        btn = Ext.getCmp(btn);
        statusBar = Ext.getCmp(statusBar);
        
        btn.disable();
        statusBar.showBusy();
        
        (function(){
            statusBar.clearStatus({useDefaults:true});
            btn.enable();
        }).defer(2000);
    };
		//end of load action		
				
			
	var win = new Ext.Window({
        title: 'History of Greek',
        width: 500,
        minWidth: 350,
        height: 400,
        modal: true,
        closeAction: 'hide',
        bodyStyle: 'padding:10px;',
        items:[{
            xtype: 'panel',
						width:450,
						height:300,
						layoutConfig:{autoScroll:true},
						html:'Greek:<p>The history of the Greek Language begins, as far as the surviving texts are concerned, with the Mycenaean civilization at least as early as the thirteenth century BCE. The earliest texts are written in a script called  Linear B. After the collapse of the Mycenaean civilization (around 1200 BCE) writing disappeared from Greece. In the late ninth to early eighth century BCE ascript based on the Phoenician syllabary was introduced, with unneeded consonant symbols being reused to represent the Greek vowels. The oldest surviving alphabetic inscriptions are written using this new system and date from the late eighth century BCE. <p></p>Click <a href="http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=SILGrk_home">here</a> for Greek fonts.',
            id: 'win-button'
            //text: 'Close',
            //handler: loadFn.createCallback('win-button', 'win-statusbar')
        }],
        bbar: new Ext.StatusBar({
            id: 'win-statusbar',
            defaultText: 'patr@languageschoolint.com',
            items: [
						{
                			email: 'patr@languageschoolint.com'
            			}, 
						'-',
            		new Date().format('n/d/Y'), ' ', ' ', '-', 
						{
			                xtype:'tbsplit',
			                text:'Menu',
			                menuAlign: 'br-tr?',
			                menu: new Ext.menu.Menu({
			                items: [{iconCls:'form_icon', text: 'designed by patr@languageschoolint.com'}]
                		})
								
            			}
					]//end of items
        	})
    });
    
    new Ext.Button({
        text: 'Greek',
        renderTo: 'langtree',
        handler: function(){
            win.show();
        }
    });	
				
	//end of greek 
	
	var win1 = new Ext.Window({
        title: 'History of Hebrew',
        width: 500,
        minWidth: 350,
        height: 400,
        modal: true,
        closeAction: 'hide',
        bodyStyle: 'padding:10px;',
        items:[{
            xtype: 'panel',
			width:450,
			height:300,
			bodyStyle: 'padding:10px;',
			layoutConfig:{autoScroll:true},
			html:'Hebrew:The earliest Hebrew script was derived from a Phoenician  script. The modern Hebrew script was developed from a script known as Proto-Hebrew/Early Aramaic. The earliest known writing in Hebrew dates from the 11th century BC. Hebrew is a member of the Canaanite group of Semitic languages. It was the language of the early Jews, but from 586 BC it started to be replaced by Aramaic as the everyday language of the Jews. Since then it has continued to be used as a liturgical language and to some extent as a spoken vernacular. <p> <p></p>Click <a href="http://www.wazu.jp/gallery/Fonts_Hebrew.html">here</a> for Hebrew fonts.',
            id: 'win-button'
            //text: 'Close',
            //handler: loadFn.createCallback('win-button', 'win-statusbar')
        }],
        bbar: new Ext.StatusBar({
            id: 'win-statusbar',
            defaultText: 'patr@languageschoolint.com',
            items: [
				{
                text: 'Languages'
           		 }, 
						
						'-',
            new Date().format('n/d/Y'), ' ', ' ', '-', 
						{
                xtype:'tbsplit',
                text:'Menu',
                menuAlign: 'br-tr?',
                menu: new Ext.menu.Menu({
                    items: [{iconCls:'form_icon', text: 'designed by patr@languageschoolint.com'}]
                })
								
            		}
						]//end of items
        })
    });
    
    new Ext.Button({
        text: 'Hebrew',
        renderTo: 'langtreehebrew',
        handler: function(){
            win1.show();
        }
    });	
		
	//end of Hebrew
	
	
	
	
	
	
				
		//below defines the entire viewport		
       var viewport = new Ext.Viewport({
            layout:'border',
            items:[
					{
					region:'north',
					//iconCls:'lsi',
                    contentEl: 'lsi_logo',
                    split:true,
                    height: 115,
                    minSize: 80,
                    maxSize: 110,
                    collapsible: true,
                    title:'<img src="images/flags/png/fr.png" width=16 height=11 align="absmiddle"> Language School International, Inc. (978) 263-0326 ',
											items:[{
											
											xtype: "panel",
											title: "Latest Updates",
											iconCls:'login',
											id: "stb",//use id for the styles to position
											collapsible: false,
											autoScroll:false,
											frame:true,
											width: 1018,
											height: 75,
											html: "<img src='images/flags/gif/ws.gif' width='16' height='11'> <img src='images/flags/gif/ye.gif' width='16' height='11' alt='' border='0'> <img src='images/flags/gif/yt.gif' width='16' height='11' alt='' border='0'> <img src='images/flags/gif/za.gif' width='16' height='11' alt='' border='0'> <img src='images/flags/gif/zm.gif' width='16' height='11' alt='' border='0'> <img src='images/flags/gif/zw.gif' width='16' height='11' alt='' border='0'> <a class='brochure' href=http:/Brochure.zip>Download Printable Brochure</a><br><img src='icons/application_view_tile.png' width='16' height='16' align='absmiddle'> <font point-size='8' face='Verdana'>Last Updated: February 8, 2010    <img src='icons/application_view_tile.png' width='16' height='16' align='absmiddle'> Coming Soon: Language Forums, <img src='images/facebook.png' width='14' height='14' align='absmiddle'> facebook & <img src='images/twitter.png' width='14' height='14' align='absmiddle'> Twitter</font><img class='tall_building' src='images/tall_building.jpg' width='280' height='44' alt='' border=0'>"
											}]								
								},{
                    region:'south',
					//iconCls:'login',
                    contentEl: 'south',
                    split:true,
					width:800,
        			height:130,
                    minSize: 90,
                    maxSize: 200,
					layout:'fit',
                    collapsible: true,
                    title:'<img src="icons/layout.png" width="16" height="16" alt="" border="0" align="absmiddle"> Information',
						items:
							new Ext.TabPanel({
								border:false,
                            	activeTab:0,
                            	tabPosition:'top',
								enableTabScroll:true,
								defaults: {autoScroll:true},
                            			items:[{
                                		contentEl:'newslinks',
                                		title: 'Linquistic News',
										iconCls:'customers',
                                		autoScroll:true
                            	},{
                                		contentEl:'newspapers',
                                		title: 'Foreign Newspapers',
										iconCls:'login',
                                		autoScroll:true
                            	},{
										contentEl:'lsi_fonts',
                                		title: 'Language Fonts',
										iconCls:'lan_fonts',
                                		autoScroll:true
									},{
										contentEl:'computer_lan',
                                		title: 'Computer Languages',
										iconCls:'com_fonts',
                                		autoScroll:true
									}]
                        })
                    //margins:'0 0 0 0'
                }, {
                    region:'east',
					//iconCls:'login',
                    title: '<img src="icons/layout.png" width="16" height="16" alt="" border="0" align="absmiddle"> Company Information & Clients',
                    collapsible: true,
                    split:true,
                    width: 230,
                    minSize: 300,
                    maxSize: 390,
                    layout:'fit',
                    //margins:'0 5 0 0',
                    items:
                        new Ext.TabPanel({
                            border:false,
                            activeTab:1,
                            tabPosition:'bottom',
                            items:[{
                                contentEl:'companylist',
                                title: 'Clients',
								iconCls:'customers',
                                autoScroll:true
                            },{
                                contentEl:'companyaddress',
                                title: 'Address',
								iconCls:'login',
                                autoScroll:true
                            }
                            
														]
                        })
                 },{//navigational area below
                    region:'west',
                    id:'west-panel',
					//iconCls:'lsi',
                    title:'<img src="icons/layout.png" width="16" height="16" alt="" border="0" align="absmiddle"> <u>Our Services</u>',
                    split:true,
                    width: 200,
                    minSize: 175,
                    maxSize: 400,
                    collapsible: true,
                    //margins:'0 0 0 5',
                    layout:'accordion',
                    layoutConfig:{
                        animate:true
                    },
                    items: [{
                        contentEl: 'west',
                        title:'<img src="icons/computer.png" width="16" height="16" alt="" border="0" align="absmiddle"> <font color="#15428B"><b><u>Translation Services</u></b></font>',
                        border:false,
						duration: 3.0,
                        //iconCls:'translation',
						autoScroll:true
                    },{
                        title:'<img src="icons/group.png" width="16" height="16" alt="" border="0" align="absmiddle"> <font color="#15428B"><b><u>Language Training</u></b></font>',
                        contentEl: 'westtwo',
                        border:false,
						duration: 3.0,
                        //iconCls:'languagetraining',
						autoScroll:true
                    },{
                        title:'<img src="icons/ipod_cast.png" width="16" height="16" alt="" border="0" align="absmiddle"> <font color="#15428B"><b><u>Interpretation Services</u></b></font>',
                        contentEl: 'westthree',
                        border:false,
						duration: 3.0,
                        //iconCls:'interpretation',
						autoScroll:true
                    },{
                        title:'<img src="icons/page_world.png" width="16" height="16" alt="" border="0" align="absmiddle"> <font color="#15428B"><b><u>Cross Cultural Seminars</u></b></font>',
						contentEl: 'westfour',
                        border:false,
						duration: 3.0,
                        //iconCls:'seminars',
						autoScroll:true
                    },{
                        title:'<img src="icons/comment.png" width="16" height="16" alt="" border="0" align="absmiddle"> <font color="#15428B"><b><u>Accent Reduction</u></b></font>',
                        html:'<p>Our accent Imrovement Course uses the nationally renowned Compton Pronouncing Method. Our licensed speech and language pathologist will perform an in-depth analysis of your speech, develop and implement an accent improvement program based on the analysis results and customized to each client\'s needs. Please contact us for more information at 978.263.0326</p>',
                        border:false,
						duration: 3.0,
                        //iconCls:'accentreduction',
						autoScroll:true
                    }]
                },
								
								{
                    region:'center',
					//iconCls:'lsi',
                    title: '<img src="icons/layout.png" width="16" height="16" alt="" border="0" align="absmiddle"> Language School International, Inc.',
                    collapsible: false,
                    split:true,
                    width: 225,
                    minSize: 175,
                    maxSize: 400,
                    layout:'fit',
                    //margins:'0 5 0 0',
                    items:
                        new Ext.TabPanel({
                            border:false,
                            activeTab:0,
                            tabPosition:'bottom',
                            items:[{
                                iconCls:'login',
                                title: 'About Us',
																contentEl:'ci',
                                autoScroll:true
                            },{
														title:'Translations',
														iconCls:'translation',
														contentEl:'tr',
														autoScroll:true
														
														},{
														title:'Language Training',
														iconCls:'languagetraining',
														contentEl:'lt',
														autoScroll:true
														
														},{														
														title:'Interpreting',
														iconCls:'interpretation',
														contentEl:'int',
														autoScroll:true
														
														},{
														title:'Cross Cultural Seminars',
														iconCls:'seminars',
														contentEl:'ccs',
														autoScroll:true
														
														},{
														title:'About Languages',
														iconCls:'languageinfo',
														contentEl:'languageinfo',
														autoScroll:true
														
														}
                            //new Ext.grid.PropertyGrid({
                              //  title: 'Property Grid',
                              //  closable: false
                                
                            //})
														]
                        })
                 }
								
             ]//end of viewport
        });
        Ext.get("hideit").on('click', function() {
           var w = Ext.getCmp('west-panel');
           w.collapsed ? w.expand() : w.collapse(); 
        });
    });