// Global n4=(document.layers); n6=(document.getElementById&&!document.all); ie=(document.all); function GetEl(el) { if(n4){ obj = document.el; // NN4 } else { if(n6){ obj = document.getElementById(el); } else { if(ie){ obj = document.all[el]; // IE4 } } } return obj; } function changeLanguage(link) { select=document.getElementById('languageSelectorId'); lang = select.options[select.selectedIndex].value; if (lang == 'ru') { window.open('http://insunrise.ru/'+link, '_self'); //http://preprod.insunrise.ru/'+link, '_self'); } else if (lang == 'en') { window.open('http://en.insunrise.ru/'+link, '_self'); //http://preprod-eng.insunrise.ru/'+link, '_self'); } } function changeReportLink1(selector, linkIds, langs, urls) { for (link = 0; link < linkIds.length; link++) { i = 0; while (document.getElementById(linkIds[link]).attributes[i] != null) { if (document.getElementById(linkIds[link]).attributes[i].name == 'href') { oldLink = document.getElementById(linkIds[link]).attributes[i].value; var changed = false; for (langIndex = 0; langIndex -1) { newLink = oldLink.replace(urls[langIndexToReplace], urls[langIndex]); changed = true; break; } else if (oldLink.search('..') > -1) { if (selector.options[selector.selectedIndex].value == langs[langIndex]) { newLink = oldLink.replace("../", urls[langIndex]); changed = true; break; } } } } } if (changed) { document.getElementById(linkIds[link]).attributes[i].value = newLink; break; } } break; } i++; } } } function changeReportLink(selector, linkIds, langs) { for (langIndex = 0; langIndex