var siteTransform = new Array();
siteTransform['sa_corp_nwa'] = new Array();
siteTransform['sa_corp_nwa']['https://stage.siemens.com'] = 'https://stage.siemens.com/sa/corp';
siteTransform['sa_corp_nwa']['http://www.siemens.com.sa']  = 'http://www.siemens.com.sa';

// This file is auto generated. Do not edit.
// See cms/apps/SiteExplorer for further information
var currentSite = window.location.protocol+'//'+window.location.host;

var sitetree = Class.create();
sitetree.prototype = {
    initialize: function()
    {
        SiteExplorer.getContent = function() {
            return '<ul>'
                       
                    +'<li class="collapsed">'
                    +'  <a class="collapsed" href="javascript:void(0);">Products, Solutions &amp; Services'
                    +'  </a>'
                    +'  <ul>'
                    +'      <li>'
                        
                    +'          <a class="page" rel="815" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/products/index.htm">Overview</a>'
                            
                    +'      </li>'
                            
                    +'<li class="collapsed">'
                    +'  <a class="collapsed" href="javascript:void(0);">Energy'
                    +'  </a>'
                    +'  <ul>'
                    +'      <li>'
                        
                    +'          <a class="page" rel="829" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/products/energy.htm">Overview</a>'
                            
                    +'      </li>'
                            
                    +'<li>'
                    +'  <a class="page" rel="832" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/products/energy/fossil_power_generation.htm">Fossil Power Generation'
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="833" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/products/energy/oil_and_gas.htm">Oil and Gas'
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="835" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/products/energy/newfilename.htm">Power Transmission'
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="834" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/products/energy/renewable_energy.htm">Renewable Energy'
                    +'  </a>'
                    +'</li>'
                
                    +'  </ul>'
                    +'</li>'
                
                    +'<li class="collapsed">'
                    +'  <a class="collapsed" href="javascript:void(0);">Industry'
                    +'  </a>'
                    +'  <ul>'
                    +'      <li>'
                        
                    +'          <a class="page" rel="828" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/products/industry.htm">Overview</a>'
                            
                    +'      </li>'
                            
                    +'<li>'
                    +'  <a class="page" rel="837" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/products/industry/drive_technologies.htm">Drive Technologies'
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="836" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/products/industry/industry_automation.htm">Industry Automation'
                    +'  </a>'
                    +'</li>'
                
                    +'  </ul>'
                    +'</li>'
                
                    +'<li class="collapsed">'
                    +'  <a class="collapsed" href="javascript:void(0);">Healthcare'
                    +'  </a>'
                    +'  <ul>'
                    +'      <li>'
                        
                    +'          <a class="page" rel="827" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/products/healthcare.htm">Overview</a>'
                            
                    +'      </li>'
                            
                    +'<li>'
                    +'  <a class="page" rel="838" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/products/healthcare/diagnostics.htm">Diagnostics'
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="839" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/products/healthcare/imaging_it.htm">Imaging &amp; IT'
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="840" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/products/healthcare/workflow_solution.htm">Workflow &amp; Solution'
                    +'  </a>'
                    +'</li>'
                
                    +'  </ul>'
                    +'</li>'
                
                    +'  </ul>'
                    +'</li>'
                
                    +'<li class="collapsed">'
                    +'  <a class="collapsed" href="javascript:void(0);">News &amp; Events'
                    +'  </a>'
                    +'  <ul>'
                    +'      <li>'
                        
                    +'          <a class="page" rel="816" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/news/index.htm">Overview</a>'
                            
                    +'      </li>'
                            
                    +'<li class="collapsed">'
                    +'  <a class="collapsed" href="javascript:void(0);">Press'
                    +'  </a>'
                    +'  <ul>'
                    +'      <li>'
                        
                    +'          <a class="page" rel="842" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/news/press.php">Overview</a>'
                            
                    +'      </li>'
                            
                    +'<li>'
                    +'  <a class="page" rel="864" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/news/press/index/siemenssec.htm">Siemens completes EUR155 million project for Saudi Electricity'
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="861" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/news/press/index/1stkaustcareerday.htm">1st KAUST Career Day with outstanding Siemens participation'
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="857" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/news/press/safetyawarenessworkshops.htm">Siemens Sponsors Customer-oriented Safety Awareness Workshops'
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="856" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/news/press/discovery_box_initiative.htm">Discovery Box initiative'
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="854" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/news/press/research_university_collaboration.htm">Siemens collaborates with international research university in Saudi Arabia'
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="852" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/news/press/mobile_water_treatment.htm">Siemens Establishes Mobile Water Treatment Services in Middle East'
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="851" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/news/press/loescher_visit.htm">Peter Loescher visit to the Kingdom '
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="850" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/news/press/water_and_power_forum.htm">Saudi Water and Power Forum 2008'
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="849" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/news/press/somatom_definition_flash.htm">SOMATOM Definition Flash'
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="848" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/news/press/saudi_health_authorities.htm">Siemens and the Saudi Health Authorities moves health care to a higher level '
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="847" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/news/press/management_trainee_program.htm">Commercial Management Trainee Program'
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="846" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/news/press/king_fahad_university.htm">Career Fair Day at King Fahad University'
                    +'  </a>'
                    +'</li>'
                
                    +'<li class="collapsed">'
                    +'  <a class="collapsed" href="javascript:void(0);">Trainee Program'
                    +'  </a>'
                    +'  <ul>'
                    +'      <li>'
                        
                    +'          <a class="page" rel="844" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/news/press/trainee_program.htm">Overview</a>'
                            
                    +'      </li>'
                            
                    +'<li>'
                    +'  <a class="page" rel="845" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/news/press/080322_trainee_program_photogallery.htm">Photo Gallery'
                    +'  </a>'
                    +'</li>'
                
                    +'  </ul>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="843" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/news/press/resolution.htm">Siemens AG reaches a resolution with German and U.S. authorities '
                    +'  </a>'
                    +'</li>'
                
                    +'  </ul>'
                    +'</li>'
                
                    +'  </ul>'
                    +'</li>'
                
                    +'<li class="collapsed">'
                    +'  <a class="collapsed" href="javascript:void(0);">Corporate Responsibility'
                    +'  </a>'
                    +'  <ul>'
                    +'      <li>'
                        
                    +'          <a class="page" rel="817" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/corporate_responsibility/index.htm">Overview</a>'
                            
                    +'      </li>'
                            
                    +'<li>'
                    +'  <a class="page" rel="826" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/corporate_responsibility/generation_21.htm">Generation 21'
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="825" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/corporate_responsibility/caring_hands.htm">Caring Hands'
                    +'  </a>'
                    +'</li>'
                
                    +'  </ul>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="818" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/working_at_siemens/index.htm">Working at Siemens'
                    +'  </a>'
                    +'</li>'
                
                    +'<li class="collapsed">'
                    +'  <a class="collapsed" href="javascript:void(0);">About Us'
                    +'  </a>'
                    +'  <ul>'
                    +'      <li>'
                        
                    +'          <a class="page" rel="819" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/about/index.htm">Overview</a>'
                            
                    +'      </li>'
                            
                    +'<li>'
                    +'  <a class="page" rel="830" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/about/values_vision.htm">Siemens Values and Vision'
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="823" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/about/statement.htm">CEO &amp; Management statement'
                    +'  </a>'
                    +'</li>'
                
                    +'<li>'
                    +'  <a class="page" rel="824" href="'+siteTransform['sa_corp_nwa'][currentSite]+'/en/about/offices.htm">Our offices'
                    +'  </a>'
                    +'</li>'
                
                    +'  </ul>'
                    +'</li>'
                
                     +'</ul>';
        }
    }
}

