var section;
var page;

var state_var_4_press_archive;
var page_state_var_4_press_archive;

function go_()
{
   location.href = "/sustainable-fibers.php";
}


function popArticle(which, pages) {
// this function clears articles away from view

   document.images.closebox.style.visibility = 'hidden';

   var closebox_offset = (20 + (pages * 2) );
   var f = 21;

   for (f=21; f < closebox_offset; f = f+2)
   {
      document.images[f].style.visibility = 'hidden';
   }

   document.images.rightvcr.style.visibility = 'hidden';
   document.images.leftvcr.style.visibility = 'hidden';
}

function nextPage() {
   document.images.closebox.style.visibility = 'hidden';
   document.images[state_var_4_press_archive].style.visibility = 'hidden';
   articlePop( (state_var_4_press_archive + 2), page_state_var_4_press_archive);
}

function prevPage() {
   document.images.closebox.style.visibility = 'hidden';
   document.images[state_var_4_press_archive].style.visibility = 'hidden';
   articlePop( (state_var_4_press_archive - 2), page_state_var_4_press_archive);
//   document.images[(state_var_4_press_archive-2)].style.visibility = 'visible';
}

function articlePop(which, pages) {
// which is image number
// pages is total number of pages in article 
   state_var_4_press_archive = which;
   page_state_var_4_press_archive = pages;
   popArticle(which, pages);

   var image_width = document.images[which].width;
   var window_width = find_clientWidth();
   var left_offset = ((window_width - image_width) / 2);
   var scroll_position = find_scrollTop();

   document.images[which].position = 'absolute';
   document.images[which].style.left = left_offset + 'px';
   document.images[which].style.top = scroll_position + 'px';
   document.images[which].style.visibility = 'visible';

   var closebox_offset = (20 + (pages * 2) );
   var closebox_left_offset = (left_offset + image_width - 32);
   document.images.closebox.style.left = closebox_left_offset + 'px';
   document.images.closebox.style.top = scroll_position + 'px';
   document.images.closebox.style.visibility = 'visible';

//   alert (closebox_offset + " " + closebox_left_offset);
   document.images.rightvcr.style.left = (closebox_left_offset + 23 + 15) +'px';
   document.images.rightvcr.style.top = scroll_position + 'px';
   document.images.leftvcr.style.left = (left_offset - 38 - 15) + 'px';
   document.images.leftvcr.style.top = scroll_position + 'px';

   document.images.leftvcr.style.visibility = 'visible';
   document.images.rightvcr.style.visibility = 'visible';

   if ( (which - 2) < 21 ){
      document.images.leftvcr.style.visibility = 'hidden';
   }
   else
   {
      document.images.leftvcr.style.visibility = 'visible';
   }
   if ( (which + 2) >= (21 + (pages * 2) ) ){
      document.images.rightvcr.style.visibility = 'hidden';
   }
   else
   {
      document.images.rightvcr.style.visibility = 'visible';
   }

}

/* AJAX positioning concept */
function find_clientWidth() {
	return find_filterResults (
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}
function find_clientHeight() {
	return find_filterResults (
		window.innerHeight ? window.innerHeight : 0,
		document.documentElement ? document.documentElement.clientHeight : 0,
		document.body ? document.body.clientHeight : 0
	);
}
function find_scrollLeft() {
	return find_filterResults (
		window.pageXOffset ? window.pageXOffset : 0,
		document.documentElement ? document.documentElement.scrollLeft : 0,
		document.body ? document.body.scrollLeft : 0
	);
}
function find_scrollTop() {
	return find_filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}
function find_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}


function openwin(url, width, height) {

var name = "popup"; // popup name
var width = width; // popup width
var height = height; // popup height
var left = (screen.width - width) / 2 ;
var top = (screen.height - height) / 2;
var windowproperties = "width="+ width +",height="+ height +",left="+ left +",top="+ top +",scrollbars=1";
window.open(url, name, windowproperties);

}

function cropfinder(cityid, month)
{
  if (cityid != '')
  {
    document.cropthing.city.value = cityid;
  }
  if (month != '')
  {
    document.cropthing.month.value = month;
  }
  document.cropthing.submit();
}

function clearInput(which)
{
   which.value = '';
}

