var bikky = document.cookie; function getCookie(name) { // use: getCookie("name"); var index = bikky.indexOf(name + "="); if (index == -1) return null; index = bikky.indexOf("=", index) + 1; var endstr = bikky.indexOf(";", index); if (endstr == -1) endstr = bikky.length; return unescape(bikky.substring(index, endstr)); } function getCookieSafe(name){ var tmpCookie = getCookie(name); return tmpCookie .replace(/&/g, "&") .replace(//g, ">") .replace(/"/g, """) .replace(/'/g, "'"); } var today = new Date(); var expiry = new Date(today.getTime() + 7 * 24 * 60 * 60 * 1000); // plus 7 days function setCookie(name, value) { // use: setCookie("name", value); if (value != null && value != "") document.cookie=name + "=" + escape(value) + "; expires=" + expiry.toGMTString(); bikky = document.cookie; // update bikky } function delCookie (name) { if (getCookie(name)) document.cookie = name + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; bikky = document.cookie; // update bikky } function getAllSheets(doc) { if( !window.ScriptEngine && navigator.__ice_version ) { return doc.styleSheets; } if( doc.getElementsByTagName ) { var Lt = doc.getElementsByTagName('link'), St = doc.getElementsByTagName('style'); } else if( doc.styleSheets && doc.all ) { var Lt = doc.all.tags('LINK'), St = doc.all.tags('STYLE'); } else { return []; } for( var x = 0, os = []; Lt[x]; x++ ) { var rel = Lt[x].rel ? Lt[x].rel : Lt[x].getAttribute ? Lt[x].getAttribute('rel') : ''; if( typeof( rel ) == 'string' && rel.toLowerCase().indexOf('style') + 1 ) { os[os.length] = Lt[x]; } } for( var x = 0; St[x]; x++ ) { os[os.length] = St[x]; } return os; } function setStyleSheet(theme, doc) { if (doc == null) doc = document; found = false; for( var x = 0, ss = getAllSheets(doc); ss[x]; x++ ) { if( ss[x].title ) { ss[x].disabled = true; } if( ss[x].title == theme) { found = true; ss[x].disabled = false; } } if (((theme == null) || !found) && (ss != null) && (ss[0] != null)) ss[0].disabled = false; } function setSelectedCombo(combo, item) { for (i = 0; i < combo.options.length; i++) if (combo.options[i].value == item) combo.options[i].selected = true; } function getSelectedCombo(combo) { return combo.options[combo.selectedIndex].value; } function select_browser(standard) { if (standard) location.href = "index.html"; else location.href = "download_isb.html"; } function set_cookie_and_reload(name, value) { setCookie(name, value); if (name == "language") history.go(0); if (name == "skin") setStyleSheet(value, document); } function init_selects() { try { if (getCookie("skin") != null) setSelectedCombo(document.getElementById("skin"),getCookie("skin")); if (getSelectedCombo(document.getElementById("skin")) != getCookie("skin")) set_cookie_and_reload("skin", getSelectedCombo(document.getElementById("skin"))); if (getCookie("language") != null) setSelectedCombo(document.getElementById("language"),getCookie("language")); if (getSelectedCombo(document.getElementById("language")) != getCookie("language")) set_cookie_and_reload("language", getSelectedCombo(document.getElementById("language"))); } catch (e) {} } function load_stylesheet(name) { // document.write(""); // document.write(""); document.write(""); setStyleSheet(getCookie('skin')); } document.write(""); document.write(""); if (getCookie("language") != null) { document.write(""); document.write(""); } function onButtIn(normal, pressed) { if(document.getElementById(normal).style.display == "inline") { document.getElementById(pressed).style.display = "inline"; document.getElementById(normal).style.display = "none"; } } function onButtOut(normal, pressed) { if(document.getElementById(normal).style.display == "none") { document.getElementById(normal).style.display = "inline"; document.getElementById(pressed).style.display = "none"; } } function writeLanguages(doc, language_string, id_str) { doc.write(language_string); doc.write(" "); doc.write(""); } function writeSkins(doc, skin_string, id_str) { doc.write(skin_string); doc.write(" "); doc.write(""); } function getLanguageStr(str) { try { return eval(str); } catch (e) {} return str; } function is_hebrew() { return getCookie("language")=="hebrew" ? 1 : 0; } function padding_helper() { if(is_hebrew()) { document.write("