rem: if (!ev) var ev = window.event;  
add: if (!ev) var ev = window.event;  
context:         function checkBeforeSubmit(ev)        {        	if (!ev) var ev = window.event;        	            if (ev.ctrlKey && ev.altKey)            {                var mdt = getObj("mdt"); if (!mdt) return false;                                makeWindow('', '<pre>' +                     ('<?xml version="1.0" encoding="UTF-16"?>' +                      '  <!-- From browser, save as Text/Unicode -->\n\n' +                      mdt.value)                        .replace(/&/g, '&amp;').replace(/"/g, '&quot;')                        .replace(/</g, '&lt;').replace(/>/g, '&gt;') +                     '</pre>');                return false;            }                    	var kwdsnow = getObj("kwds_string"); if (!kwdsnow) return true;        	if (kwdsnow.value == kwdswere) return true;  // unchanged        	// note: calling HTML should define var kwdswere!        	        	var language = kwdsnow.title;        	        	var mda = getObj("mda");        	if (!mda) { alert('? Form does not contain mda'); return false; }        	        	var kwdsarray = kwdswere.split(',');        	        	for (var k = 0; k < kwdsarray.length; k++)  // delete old        	    if (kwdsarray[k].trim() != '')                 	mda.value += "\nmetadata/lom/general/keyword[-1]~";        	        	kwdsarray = kwdsnow.value.split(',');        	        	for (k = 0; k < kwdsarray.length; k++)        	{            	var newkw = kwdsarray[k].trim();            	if (newkw != '') mda.value +=             	    "\nmetadata/lom/general!keyword" +             	    "\nmetadata/lom/general/keyword[-1]!string=" + newkw +             	    "\nmetadata/lom/general/keyword[-1]/string/@language=" + language;            }        	        	return true;       	        }
meta: 7863	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/7863/de8684d4ffe67b5e9ceafb6725e84b0a2588b4d4/md_script.js/buggy/main/metadata/md_script.js