/* ###########################################################################

GLOBAL ASSETS RELEASE v2.6.2

MENUCONTENT.JS v3.7

BUILD DATE: 20070416

COPYRIGHT SUN MICROSYSTEMS INC. 2007

CONTACT webdesign -at- sun.com WITH ANY QUESTIONS

########################################################################### */

// translation for See All link at the end of each menu
var seeall = "See All";

// set this to the location of your local im directories
var imdir = "/im";

// sub menu width
var mwidth = 150;

// menus are organized using a two number decimel delineated system (1.2)
// the first number indicates which main topic link the menu belongs to.
// the second number indicates the order the sub topic link appears in the menu.
//
// the values for each item are then organized by a | delineated system (Link Name|URL)
// item X.0 MUST alway be the exact name of the main topic link as hardcoded in
// the masthead and must include a link that is the also the same.
//
// if the first main topic link was Products and it's URL was /products/ then then you
// would start the products menu with... 
//
// navmenu['1.0'] = 'Products|/products/';
//
// if the main topic link is not a link to another page, but simply the title of your
// menu (i.e. Select A Topic) then you would set the [X.0] item to "|". this way the
// See All Item is not created at the bottom of the menu. like...
//
// navmenu['1.0'] = '|';

navmenu['1.0'] = 'APIs|http://java.sun.com/reference/api/';
navmenu['1.1'] = 'Java Card|http://java.sun.com/products/javacard/reference/docs/';
navmenu['1.2'] = 'Java EE|http://java.sun.com/javaee/reference/';
navmenu['1.3'] = 'Java ME|http://java.sun.com/javame/reference/apis.jsp';
navmenu['1.4'] = 'Java SE|http://java.sun.com/reference/api/';
navmenu['1.5'] = 'Solaris|http://developers.sun.com/solaris/reference/docs/';
navmenu['1.6'] = 'Sun Studio Compilers & Tools|http://developers.sun.com/sunstudio/reference/docs/';
navmenu['1.7'] = 'Web Services|http://java.sun.com/webservices/reference/api/';

navmenu['2.0'] = 'Downloads|http://developers.sun.com/resources/downloads.html';
navmenu['2.1'] = 'Early Access|http://java.sun.com/downloads/ea/';
navmenu['2.2'] = 'Java EE|http://java.sun.com/javaee/downloads/';
navmenu['2.3'] = 'Java ME|http://java.sun.com/javame/downloads/';
navmenu['2.4'] = 'Java SE|http://java.sun.com/javase/downloads/';
navmenu['2.5'] = 'Java Studio Creator|http://developers.sun.com/prodtech/javatools/jscreator/downloads/';
navmenu['2.6'] = 'Java Studio Enterprise|http://developers.sun.com/prodtech/javatools/jsenterprise/downloads/';
navmenu['2.7'] = 'NetBeans|http://www.netbeans.info/downloads/index.php';
navmenu['2.8'] = 'Solaris|http://developers.sun.com/solaris/downloads/';
navmenu['2.9'] = 'Sun Studio Compilers & Tools|http://developers.sun.com/sunstudio/downloads/';


navmenu['3.0'] = 'Technologies|http://developers.sun.com/global/mh/tech/index.html';
navmenu['3.1'] = 'Java EE|http://java.sun.com/javaee/';
navmenu['3.2'] = 'Java ME|http://java.sun.com/javame/';
navmenu['3.3'] = 'Java SE|http://java.sun.com/javase/';
navmenu['3.4'] = 'Mobility|http://developers.sun.com/techtopics/mobility/';
navmenu['3.5'] = 'Solaris|http://developers.sun.com/solaris/';

navmenu['4.0'] = 'Products|http://developers.sun.com/global/mh/products/index.html';
navmenu['4.1'] = 'Java Studio Creator|http://developers.sun.com/prodtech/javatools/jscreator/';
navmenu['4.2'] = 'Java Studio Enterprise|http://developers.sun.com/prodtech/javatools/jsenterprise/';
navmenu['4.3'] = 'NetBeans Mobility Packs|http://developers.sun.com/prodtech/javatools/mobility/';
navmenu['4.4'] = 'Sun Studio Compilers & Tools|http://developers.sun.com/sunstudio/';