function imageRotator(path, howMany, imageHeight, imageWidth) 
{
   var my_random = Math.ceil(Math.random() * howMany);
   FirstPartTag = '<img src="';
   derivedPath = '/images/rotating/' + path + '/0' + my_random + '.jpg" ';
   LastPartTag = 'height="' + imageHeight + '" width="' + imageWidth + '">';
   document.write(FirstPartTag + derivedPath + LastPartTag);
}

function valid ()
{
   if ( ( phonesupportsubmission.EmailAddress.value == "") &&  ( phonesupportsubmission.PhoneNumber.value == "") )
   {
      phonesupportsubmission.EmailAddress.focus();
      alert("Fill out required fields, please");
      return false;
   }

   if (phonesupportsubmission.FirstName.value == "") 
   {
      phonesupportsubmission.FirstName.focus();
      alert("Fill out required fields, please");
      return false;
   }
   if (phonesupportsubmission.LastName.value == "")
   {
      phonesupportsubmission.LastName.focus();
      alert("Fill out required fields, please");
      return false;
   }
   if ( phonesupportsubmission.ProblemDescription.value == "") 
   {
      phonesupportsubmission.ProblemDescription.focus();
      alert("Fill out required fields, please");
      return false;
   }
   phonesupportsubmission.submit();
}

function preloadhome()
{
   if (document.images)
   {
      pic1= new Image(100,25); 
      pic1.src="/grid/grid_f2t.jpg"; 
      pic2= new Image(100,25); 
      pic2.src="/grid/grid_ff.jpg"; 
      pic3= new Image(100,25); 
      pic3.src="/grid/grid_gr.jpg"; 
      pic4= new Image(100,25); 
      pic4.src="/grid/grid_gt.jpg"; 
      pic5= new Image(100,25); 
      pic5.src="/grid/grid_l450.jpg"; 
      pic6= new Image(100,25); 
      pic6.src="/grid/grid_wf.jpg"; 
   }
}

function cert_chart_switcher(on_off, which)
{
   // controls rollover at top of sustainable-certifications page
   if (on_off == 'on'){
      which.src = "/images/cert_chart/" + which.name + "_over.png";
   }
   if (on_off == 'off'){
      which.src = "/images/cert_chart/" + which.name + ".png";
   }
   // alert ("" + which.name);
}

function news_banner_switcher(which)
{
   // controls banner images on news & events page
   // alert ("" + which);
   document.images.newsbanner.src = "/images/headliners/ep_news_" + which + ".gif";
   setState();
}

function switcher(on_off, which)
{
   // controls navigation rollover images
   //alert ("" + which.name);
   which.src = "/images/menu/" + which.name + "_" + on_off + ".gif";
   setState();
}

function inverted_switcher(on_off, which)
{
   // controls navigation rollover images where the background is dark brown
   //alert ("" + which.name);
   which.src = "/images/menuinverted/" + which.name + "_" + on_off + ".gif"; setState();
}

