/* © 2005-2006 TCKnetwork 25.02.2006 12:37 */
var form_r="";
function form_la(n,c,m) { var h=document.getElementById(n); var d=document.createElement("div"); var t=h.value; var v=''; while (t!='') { p=t.indexOf(','); if (p==-1) p=t.length; f=t.substring(0,p); q=f.indexOf('='); if (q==-1) q=f.length; v+='<option value="'+f.substring(q+1)+'">'+f.substring(0,q)+'</option>'; t=t.substring(p+1); } d.innerHTML='<select size="5" class="'+c+'t" id="'+n+'_list" onclick="form_ld(\''+n+'\',3);">'+v+'</select><div class="'+c+'r"><a href=\"javascript:form_ld(\''+n+'\',1);">'+form_l[5]+'</a> <a href=\"javascript:form_ld(\''+n+'\',0);">'+form_l[6]+'</a></div>'+form_l[7]+'<br /><input type="text" class="'+c+'t" id="'+n+'_text" onkeyup=\"form_ld(\''+n+'\',2);\"><br />'+(m?form_l[8]+'<br /><input type="text" class="'+c+'t" id="'+n+'_value" onkeyup=\"form_ld(\''+n+'\',2);\"><br />':''); h.parentNode.insertBefore(d,h); h.style.position='absolute'; h.style.visibility='hidden'; }
function form_le(n) { var l=document.getElementById(n+'_list'); var t=document.getElementById(n+'_text'); var v=document.getElementById(n+'_value'); if (l.options.length) { t.value=l.options[0].text; if (v) v.value=l.options[0].value; l.selectedIndex=0; } }
function form_ld(n,a) { var l=document.getElementById(n+'_list'); var t=document.getElementById(n+'_text'); var v=document.getElementById(n+'_value'); if (eval('/[,=]/i').test(t.value)) t.value=t.value.replace(/[,=]/,''); if (v&&eval('/[,=]/i').test(v.value)) v.value=v.value.replace(/[,=]/,''); if (a==0) { l.options[l.selectedIndex]=null; t.value=''; if (v) v.value=''; form_le(n); } else if (a==1) { t.value='-'; if (v) v.value=''; l.options[l.options.length]=new Option(t.value,v?v.value:''); l.selectedIndex=l.options.length-1; t.focus(); t.select(); } else if (a==2) { l.options[l.selectedIndex].text=t.value; if (v) l.options[l.selectedIndex].value=v.value; } else if (a==3) { t.value=l.options[l.selectedIndex].text; if (v) v.value=l.options[l.selectedIndex].value; t.focus(); } }
function form_lg(n) { l=document.getElementById(n+'_list'); r=''; for (i=0;i<l.options.length; i++) { o=l.options[i]; r+=o.text+(o.value?'='+o.value:'')+','; } document.getElementById(n).value=r.substring(0,r.length-1); return true; }
function form_del(n,u) { if(confirm(form_l[4].replace(/%n%/,n))) window.location=u; }
function form_delt(u) { if(confirm(form_l[9])) window.location=u; }
function form_msg() { if (!form_r) return true; alert(form_l[0]+' :\n'+form_r); form_r=''; return false; }
function form_exp(n,c,e) { o=document.getElementById(n); if(o&&!eval('/^'+e+'$/i').test(o.value)) form_r+='- '+form_l[1].replace(/%n%/,c)+'\n'; }
function form_pwd(n,c,l) { p1=document.getElementById(n+'1'); p2=document.getElementById(n+'2'); if (!p1||!p2||p1.value==''&&p2.value=='') return; if (p1.value.length<l) form_r+='- '+form_l[2].replace(/%n%/,c).replace(/%l%/,l)+'\n'; if (p1.value!=p2.value) form_r+='- '+form_l[3].replace(/%n%/,c)+'\n'; }
function form_pop(u) { window.open(u,'_blank'); }
