function getBodyHeight(){
	return document.body.scrollHeight;
}

function showHideOpac(showHide){
	
	bodyHeight = getBodyHeight();
	
	if (showHide == 'show') {
		appendElement(document.body,'div','opac','')
		document.getElementById('opac').style.height = bodyHeight + 'px';
		document.getElementById('opac').style.visibility = 'visible';
		
	}
	else {
		document.getElementById('opac').style.visibility = 'hidden';
	}
}

function appendElement(node,tag,id,htm){
	
	if (id) {
		if (!document.getElementById(id)){
			var ne = document.createElement(tag);
        	if(id) ne.id = id;
        	if(htm) ne.innerHTML = htm;
        	node.appendChild(ne);
		}
	}
}

function showHideWaves(showHide){
	
	if (showHide == 'show'){
		showHideOpac(showHide)
		document.getElementById('upper21').style.visibility = 'visible';
	}
	else {
		showHideOpac(showHide)
		document.getElementById('upper21').style.visibility = 'hidden';
	}
}

function showHideGM(showHide){
	
	if (showHide == 'show'){
		showHideOpac(showHide)
		document.getElementById('upper1').style.visibility = 'visible';
	}
	else {
		showHideOpac(showHide)
		document.getElementById('upper1').style.visibility = 'hidden';
	}
}