navmenu['5.0'] = 'Support|http://developers.sun.com/services/';
navmenu['5.1'] = 'Big Admin|http://www.sun.com/bigadmin/home/';
navmenu['5.2'] = 'Developer Services|http://developers.sun.com/services/';
navmenu['5.3'] = 'Forums|http://forum.java.sun.com/index.jspa';



navmenu['6.0'] = 'Training|http://www.sun.com/training/';
navmenu['6.1'] = 'Certification|http://www.sun.com/training/certification/index.xml';
navmenu['6.2'] = 'Developer Training|http://www.sun.com/training/catalog/developer.xml';

navmenu['7.0'] = 'Sun.com|http://www.sun.com/';
navmenu['7.1'] = 'About Sun|http://www.sun.com/aboutsun/';
navmenu['7.2'] = 'Downloads|http://www.sun.com/download/';
navmenu['7.3'] = 'Products|http://www.sun.com/products/';
navmenu['7.4'] = 'Services &amp; Solutions|http://www.sun.com/servicessolutions/';
navmenu['7.5'] = 'Support|http://sunsolve.sun.com/pub-cgi/show.pl?target=tous';
navmenu['7.6'] = 'Training|http://www.sun.com/training/';



// oldmenu is an array used when changes to the A2 masthead HTML is made. since pages can
// exist that do not have the most current masthead HTML, but still link to the latest js 
// we can use this old menu information to allow the menucode.js script to insert legacy
// menu content for legacy masthead links.
//
// oldmenu items should be numbered as they once were when they were navmenu items.
// the only thing that changes is the array name. if you are using site specific
// links and you know that all changes to the masthead have been made to all of your
// pages you do not need to keep legacy menus in the oldmenu array.

oldmenu['6.0'] = 'Research|http://research.sun.com/';
oldmenu['6.1'] = 'Projects|http://research.sun.com/projects/';
oldmenu['6.2'] = 'Events|http://research.sun.com/events/';
oldmenu['6.3'] = 'Lab Downloads|http://research.sun.com/download/';

// these arrays control the flyout menus for the A1 component. there are three
// arrays that control these menus.
//
// a1menuwrap -> defines html code that makes the menu box, this should NOT be altered
//
// a1hrefs -> this array uses a value (e.g. 'javamenu') to identify it's contents. this value
//            is also used by the a1menus array and can be any value you want it to be, it just
//            needs to be unique for each menu. the value of this variable is an array. it should
//            contain the text of the link that you wish the menu to be attached to (e.g. new Array('Java');)
//            although 'Java' is only one value, an array is used in case there are other languages
//            pointing to this one file. in that case you could use something like
//            "new Array('Communities','Comunidades');" so the menu will attach to either of those links.
//
// a1menus -> this array defines the menu width and menu content. in the a1menus['javamenu'] variable
//            the first value of it's array is 180, which sets the width of the menu, the second value
//            is the menus content. each line return of this value must end with \ in order for you to use
//            multiple lines to define this value.

var a1menuwrap  = new Array('<div set_outerwidth class="a1menu" id="','">\n<div class="a1menux1" set_outerwidth></div>\n<div class="a1menuw1" set_width>\n','</div>\n<div class="a1menux2" set_outerwidth></div>\n</div>');

