/*  Web App Guru Desktop Loader  */

function gdtWagLoader() {}

gdtWagLoader.prototype = {
    initialize: function(desktop) {
        this.desktop = desktop;
        //place any other initialization calls below        
    },
    moduleList: function() {
        //return array of module ids for modules loaded in this application
        //e.g. return new array(gFeed.MODULE_ID);
        return new Array();
    },
    load: function() {
        //load menuodules in desired order to desktop        
        // e.g. this.desktop.feedBin  = new gFeedMgr(this.desktop);
        this.desktop.menu.addItems( 
	        [ 	 
                { text: "Home", onClick: { fn: this.loadHome, scope: this }},
                { text: "Services", onClick: { fn: this.loadServices, scope: this }}, 
                { text: "Support", onClick: { fn: this.loadSupport, scope: this }}, 
                { text: "About Us", onClick: { fn: this.loadAbout, scope: this }}, 
                { text: "Contact", onClick: { fn: this.loadContact, scope: this }}, 
	        ] );
      
    },
    finalize: function() {
        //load home page
        this.loadHome();
        // load sidebars
        this.loadLeftSidebar();
    },
    loadLeftSidebar: function() {
        
        var el = document.getElementById(this.desktop.view.leftSidebarId);
        el.innerHTML = '<p>Minneapolis,<br>Minnesota<br><br>612.827.5143</p><p><a href="http://www.drupal.org" target="other"><img src="img/drupal.png" border="0"></a></p><p><a href="http://www.mozilla.org" target="other"><img src="img/firefox.jpg" border="0"></a></p><p><a href="http://script.aculo.us" target="other"><img src="img/scriptaculous_logo.png" border="0"></a></p>';    
    },
    reloadWorkspace: function(newPage) {
        if(this.desktop.workspace.innerHTML != newPage) {            
            this.desktop.workspace.style.visibility = "hidden";
            this.desktop.workspace.innerHTML = newPage;
            this.desktop.workspace.style.opacity = 0;
            this.desktop.workspace.style.visibility = "visible";
            new Effect.Opacity(this.desktop.workspace, {duration:1, from:0, to:1.0});
                
        }        
    },
    loadHome: function() {
        var html = "<h2>Why Web Applications?</h2><p>Settling for an \"online brochure\" style site on the web today can negatively impact public perception of your organization. Web applications can turn your under-utilized web site into an <b>effective communications hub</b> for employees and customers alike,    providing user interaction and information sharing capabilities that were unimaginable just a few years ago.</p><h2>Reliable</h2>Historically, the average lifetime for software procurement is 2 1/2 years, with maintenance fees  accounting for roughly 80% of overall software costs. <b>You should expect better,</b> and we offer our track record as proof. Our experienced developers build systems right the first time, with architectures that can adapt easily to your ever-changing needs without costly redesign. Many of our systems have been in production for over a decade, with minimal maintenance required.</p><h2>Affordable</h2><p>By drawing from an expansive, modular code base and incorporating free code libraries into our solutions, Web App Gurus create innovative solutions at <b>a fraction of the cost </b>of other providers. Leveraging code reusability stands at the core of our business philosophy. By reusing time-tested code we are able to quickly deliver robust, flexible solutions that are customized to your needs. </p><h2>Ease of Maintenance</h2><p>Creating new, timely, accurate and interesting content that keeps visitors coming back is the single, largest challenge facing web site owners today. Web App Gurus believes that content creation should be in the hands of subject matter experts, not delegated to overworked, overpriced geeks. Many of the tools available to the layperson result in cookie-cutter sites that fail to stand apart from the crowd.  We create tools for content management that are both powerful and intuitive, giving you the power to <b>take control of your web presence</b>.</p>";
        this.reloadWorkspace(html);
    },
    loadServices: function() {
        this.reloadWorkspace('<h2>Web Application Programming</h2><p>As our name suggests, Web App Gurus specializes in creating customized web applications. Using AJAX (Asynchronous JavaScript and XML) techniques, we pride ourselves on the ability to create dynamic, cross-platform, cross-browser web applications that behave much like their desktop counterparts.</p><h2>Web Application Hosting</h2><p>In an effort to support the Twin Cities\' local music scene, we host Giggle, a free web service for musicians. Giggle offers listings of clubs and performance venues, radio stations, publications and more. Giggle members are provided with tools for creating, updating and publishing event calendars, maintain email lists to keep in touch with their fans, manage industry contacts, and a forum to share their knowledge and experiences with fellow musicians.<h2>Windows Applications</h2><p>We have been programming for the Windows desktop for over a decade. Considering the proportion of organizations that are invested in Microsoft products, we are frequently called upon to leverage that investment in our solutions.</p><h2>Database Programming</h2><p>We provide database design and  optimization services. With extensive experience in SQL Server, Access, postgresql and MySQL, we can also help with your database reporting, query authoring and stored procedure needs. Additionally, we specialize in creating data brokerage services, allowing any variety of applications to consume data easily and efficiently.</p><h2>CMS Administration</h2><p>Content Management Systems (CMS) can be a great option for those seeking advanced web site features for a low cost. We highly recommend <a href="http://www.drupal.org" target="other">drupal</a>. It has a rich feature set, is easy to configure and administer, and given its\' modular nature can be extended to meet your needs. Best of all, it is <b>free</b>, and we can setup your drupal site in a matter of minutes.</p>');
    },
    loadSupport: function() {
        this.reloadWorkspace('<h2>For immediate support contact John:</h2><p>Phone: 612.827.5143</p><p>Mobile: 612.695.6553</p><p><a href="mailto:jmason@mm.com">Email</a></p><h2>Coming in April...</h2><p>We are excited to announce the release of our new online bug reporting system, which will give our customers the ability to report bugs online. Our development team will be notified immediately and bug reports will be automatically placed into our work queue. We are confident that this will result in speedier bug fixes and shorten  response times. </p><p><b>Existing Customers:</b><br>You will receive an email that describes the new bug reporting service and provides instructions for its\' use by the end of the March. We welcome any questions and comments you may have as you begin to use the service, and thank you for your business.</p>');
    },
    loadAbout: function() {
        this.reloadWorkspace('<h2>John Mason: Lead Programmer</h2><h2>Bio</h2><p>Originally an accountant, John began programming in an attempt to shore up weaknesses in the mid-level financial and accounting packages of the 80\'s and early 90\'s. <div style="{float: right;margin:2em;}"><img src="img/HappyJohn.jpg"></div>He soon discovered that dramatic performance increases could be realized by customizing software to mirror existing processes. Eager to demonstrate this to a wider audience, John was swept up by the dot-com boom of the 90\'s, creating business management software for <b>Epani, On-Tee.com and Wizzen</b>. Since 2001 John has served as an independent developer and consultant to <b>Dain Rauscher, NRG Energy, Biffs, MnBlue.com and Tonka Equipment</b>, among others.</p><p> Seeing poor return on investment as the Achilles heel of the dot-com era and able to draw on his experience as an accountant, John has dedicated himself to providing solutions that make good business sense. His toolbox includes <b>JavaScript, PHP, Visual Basic, C and Python </b>and he is a proponent of using <b>Linux in the workplace</b>. John also has bachelor degrees in philosophy and english, is a semi-professional musician, and has recently been experimenting with temperature control applications on embedded micro-computers for use in energy saving appliances and home automation.</p>');
    },
    loadContact: function() {
        this.reloadWorkspace('<div style="{text-align: center}"><h2>Contact:</h2><p>John Mason</p><p>Phone: 612.827.5143</p><p>Mobile: 612.695.6553</p><p><a href="mailto:jmason@mm.com">Email</a></p></div>');
    }    
}

 