/*global document,window,location,clearTimeout,setTimeout,pagetools_url:true,Cookie,Win,q */
var Menu=function(){return{attachTop:function(){
	$('#mn6').append('<ul class="nav-top-menu" id="tn6"><li><a href="/page.cfm/Corporate_Information">Corporate Information</a></li><li><a href="/page.cfm/Business_Units">Business Units</a></li><li><a href="/page.cfm/Office_Locations">Office Locations</a></li><li><a href="/events.cfm">Events Calendar</a></li><li><a href="/page.cfm/RTI_Fellow_Program">RTI Fellow Program</a></li><li><a href="/experts.cfm">RTI Experts</a></li><li><a href="/page.cfm/Awards_and_Honors">Awards &amp; Honors</a></li></ul>');
	$('#mn777').append('<ul class="nav-top-menu" id="tn777"><li><a href="/page.cfm/Health_Research">Health Research</a></li><li><a href="/page.cfm/Drug_Discovery_and_Development">Drug Discovery &amp; Development</a></li><li><a href="/page.cfm/Education_and_Training_Research">Education &amp; Training Research</a></li><li><a href="/page.cfm/Survey_Research_and_Services">Survey Research &amp; Services</a></li><li><a href="/page.cfm/Statistics_Research">Statistics Research</a></li><li><a href="/page.cfm/International_Development">International Development</a></li><li><a href="/page.cfm/Economic_and_Social_Research">Economic &amp; Social Research</a></li><li><a href="/page.cfm/Advanced_Technology">Advanced Technology</a></li><li><a href="/page.cfm/Energy_Research">Energy Research</a></li><li><a href="/page.cfm/Environmental_Research_Services">Environmental Research Services</a></li><li><a href="/page.cfm/Laboratory_and_Chemistry_Services">Laboratory &amp; Chemistry Services</a></li></ul>');
	$('#mn801').append('<ul class="nav-top-menu" id="tn801"><li><a href="/newsroom/news.cfm">News Releases</a></li><li><a href="/newsroom/experts.cfm">Expert Sources</a></li><li><a href="/newsroom/page.cfm/Ongoing_Projects">Ongoing Projects</a></li><li><a href="/newsroom/clippings.cfm">RTI in the News</a></li><li><a href="/newsroom/images.cfm">Image Gallery</a></li><li><a href="/newsroom/events.cfm">Events Calendar</a></li><li><a href="/newsroom/page.cfm/Subscribe_to_RTI_News">Subscribe to RTI News</a></li><li><a href="/newsroom/page.cfm/Media_Contacts">Media Contacts</a></li><li><a href="/newsroom/page.cfm/Corporate_Facts">Corporate Facts</a></li></ul>');
	$('#mn808').append('<ul class="nav-top-menu" id="tn808"><li><a href="/publications/publications.cfm">RTI Publications Database</a></li><li><a href="/publications/rtipress.cfm">RTI Press</a></li><li><a href="/page.cfm/Publications_Bulletin">Publications Bulletin</a></li></ul>');
	$('#mn2').append('<ul class="nav-top-menu" id="tn2"><li><a href="/page.cfm/Job_Openings">Job Openings</a></li><li><a href="/page.cfm/Internships_and_Fellowships">Internships & Fellowships</a></li><li><a href="/page.cfm/Benefits">Benefits</a></li><li><a href="/page.cfm/Frequently_Asked_Questions">Frequently Asked Questions</a></li><li><a href="/page.cfm/Corporate_Culture">Corporate Culture</a></li><li><a href="/page.cfm/RTI_Fellow_Program_72">RTI Fellow Program</a></li><li><a href="/page.cfm/Senior_Management">Senior Management</a></li><li><a href="/page.cfm/Annual_Reports">Annual Reports</a></li><li><a href="/contact.cfm?nav=173">Contact RTI Recruitment Services</a></li></ul>');
	$('#mn11').append('<ul class="nav-top-menu" id="tn11"><li><a href="/page.cfm/GSA_Schedules">GSA Schedules</a></li><li><a href="/page.cfm/Contract_Vehicles">Contract Vehicles</a></li><li><a href="/page.cfm/PO_Terms">PO Terms</a></li><li><a href="/page.cfm/Current_RFP_List">Current RFP List</a></li><li><a href="/page.cfm/Supplier_Diversity_and_Small_Business_Program">Supplier Diversity & Small Business Program</a></li><li><a href="/page.cfm/Partner_LinkUp_System">Partner Link-Up System</a></li><li><a href="/page.cfm/Subcontract_Terms">Subcontract Terms</a></li></ul>');
	$('#mn12').append('<ul class="nav-top-menu" id="tn12"><li><a href="/page.cfm/Advanced_Energy_Technologies">Advanced Energy Technologies</a></li><li><a href="/page.cfm/Medical_Technologies">Medical Technologies</a></li><li><a href="/page.cfm/Information_Technologies">Information Technologies</a></li><li><a href="/page.cfm/Commercial_Services_315">Commercial Services</a></li><li><a href="/page.cfm/Patents_List_316">Patents List</a></li></ul>');},
	detachTop:function(){$('#mn6').remove();$('#mn777').remove();$('#mn801').remove();$('#mn808').remove();$('#mn2').remove();$('#mn11').remove();}};}();