a1hrefs['javamenu'] = new Array('Java');
a1menus['javamenu'] = new Array(450,'\
<table style="background:transparent;"><tr><td style="width:50%;vertical-align:top;padding-right:10px;">\
<ul class="bluearrows">\
<li><a href="http://java.com/download/">Java for your computer</a><p>Stay up to date with the latest versions of Java for your desktop computer.</p></li>\
<li><a href="http://www.sun.com/software/opensource/java/">Free and Open Source Java</a><p>Get your own copy of the underlying software code for the Java language.</p></li>\
<li><a href="http://java.sun.com/javase/downloads/">Download the latest JDK</a><p>The basic developer kit for Java developers.</p></li>\
<li><a href="http://java.sun.com/javaee/downloads/">Download the Java EE SDK</a><p>The SDK supports Java SE 6 and the latest Java EE 5 technologies.</p></li>\
<li><a href="http://www.netbeans.org/downloads/index.html">Download NetBeans IDE</a><p>Get the award-winning, open-source tool suite for developing Java applications.</p></li>\
<li><a href="http://java.sun.com/">Java Developer Resources</a><p>Visit java.sun.com for everything you need to know about the Java technology.</p></li>\
</ul>\
</td><td style="width:50%;vertical-align:top;">\
<ul class="bluearrows">\
<li><a href="http://developers.sun.com/prodtech/javatools/">Java Developer Tools</a><p>See and download all software tools available from Sun.</p></li>\
<li><a href="http://java.sun.com/javase/">Java Standard Edition</a><p>For developing and deploying Java applications for the desktop, servers, embedded, and real-time environments.</p></li>\
<li><a href="http://java.sun.com/javaee/">Java Enterprise Edition</a><p>For enterprise, server-side Java applications.</p></li>\
<li><a href="http://java.sun.com/javame/">Java Micro Edition</a><p>For Java applications running on mobile devices.</p></li>\
<li><a href="http://java.sun.com/learning/training/">Java Training</a><p>Sharpen your Java skills with courses from the source.</p></li>\
<li><a href="http://developers.sun.com/services/">Java Support</a><p>Get dedicated help from Sun including technical assistance, product support, and support for deployed Java applications.</p></li>\
</ul>\
</td></tr></table>\
');

a1hrefs['solarismenu'] = new Array('Solaris');
a1menus['solarismenu'] = new Array(280,'\
<ul class="bluearrows">\
<li><a href="http://www.sun.com/software/solaris/get.jsp">Solaris</a><p>Download the most advanced operating system in the world</p></li>\
<li><a href="http://developers.sun.com/sunstudio/">Sun Studio</a><p>Optimizing compilers and tools for C/C++/Fortran application development</p></li>\
<li><a href="http://developers.sun.com/solaris/">Solaris Developer Center</a><p>Explore the resources and community available to the Solaris developer.</p></li>\
<li><a href="http://developers.sun.com/services/">Sun Developer Services</a><p>Get technical assistance, product support, training, and other services from the source.</p></li>\
<li><a href="http://www.sun.com/bigadmin/home/index.html">BigAdmin</a><p>A community site with Solaris system administration information, hardware compatibility, a script library, and other resources for administrators of Sun products.</p></li>\
<li><a href="http://www.opensolaris.org">OpenSolaris</a><p>Join the open-source community for collaboration and conversation around the OpenSolaris technology.</p></li>\
</ul>\
');

a1hrefs['communitiesmenu'] = new Array('Communities');
a1menus['communitiesmenu'] = new Array(450,'\
<table style="background:transparent;"><tr><td style="width:50%;vertical-align:top;padding-right:10px;">\
<ul class="bluearrows">\
<li><a href="http://developers.sun.com">Communities @ SDN</a><p>Join the Sun Developer Network, a worldwide community of over 2 million developers, and learn about the benefits of membership.</p></li>\
<li><a href="http://www.sun.com/bigadmin/">System Administrators</a><p>The BigAdmin portal provides Solaris system administration information, hardware compatibility, a script library, and other resources for administrators of Sun products, contributed both by Sun and members of the community.</p></li>\
<li><a href="http://www.sun.com/partners/">Sun Student Developers</a><p>The SDN Academic Developer Program offers you ready access to the tools, resources, and student communities.</p> </li>\
<li><a href="http://www.java.net">Java.net</a><p>A gathering place for Java technology enthusiasts and existing communities across industries, platforms, and interest groups.</p></li>\
<li><a href="http://www.sun.com/software/opensource/">Open Source &amp; Collaboration</a><p>Learn about Sun\'s involvement in open source projects.</p></li>\
</ul>\
</td><td style="width:50%;vertical-align:top;">\
<ul class="bluearrows">\
<li><a href="http://research.sun.com">Research</a><p>Discover the latest projects in Sun Labs.</p></li>\
<li><a href="http://www.sun.com/aboutsun/media/index.jsp">Java Technology</a><p>What\'s happening with the Java programming language -- from mobile devices and smart cards to enterprise-scale data centers.</p></li>\
<li><a href="http://developers.sun.com/usergroups/">User Groups</a><p>Join developers, IT managers, system administrators, and others who share a common interest in Java technology or Sun products.</p></li>\
<li><a href="http://developers.sun.com/newsletters/index.html">Newsletters</a><p>Find out about new articles, product announcements, upcoming releases, and future events.</p></li>\
<li><a href="http://forum.java.sun.com/index.jspa">Forums</a><p>Access a wide range of Sun-related topics in the Sun community forums.</p></li>\
<li><a href="http://blogs.sun.com/">Sun Blogs</a><p>Join the conversation -- meet the people at Sun who are passionate about their jobs.</p></li>\
<li><a href="http://developers.sun.com/sdnshare/">SDN Share</a><p>Submit content, interact with peers through comments and voting, and earn rewards for your contributions.</p></li>\
</ul>\
</td></tr></table>\
');
 
