function trim(inputString) { if (typeof inputString != "string") return inputString; var retValue = inputString; var ch = retValue.substring(0, 1); while (ch == " ") { retValue = retValue.substring(1, retValue.length); ch = retValue.substring(0, 1); } ch = retValue.substring(retValue.length - 1, retValue.length); while (ch == " ") { retValue = retValue.substring(0, retValue.length - 1); ch = retValue.substring(retValue.length - 1, retValue.length); } while (retValue.indexOf(" ") != -1) retValue = retValue.substring(0, retValue.indexOf(" ")) + retValue.substring(retValue.indexOf(" ") + 1, retValue.length); return retValue; } function set_cookie ( name, value, exp_seconds, path, domain, secure ) { var cookie_string = name + "=" + escape ( value ); if ( exp_seconds ) { var expires = new Date (); ex=expires.valueOf()+exp_seconds*1000; expires = new Date (ex); cookie_string += "; expires=" + expires.toGMTString(); } if ( path ) cookie_string += "; path=" + escape ( path ); if ( domain ) cookie_string += "; domain=" + escape ( domain ); if ( secure ) cookie_string += "; secure"; document.cookie = cookie_string; } function delete_cookie ( cookie_name ) { var cookie_date = new Date ( ); // current date & time cookie_date.setTime ( cookie_date.getTime() - 1 ); document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString(); } function get_cookie ( cookie_name ) { var results = document.cookie.match ( cookie_name + '=(.*?)(;|$)' ); if ( results ) return ( unescape ( results[1] ) ); else return null; } function xx_switch_lang(xlang) { set_cookie("lang", xlang, 86400*30,'/'); window.location=window.location; } var definfoboxtext=""; var iboxfocused=false; function iboxsend() { if (!iboxfocused) iboxfocus() else { o=document.forms["infoboxform"]; if (o) o.submit(); } } function iboxfocus() { m=document.getElementById("defmail"); o=document.getElementById("infobox"); if ((o) && (!iboxfocused)) { o.style.cursor="text"; o.title=_infobox_hint; iboxfocused=true; definfoboxtext=o.value; xx=_infobox_inside; if (m) xx+=m.value; o.value=xx; o.focus(); } } function resetInfobox() { o=document.getElementById("infobox"); if ((o) && (iboxfocused)) { iboxfocused=false; o.value=definfoboxtext; } }