//      funcs.js// Originally created for Talking Dictionaries project. Swarthmore College. Copyright 2005-2007//--------------------------------------------------------------------------//  Commonly used JavaScript functions are kept here.//  These could possibly be collapsed into one function.//--------------------------------------------------------------------------var new_entry = 'noedit';var entries = new Array();function showhide() {    if(new_entry == "noedit") {        document.getElementById("new_entry").style.display="block";        new_entry = "edit";    } else {        document.getElementById("new_entry").style.display="none";        new_entry = "noedit";    }}function edit(block_id) {    if(!entries[block_id]) {        entries[block_id] = "noedit";    }    if(entries[block_id] == "noedit") {        document.getElementById(block_id).style.display="block";        document.getElementById(block_id.concat("text")).style.display="none";        entries[block_id] = "edit";    } else {        document.getElementById(block_id).style.display="none";        document.getElementById(block_id.concat("text")).style.display="block";        entries[block_id] = "noedit";    }}function playSound(surl) {    document.getElementById('dumspan').innerHTML = "<embed src='"+surl+"' hidden=true autostart=true loop=false />";    setTimeout('clearSound()', 100000);}function pressButton(swap) {    document.getElementById(swap).src = "../../resources/audio-in.gif";}function unpressButton(swap) {    document.getElementById(swap).src = "../../resources/audio-out.gif";}function clearSound() {    document.getElementById('dumspan').innerHTML = "";}// Menu code provided by EchoEcho.com (June 2007).function land(ref, target){lowtarget=target.toLowerCase();if (lowtarget=="_self") {window.location=loc;}else {if (lowtarget=="_top") {top.location=loc;}else {if (lowtarget=="_blank") {window.open(loc);}else {if (lowtarget=="_parent") {parent.location=loc;}else {parent.frames[target].location=loc;};}}}}function jump(menu){ref=menu.choice.options[menu.choice.selectedIndex].value;splitc=ref.lastIndexOf("*");target="";if (splitc!=-1){loc=ref.substring(0,splitc);target=ref.substring(splitc+1,1000);}else {loc=ref; target="_self";};if (ref != "") {land(loc,target);}}//-->