/******************************************************************************* * Filename: functions.js * Location: /www/include/js * Author: Peter Liljegren * Date: 10/03/2006 * Purpose: Provide various javascript functions *******************************************************************************/ /** * Set the value property of a DOM node obtained by the 'id' * to the value specified in the 'value' parameter */ function set_value(id, value) { if(document.getElementById(id)) { document.getElementById(id).value = value; } } var message="Function Disabled!"; function clickIE4(){ if (event.button==2){ alert(message); return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } //document.oncontextmenu=new Function("alert(message);return false") //document.oncontextmenu=new Function("return false")