// Javascript include file for the header code

/***********************************************
 * CSS Horizontal List Menu- by JavaScript Kit (www.javascriptkit.com)
 * Menu interface credits: http://www.dynamicdrive.com/style/csslibrary/item/glossy-vertical-menu/ 
 * This notice must stay intact for usage
 * Visit JavaScript Kit at http://www.javascriptkit.com/ for this script and 100s more
 * http://www.javascriptkit.com/script/script2/csstopmenu.shtml
 ***********************************************/

var incompat = !(dojo.isMozilla || dojo.isSafari);

function checkBrowser(input) {
    input.value='';
    if (incompat)
        alert('The browser that you are using is not supported by Cloud Foundry.  You may continue to explore using this browser, but many features and layout elements will not work or display properly. We recommend that you use FireFox 3.0+ or Safari 4.0+ for Cloud Foundry.');
    incompat = false;
}

function setHeader() {
    var header = document.getElementById('main-header');
    header.innerHTML = '\
<div id="header"> \
<a href="index.html"><img src="images/logoCloudFoundry.png" id="logo" align="left"/></a> \
<div id="top-login"> \
    <form method="POST" action="https://www.cloudfoundry.com/cfapp/j_acegi_security_check"> \
    <div style="vertical-align: top;"><input type="image" src="images/btnSignIn.png" tabindex=3 value="Login"></input></div> \
    <div><input type="password" name="j_password" size="26" value="Password" tabindex=2 onfocus="this.value=\'\'"/> \
        <br/> \
        <a id="forgotpasswordLink" href="https://www.cloudfoundry.com/cfapp/forgotpassword.html">Forgot password?</a> \
    </div> \
    <div><input type="text" name="j_username" size="26" value="Email" tabindex=1 onfocus="checkBrowser(this)"/> \
        <br/> \
        <a id="newUserRegistration" href="https://www.cloudfoundry.com/cfapp/reg.html?_flowId=register-flow">Sign Up</a> \
    </div> \
    </form> \
</div> \
</div> \
<div class="horizontalcssmenu"> \
<ul id="cssmenu1"> \
<li><a href="#">How We Help</a> \
    <ul> \
	<li><a href="how_fast.html">Deploy Java Applications Fast</a></li> \
	<li><a href="how_survive.html">Plan to Survive Success</a></li> \
	<li><a href="how_focus.html">Focus on Development</a></li> \
	<li><a href="how_short.html">Short Term IT Needs</a></li> \
	<li><a href="how_repro.html">Reproducible Deployments</a></li> \
    </ul> \
</li> \
<li><a href="#">Features</a> \
    <ul> \
	<li><a href="features.html#ui">Intuitive User Interface</a></li> \
	<li><a href="features.html#topology">Configurable Topology</a></li> \
	<li><a href="features.html#java">Optimized Java Web Stack</a></li> \
	<li><a href="features.html#autoscale">Auto-scale Intelligence</a></li> \
	<li><a href="features.html#backup">Continuous Backups</a></li> \
	<li><a href="features.html#extensible">Extensible Configuration</a></li> \
	<li><a href="features.html#multi">Multi-Application Management</a></li> \
	<li><a href="features.html#oss">Open Platform</a></li> \
    </ul> \
</li> \
<li><a href="#">Information</a> \
    <ul> \
	<li><a href="getting_started.html">Getting Started</a></li> \
	<li><a href="faq.html">FAQ</a></li> \
    <li><a href="screencasts.html">Screencasts</a></li> \
	<li><a href="news.html">News</a></li> \
	<li><a href="aboutus.html">About Us</a></li> \
    </ul> \
</li> \
    <li id="blog"><a href="http://blog.springsource.com/category/cloud-computing/">Blog</a></li> \
    <li id="contact"><a href="contactus.html">Contact Us</a></li> \
</ul> \
<a id="newUserNavigation" href="https://www.cloudfoundry.com/cfapp/reg.html?_flowId=register-flow"><img style="float: right;" src="images/btnNavSignUP.png"/></a> \
<br style="clear: left;" /> \
</div> \
 \
';
}

