rem: if (destFile.value == '' || destFile.value == document.fname ) { document.getElementById('wpDestFile').value = fname; } document.fname = fname; 
add: if (destFile) destFile.value = fname; 
context: function fillDestFilename() {	if (!document.getElementById) return;	var path = document.getElementById('wpUploadFile').value;	// Find trailing part	var slash = path.lastIndexOf( '/' );	var backslash = path.lastIndexOf( '\\' );	var fname;	if ( slash == -1 && backslash == -1 ) {		fname = path;	} else if ( slash > backslash ) {		fname = path.substring( slash+1, 10000 );	} else {		fname = path.substring( backslash+1, 10000 );	}	// Capitalise first letter and replace spaces by underscores	fname = fname.charAt(0).toUpperCase().concat(fname.substring(1,10000)).replace( / /g, '_' );	// Output result	var destFile = document.getElementById('wpDestFile');	if (destFile.value == '' || destFile.value == document.fname ) {		document.getElementById('wpDestFile').value = fname;	}	document.fname = fname;}
meta: 7966	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7966/ebedad54954665b6fe5ea7a4df70bac86e4e0689/wikibits.js/buggy/skins/common/wikibits.js