Ext.BLANK_IMAGE_URL="images/s.gif";var windowIndex=0,tutNewAccountWindow,tutOutlookWindow,tutOutExpWindow,tutFilezillaWindow,tutThunderWindow;MyDesktop=new Ext.app.App({init:function(){Ext.QuickTips.init()},getModules:function(){tutNewAccountWindow=new MyDesktop.TutNewAccountWindow;tutOutlookWindow=new MyDesktop.TutOutlookWindow;tutOutExpWindow=new MyDesktop.TutOutExpWindow;tutFilezillaWindow=new MyDesktop.TutFilezillaWindow;tutThunderWindow=new MyDesktop.TutThunderWindow;return[new MyDesktop.WeWindow,new MyDesktop.ServicesWindow,new MyDesktop.ContactWindow,new MyDesktop.HostingWindow,new MyDesktop.FeedWindow,new MyDesktop.ClientsWindow,new MyDesktop.TutorialsWindow,new MyDesktop.GlossaryWindow,new MyDesktop.CoursesWindow,new MyDesktop.DownloadsWindow]},getStartConfig:function(){return{title:resTitle,iconCls:"scientia",toolItems:[{text:resAdministrate,iconCls:"admin-sm",scope:this,handler:function(){soundManager.play("newwindow");window.open("http://admin.scientia.com.ar")}},{text:"Webmail",iconCls:"webmail-sm",scope:this,handler:function(){soundManager.play("newwindow");window.open("http://mail.scientia.com.ar")}},"-",{text:resForum,iconCls:"forum-sm",scope:this,handler:function(){soundManager.play("newwindow");window.open("http://foro.scientia.com.ar")}},{text:resBlog,iconCls:"blog-sm",scope:this,handler:function(){soundManager.play("newwindow");window.open("http://www.programandoamedianoche.com")}}]}}});MyDesktop.WeWindow=Ext.extend(Ext.app.Module,{id:"we-win",init:function(){this.launcher={text:resWe,iconCls:"we-sm",handler:this.createWindow,scope:this}},createWindow:function(){var b=this.app.getDesktop(),a=b.getWindow("we-win");if(!a)a=b.createWindow({id:"we-win",title:resWe,width:550,height:400,iconCls:"we",shim:false,animCollapse:true,constrainHeader:true,layout:"accordion",border:false,layoutConfig:{animate:true},items:[{title:resWhoAreWe,lines:false,autoScroll:true,html:'<p class="we-who"><img src="images/s.gif" align="left" />'+resWhoAreWe_Content+'</p><p class="we-who">'+resContactSentence+"</p>",listeners:{beforeExpand:function(){soundManager.play("default")}}},{title:resQualityPolicy,html:'<p class="we-qp"><img src="images/s.gif" align="left" />'+resQualityPolicy_Content+"</p>",autoScroll:true,listeners:{beforeExpand:function(){soundManager.play("default")}}},{title:resVision,html:'<p class="we-vision"><img src="images/s.gif" align="left" />'+resVision_Content+"</p>",autoScroll:true,listeners:{beforeExpand:function(){soundManager.play("default")}}},{title:resScope,html:'<p class="we-scope"><img src="images/s.gif" align="left" />'+resScope_Content+"</p>",autoScroll:true,listeners:{beforeExpand:function(){soundManager.play("default")}}},{title:resMission,html:'<p class="we-mission"><img src="images/s.gif" align="left" />'+resMission_Content+"</p>",autoScroll:true,listeners:{beforeExpand:function(){soundManager.play("default")}}}]});a.show()}});MyDesktop.ServicesWindow=Ext.extend(Ext.app.Module,{id:"services-win",init:function(){this.launcher={text:resServices,iconCls:"services-sm",handler:this.createWindow,scope:this}},createWindow:function(){var b=this.app.getDesktop(),a=b.getWindow("services-win");if(!a)a=b.createWindow({id:"services-win",title:resServices,width:500,height:390,iconCls:"services",shim:false,animCollapse:true,constrainHeader:true,layout:"accordion",border:false,layoutConfig:{animate:true},items:[{title:resService_SoftwareDevelopment,lines:false,autoScroll:true,html:'<p class="services-development"><img src="images/s.gif" align="left" />'+resService_SoftwareDevelopment_Content+'</p><p class="services-development">'+resContactSentence+"</p>",listeners:{beforeExpand:function(){soundManager.play("default")}}},{title:resService_Training,html:'<p class="services-training"><img src="images/s.gif" align="left" />'+resService_Training_Content+'</p><p class="services-training">'+resCoursesSentence+'</p><p class="services-training">'+resContactSentence+"</p>",autoScroll:true,listeners:{beforeExpand:function(){soundManager.play("default")}}},{title:resService_Hosting,html:'<p class="services-hosting"><img src="images/s.gif" align="left" />'+resService_Hosting_Content+'</p><p class="services-hosting">'+resContactSentence+"</p>",autoScroll:true,listeners:{beforeExpand:function(){soundManager.play("default")}}}]});a.show()}});var HostingWindowInit=false;MyDesktop.HostingWindow=Ext.extend(Ext.app.Module,{id:"hosting-win",init:function(){this.launcher={text:resHosting,iconCls:"hosting-sm",handler:this.createWindow,scope:this}},createWindow:function(){var e=this.app.getDesktop(),b=e.getWindow("hosting-win");Ext.grid.RowExpander=function(a){Ext.apply(this,a);this.addEvents({beforeexpand:true,expand:true,beforecollapse:true,collapse:true});Ext.grid.RowExpander.superclass.constructor.call(this);if(this.tpl){if(typeof this.tpl=="string")this.tpl=new Ext.Template(this.tpl);this.tpl.compile()}this.state={};this.bodyContent={}};Ext.grid.RowExpander=function(a){Ext.apply(this,a);this.addEvents({beforeexpand:true,expand:true,beforecollapse:true,collapse:true});Ext.grid.RowExpander.superclass.constructor.call(this);if(this.tpl){if(typeof this.tpl=="string")this.tpl=new Ext.Template(this.tpl);this.tpl.compile()}this.state={};this.bodyContent={}};Ext.extend(Ext.grid.RowExpander,Ext.util.Observable,{header:"",width:20,sortable:false,fixed:true,menuDisabled:true,dataIndex:"",id:"expander",lazyRender:true,enableCaching:true,getRowClass:function(b,d,c){c.cols=c.cols-1;var a=this.bodyContent[b.id];if(!a&&!this.lazyRender)a=this.getBodyContent(b,d);if(a)c.body=a;return this.state[b.id]?"x-grid3-row-expanded":"x-grid3-row-collapsed"},init:function(a){this.grid=a;var b=a.getView();b.getRowClass=this.getRowClass.createDelegate(this);b.enableRowBody=true;a.on("render",function(){b.mainBody.on("mousedown",this.onMouseDown,this)},this);HostingWindowInit=true},getBodyContent:function(b){if(!this.enableCaching)return this.tpl.apply(b.data);var a=this.bodyContent[b.id];if(!a){a=this.tpl.apply(b.data);this.bodyContent[b.id]=a}return a},onMouseDown:function(a,c){if(c.className=="x-grid3-row-expander"){a.stopEvent();var b=a.getTarget(".x-grid3-row");this.toggleRow(b)}},renderer:function(c,a){a.cellAttr='rowspan="2"';return'<div class="x-grid3-row-expander">&#160;</div>'},beforeExpand:function(b,c,a){if(this.fireEvent("beforeexpand",this,b,c,a)!==false){if(this.tpl&&this.lazyRender)c.innerHTML=this.getBodyContent(b,a);return true}else return false},toggleRow:function(a){soundManager.play("default");if(typeof a=="number")a=this.grid.view.getRow(a);this[Ext.fly(a).hasClass("x-grid3-row-collapsed")?"expandRow":"collapseRow"](a)},expandRow:function(a){if(typeof a=="number")a=this.grid.view.getRow(a);var b=this.grid.store.getAt(a.rowIndex),c=Ext.DomQuery.selectNode("tr:nth(2) div.x-grid3-row-body",a);if(this.beforeExpand(b,c,a.rowIndex)){this.state[b.id]=true;Ext.fly(a).replaceClass("x-grid3-row-collapsed","x-grid3-row-expanded");this.fireEvent("expand",this,b,c,a.rowIndex)}},collapseRow:function(a){if(typeof a=="number")a=this.grid.view.getRow(a);var b=this.grid.store.getAt(a.rowIndex),c=Ext.fly(a).child("tr:nth(1) div.x-grid3-row-body",true);if(this.fireEvent("beforcollapse",this,b,c,a.rowIndex)!==false){this.state[b.id]=false;Ext.fly(a).replaceClass("x-grid3-row-expanded","x-grid3-row-collapsed");this.fireEvent("collapse",this,b,c,a.rowIndex)}}});if(!b){var a=Ext.grid,f=new Ext.data.ArrayReader({},[{name:"service"},{name:"desc"}]),d=new a.RowExpander({tpl:new Ext.Template('<hr/><p style="line-height: 17px;padding-top: 0px;">{desc}</p>')}),c=new a.RowExpander({tpl:new Ext.Template('<hr/><p style="line-height: 17px;padding-top: 0px;">{desc}</p>')});b=e.createWindow({id:"hosting-win",title:resHosting,width:500,height:365,iconCls:"hosting",shim:false,animCollapse:true,constrainHeader:true,layout:"fit",border:false,items:[new Ext.TabPanel({activeTab:0,width:600,height:250,plain:true,defaults:{autoScroll:true},listeners:{beforetabchange:function(){if(HostingWindowInit)HostingWindowInit=false;else soundManager.play("default")}},items:[{title:resDescription,html:'<p class="hosting-description"><img src="images/s.gif" align="left" />'+resHosting_Description+'</p><p class="hosting-description">'+resContactSentence+"</p>"},new a.GridPanel({title:"Windows",iconCls:"win",cls:"x-panel-grid",enableHdMenu:false,store:new Ext.data.Store({reader:f,data:[["Windows Server 2003",resHosting_Win2k3],["ASP",resHosting_ASP],["ASP.NET",resHosting_ASPNET],["PHP",resHosting_PHP],["MySQL",resHosting_MySQL],["SQL Server",resHosting_SQLServer],["Webmail",resHosting_Webmail],["AntiSpam",resHosting_AntiSpam],[resCDOComponent,resHosting_CDO],[".NET Framework",resHosting_NET]]}),cm:new a.ColumnModel([d,{dataIndex:"service",header:resServices,sortable:false}]),viewConfig:{forceFit:true},plugins:d,collapsible:true}),new a.GridPanel({title:"Linux",iconCls:"tux",cls:"x-panel-grid",enableHdMenu:false,store:new Ext.data.Store({reader:f,data:[["Linux",resHosting_Linux],["ASP",resHosting_ASP],["PHP",resHosting_PHP],["MySQL",resHosting_MySQL],["SQL Server",resHosting_SQLServer],["Webmail",resHosting_Webmail],["AntiSpam",resHosting_AntiSpam]]}),cm:new a.ColumnModel([c,{dataIndex:"service",header:resServices,sortable:false}]),viewConfig:{forceFit:true},plugins:c,collapsible:true})]})]})}b.show()}});var contactForm;MyDesktop.ContactWindow=Ext.extend(Ext.app.Module,{id:"contact-win",init:function(){this.launcher={text:resContact,iconCls:"contact-sm",handler:this.createWindow,scope:this}},createWindow:function(){var b=this.app.getDesktop(),a=b.getWindow("contact-win");contactForm=new Ext.form.FormPanel({baseCls:"x-plain",url:"save-form.php",defaultType:"textfield",waitMsgTarget:true,labelWidth:75,title:'<table border="0" class="contactTitle"><tr><td><img src="images/s.gif" class="contact-phone" /></td><td>'+resContactTitle+'</td><td><img src="images/s.gif" class="contact-email" height="40" width="40" /></td></tr></table><hr/>',items:[{fieldLabel:resName,name:"Name",anchor:"-18",allowBlank:false,msgTarget:"side",blankText:resRequiredField},{fieldLabel:resCompany,name:"Company",anchor:"-18"},{fieldLabel:resPhone,name:"Phone",anchor:"-18"},{fieldLabel:resEmail,name:"email",vtype:"email",msgTarget:"side",anchor:"-18",vtypeText:resIncorrectEmail,allowBlank:false,blankText:resRequiredField},{hideLabel:true,name:"Body",xtype:"textarea",allowBlank:false,anchor:"-18 -104",msgTarget:"side",blankText:resRequiredField}]});if(!a)a=b.createWindow({id:"contact-win",title:resContact,width:500,height:350,minWidth:300,minHeight:250,iconCls:"contact",shim:false,animCollapse:true,constrainHeader:true,layout:"fit",border:false,plain:true,bodyStyle:"padding:5px;",buttonAlign:"center",layoutConfig:{animate:true},items:contactForm,buttons:[{text:resSend,handler:function(){if(contactForm.getForm().isValid()){Ext.MessageBox.show({msg:resSendingMail,progressText:resPleaseWait,width:300,wait:true,waitConfig:{interval:200},icon:"ext-mb-sendMail"});soundManager.play("default");contactForm.getForm().submit({url:"Contact.ashx",success:function(){soundManager.play("process");Ext.MessageBox.hide();Ext.MessageBox.show({title:resTitle,msg:resMailSended,width:300,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.INFO,fn:function(){a.close()}})},failure:function(){soundManager.play("error");Ext.MessageBox.hide();Ext.MessageBox.show({title:resTitle,msg:resMailNotSended,width:300,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.ERROR})}})}else soundManager.play("error")}},{text:resReset,handler:function(){soundManager.play("default");contactForm.getForm().reset()}}]});a.show()}});var mainPanel;MyDesktop.FeedWindow=Ext.extend(Ext.app.Module,{id:"feed-win",init:function(){this.launcher={text:resFeed,iconCls:"feed-sm",handler:this.createWindow,scope:this}},createWindow:function(){var b=this.app.getDesktop(),a=b.getWindow("feed-win");mainPanel=new MainPanel;if(!a){a=b.createWindow({id:"feed-win",title:resFeed,width:"90%",height:500,iconCls:"feed",shim:false,animCollapse:true,constrainHeader:true,layout:"fit",border:false,items:[mainPanel],layoutConfig:{animate:true}});mainPanel.loadFeed({text:"Programando a medianoche"})}a.show()}});MyDesktop.GlossaryTerms=function(a){var a=a||{};Ext.applyIf(a,{reader:new Ext.data.XmlReader({record:"Term",id:"Name",totalRecords:"@total"},["Name","Description"])});MyDesktop.GlossaryTerms.superclass.constructor.call(this,a)};Ext.extend(MyDesktop.GlossaryTerms,Ext.data.Store);MyDesktop.GlossaryGrid=Ext.extend(Ext.grid.GridPanel,{initComponent:function(){Ext.apply(this,{columns:[{header:resTerm,dataIndex:"Name",sortable:true}],enableHdMenu:false,sm:new Ext.grid.RowSelectionModel({singleSelect:true}),store:new MyDesktop.GlossaryTerms({storeId:"gridGlossaryTerms",url:desktopLang+"/Glossary.xml"}),viewConfig:{forceFit:true}});MyDesktop.GlossaryGrid.superclass.initComponent.call(this)}});Ext.reg("GlossaryGrid",MyDesktop.GlossaryGrid);MyDesktop.GlossaryDetail=Ext.extend(Ext.Panel,{tplMarkup:["<b>"+resTerm+":</b> {Name}<br/>","<b>"+resDescription+":</b> {Description}"],startingMarkup:resSelectTerm,initComponent:function(){this.tpl=new Ext.Template(this.tplMarkup);Ext.apply(this,{bodyStyle:{background:"#ffffff",padding:"7px"},html:this.startingMarkup});MyDesktop.GlossaryDetail.superclass.initComponent.call(this)},updateDetail:function(a){this.tpl.overwrite(this.body,a)}});Ext.reg("GlossaryDetail",MyDesktop.GlossaryDetail);MyDesktop.GlossaryWindow=Ext.extend(Ext.app.Module,{id:"glossary-win",init:function(){this.launcher={text:resGlossary,iconCls:"glossary-sm",handler:this.createWindow,scope:this}},createWindow:function(){var b=this.app.getDesktop(),a=b.getWindow("glossary-win");if(!a){glossaryFirst=true;a=b.createWindow({id:"glossary-win",title:resGlossary,width:500,height:400,iconCls:"glossary",shim:false,layout:"border",border:false,layoutConfig:{animate:true},items:[{xtype:"GlossaryGrid",itemId:"gridPanel",region:"north",height:210,split:true},{xtype:"GlossaryDetail",itemId:"detailPanel",region:"center",cls:"sliding",autoScroll:true}]})}a.show();var c=a.getComponent("gridPanel").getSelectionModel();c.on("rowselect",this.onRowSelect,this);Ext.StoreMgr.get("gridGlossaryTerms").load()},onRowSelect:function(d,c,b){soundManager.play("slide");var a=this.app.getDesktop().getWindow("glossary-win").getComponent("detailPanel");a.updateDetail(b.data);a.body.slideIn("t",{stopFx:true,duration:.2})}});var clientsWin;MyDesktop.ClientsWindow=Ext.extend(Ext.app.Module,{id:"clients-win",init:function(){this.launcher={text:resClients,handler:this.createWindow,scope:this}},createWindow:function(){var b=this.app.getDesktop(),a=b.getWindow("clients-win");if(!a)a=b.createWindow({id:"clients-win",title:resClients,width:530,height:400,background:"#ffffff",html:'<p align="center" class="imagesBorder"><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/AFClassic.gif" title="AFClassic"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/BairesWeb.gif" title="BairesWeb"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/Banelco.gif" title="Banelco"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/Bimbo.gif" title="Bimbo de Argentina"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/BPScouts.gif" title="Baden Powell Scouts Argentina"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/CajVal.gif" title="Caja de Valores"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/CDA.gif" title="CDA"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/ClaudioG.gif" title="Claudio Guiragossian"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/Conpaini.gif" title="Conpaini"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/DGB.gif"  title="Dobniewski & Garc\ufffda Berros Abogados"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/ECPS.gif"  title="Gesti\ufffdn Inform\ufffdtica ECPS"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/ESR.gif" title="ESR & Asociados"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/ExCle.gif"  title="Ex-Cl&eacute; Soluciones Biom&eacute;tricas"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/Fiat.gif" title="Fiat Argentina"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/GeoExplora.gif" title="GeoExplora"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/ImagenGrafica.gif" title="Imagen Gr\ufffdfica"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/KraftFoods.gif" title="Kraft Foods"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/PagoMisCuentas.gif" title="Pago mis cuentas"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/PaseosImaginarios.gif" title="Paseos imaginarios"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/PoscastVision.gif" title="Podcast Vision"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/SPC.gif" title="Sanatorio Privado del Centro"/><img height="82" width="230" vspace="2" hspace="2" src="images/clients/site/TripleD.gif" title="DDD S.A."/></p>',iconCls:"clients",shim:false,border:false,autoScroll:true,layoutConfig:{animate:true}});a.show()}});MyDesktop.TutorialsWindow=Ext.extend(Ext.app.Module,{id:"tut-win",init:function(){this.launcher={text:resTutorials,iconCls:"tut-sm",handler:this.createWindow,scope:this,windowId:windowIndex,menu:{cls:"whiteBack",items:[{text:resCreateEmailAccount,iconCls:"tut-newaccount-sm",handler:tutNewAccountWindow.createWindow,scope:this,windowId:windowIndex++},{text:"Filezilla",iconCls:"tut-filezilla-sm",handler:tutFilezillaWindow.createWindow,scope:this,windowId:windowIndex++},{text:"Outlook",iconCls:"tut-outlook-sm",handler:tutOutlookWindow.createWindow,scope:this,windowId:windowIndex++},{text:"Outlook Express",iconCls:"tut-outlookexp-sm",handler:tutOutExpWindow.createWindow,scope:this,windowId:windowIndex++},{text:"Thunderbird",iconCls:"tut-thunderbird-sm",handler:tutThunderWindow.createWindow,scope:this,windowId:windowIndex++}]}}},createWindow:function(){var c=this.app.getDesktop(),a=c.getWindow("tut-win");if(!a)a=c.createWindow({id:"tut-win",title:resTutorials,width:400,height:120,iconCls:"tut",shim:false,animCollapse:true,constrainHeader:true,layout:"fit",border:false,layoutConfig:{animate:true},items:[{region:"center",autoScroll:true,html:'<div id="tut-shortcuts"><div class="tutorial tut-newaccount-win" id="tutNewAccount-shortcut"><a onfocus="this.blur();" href="#"><img src="images/s.gif"/><br/>'+resCreateEmailAccount+'</a></div><div class="tutorial tut-filezilla-win" id="tutFilezilla-shortcut"><a onfocus="this.blur();" href="#"><img src="images/s.gif"/><br/>FileZilla</a></div><div class="tutorial tut-outlook-win" id="tutOutlook-shortcut"><a onfocus="this.blur();" href="#"><img src="images/s.gif"/><br/>Outlook</a></div><div class="tutorial tut-outexp-win" id="tutOutExp-shortcut"><a onfocus="this.blur();" href="#"><img src="images/s.gif"/><br/>Outlook Express</a></div><div class="tutorial tut-thunder-win" id="tutThunder-shortcut"><a onfocus="this.blur();" href="#"><img src="images/s.gif"/><br/>Thunderbird</a></div></div>'}]});a.show();var b=Ext.get("tut-shortcuts");b.on("click",function(c,d){if(d=c.getTarget("div",b)){c.stopEvent();var a=eval(d.id.replace("-shortcut","")+"Window");a&&a.createWindow()}})}});MyDesktop.TutNewAccountWindow=Ext.extend(Ext.app.Module,{id:"tut-newaccount",init:function(){this.launcher={handler:this.createWindow}},createWindow:function(){var b=desktopApp.getDesktop(),a=b.getWindow("tut-newaccount-win");if(!a)a=b.createWindow({id:"tut-newaccount-win",title:resTutorial+": "+resCreateEmailAccount,width:750,height:500,iconCls:"tut-newaccount",border:false,layoutConfig:{animate:true},html:'<iframe frameborder="0" width="100%" height="100%" src="'+desktopLang+'/Tutorial/NewAccount.html"></iframe>'});a.show()}});MyDesktop.TutOutlookWindow=Ext.extend(Ext.app.Module,{id:"tut-outlook",init:function(){this.launcher={handler:this.createWindow}},createWindow:function(){var b=desktopApp.getDesktop(),a=b.getWindow("tut-outlook-win");if(!a)a=b.createWindow({id:"tut-outlook-win",title:resTutorial+": Outlook",width:700,height:500,iconCls:"tut-outlook",border:false,layoutConfig:{animate:true},html:'<iframe frameborder="0" width="100%" height="100%" src="'+desktopLang+'/Tutorial/Outlook.html"></iframe>'});a.show()}});MyDesktop.TutOutExpWindow=Ext.extend(Ext.app.Module,{id:"tut-outexp",init:function(){this.launcher={handler:this.createWindow}},createWindow:function(){var b=desktopApp.getDesktop(),a=b.getWindow("tut-outexp-win");if(!a)a=b.createWindow({id:"tut-outexp-win",title:resTutorial+": Outlook Express",width:730,height:500,iconCls:"tut-outlookexp",border:false,layoutConfig:{animate:true},html:'<iframe frameborder="0" width="100%" height="100%" src="'+desktopLang+'/Tutorial/OutlookExpress.html"></iframe>'});a.show()}});MyDesktop.TutFilezillaWindow=Ext.extend(Ext.app.Module,{id:"tut-filezilla",init:function(){this.launcher={handler:this.createWindow}},createWindow:function(){var b=desktopApp.getDesktop(),a=b.getWindow("tut-filezilla-win");if(!a)a=b.createWindow({id:"tut-filezilla-win",title:resTutorial+": Filezilla",width:700,height:500,iconCls:"tut-filezilla",border:false,layoutConfig:{animate:true},html:'<iframe frameborder="0" width="100%" height="100%" src="'+desktopLang+'/Tutorial/Filezilla.html"></iframe>'});a.show()}});MyDesktop.TutThunderWindow=Ext.extend(Ext.app.Module,{id:"tut-thunder",init:function(){this.launcher={handler:this.createWindow}},createWindow:function(){var b=desktopApp.getDesktop(),a=b.getWindow("tut-thunder-win");if(!a)a=b.createWindow({id:"tut-thunder-win",title:resTutorial+": Thunderbird",width:670,height:500,iconCls:"tut-thunderbird",border:false,layoutConfig:{animate:true},html:'<iframe frameborder="0" width="100%" height="100%" src="'+desktopLang+'/Tutorial/Thunderbird.html"></iframe>'});a.show()}});var coursesWin;MyDesktop.CoursesWindow=Ext.extend(Ext.app.Module,{id:"courses-win",init:function(){this.launcher={text:resCourses,iconCls:"courses-sm",handler:this.createWindow,scope:this}},createWindow:function(){if(!coursesWin||!coursesWin.view.store){coursesWin=new CourseChooser({url:desktopLang+"/Courses.txt",width:650,height:530});coursesWin.show(this.app.getDesktop())}else coursesWin.win.show()}});var CourseChooser=function(a){this.config=a},CourseChooserFirst=false;CourseChooser.prototype={lookup:{},show:function(c){if(!this.win){this.initTemplates();this.store=new Ext.data.JsonStore({url:this.config.url,root:"courses",fields:["id","name","pdf","xps","xpsSize","pdfSize","duration","note","prerequisite","details"],listeners:{load:{fn:function(){this.view.select(0)},scope:this,single:true}}});this.store.load();CourseChooserFirst=true;var b=function(a){a.shortName=a.name.ellipse(14);this.lookup[a.name]=a;return a};this.view=new Ext.DataView({tpl:this.thumbTemplate,singleSelect:true,overClass:"x-view-over",itemSelector:"div.thumb-wrap",emptyText:'<div style="padding:10px;">'+resNoCoursesFound+"</div>",store:this.store,listeners:{selectionchange:{fn:this.showDetails,scope:this,buffer:100},dblclick:{fn:this.doCallback,scope:this},loadexception:{fn:this.onLoadException,scope:this},beforeselect:{fn:function(a){return a.store.getRange().length>0}}},prepareData:b.createDelegate(this)});var a={title:resCourses,id:"course-chooser-dlg",layout:"border",width:650,height:530,minWidth:650,minHeight:300,border:false,items:[{region:"north",html:'<div class="coursesHeader"><table width="88%" border="0"><tr><td>'+resCoursesHeader+"</td></tr></table></div>",height:100,autoScroll:true},{id:"course-chooser-view",region:"west",autoScroll:true,items:this.view,width:290},{id:"course-detail-panel",region:"center",cls:"sliding",autoScroll:true}],iconCls:"courses"};Ext.apply(a,this.config);this.win=c.createWindow(a)}this.win.show()},initTemplates:function(){this.thumbTemplate=new Ext.XTemplate('<tpl for=".">','<div class="thumb-wrap" id="{name}">','<div class="thumb"><img src="Images/Courses/{id}.png" title="{name}"></div>',"<span>{name}</span></div>","</tpl>");this.thumbTemplate.compile();this.detailsTemplate=new Ext.XTemplate('<div class="details">','<table border="0"><tr><td><img src="Images/Courses/{id}.gif" title="{name}"></td>','<td class="courseTitle">{name}</td></tr></table>','<div class="details-info">',"<b>"+resCourseDuration+":</b>",'<span><ul class="courseList"><tpl for="duration"><li>{.}</li></tpl></ul></span>','<tpl if="prerequisite">',"<b>"+resPrerequisites+":</b>",'<span><ul class="courseList"><tpl for="prerequisite">',"<li>{.}</li>","</tpl></ul></span>","</tpl>",'<tpl if="note">',"<b>"+resNote+":</b>","<span>{note}</span>","</tpl>","<b>"+resDownloadTopics+":</b>",'<table align="center"><tr><td align="center">','<a href="Download.ashx?id={pdf}" target="_blank" onfocus="this.blur();"><img src="images/s.gif" class="iconPDF" /></a>','</td><td align="center">','<a href="Download.ashx?id={xps}" target="_blank" onfocus="this.blur();"><img src="images/s.gif" class="iconXPS" /></a>','</td></tr><tr><td align="center">','<a href="Download.ashx?id={pdf}" target="_blank" onfocus="this.blur();" class="fileDescription">Adobe Acrobat (PDF)<br/>({pdfSize})</a>','</td><td align="center">','<a href="Download.ashx?id={xps}" target="_blank" onfocus="this.blur();" class="fileDescription">XML Paper Specification (XPS)<br/>({xpsSize})</a>',"</td></tr></table>","<b>"+resCourseTopics+":</b>",'<span><ul class="courseList"><tpl for="details">',"<li>{item}</li>",'<tpl if="detail">','<ul class="courseList"><tpl for="detail">',"<li>{.}</li>","</tpl></ul>","</tpl>","</tpl></ul></span>","</div>","</div>");this.detailsTemplate.compile()},showDetails:function(){if(CourseChooserFirst)CourseChooserFirst=false;else soundManager.play("slide");var a=this.view.getSelectedNodes(),b=Ext.getCmp("course-detail-panel").body;if(a&&a.length>0){a=a[0];var c=this.lookup[a.id];b.hide();this.detailsTemplate.overwrite(b,c);b.slideIn("l",{stopFx:true,duration:.2})}else b.update("")},onLoadException:function(){this.view.getEl().update('<div style="padding:10px;">Error loading images.</div>')}};String.prototype.ellipse=function(a){return this.length>a?this.substr(0,a-2)+"...":this};MyDesktop.DownloadsWindow=Ext.extend(Ext.app.Module,{id:"down-win",init:function(){this.launcher={text:resDownloads,iconCls:"down-sm",handler:this.createWindow,scope:this,windowId:windowIndex,menu:{cls:"whiteBack",items:[{text:"Scientia&reg; Resource Translator (606 KB)",iconCls:"down-srt-sm",handler:function(){window.open("download.ashx?id=1")},scope:this,windowId:windowIndex++}]}}},createWindow:function(){var b=this.app.getDesktop(),a=b.getWindow("down-win");if(!a)a=b.createWindow({id:"down-win",title:resDownloads,width:200,height:150,iconCls:"down",shim:false,animCollapse:true,constrainHeader:true,layout:"fit",border:false,layoutConfig:{animate:true},items:[{region:"center",autoScroll:true,html:'<div id="down-shortcuts"><div class="downloads down-srt-win" id="SRT-shortcut"><a onfocus="this.blur();" href="download.ashx?id=1"><img src="images/s.gif"/><br/>Scientia&reg; Resource Translator (606 KB)</a></div></div>'}]});a.show()}});function welcome(){if(typeof startUpWindow!="undefined")showWindow(startUpWindow);else if(document.cookie.indexOf("welcomeWin")==-1){document.cookie="welcomeWin=1; path=/;";var a=desktopApp.getDesktop().createWindow({id:"welcome-win",title:"Bienvenido - Welcome - Bem-vindo",width:600,height:400,iconCls:"scientia",shim:false,border:false,layoutConfig:{animate:true},html:'<iframe frameborder="0" width="100%" height="100%" src="Welcome.html"></iframe>'});a.show()}}