//Copyright timeanddate.com 2006, do not use without permission

function setdisp(f,v){var o=null;if(document.getElementById){o=document.getElementById(f);}else if(document.all){o=document.all[f];}else if(document.layers){o=document.layers[f];}
if(o&&o.style){o.style.display=v;}}
function holtog(f,v){var opts=document.customform.hol.options;var opt=opts[opts.length-1];var n=opt.value;if(f.checked){n|=v;}else{n&=1048575-v;}
opt.value=n;}
function holchg(){var df=document.customform;var f=df.hol;if(f){var lo=f.options.length-1;var vis=(f.selectedIndex==lo);setdisp("customhol",vis?"block":"none");var v=0;for(var i=0;i<20;i++){var fo=df["h"+i];if(fo){fo.disabled=!vis;if(fo.checked){v+=1<<i;}}}
f.options[lo].value=v;}}
function ah(){var df=document.customform;var f=df.hol;if(f){var o=f.options,ol=o.length,i,v,b=0;for(i=ol-1;i>=0;i--){if((v=o[i].value-0)>b){f.selectedIndex=i;b=v;}}
df.submit();}}