SiteExplorer.expandSubtree = function(linkNode) {
    linkNode.addClassName("expanded");
    linkNode.up().removeClassName("collapsed");
    linkNode.up().addClassName("expanded");
    SiteExplorer.layer.afterOpen();
}

SiteExplorer.collapseSubtree = function(linkNode) {
    linkNode.removeClassName("expanded");
    linkNode.up().addClassName("collapsed");
    linkNode.up().removeClassName("expanded");
    SiteExplorer.layer.afterOpen();
}

SiteExplorer.followLink = function(linkNode) {
    if (linkNode.innerHTML != "Home") {
        //alert("clicked link: " + linkNode.innerHTML + "\nThe Site Explorer will be closed.");
        Layer.closeCurrent();
    }
}

SiteExplorer.openTree = function(page_key) {
    $$('#site-explorer-layer a[rel="'+page_key+'"]').each(function(a) {
        l = a.up();
        l.addClassName("active").update('<span class="active">'+a.innerHTML+'</span>');

        while (l.tagName != 'DIV')
        {
            l = l.up();
            if(l.tagName == 'LI')
            {
                l.removeClassName("collapsed");
                l.addClassName("expanded");
                l.firstDescendant().removeClassName("collapsed");
                l.firstDescendant().addClassName("expanded");
            }
        }

    });
}
/* 
 * explicitly overwrite SiteExplorerLayer.getContent from script.js to call 
 * SiteExplorer.openTree(siteExplorerActivePage);
 * avoids modifying script.js
*/