E.attach(window,'load',Menu.attachTop);
//based on Paul Sowden - http://www.alistapart.com/stories/alternate/
function setActiveStyleSheet(title){var i,a;for(i=0;(a=document.getElementsByTagName("link")[i]);i++){if(a.getAttribute("rel").indexOf("style")!==-1&&a.getAttribute("title")){a.disabled=true;if(a.getAttribute("title")===title){a.disabled=false;}}}}
function getActiveStyleSheet(){var i,a;for(i=0;(a=document.getElementsByTagName("link")[i]);i++){if(a.getAttribute("rel").indexOf("style")!==-1&&a.getAttribute("title")&&!a.disabled){return a.getAttribute("title");}}return null;}
function getPreferredStyleSheet(presetStyle){var i,a;if(typeof presetStyle!=="undefined"&&presetStyle!==""){return presetStyle;}for(i=0;(a=document.getElementsByTagName("link")[i]);i++){if(a.getAttribute("rel").indexOf("style")!==-1&&a.getAttribute("rel").indexOf("alt")==-1&&a.getAttribute("title")){return a.getAttribute("title");}}return null;}
//ideas fished from http://www.htmldog.com/articles/suckerfish/dropdowns/, well, sortof.
var SF=function(){var _inited=false,_isIE=document.all?true:false;var _types=['INPUT','TEXTAREA','SELECT','BUTTON'],_fish=[],_bait=[],_tackle=[];var _to={},_tn={};var _bp='backgroundPosition',_fc='firstChild';
function _hook(frms){var m=_types.length;var t=[],o={},p={};for(var i=0,l=frms.length;i<l;i++){for(var j=0;j<m;j++){t=frms[i].getElementsByTagName(_types[j]);for(var k=0,n=t.length;k<n;k++){o=t[k];if(o.type==='text'||o.type==='select-one'||o.type==='textarea'){o.onfocus=SF.F;o.onblur=SF.B;}else if(o.type==='submit'||o.type==='button'||o.type==='reset'){p=(_isIE)?o.parentElement:o.parentNode;if(p.tagName==='DIV'&&p.className==='button'){p.onmouseover=SF.H;p.onmouseout=SF.N;p.onmousedown=SF.D;p.onmouseup=SF.U;}}}}}}
function _line(navs){var n={},c=[],o={};for(var i=0,l=navs.length;i<l;i++){n=document.getElementById(navs[i]);if(n!==null){c=n.childNodes;for(var j=0,m=c.length;j<m;j++){o=c[j];if(o.nodeName==='LI'){o.onmouseover=SF.S;o.onmouseout=SF.M;}}}}}
function _sinker(as){var a={},p={};for(var i=0,l=as.length;i<l;i++){a=as[i];p=(a.parentElement)?a.parentElement:a.parentNode;if(p.tagName==='DIV'&&p.className==='button'){p.onmouseover=SF.H;p.onmouseout=SF.N;p.onmousedown=SF.D;p.onmouseup=SF.U;}}}
return{init:function(){_inited=true;_fish=document.getElementsByTagName('FORM');if(_fish.length){_hook(_fish);}var navs='nav';_bait=navs.split(',');if(_bait.length){_line(_bait);}_tackle=document.getElementById('content').getElementsByTagName('A');if(_tackle.length){_sinker(_tackle);}},F:function(){this.className+=' sffocus';},B:function(){this.className=this.className.replace(new RegExp('\\s*sffocus\\b'),'');},H:function(){this.style[_bp]='right -23px';this[_fc].style[_bp]='left -23px';},N:function(){this.style[_bp]='right 0px';this[_fc].style[_bp]='left 0px';this.style.color='#fff';this[_fc].style.color='#fff';},D:function(){this.style.color='#777';this[_fc].style.color='#777';},U:function(){this.style.color='#fff';this[_fc].style.color='#fff';},S:function(){clearTimeout(_to);if(_tn!=this){SF.P();}this.className='sfhover';},M:function(){_tn=this;_to=setTimeout(SF.P,200);},P:function(){_tn.className='top';_tn={};}};}();
E.attach(window,'load',SF.init);
