
var Sound = new Object();
Sound.play = function Sound_play(src) {

	if (!src) {
		return false;
	}
	this.stop();
	var elm;

	if (typeof document.all != "undefined") {
		elm = document.createElement("bgsound");
		elm.src = src;
	}
	else {
		elm = document.createElement("object");
		elm.setAttribute("data",src);
		elm.setAttribute("type","audio/x-wav");
		elm.setAttribute("controller","true");
	}
	document.body.appendChild(elm);
	this.elm = elm;
	return true;
};

Sound.stop = function Sound_stop() {
	if (this.elm) {
		this.elm.parentNode.removeChild(this.elm);
		this.elm = null;
	}
};


 function play_sound(soundName)
 {
	sound_name = "sounds/" + soundName;
    if(on_off == 1)
	{
	  Sound.play(sound_name);
	  on_off=0;

	}
	else
	{
      Sound.stop(sound_name);
	  on_off=1;
	}
 }
 
 function setIFrameHeight(f,spanId) {
	// set height of iFrame to the height of the document inside it
	f.style.height = f.contentWindow.document.body.scrollHeight + "px";
	// set height of last cell on left hand nav to the same height as the iFrame
	padderLHnavCell = document.getElementById(spanId);
	// padderLHnavCell.style.height = f.contentWindow.document.body.scrollHeight + "px";
	padderLHnavCell.style.height = "640px";
}

function toggleVisibility(spanId) {
	
	currentVisibility = eval("document.all." + spanId + ".style.display");
	// alert(currentVisibility);
	if(currentVisibility == "none") {
		eval("document.all." + spanId + ".style.display = \"block\"");
		eval("document.all." + spanId + ".style.visibility = \"visible\"");
	} else {
		eval("document.all." + spanId + ".style.display = \"none\"");
		eval("document.all." + spanId + ".style.visibility = \"hidden\"");
	}
}

function imageRollover(imgName, imgObjName) {
	document.images[imgName].src = eval(imgObjName + ".src");
}

function rolloverCursor(spanElementId,cursorType) {
  tmpString = spanElementId + ".style.cursor='" + cursorType + "'";
  eval(tmpString);
}