function switcheroof()
{
// controls home page rollover images
// this one turns off the rollover state
      document.images[11].src = "/images/grid/off/01.gif";
      document.images[12].src = "/images/grid/off/02.gif";
      document.images[13].src = "/images/grid/off/03.gif";
      document.images[14].src = "/images/grid/off/04.jpg";
      document.images[15].src = "/images/grid/off/05.gif";
      document.images[16].src = "/images/grid/off/06.gif";
      document.images[17].src = "/images/grid/off/07.gif";
      document.images[18].src = "/images/grid/off/08.jpg";
      document.images[19].src = "/images/grid/off/09.gif";
      document.images[20].src = "/images/grid/off/10.gif";
      document.images[21].src = "/images/grid/off/11.gif";
      document.images[22].src = "/images/grid/off/12.gif";
      document.images[23].src = "/images/grid/off/13.gif";
      document.images[24].src = "/images/grid/off/14.gif";
      document.images[25].src = "/images/grid/off/15.gif";
}
function switcheroo(where)
{
// controls home page rollover images
// this one turns on the rollover state
   if (where.name == '03')
   {
      document.images[11].src = "/images/grid/common/01.gif";
      document.images[12].src = "/images/grid/common/02.gif";
      document.images[13].src = "/images/grid/off/03.gif";
      document.images[14].src = "/images/grid/common/04.jpg";
      document.images[15].src = "/images/grid/common/05.gif";
      document.images[16].src = "/images/grid/common/06.gif";
      document.images[17].src = "/images/grid/common/07.gif";
      document.images[18].src = "/images/grid/wf/08.gif";
      document.images[19].src = "/images/grid/wf/09.gif";
      document.images[20].src = "/images/grid/common/10.gif";
      document.images[21].src = "/images/grid/common/11.gif";
      document.images[22].src = "/images/grid/common/12.gif";
      document.images[23].src = "/images/grid/wf/13.gif";
      document.images[24].src = "/images/grid/wf/14.gif";
      document.images[25].src = "/images/grid/common/15.gif";
   }

   if (where.name == '05')
   {
      document.images[11].src = "/images/grid/common/01.gif";
      document.images[12].src = "/images/grid/common/02.gif";
      document.images[13].src = "/images/grid/common/03.gif";
      document.images[14].src = "/images/grid/common/04.jpg";
      document.images[15].src = "/images/grid/off/05.gif";
      document.images[16].src = "/images/grid/common/06.gif";
      document.images[17].src = "/images/grid/common/07.gif";
      document.images[18].src = "/images/grid/f2t/08.gif";
      document.images[19].src = "/images/grid/f2t/09.gif";
      document.images[20].src = "/images/grid/common/10.gif";
      document.images[21].src = "/images/grid/common/11.gif";
      document.images[22].src = "/images/grid/common/12.gif";
      document.images[23].src = "/images/grid/f2t/13.gif";
      document.images[24].src = "/images/grid/f2t/14.gif";
      document.images[25].src = "/images/grid/common/15.gif";
   }

   if (where.name == '06')
   {
      document.images[11].src = "/images/grid/common/01.gif";
      document.images[12].src = "/images/grid/common/02.gif";
      document.images[13].src = "/images/grid/common/03.gif";
      document.images[14].src = "/images/grid/common/04.jpg";
      document.images[15].src = "/images/grid/common/05.gif";
      document.images[16].src = "/images/grid/off/06.gif";
      document.images[17].src = "/images/grid/ff/07.gif";
      document.images[18].src = "/images/grid/ff/08.gif";
      document.images[19].src = "/images/grid/common/09.gif";
      document.images[20].src = "/images/grid/common/10.gif";
      document.images[21].src = "/images/grid/common/11.gif";
      document.images[22].src = "/images/grid/ff/12.gif";
      document.images[23].src = "/images/grid/ff/13.gif";
      document.images[24].src = "/images/grid/common/14.gif";
      document.images[25].src = "/images/grid/common/15.gif";
   }

   if (where.name == '09')
   {
      document.images[11].src = "/images/grid/common/01.gif";
      document.images[12].src = "/images/grid/common/02.gif";
      document.images[13].src = "/images/grid/common/03.gif";
      document.images[14].src = "/images/grid/common/04.jpg";
      document.images[15].src = "/images/grid/common/05.gif";
      document.images[16].src = "/images/grid/common/06.gif";
      document.images[17].src = "/images/grid/gr/07.gif";
      document.images[18].src = "/images/grid/gr/08.gif";
      document.images[19].src = "/images/grid/off/09.gif";
      document.images[20].src = "/images/grid/common/10.gif";
      document.images[21].src = "/images/grid/common/11.gif";
      document.images[22].src = "/images/grid/gr/12.gif";
      document.images[23].src = "/images/grid/gr/13.gif";
      document.images[24].src = "/images/grid/common/14.gif";
      document.images[25].src = "/images/grid/common/15.gif";
   }

   if (where.name == '12')
   {
      document.images[11].src = "/images/grid/common/01.gif";
      document.images[12].src = "/images/grid/common/02.gif";
      document.images[13].src = "/images/grid/common/03.gif";
      document.images[14].src = "/images/grid/common/04.jpg";
      document.images[15].src = "/images/grid/common/05.gif";
      document.images[16].src = "/images/grid/common/06.gif";
      document.images[17].src = "/images/grid/common/07.gif";
      document.images[18].src = "/images/grid/gt/08.gif";
      document.images[19].src = "/images/grid/gt/09.gif";
      document.images[20].src = "/images/grid/common/10.gif";
      document.images[21].src = "/images/grid/common/11.gif";
      document.images[22].src = "/images/grid/off/12.gif";
      document.images[23].src = "/images/grid/gt/13.gif";
      document.images[24].src = "/images/grid/gt/14.gif";
      document.images[25].src = "/images/grid/common/15.gif";
   }

   if (where.name == '14')
   {
      document.images[11].src = "/images/grid/common/01.gif";
      document.images[12].src = "/images/grid/common/02.gif";
      document.images[13].src = "/images/grid/common/03.gif";
      document.images[14].src = "/images/grid/common/04.jpg";
      document.images[15].src = "/images/grid/common/05.gif";
      document.images[16].src = "/images/grid/common/06.gif";
      document.images[17].src = "/images/grid/l450/07.gif";
      document.images[18].src = "/images/grid/l450/08.gif";
      document.images[19].src = "/images/grid/common/09.gif";
      document.images[20].src = "/images/grid/common/10.gif";
      document.images[21].src = "/images/grid/common/11.gif";
      document.images[22].src = "/images/grid/l450/12.gif";
      document.images[23].src = "/images/grid/l450/13.gif";
      document.images[24].src = "/images/grid/off/14.gif";
      document.images[25].src = "/images/grid/common/15.gif";
   }

}


