var siteTransform = new Array();
siteTransform['uk_corp_careers_oe3'] = new Array();
siteTransform['uk_corp_careers_oe3']['edit.siemens.local'] = 'edit.siemens.local/uk/corp_careers_oe3/root';   //Server: local
siteTransform['uk_corp_careers_oe3']['edit.siemens.com'] = 'edit.siemens.com/uk/corp_careers_oe3/root';   //Server: edit
siteTransform['uk_corp_careers_oe3']['stage.siemens.com'] = 'stage.siemens.com/uk/corp_careers_oe3';   //Server: stage
siteTransform['uk_corp_careers_oe3']['www.siemens.co.uk'] = 'www.siemens.co.uk/careers';   //Server: live

// This file is auto generated. Do not edit.
// See cms/apps/SiteExplorer for further information
var currentSite = 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);">Working at Siemens in the UK'
					+'	</a>'
					+'	<ul>'
					+'		<li>'
						
					+'			<a class="page" rel="1249" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/working_at_siemens/working_at_siemens_in_the_uk.htm">Overview</a>'
							
					+'		</li>'
							
					+'<li>'
					+'	<a class="page" rel="1251" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/evp/whats-in-it-for-you.htm">What\'s in it for you?'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1326" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/working_at_siemens/training-and-development.htm">Training &amp; Development'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1349" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/working_at_siemens/equality-and-diversity.htm">Equality &amp; Diversity'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1327" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/working_at_siemens/faq.htm">FAQ'
					+'	</a>'
					+'</li>'
				
					+'	</ul>'
					+'</li>'
                
					+'<li>'
					+'	<a class="page" rel="1347" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/siemens-at-a-glance.htm">Siemens at a glance'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1250" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/working_at_siemens/career-paths.htm">Career Paths'
					+'	</a>'
					+'</li>'
				
					+'<li class="collapsed">'
					+'	<a class="collapsed" href="javascript:void(0);">Graduates'
					+'	</a>'
					+'	<ul>'
					+'		<li>'
						
					+'			<a class="page" rel="1334" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/graduate.htm">Overview</a>'
							
					+'		</li>'
							
					+'<li class="collapsed">'
					+'	<a class="collapsed" href="javascript:void(0);">Engineering'
					+'	</a>'
					+'	<ul>'
					+'		<li>'
						
					+'			<a class="page" rel="1361" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/engineering.htm">Overview</a>'
							
					+'		</li>'
							
					+'<li>'
					+'	<a class="page" rel="1373" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/degree/aeronautical.htm">Aeronautical'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1365" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/degree/electrical.htm">Electrical'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1375" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/degree/electronics.htm">Electronics'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1376" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/degree/mechanical.htm">Mechanical'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1377" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/degree/systems.htm">Systems'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1378" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/degree/software.htm">Software'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1379" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/degree/mechatronics.htm">Mechatronics'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1380" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/degree/manufacturing.htm">Manufacturing'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1381" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/degree/materials.htm">Materials'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1382" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/degree/metallurgy.htm">Metallurgy'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1383" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/degree/chemical.htm">Chemical, Process and Chemistry'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1384" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/degree/computer-science.htm">Computer Science'
					+'	</a>'
					+'</li>'
				
					+'	</ul>'
					+'</li>'
                
					+'<li class="collapsed">'
					+'	<a class="collapsed" href="javascript:void(0);">Business'
					+'	</a>'
					+'	<ul>'
					+'		<li>'
						
					+'			<a class="page" rel="1350" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/business.htm">Overview</a>'
							
					+'		</li>'
							
					+'<li>'
					+'	<a class="page" rel="1351" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/finance-and-accounting.htm">Finance &amp; Accounting'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1354" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/operations-management.htm">Operations Management'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1353" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/project-management.htm">Project Management'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1352" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/sales.htm">Sales'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1355" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/information-technology.htm">IT'
					+'	</a>'
					+'</li>'
				
					+'	</ul>'
					+'</li>'
                
					+'<li>'
					+'	<a class="page" rel="1369" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/training-and-development.htm">Training &amp; Development'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1368" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/questions-and-answers.htm">Frequently asked questions'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1367" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/application-tips.htm">Application Tips'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1370" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/graduate/current-vacancies.htm">Current Vacancies'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1388" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/students/international.htm">International Students'
					+'	</a>'
					+'</li>'
				
					+'	</ul>'
					+'</li>'
                
					+'<li class="collapsed">'
					+'	<a class="collapsed" href="javascript:void(0);">Undergraduates'
					+'	</a>'
					+'	<ul>'
					+'		<li>'
						
					+'			<a class="page" rel="1341" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/students/undergraduate/undergraduate.htm">Overview</a>'
							
					+'		</li>'
							
					+'<li>'
					+'	<a class="page" rel="1342" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/students/undergraduate/undergraduate-sponsorship.htm">Undergraduate Sponsorship'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1371" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/students/undergraduate/current-vacancies.htm">Current Vacancies'
					+'	</a>'
					+'</li>'
				
					+'	</ul>'
					+'</li>'
                
					+'<li class="collapsed">'
					+'	<a class="collapsed" href="javascript:void(0);">Apprenticeships'
					+'	</a>'
					+'	<ul>'
					+'		<li>'
						
					+'			<a class="page" rel="1343" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/students/apprenticeships.htm">Overview</a>'
							
					+'		</li>'
							
					+'<li>'
					+'	<a class="page" rel="1345" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/students/apprenticeships/our-apprenticeships.htm">Our Apprenticeships'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1386" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/students/apprenticeships/apply-now.htm">Apply Now'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1346" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/students/apprenticeships/frequently-asked-questions.htm">FAQs'
					+'	</a>'
					+'</li>'
				
					+'	</ul>'
					+'</li>'
                
					+'<li class="collapsed">'
					+'	<a class="collapsed" href="javascript:void(0);">Finance &amp; Commercial Academy'
					+'	</a>'
					+'	<ul>'
					+'		<li>'
						
					+'			<a class="page" rel="1335" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/students/commercial-academy/finance-and-commercial-academy.htm">Overview</a>'
							
					+'		</li>'
							
					+'<li>'
					+'	<a class="page" rel="1336" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/students/commercial-academy/about-the-academy.htm">About the Academy'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1337" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/students/commercial-academy/entry-requirements.htm">Entry Requirements'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1338" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/students/commercial-academy/selection-process.htm">Selection Process'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1385" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/students/commercial-academy/faqs.htm">FAQs'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1340" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/students/commercial-academy/what-about-qualifications.htm">What about qualifications?'
					+'	</a>'
					+'</li>'
				
					+'<li>'
					+'	<a class="page" rel="1387" href="'+window.location.protocol+'//'+siteTransform['uk_corp_careers_oe3'][currentSite]+'/en/students/commercial-academy/apply.htm">Apply'
					+'	</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;
document.observe('dom:loaded', 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();
});
    

