

function showSection() {
    var myDiv=document.getElementById("text2");
    var myText=document.getElementById("more");
    var moreText = "MORE &raquo;";
    var lessText = "&laquo; LESS";
    
    if (myDiv.style.display=="block"){
		myDiv.style.display="none";
		if (myText.firstChild.nodeType==3) {
			myText.firstChild.nodeValue = moreText.unescapeHtml();
		}     
	} else {
		myDiv.style.display="block";
		if (myText.firstChild.nodeType==3) {
			myText.firstChild.nodeValue = lessText.unescapeHtml();
		}
    }
}



function showFlashGame() {

	var scrollOff = document.viewport.getScrollOffsets();
	var fromTop = scrollOff["top"] + 40 + 'px';
	var containerHeight = $("wholepage").getHeight() + 40 + "px";
	
	$("overlay").setStyle({height: containerHeight});
	$("yourgameinhere").setStyle({top: fromTop});
	
	Element.show("overlay");
	Effect.Appear("yourgameinhere");
        
}

function hideFlashGame(){
    var myDiv=document.getElementById("overlay");
 var myDiv2=document.getElementById("yourgameinhere");
  //  var myDiv3=document.getElementById("activity");
    myDiv.style.display="none";
    myDiv2.style.display="none";
   // myDiv3.style.display="block";
    
}


function swapImage(newImage){
    var myPic=document.getElementById("gamepic");
    myPic.setAttribute("src", newImage);
    
}


String.prototype.unescapeHtml = function() {
    var temp = document.createElement("div");
    temp.innerHTML = this;
    var result = temp.childNodes[0].nodeValue;
    temp.removeChild(temp.firstChild);
    return result;
}

function swapMovie(myMovie) {
	var flashvars = {};
	var attributes = {};
	var params = {
  		wmode: "transparent",
  		menu: "false"
	};
	var movieLoc = "/flash/" + myMovie;
	swfobject.embedSWF(movieLoc, "yourgameinhere", "800", "600", "9.0.0", "/swfobject/expressInstall.swf", flashvars, params, attributes);
}


