/* ---Jackie Mann's scripts for Tarbert, Argyll, Scotland------ */
<!--
function myTarb(){var V=new Date,C=V.getHours(),v=V.getMinutes();v=((v<10)?"0":"")+v;n="am";if(C>=12){n="pm";C=C-12};if(C==0)C=12;c=C+":"+v+""+n+", ";var i=new Date,l=i.getYear();if(l<1000)l+=1900;var O=i.getDay(),o=i.getMonth(),I=i.getDate();if(I<10)I=""+I;dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December");tarbm=c+dayarray[O]+", "+montharray[o]+" "+I+", "+l;return tarbm}
function mySal(){var l=new Date,I=l.getHours(),i
if(I>=0&&I<12){i=("<font face='Arial' color='#00cc00' size='3'><strong>"+"Good morning "+"</strong></font>")}else if(I>=12&&I<16){i=("<font face='Arial' color='#9900ff' size='3'><strong>"+"Good afternoon "+"</strong></font>")}else if(I>=16&&I<24){i=("<font face='Arial' color='#0000ff' size='3'><strong>"+"Good evening "+"</strong></font>")}
return i}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function copNot(){myMsg="Thanks for reading our Copyright Notice: \n\nAll Images, Content, and Design on this Web site \nare World-wide Copyright materials and are not \navailable for reuse in any form. \n\nCopyright (c) 2001 - 2011 Jackie Mann."
bVer=parseInt(navigator.appVersion);brNS=navigator.appName=="Netscape";brIE=navigator.appName=="Microsoft Internet Explorer"
function i(I){if(brNS&&I.which>1){alert(myMsg);return false}else if(brIE&&(event.button>1)){alert(myMsg);return false}}
document.onmousedown=i;if(document.layers)window.captureEvents(Event.MOUSEDOWN);if(brNS&&bVer<5)window.onmousedown=i}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function readCookie(I){eq=I+"=";ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(eq)==0)return c.substring(eq.length,c.length)}return ''}
function writeCookie(I,l,o){var i="";if(o){d=new Date;d.setTime(d.getTime()+(o*86400000));i="; expires="+d.toGMTString()}document.cookie=I+"="+l+i+"; path=/"}function checkardForm(){if((document.getElementById('tarbertforma2').texttarbName.value!='')){var i=false;document.cookie="Enabled=true";var I=document.cookie;if(I.indexOf("Enabled=true")!=-1){writeCookie('tarbgreet',MM_findObj('texttarbName').value,90);alert('Thanks, the page will now\n reload to make changes.');location.reload();i=true}else{i=false;alert('You need to enable cookies \nto perform this function.')}}else{alert('Please enter your name.');return false}}
function killCookie(I){var i=readCookie(I);if(i){document.cookie=I+'=; expires=Thu, 01-Jan-70 00:00:01 GMT'+'; path=/';alert('Thanks. If Greeting Persists \nClose, Restart Browser and \nClick Disable Again.');location.reload()}else{alert('Only Enabled Greetings\ncan be Disabled.')}}
/* style sheet changing  */
function chosenStyle(i){var o,l,I;for(o=0;(l=document.getElementsByTagName("link")[o]);o++){if(l.getAttribute("rel").indexOf("style")!=-1&&l.getAttribute("title")){l.disabled=true;if(l.getAttribute("title")==i)l.disabled=false}}}
function findStyle(){var i,I;for(i=0;(I=document.getElementsByTagName("link")[i]);i++){if(I.getAttribute("rel").indexOf("style")!=-1&&I.getAttribute("title")&&!I.disabled)return I.getAttribute("title")}
return null}
function findprefStyle(){var i,I;for(i=0;(I=document.getElementsByTagName("link")[i]);i++){if(I.getAttribute("rel").indexOf("style")!=-1&&I.getAttribute("rel").indexOf("alt")==-1&&I.getAttribute("title"))return I.getAttribute("title")}
return null}
window.onload=function(l){var i=readCookie("style"),I=i?i:findprefStyle();chosenStyle(I)}
window.onunload=function(I){var i=findStyle();writeCookie("style",i,365)}
var cookie=readCookie("style"),title=cookie?cookie:findprefStyle();chosenStyle(title);function checkDom(){var i=document.getElementById&&document.createElement?true:false;if(i){}else{window.location='tarberttext/oldbr.htm'}}
//-->

