function infoblock_toggle(div_id){ var icon_id = '#icon_' + div_id; var title_id = '#title_' + div_id; var idd = '#' + div_id; if (document.cookie == "") { if (document.getElementById(div_id).style.display == 'block'){ $(idd).slideToggle(600); $.cookie(idd, 'collapsed'); $(icon_id).attr('src', "/_img/icon_expand.gif"); $(title_id).attr('title', ""); } else { $(idd).slideToggle(600); $.cookie(idd, 'expanded'); $(icon_id).attr('src', "/_img/icon_collapse.gif"); $(title_id).attr('title', ""); } } else { if ($.cookie(idd) == 'collapsed') { $(idd).slideToggle(600); $.cookie(idd, 'expanded'); $(icon_id).attr('src', "/_img/icon_collapse.gif"); $(title_id).attr('title', ""); } else { $(idd).slideToggle(600); $.cookie(idd, 'collapsed'); $(icon_id).attr('src', "/_img/icon_expand.gif"); $(title_id).attr('title', ""); } } } function div_toggle(div_id){ var idd = '#' + div_id; if (document.cookie == "") { if (document.getElementById(div_id).style.display == 'block'){ $(idd).slideToggle(600); $.cookie(idd, 'collapsed'); } else { $(idd).slideToggle(600); $.cookie(idd, 'expanded'); } } else { if ($.cookie(idd) == 'collapsed') { $(idd).slideToggle(600); $.cookie(idd, 'expanded'); } else { $(idd).slideToggle(600); $.cookie(idd, 'collapsed'); } } } function IsNumeric(sText){ var ValidChars = "0123456789."; var IsNumber=true; var Char; for (i = 0; i < sText.length && IsNumber == true; i++) { Char = sText.charAt(i); if (ValidChars.indexOf(Char) == -1) IsNumber = false; } return IsNumber; } function show_mail(username, host) { document.write('' + username + '@' + host +''); } function addbookmark(title,url){ if (window.sidebar) window.sidebar.addPanel(title, url, ""); else if (window.opera && window.print){ var elem = document.createElement('a'); elem.setAttribute('href',url); elem.setAttribute('title',title); elem.setAttribute('rel','sidebar'); elem.click(); } else if(document.all) window.external.AddFavorite(url, title); } function setHomepage(url){ if (document.all){ document.body.style.behavior='url(#default#homepage)'; document.body.setHomePage(url); } else if (window.sidebar){ if(window.netscape){ try{ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); } catch(e){ alert(""); } } var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch); prefs.setCharPref('browser.startup.homepage',url); } } function loadweather(selObj){ if (IsNumeric(selObj.options[selObj.selectedIndex].value)) $('#weather').load('/dynweather/locality-'+selObj.options[selObj.selectedIndex].value+'/'); else return false; } function selstar(val){ for(var x=1;x<=val;x++){ document['ri'+x].src="/_img/star1.gif"; } } function unselstar(val){ for(var x=1;x<=val;x++){ document['ri'+x].src="/_img/star0.gif"; } } function loadurl2(dest) { try { xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { } xmlhttp.onreadystatechange = triggered2; xmlhttp.open("GET", dest); xmlhttp.send(null); } function sendpolldata(form,id) { var howMany = form.elements.length; var str = ''; for (count = 0; count < howMany; count++) { if (form.elements[count].checked == true) { str = str + "&answer[]=" + form.elements[count].value; } } var url = "/_inc/poll.php?poll=" + id + str; loadurl2(url); return false; } function triggered2() { if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) { document.getElementById('polls').innerHTML = xmlhttp.responseText; } }