function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}
addLoadEvent(init);
addLoadEvent(function() { 
addLoadEvent(openClose);
});


function init()
{
	if (document.getElementById('moretext')) {
		var objDescription = document.getElementById('moretext');
		var objHelp, objAnchor, objClone;

		objAnchorContainer = document.createElement('p');
		objAnchorContainer.setAttribute('class', 'moretext');
		objAnchorContainer.setAttribute('id', 'morep');
		objAnchor = document.createElement('a');
		objAnchor.setAttribute('href', '#');
		objAnchor.setAttribute('id', 'morelink');
		objAnchor.appendChild(document.createTextNode("Read more \u00BB"));
		objAnchor.onclick = function() {return openClose(this);};
		objAnchorContainer.appendChild(objAnchor);
		objDescription.style.display = 'none';
		objDescription.parentNode.insertBefore(document.createTextNode(' '),objDescription);
		objDescription.parentNode.insertBefore(objAnchorContainer,objDescription);
		objDescription.parentNode.insertBefore(document.createElement('p'),objDescription);

	}
}


function openClose(objElement)
{
	var objElement = objElement;
	var objHelp = document.getElementById('moretext');

	if (objHelp)
	{
		if (objHelp.style.display == 'none')
		{
			objHelp.style.display = 'block';
			document.getElementById("morep").style.display = 'none';
		}
		else
		{
			objHelp.style.display = 'none';
		}
	}

	return false;
}









