function reveal(id,show) { if (show) document.getElementById(id).style.visibility='visible'; else document.getElementById(id).style.visibility='hidden'; } function postit(form,flag) { switch (flag) { case 1: form.action="utils/pimailer.php"; break; default: return; } form.method="post" if (flag==1) { reveal('sendbutton',false); reveal('filebutton',false); reveal('ack',true); } form.submit(); } function nfour(number) { return (number < 1000) ? number + 1900 : number;} function calcdate() { var now = new Date(); var days = new Array('Sunday','Monday','Tuesday','Wednesday', 'Thursday','Friday','Saturday'); var months = new Array('January','February','March','April','May','June', 'July','August','September','October','November','December'); var date = ((now.getDate()<10) ? "0" : "")+ now.getDate(); today = days[now.getDay()]+" "+now.getDate()+" "+months[now.getMonth()] + " " +nfour(now.getYear()); return today; } function launch(form,pg) { form.method="get"; form.action=pg; form.submit(); } function getarticle(form) { var i=form.articles.selectedIndex; rn=recarray[i]; form.action="diary.php?rn="+rn; form.submit(); } function getworldnews(form) { var i=form.articles.selectedIndex; rn=recarray[i]; form.action="worldnews.php?rn="+rn; form.submit(); } function anonclick() { if (document.cuform.anon.checked) document.cuform.fromemail.value='anon@noemail.com'; else document.cuform.fromemail.value=''; } function windowsize() { var winW=630,winH=460; if (document.body && document.body.clientWidth) { winW = document.body.clientWidth; winH = document.body.clientHeight; } if (document.compatMode=='CSS1Compat' && document.documentElement && document.documentElement.clientWidth ) { winW = document.documentElement.clientWidth; winH = document.documentElement.clientHeight; } if (window.innerWidth && window.innerHeight) { winW = window.innerWidth; winH = window.innerHeight; } return [winW,winH]; } function hidepic(n) { document.getElementById(n).style.visibility='hidden'; } function showpic(n) { var ob,obpic; ob=document.getElementById(n); obpic=document.getElementById(n+'pic'); if (ob.style.visibility=='visible') { ob.style.visibility='hidden'; return; } ws=windowsize(); stb=document.body.scrollTop; var x=(ws[0]-obpic.width)/2-180; var y=stb; ob.style.left=x+'px'; ob.style.top=y+'px'; ob.style.visibility='visible'; } function sendblog(f,n) { f.action='utils/piblog.php'; f.method="post" f.submit(); document.getElementById(n).style.visibility='hidden'; }