/****************************************************************************************************/
/* control the opening of new windows */

function newwin(url)
{

/* control the opening of new windows */

var winvars = "";
var op = false;
var ie55 = false;
var ie6 = false;
var ie7 = false;
var ie8 = false;
var ie = false;
var sm = false;
var ff = false;
var ch = false;
var sf = false;
var nk = false;
var nw = false;

function opnewwin(url)
{
w = (screen.availWidth - 10).toString();
h = (screen.availHeight - 122).toString();
if (ie) {winvars = "width="+w+",height="+h+",top=0,left=0,toolbar=yes,scrollbars=yes,location=yes,status=yes,menubar=yes,resizable=yes";}
else {winvars = "width="+w+",height="+h+",top=0,left=0,toolbar=yes,scrollbars=yes,location=yes,statusbar=yes,menubar=yes,resizable=yes";}
winContent = window.open(url,'jb_newwin',winvars);
if (window.focus) {winContent.focus();}
}

function opnew(url)
{
win1=window.open(url,'jb_newwin');
if (window.focus) {win1.focus();}
}

/* find browser */
op = (navigator.userAgent.indexOf("Opera")!=-1)?true:false;
ie55 = (navigator.userAgent.indexOf("MSIE 5.5")!=-1)?true:false;
ie6 = (navigator.userAgent.indexOf("MSIE 6.0")!=-1)?true:false;
ie7 = (navigator.userAgent.indexOf("MSIE 7.0")!=-1)?true:false;
ie8 = (navigator.userAgent.indexOf("MSIE 8.0")!=-1)?true:false;
if(ie55 || ie6 || ie7) {ie = true;}
ie = (navigator.appName.indexOf("Microsoft Internet Explorer")!=-1)?true:false;
if (op & ie) {ie = false;}
sm = (navigator.userAgent.indexOf("SeaMonkey")!=-1)?true:false;
ff=(navigator.userAgent.indexOf("Firefox")!=-1)?true:false;
ch=(navigator.userAgent.indexOf("Chrome")!=-1)?true:false;
sf=(navigator.userAgent.indexOf("Safari")!=-1)?true:false;
if (!op & !ie  & !sm & !ff & !ch & !sf) {nk = true;}
if (ch | sm | nk) {nw = false;}
else {nw = true;}

if (nw) {opnewwin(url);}
else {opnew(url);}

}

/****************************************************************************************************/

/*************************************************************************************************/
/* File    : fadeimg.js © jan-billington.com											    	 */
/* Created : 06 Mar 2005                                                                         */
/* Author  : Jan Billington  (janbill@jan-billington.com) jan-billington.com				 */
/* Purpose : To create an upwards/downwards fading effect for images                             */
/*                                                                                               */
/* Call as follows:-                                                                             */
/* <img class="fadeimg" onMouseover='fadedn(this)' onMouseout='fadeup(this)' src="example.gif">  */
/*                                                                                               */
/*                                                                          				     */
/* YOU ARE WELCOME TO USE THIS SCRIPT BUT PLEASE LEAVE THIS NOTICE INTACT.                       */
/*                                                                               				 */
/*************************************************************************************************/

var low=0.8;		/* lowest opacity strength */
var high=1;			/* highest opacity strength */
var step=0.01;	    /* stepped change of opacity */
moz = false;        /* indicates mozilla browser */
alpha = false;      /* indicates i.e browser */
strength = 1;


/* faded increase of opacity */
function fadeup(cur){

browserdetect=cur.filters? "ie" : typeof cur.style.MozOpacity=="string"? "mozilla" : "";
if (browserdetect=="mozilla") moz = true;
else if (browserdetect=="ie") alpha = true;
else return;
strength=low;
if (moz) cur_opacity = cur.style.MozOpacity;
else cur_opacity = cur.filters.alpha.opacity/100;

strength = strength+step;
while (strength < high) {
  if (moz) cur.style.MozOpacity = strength;
  else cur.filters.alpha.opacity = strength*100;
  strength = strength + step;
}
if (moz) cur_opacity = cur.style.MozOpacity;
else cur_opacity = cur.filters.alpha.opacity/100;

}


/* faded decrease of opacity */
function fadedn(cur){

browserdetect=cur.filters? "ie" : typeof cur.style.MozOpacity=="string"? "mozilla" : "";
if (browserdetect=="mozilla") moz = true;
else if (browserdetect=="ie") alpha = true;
else return;
strength=high;
if (moz) cur_opacity = cur.style.MozOpacity;
else cur_opacity = cur.filters.alpha.opacity/100;

strength = strength-step;
while (strength > low) {
  if (moz) cur.style.MozOpacity = strength;
  else cur.filters.alpha.opacity = strength*100;
  strength = strength - step;
}
if (moz) cur_opacity = cur.style.MozOpacity;
else cur_opacity = cur.filters.alpha.opacity/100;

}



