// JavaScript Document
function changetext(content){
	document.getElementById('eventdetails').innerHTML = content;
}

// JavaScript Document
function toggleMe(targetId){
	if (document.getElementById){
		target = document.getElementById( targetId );
		if (target.style.display == "none"){
				target.style.display = "";
		} else {
			target.style.display = "none";
		}
	}	 
}
 
 
function adminToggle(targetId,arrowId){
	if (document.getElementById){
		target = document.getElementById( targetId );
		flipper = document.getElementById( arrowId );
		if (target.style.display == "none"){
				target.style.display = "";
				flipper.style.background = "url(images/downarrow.png)";
		} else {
			target.style.display = "none";
			flipper.style.background = "url(images/rightarrow.png)";
		}
	}	 
}

function swapimage(newimage)
   {
   
   	newimage = "ximages/m/" + newimage;
   	
      var imgMain = document.getElementById('mainimage');
      var divParent;

      // create new image element
      var imgNew = document.createElement('img');

      // give it an image
      // here I use the src of the icon just for convenience
      // you'd want to somehow determine the src of your desired image
      imgNew.src = newimage;
   
      // give it an id
      imgNew.id = 'mainimage';

      // replace image
      divParent = imgMain.parentNode;
      divParent.replaceChild(imgNew, imgMain);

}         