/* START: site explorer layer                                       */
var SiteExplorerLayer = Class.create();

SiteExplorerLayer.prototype = Object.extend(new Layer, {

    initialize: function(node, trigger) {
        this.initSuper(node, trigger);

        var closeButton = Helper.getCloseButton(this.node);

        closeButton.observe("click",
            function() {
                this.close();
            }.bindAsEventListener(this)
        );

        this.content     = null;
        this.contentNode = $(document.createElement("div"));
        this.node.appendChild(this.contentNode);
    },

    afterClose: function(newLayer) {
        if (!Layer.toggle) {
            HeaderAnimation.augment();
        }
    },

    afterOpen: function() {
        if (Info.browser.isIE) { // correct float bug in all IE versions
            Helper.getCloseButton(this.node).setStyle(
                {
                    position: "absolute",
                    left: (this.contentNode.getDimensions().width - 20) + "px"
                }
            );
        }
        HeaderAnimation.diminish();
    },

    beforeClose: function() {
        HeaderAnimation.unregisterLayer();
        return true;
    },

    beforeOpen: function() {
        this.getContent();
        HeaderAnimation.registerLayer(this);
        return true;
    },

    hide: function() {
        $("site-explorer").removeClassName("active");
    },

    show: function() {
        $("site-explorer").addClassName("active");
        this.trigger.addClassName("clicked"); // avoids hover effect (only for the first time)
        this.trigger.observe("mouseout",
            function(e) {
                this.trigger.removeClassName("clicked");
                this.trigger.stopObserving("mouseout");
            }.bindAsEventListener(this)
        );
    },
    getContent: function() {
        if (!this.content) {
            this.content = SiteExplorer.getContent();
            this.contentNode.innerHTML = this.content;
            SiteExplorer.registerEvents(this.contentNode);
            SiteExplorer.openTree(siteExplorerActivePage);
        }
    }

});

/* END: site explorer layer                                         */

var siteExplorerActivePage = 0;
Event.onDOMReady(function()
{
    var metaNames = $A(document.getElementsByTagName('meta'));
    metaNames.each(function(metaitem) {
        if(metaitem.name == 'DC.Identifier') {
            var content = metaitem.content;
            var i = content.lastIndexOf('/');
            siteExplorerActivePage = parseInt(content.substring(i+1),10);
        }
    });
    $('site-explorer').setStyle({display: 'block'});
    new sitetree();
});
    