function setFooter() {
    var footer = document.getElementById('main-footer');
    footer.innerHTML = '<div id="networks" class="clearfix"> \
        <a href="http://www.springsource.com/" title="SpringSource"><img src="images/logoSpringSource.gif"> \
		</a><a href="http://www.grails.org/" title="Grails"><img src="images/logoGrails.gif"></a> \
		<a href="http://www.springsource.org/" title="SpringSource Community"><img src="images/logoSpringSourceCommunity.gif"></a> \
		<a href="http://www.hyperic.com" title="Hyperic HQ"><img src="images/logoHyperic.gif"></a> \
		<a href="http://www.cloudstatus.com" title="CloudStatus"><img src="images/logoCloudStatus.gif"></a> \
    </div> \
    <hr class="hrLine"/> \
    &#169; Copyright 2009 SpringSource.  All Rights Reserved. | <a href="termsandconditions.html">Terms of Service</a><br/>\
        <a href="faq.html#ready"><img id="cf_ready" src="images/CFBadge100x33.png"></a> \
';
}

function setNews() { 
    var news = document.getElementById('news');
    if (news != null) {
        news.innerHTML = '\
        <div class="event"><a href="http://www.grailspodcast.com/blog/id/564">Grails Podcast Episode 105: Interview with John Adelus</a><br/>Feb 6, 2010 - Sven Haiges<hr/></div> \
        <div class="event"><a href="http://money.cnn.com/news/newsfeeds/articles/marketwire/0578619.htm">Open-Source Java and Python SDKs for VMware vCloud API</a><br/>JAN 20, 2010 - VMware, Inc.<hr/></div> \
        <div class="event"><a href="http://blog.springsource.com/2009/12/08/3537/">VI Java API and CloudTools</a><br/>DEC 8, 2009 - Charles Lee<hr/></div> \
        <div class="event"><a href="http://blog.springsource.com/2009/11/23/new-features-in-the-latest-cloud-foundry/">New Features in the Latest Cloud Foundry</a><br/>NOV 23, 2009 - Charles Lee<hr/></div> \
        <div class="event"><a href="http://blog.springsource.com/2009/11/10/cloud-foundry-integrated-into-developer-tools/">Cloud Foundry integrated into developer tools</a><br/>NOV 10, 2009 - Charles Lee<hr/></div> \
        <div class="event"><a href="http://blog.springsource.com/2009/10/07/new-cloud-foundry-feature-save-deployment-blueprints-as-templates/">New Cloud Foundry feature: Save deployment blueprints as Templates</a><br/>OCT 7, 2009 - Chris Richardson<hr/></div> \
        <div class="event"><a href="http://blog.springsource.com/2009/08/27/update-on-groovy-and-grails-tools/">Update on Groovy and Grails Tools</a><br/>AUG 27, 2009 - Christian Dupuis<hr/></div> \
        <div class="event"><a href="http://blog.springsource.com/2009/08/19/cloud-foundry/">SpringSource Launches Enterprise Java Cloud</a><br/>AUG 19, 2009 - Rod Johnson<hr/></div> \
        <div class="event"><a href="http://chris-richardson.blog-city.com/">Cloud Foundry is now part of SpringSource</a><br/>AUG 19, 2009 - Chris Richardson<hr/></div> \
        <div class="event"><a href="http://blog.springsource.com/2009/08/13/virtualization-enterprise-java/">Virtualization & Enterprise Java</a><br/>AUG 13, 2009 - Adrian Colyer<hr/></div> \
        <div class="event"><a href="http://blog.springsource.com/2009/08/10/springsource-chapter-two/">SpringSource: Chapter Two</a><br/>AUG 10, 2009 - Rod Johnson<hr/></div> \
        <div id="more"><a href="http://blog.springsource.com/category/cloud-computing/">Read more posts &#187</a></div>';
    }
}

function setHeaderFooter() {
    setHeader();
    setFooter();
    setNews();
    createcssmenu2();
}

if (window.addEventListener)
    window.addEventListener("load", setHeaderFooter, false)
else if (window.attachEvent)
    window.attachEvent("onload", setHeaderFooter)

document.write('\
<style type="text/css"> \
@import "css/site.css"; \
@import "css/csshorizontalmenu.css"; \
</style> \
<script type="text/javascript" src="js/csshorizontalmenu.js"/> \
');

