/******************************************************************************** * include/philter.js : philter javascript functions * ------------------ * * This file is part of the philter distribution * Copyright: See COPYING files that comes with this distribution ********************************************************************************/ function text_onfocus(object,val) { if(object.value == val) object.value = ''; } function text_onblur(object,val) { if(object.value == '') object.value = val; } function cleanChilds(Node, nbChilds) { while(Node.childNodes.length>nbChilds) Node.removeChild(Node.childNodes[nbChilds]); } /********** ORDER FORM FUNCTIONS **********/ function order_up() { form = document.forms['order']; select = form.elements['order[select]']; if(select.selectedIndex>1) { i = select.selectedIndex; value1 = select.options[i].value; text1 = select.options[i].text; value2 = select.options[i-1].value; text2 = select.options[i-1].text; select.options[i] = new Option(text2,value2,false,false); select.options[i-1] = new Option(text1,value1,false,false); select.selectedIndex = i-1; form.elements['order['+value1+']'].value = i-1; form.elements['order['+value2+']'].value = i; } } function order_dn() { form = document.forms['order']; select = form.elements['order[select]']; if(select.selectedIndex>0 && select.selectedIndex