/* end of page validations */
function endofpage(){

var bookmarkurl="http://jan-billington.com/";
var bookmarktitle="Jan Billington: Home Page";

var AFS_Account='00315118';
var AFS_Tracker='auto';
var AFS_Server='www3';
var AFS_Page='DetectName';
var AFS_Url='DetectUrl';

function addbookmark() {
ie = false;
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) ie=true;
op=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;
if(ie&&op) ie = false;
if(ie){
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}
else if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) {
        window.sidebar.addPanel(bookmarktitle,bookmarkurl,""); 
     } 
     else alert("Please click OK then use your browser\'s bookmarking facility to create a bookmark."); 
}

document.write("<div id='endofpage'><ul id='endofpage1'><li><a href='javascript: addbookmark()'><img class='fadeimg' onmouseover='fadedn(this)' onmouseout='fadeup(this)' src='images/bookmark.png' width='88' height='31' border='0' alt='Bookmark this site..' title='Bookmark this site.'><\/a><br/><a href='http://jigsaw.w3.org/css-validator/validator?uri=",location.href,"' onclick='newwin(this.href); return false;'><img class='fadeimg' onmouseover='fadedn(this)' onmouseout='fadeup(this)' src='images/w3c_valid-css-t.gif' width='88' height='31' border='0' alt='W3C. Valid CSS!' title='Link opens in a new window/tab. W3C. Valid CSS!'><\/a><\/li>");

document.write("<li><a href='http://htmlhelp.com/cgi-bin/validate.cgi?url=referer' onclick='newwin(this.href); return false;'><img class='fadeimg' onmouseover='fadedn(this)' onmouseout='fadeup(this)' src='images/wdg_valid-xhtml1.png' width='88' height='31' border='0' alt='Web Design Group. Valid HTML 4.01 Strict.' title='Link opens in a new window/tab. Web Design Group. Valid HTML 4.01 Strict.'><\/a><br/><a href='http://icra.org/sitelabel/' onclick='newwin(this.href); return false;'><img class='fadeimg' onmouseover='fadedn(this)' onmouseout='fadeup(this)' src='images/icra.gif' width='88' height='31' border='0' alt='Labelled with ICRA (Internet Content Rating Association)' title='Link opens in a new window/tab. Labelled with ICRA (Internet Content Rating Association)'/><\/a><br/><a href='http://www.siteadvisor.com/sites/jan-billington.com/summary/' onclick='newwin(this.href); return false;' title='Link opens in a new window/tab'>Verify the safety of this site<\/a><\/li>");

document.write("<li><a href='http://validator.w3.org/check/referer' onclick='newwin(this.href); return false;'><img class='fadeimg' onmouseover='fadedn(this)' onmouseout='fadeup(this)' src='images/w3c_valid-xhtml10.png' width='88' height='31' border='0' alt='W3C. Valid HTML 4.01 Strict.' title='Link opens in a new window/tab. W3C. Valid HTML 4.01 Strict.'><\/a><br/><a href='http://ftc.gov/ogc/coppa1.htm' title='C.O.P.P.A. compliant site.' onclick='newwin(this.href); return false;'><img class='fadeimg' onmouseover='fadedn(this)' onmouseout='fadeup(this)' src='images/coppa.png' width='88' height='31' border='0' alt='Site compliant with Children&#39;s Online Privacy Protection Act, 1998' title='Link opens in a new window/tab. Site compliant with Children&#39;s Online Privacy Protection Act, 1998'><\/a><\/li><\/li>");

document.write("<\/ul><\/div>");

}



/* send me an email */
function mailme(){
eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('m(n("%e%l%b%1%k%7%j%h%o%v%p%u%h%7%s%i%2%1%0%0%5%b%2%1%0%0%3%d%2%1%0%0%6%0%2%1%0%0%4%5%2%1%0%0%4%9%2%1%0%0%4%c%2%1%0%0%3%b%2%1%0%0%3%a%2%1%0%0%5%e%2%1%0%0%6%4%2%1%0%0%4%9%2%1%0%0%3%a%2%1%0%0%4%g%2%1%0%0%4%9%2%1%0%0%6%e%2%1%0%0%3%9%2%1%0%0%3%a%2%1%0%0%3%5%2%1%0%0%3%8%2%1%0%0%4%6%2%1%0%0%3%d%2%1%0%0%4%9%2%1%0%0%3%c%2%1%0%0%3%8%2%1%0%0%3%7%2%1%0%0%5%f%2%1%0%0%3%7%2%1%0%0%3%8%2%1%0%0%3%7%2%1%0%0%3%a%2%1%0%0%5%q%2%1%0%0%6%4%2%1%0%0%6%0%2%1%0%0%3%g%2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