/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
// Used on News & Events page, right column

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="/presssearch.php?initiative=ep">Earth Pledge</a>';
menu1[1]='<a href="/presssearch.php?initiative=f2t">Farm To Table</a>';
menu1[2]='<a href="/presssearch.php?initiative=ff">FutureFashion</a>';
menu1[3]='<a href="/presssearch.php?initiative=gr">Green Roofs</a>';
menu1[4]='<a href="/presssearch.php?initiative=gt">Guardian Trust</a>';
menu1[5]='<a href="/presssearch.php?initiative=l450">Limit 450</a>';
menu1[6]='<a href="/presssearch.php?initiative=wf">Waste=Fuel</a>';
		
var menu2=new Array()
menu2[0]='<a href="/presssearch.php?pub_type=newspaper">Newspapers</a>';
menu2[1]='<a href="/presssearch.php?pub_type=magazine">Magazines</a>';
menu2[2]='<a href="/presssearch.php?pub_type=website">Websites</a>';
menu2[3]='<a href="/presssearch.php?pub_type=whitepapers">White Papers</a>';
		
var menu3=new Array()
menu3[0]='<a href="/presssearch.php?archive=2009">2009</a>';
menu3[1]='<a href="/presssearch.php?archive=2008">2008</a>';
menu3[2]='<a href="/presssearch.php?archive=2007">2007</a>';
menu3[3]='<a href="/presssearch.php?archive=2006">2006</a>';
menu3[4]='<a href="/presssearch.php?archive=2005">2005</a>';
menu3[5]='<a href="/presssearch.php?archive=2004">2004</a>';
menu3[6]='<a href="/presssearch.php?archive=2003">2003</a>';
menu3[7]='<a href="/presssearch.php?archive=2002">2002</a>';
menu3[8]='<a href="/presssearch.php?archive=2001">2001</a>';
menu3[9]='<a href="/presssearch.php?archive=2000">2000</a>';

