function initit(list, img, stylesheetpath)
{
      var show = GetCookie(list);
	  var listElementStyle=document.getElementById(list).style;
      if (show == "true"){
                   
                   listElementStyle.display="block";
      }
      else{
				   listElementStyle.display="none";
      }

}
function switchit(list,img,stylesheetpath)
{
	arrayList = new Array('navcero','navOne','navTwo','navthree');
	var listElementStyle=document.getElementById(list).style;
    if (listElementStyle.display=="none")
	{
		listElementStyle.display="block";
		for (i=0; i<=arrayList.length; i++)
		{
			if(arrayList[i] != list)
			{
				SetCookie(arrayList[i],"false");
				var listElementClose = document.getElementById(arrayList[i]).style;
				listElementClose.display="none";
			}

		}
		SetCookie(list,"true");
	}
	else
	{                  
		listElementStyle.display="none";
		SetCookie(list,"false");
	}
}

function SetCookie(name, value, expires, path, domain) 
{ document.cookie = name + "=" + escape(value) + 
  ((expires == null) ? "" : "; expires=" + expires.toGMTString()) +
  ((path == null)    ? "" : "; path=" + path) +
  ((domain == null)  ? "" : "; domain=" + domain);
}

function GetCookie(name)
{ var cname = name + "=";               
  var dc = document.cookie;             
  if (dc.length > 0) 
  { begin = dc.indexOf(cname);       
    if (begin != -1) 
    { begin += cname.length;       
      end = dc.indexOf(";", begin);
      if (end == -1) end = dc.length;
      return unescape(dc.substring(begin, end));
    } 
  }
  return null;
}

function DelCookie (name,path,domain) 
{ if (getCookie(name)) 
  { document.cookie = name + "=" +
    ((path == null) ? "" : "; path=" + path) +
    ((domain == null) ? "" : "; domain=" + domain) +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}
