function ChangeClass(Obj,Klasse) {
 if(document.getElementById) {
  if(document.getElementById(Obj)) {
   document.getElementById(Obj).className=Klasse;
  }
 }
}

function ChangeImg(ObjName, ImgSrc)
{
  if(document.getElementById)
  {
    if(document.getElementById(ObjName))
    {
      document.getElementById(ObjName).src = ImgSrc;
    }
  }
}

function ChangeVisible(strId)
{
  if(document.getElementById(strId).className == "show")
  {
    document.getElementById(strId).className="hidden";
  }
  else
  {
    document.getElementById(strId).className="show";
  }
}

function ChangeVisibleImg(strId, strShowId, strHideId)
{
  if(document.getElementById(strId).className == "show")
  {
    document.getElementById(strId).className = "hidden";
    document.getElementById(strHideId).className = "hidden";
    document.getElementById(strShowId).className = "show";
    WriteCookie("ChangeVisible-" + strId, "hidden", 200);
  }
  else
  {
    document.getElementById(strId).className="show";
    document.getElementById(strHideId).className = "show";
    document.getElementById(strShowId).className = "hidden";
    WriteCookie("ChangeVisible-" + strId, "show", 200);
  }
}

function LoadVisibleImg(strId, strShowId, strHideId)
{
  var strValue = ReadCookie("ChangeVisible-" + strId);
  if((strValue == "show") || (strValue == "hidden"))
  {
    if(document.getElementById(strId).className != strValue)
    {
      ChangeVisibleImg(strId, strShowId, strHideId);
    }
  }
}

function WriteCookie(name,value,days)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function ReadCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function EraseCookie(name)
{
	createCookie(name,"",-1);
}