function toggle(divid, onoff) { if (onoff == 0) document.getElementById(divid).style.display = "none"; else document.getElementById(divid).style.display = "block"; } function minmax(divid) { if (document.getElementById(divid).style.display == "none") document.getElementById(divid).style.display = "block"; else document.getElementById(divid).style.display = "none"; } function dropmenu(divid) { var ourdiv = document.getElementById(divid); if(ourdiv.style.display == "block") ourdiv.style.display = "none"; else ourdiv.style.display = "block"; return false; } function makecookie(name, value, expires, path, domain, secure) { var today = new Date(); today.setTime( today.getTime() ); if (expires) expires = expires * 1000 * 60 * 60 * 24; var expires_date = new Date(today.getTime() + (expires)); document.cookie = name + "=" +escape( value ) + ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + ( ( path ) ? ";path=" + path : "" ) + ( ( domain ) ? ";domain=" + domain : "" ) + ( ( secure ) ? ";secure" : "" ); } function update(msg) { field = document.commentform.message; if (document.selection) { field.focus(); sel = document.selection.createRange(); sel.text = msg; } else if (field.selectionStart || field.selectionStart == 0) { var startPos = field.selectionStart; var endPos = field.selectionEnd; field.value = field.value.substring(0, startPos) + msg + field.value.substring(endPos, field.value.length); } else { field.value += msg; } } function checkall() { $("INPUT[type='checkbox']").attr('checked', 'checked'); } function uncheckall() { $("INPUT[type='checkbox']").attr('checked', ''); } function counthit(linkid, hittype) { var hittype = (hittype == null) ? "regular" : hittype; var tosend = "http://www.ancestorsontheweb.com/ajax.php?action=counthit" + escape("&") + "linkid=" + linkid + escape("&") + "hittype=" + hittype; $.get(tosend,{},function(response) {}) } function imageover(ima) { ima.style.borderColor = 'blue'; } function imageout(ima) { ima.style.borderColor = 'black'; } function sndRequest(vote,id_num,ip_num) { var selectit = '#unit_long'+id_num; var element = $(selectit); element.html('
Loading ...
'); $.post("http://www.ancestorsontheweb.com/ajax.php",{ j: vote, q: id_num, t: ip_num }, function(xml) { var update = new Array(); if(xml.indexOf('|') != -1) { update = xml.split('|'); toselect = '#' + update[0]; $(toselect).html(update[1]); } }); } function changeText(div2show, text) { var selectit = '#' + divtoshow; $(selectit).html(text); } function selectstyle(stylename) { var i, cacheobj, altsheets=[""] if (document.getElementById) { for(i=0; (cacheobj=document.getElementsByTagName("link")[i]); i++) { if (cacheobj.getAttribute("rel").toLowerCase()=="alternate stylesheet") { cacheobj.disabled = true; altsheets.push(cacheobj); if(cacheobj.getAttribute("title") == stylename) cacheobj.disabled = false; } } makecookie("stylesheet", stylename, 365); $.post("http://www.ancestorsontheweb.com/index.php", "action=setstyle&style="+stylename+"&userauthcode={THISMEMBERAUTHCODE}"); } } function login() { if ($('#loginmarker').is(':visible')) $('#loginmarker').fadeOut().removeClass('quicklogin'); else $('#loginmarker').addClass('quicklogin').fadeIn(); } function cookieisset(cookie_name) { var index; if (document.cookie != document.cookie) { index = document.cookie.indexOf(cookie_name); } else { index = -1; } return index; } if (cookieisset('timezone') == -1) { makecookie('timezone', new Date().getTimezoneOffset(), 7, '/', '', ''); } if (cookieisset('screensize') == -1) { var res = screen.width + 'x' + screen.height; makecookie('screensize', res, 7, '/', '', ''); }