var menu4=new Array()
menu4[0]='<a href="javascript:this.cropfinder(20,\'\')">Atlanta</a>';
menu4[1]='<a href="javascript:this.cropfinder(6,\'\')">Boise</a>';
menu4[2]='<a href="javascript:this.cropfinder(21,\'\')">Boston</a>';
menu4[3]='<a href="javascript:this.cropfinder(12,\'\')">Chicago</a>';
menu4[4]='<a href="javascript:this.cropfinder(18,\'\')">Cincinnati</a>';
menu4[5]='<a href="javascript:this.cropfinder(9,\'\')">Dallas</a>';
menu4[6]='<a href="javascript:this.cropfinder(23,\'\')">DC/Baltimore</a>';
menu4[7]='<a href="javascript:this.cropfinder(7,\'\')">Denver</a>';
menu4[8]='<a href="javascript:this.cropfinder(17,\'\')">Detroit</a>';
menu4[9]='<a href="javascript:this.cropfinder(10,\'\')">Houston</a>';
menu4[10]='<a href="javascript:this.cropfinder(13,\'\')">Indianapolis</a>';
menu4[11]='<a href="javascript:this.cropfinder(25,\'\')">Jacksonville</a>';
menu4[12]='<a href="javascript:this.cropfinder(8,\'\')">Kansas City</a>';
menu4[13]='<a href="javascript:this.cropfinder(4,\'\')">Los Angeles</a>';
menu4[14]='<a href="javascript:this.cropfinder(14,\'\')">Memphis</a>';
menu4[15]='<a href="javascript:this.cropfinder(24,\'\')">Miami</a>';
menu4[16]='<a href="javascript:this.cropfinder(11,\'\')">Minneapolis/St. Paul</a>';
menu4[17]='<a href="javascript:this.cropfinder(15,\'\')">Nashville</a>';
menu4[18]='<a href="javascript:this.cropfinder(16,\'\')">New Orleans</a>';
menu4[19]='<a href="javascript:this.cropfinder(22,\'\')">Philadelphia</a>';
menu4[20]='<a href="javascript:this.cropfinder(5,\'\')">Phoenix</a>';
menu4[21]='<a href="javascript:this.cropfinder(3,\'\')">San Diego</a>';
menu4[22]='<a href="javascript:this.cropfinder(2,\'\')">San Francisco</a>';
menu4[23]='<a href="javascript:this.cropfinder(1,\'\')">Seattle</a>';
menu4[24]='<a href="javascript:this.cropfinder(19,\'\')">St. Louis</a>';


var menu5=new Array()
menu5[0]='<a href="javascript:this.cropfinder(\'\',1)">January</a>';
menu5[1]='<a href="javascript:this.cropfinder(\'\',2)">February</a>';
menu5[2]='<a href="javascript:this.cropfinder(\'\',3)">March</a>';
menu5[3]='<a href="javascript:this.cropfinder(\'\',4)">April</a>';
menu5[4]='<a href="javascript:this.cropfinder(\'\',5)">May</a>';
menu5[5]='<a href="javascript:this.cropfinder(\'\',6)">June</a>';
menu5[6]='<a href="javascript:this.cropfinder(\'\',7)">July</a>';
menu5[7]='<a href="javascript:this.cropfinder(\'\',8)">August</a>';
menu5[8]='<a href="javascript:this.cropfinder(\'\',9)">September</a>';
menu5[9]='<a href="javascript:this.cropfinder(\'\',10)">October</a>';
menu5[10]='<a href="javascript:this.cropfinder(\'\',11)">November</a>';
menu5[11]='<a href="javascript:this.cropfinder(\'\',12)">December</a>';
menu5[12]='<a href="javascript:this.cropfinder(\'\',13)">All Year</a>';




var menuwidth='137px' //default menu width
var menubgcolor='#deddc4'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : 

window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : 

window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu


// this is for show/hide on the news&events page

/*  
1 = news
2 = news
3 = news
4 = events
5 = press
6 = press
7 = news


theid = 1 == news
theid = 2 == events
theid = 3 == press
          */
// # This script is no longer in use
function showHide(theid)
{
   var close_id;
   var switch_id;

   // close all menu items
   if (document.getElementById)
   {
      for (i=1;i<=7;i++)
      {
         close_id = document.getElementById('submenu' + i);
         close_id.className = 'hide';
      }
   }

   if (theid == 'news')
   {
      switch_id = document.getElementById('submenu1');
      switch_id.className = 'show';
      switch_id = document.getElementById('submenu2');
      switch_id.className = 'show';
      switch_id = document.getElementById('submenu3');
      switch_id.className = 'show';
      switch_id = document.getElementById('submenu7');
      switch_id.className = 'show';
   }

   if (theid == 'events')
   {
      switch_id = document.getElementById('submenu4');
      switch_id.className = 'show';
   }

   if (theid == 'press')
   {
      switch_id = document.getElementById('submenu5');
      switch_id.className = 'show';
      switch_id = document.getElementById('submenu6');
      switch_id.className = 'show';
   }
}