a1hrefs['accountmenu'] = new Array('My SDN Account');
a1menus['accountmenu'] = new Array(160,'\
<ul class="bluearrows">\
<li><a href="https://reg.sun.com/updateaccount?program=sdn&goto=http://developers.sun.com">Update My Profile</a></li>\
</ul>\
');

a1hrefs['joinmenu'] = new Array('Join SDN');
a1menus['joinmenu'] = new Array(160,'\
<ul class="bluearrows">\
<li><a href="https://reg.sun.com/register?program=sdn">Join SDN Now</a></li>\
<li><a href="http://developers.sun.com/user_registration/whyregister.jsp">Why Join</a><p>Becoming an Sun Developer Network (SDN) member makes you part of a vibrant worldwide community of developers, and gives you access to cool stuff and exclusive offers.</p></li>\
</ul>\
');

// ############################################################################
// BEGIN "SHARE THIS PAGE" STUFF
// To turn off share page functionality for all pages linking to this file, comment out this entire section
// To turn it off for an individual page, use <meta name="share-this-page" content="no"> in the <head> (case insensitive)

function getSafelyEncodedString(s) {
	// xss paranoia
	s = encodeURIComponent(s);
	s = s.replace(/"/,"&quot;");
	s = s.replace(/</,"&lt;");
	s = s.replace(/>/,"&gt;");
	return s;
}

var share_url = getSafelyEncodedString(location.href);
var share_title = getSafelyEncodedString(document.title);

var shareThisPage = '\
<div class="sharepagew1">\
<table summary="layout" cellpadding="0" cellspacing="0"><tr>\
<td id="share-technorati"><a href="http://www.technorati.com/search/'+share_url+'" class="sharelink technorati" title="See who links to this page on Technorati"></a></td>\
<td id="share-delicious"><a href="http://del.icio.us/post?v=4;url='+share_url+';title='+share_title+'" class="sharelink delicious" title="Bookmark this page in del.icio.us"></a></td>\
<td id="share-digg"><a href="http://digg.com/submit?phase=2&amp;url='+share_url+'&amp;title='+share_title+'" class="sharelink digg" title="Submit this page to Digg"></a></td>\
<td id="share-slashdot"><a href="http://slashdot.org/bookmark.pl?title='+share_title+'&amp;url='+share_url+'" class="sharelink slashdot" title="Submit this page to Slashdot"></a></td>\
';

var links = document.getElementsByTagName('link');
var feed_url = null;
var feed_title = null;
var numFeeds = 0;
for (var a=0; a<links.length; a++) {
	if (''+links[a].rel.toLowerCase() == 'alternate') {
		numFeeds++;
		if (!feed_url) {
			feed_url = links[a].href;
			feed_title = links[a].title;
		}
	}
}
if (numFeeds > 1) {
	shareThisPage += '<td id="share-multiple-feeds"><a href="#" title="Show available feeds"></a></td>';
} else if (numFeeds == 1) {
	shareThisPage += '<td id="share-feed"><a href="'+feed_url+'" class="sharelink feed" title="'+feed_title+'"></a></td>';
} else {
	shareThisPage += '<td id="share-blank"> </td>';
}

shareThisPage += '</tr></table></div>';

// END "SHARE THIS PAGE" STUFF
// ############################################################################

