| 1 | function vymena() { |
| 2 | var browser = navigator.appName; |
| 3 | document.formular.mail_to.value = document.formular.mail_to.value.toLowerCase() ; |
| 4 | if(browser == "Microsoft Internet Explorer") { |
| 5 | xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); |
| 6 | } |
| 7 | else { |
| 8 | xmlhttp = new XMLHttpRequest(); |
| 9 | } |
| 10 | get_id_url = '/ajax/get_id_by_name.php?name='; |
| 11 | get_id_url += document.formular.mail_to.value; |
| 12 | xmlhttp.open("GET", get_id_url); |
| 13 | xmlhttp.onreadystatechange = function() { |
| 14 | if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { |
| 15 | id = xmlhttp.responseText; |
| 16 | document.images['fricon'].src = '/images/nodes/' + id.substr(0, 1) + '/' + id.substr(1, 1) + '/' + id + '.gif'; |
| 17 | } |
| 18 | } |
| 19 | xmlhttp.send(null); |
| 20 | } |
| 21 | |
| 22 | function chngto(name,id) { |
| 23 | document.formular.mail_to.value = name ; |
| 24 | name = name.toLowerCase() ; |
| 25 | document.images['fricon'].src = '/images/nodes/' + id.substr(0, 1) + '/' + id.substr(1, 1)+'/' + id + '.gif'; |
| 26 | } |