function initit(list,img,stylesheetpath,showDefault)
{var show=GetCookie(list);var listElementStyle=document.getElementById(list).style;if((show==null)||(show=="")){show=showDefault;}
if(show=="true"){document.getElementById(img).src=stylesheetpath+"/img/up_light.gif"
listElementStyle.display="block";}
else if(show=="false"){document.getElementById(img).src=stylesheetpath+"/img/down_light.gif"
listElementStyle.display="none";}}
function switchit(list,img,stylesheetpath){var listElementStyle=document.getElementById(list).style;if(listElementStyle.display=="none"){document.getElementById(img).src=stylesheetpath+"/img/up_light.gif"
listElementStyle.display="block";SetCookie(list,"true");}
else{document.getElementById(img).src=stylesheetpath+"/img/down_light.gif"
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";}}
