function advman_form_update(element){ //element is the calling element, element.id has the identifier //detect calling form element and action accordingly switch(element.id){ /* case 'advman-product':advman_update_product(); break; */ case 'advman-adformat':advman_update_custom(); break; case 'advman-adtype':advman_update_formats(); break; } } function advman_select_update(element) { element.style.color = (element.options[0].selected) ? 'gray' : 'black'; } function advman_update_ad(element,id,what) { target = document.getElementById(id); switch (what) { case 'bg': target.style.background='#' + element.value; break; case 'border': target.style.borderColor='#' + element.value; break; case 'font-link': case 'font-text': case 'font-title': target.style.fontFamily=element.value; break; default : target.style.color='#' + element.value; break; } } function advman_update_formats() { s = document.getElementById('advman-adtype'); if (s) { n = s.length; for (i=0; i