function QMFDTree(qmaction, compid) { function QMFDTree_onChange(action, id) { } function QMFDTree_update(action, id) { var url = this.qmaction; this.action = action; if (action != null) { url = url + '&action=' + action; } if (id != null) { url = url + '&id=' + id; } url = url + '&compid=' + this.compid; url = url + '&cache=' + Math.random(); var ajax = new Ajax.Updater({success: this.compid}, url, {method: 'get'}); if(parent.document.getElementById('iframe')){ url = parent.document.getElementById('iframe').src ; url = url + "&action=" + action + "&aid=" + id; parent.document.getElementById('iframe').src = url; } this.onChange(action, id); } function QMFDTree_onKeyPress(evt) { var evt = (evt) ? evt : ((event) ? event : null); if (evt) { var target = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : mull); if (target && target.tagName != 'INPUT' && target.tagName != 'SELECT' && target.tagName != 'TEXTAREA') { var code = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : null); if (code) { var name = 'key_' + String.fromCharCode(code); var anchors = document.getElementsByName(name); if (anchors) { if (anchors[0]) { anchors[0].focus(); } } } } } } this.qmaction = qmaction; this.action =''; this.compid = compid; this.onChange = QMFDTree_onChange; this.update = QMFDTree_update; this.onKeyPress = QMFDTree_onKeyPress; document.onkeypress = QMFDTree_onKeyPress; if (!document.qmfdtree_list) { document.qmfdtree_list = new Array(); } document.qmfdtree_list[this.compid] = this; }