//  home.js  *  May 2010
//    offers link for multi-pane view (to big-screen users only)

function ontop(relURL)  { top.location = relURL; }

var isWide = false;

//  width sensing code mashed up from AndyLangton.co.uk and HowToCreate.co.uk

var myWidth = 0;
if (typeof(window.innerWidth) == 'number')  {

    //  Non-IE
    myWidth = window.innerWidth;

}  else  if (typeof document.documentElement != 'undefined'   &&
             typeof document.documentElement.clientWidth != 'undefined'  &&
             document.documentElement.clientWidth != 0)  {

    //  IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;

}  else  if ( document.body && document.body.clientWidth )  {

    //  IE 4 compatible
    myWidth = document.getElementsByTagName('body')[0].clientWidth;
}

isWide = myWidth >= 600  ?  true  :  false;

var linkcode  = '\x3cspan class="gohome"\x3e\x3ca href="#" onclick="javascript:ontop(\x27index.html\x27)"\x3e' ;
    linkcode += '\x3cb\x3eHome page\x3c/b\x3e\x3c/a\x3e \x3ci\x3e(big screen version)\x3c/i\x3e\x3cbr\x3e\x3c/span\x3e';

if (parent == self  &&  isWide)  { document.write(linkcode); }

