var standardStyle1 = "<body bgcolor=0 text=#ffffff link=#cafaca vlink=#aafaaa background=galbg.jpg>"
var standardStyle3 = "<body bgcolor=0 text=#ffffff link=#cafaca vlink=#aafaaa background=bg3.jpg>"
var standardStyle4 = "<body bgcolor=0 text=#ffffff link=#cafaca vlink=#aafaaa background=bg4.jpg>"

var cssLink = "<link href='jbh.css' rel='stylesheet'>"

function writeStyle1() {
  document.write(standardStyle1+cssLink)
  writeContents()
}

function writeStyle3() {
  document.write(standardStyle3+cssLink)
  writeContents()
}

function writeStyle4() {
  document.write(standardStyle4+cssLink)
  writeContents()
}

var newWindow
function makeNewWindow( fileName ) {
  if (!newWindow || newWindow.closed) {
    newWindow = window.open(fileName, "", "height=600,width=800")
    if (!newWindow.opener) {
      newWindow.opener = window
    }
  } else {
    // window's already open
    newWindow.focus()
    newWindow.location = fileName
//    newWindow.document.URL = fileName
  }
}

function makePicPage2 ( picFileName ) {
  if (!newWindow || newWindow.closed) {
    newWindow = window.open("", "", "height=800,width=800")
    if (!newWindow.opener) {
      newWindow.opener = window
    }
  } else {
    // window's already open
    newWindow.focus()
  }
  newWindow.document.clear();
  newWindow.document.open();
  newWindow.document.write('<html>');
  newWindow.document.write('<script language="JavaScript" src="functions.js"></script>');
  newWindow.document.write('<head>');
  newWindow.document.write('</head>');
  newWindow.document.write(standardStyle3+cssLink)
  newWindow.document.write('<center>');

  newWindow.document.write('<img src="', picFileName, '" />')

  newWindow.document.write('</center>');
/*  newWindow.document.write('<script type="text/javascript" language="javascript">');
  newWindow.document.write('var sc_project=2242424;');
  newWindow.document.write('var sc_invisible=1;');
  newWindow.document.write('var sc_partition=20;');
  newWindow.document.write('var sc_security="bf338d1a";');
  newWindow.document.write('</script>');
  newWindow.document.write('<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/frames.js">');
  newWindow.document.write('</script><noscript><a href="http://www.statcounter.com/" target="_blank">');
  newWindow.document.write('<img src="http://c21.statcounter.com/counter.php?sc_project=2242424&java=0&security=bf338d1a&invisible=1" border="0"></a></noscript>');
*/
  newWindow.document.write('</body></html>');
  newWindow.document.close();

} // function makePicPage2

function makePicPage( picFileName ) {
  document.clear();
  document.open();
  document.write('<html>');
  document.write('<script language="JavaScript" src="functions.js"></script>');
  document.write('<head>');
  document.write('</head>');
  document.write(standardStyle3+cssLink)
  document.write('<center>');

  document.write('<img src="', picFileName, '" />')

  document.write('</center>');
  document.write('<script type="text/javascript" language="javascript">');
  document.write('var sc_project=2242424;');
  document.write('var sc_invisible=1;');
  document.write('var sc_partition=20;');
  document.write('var sc_security="bf338d1a";');
  document.write('</script>');
  document.write('<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/frames.js">');
  document.write('</script><noscript><a href="http://www.statcounter.com/" target="_blank">');
  document.write('<img src="http://c21.statcounter.com/counter.php?sc_project=2242424&java=0&security=bf338d1a&invisible=1" border="0"></a></noscript>');
  document.write('</body></html>');
  document.close();
}

function picPageLink( picPath, picFileName, alignment ) {
  document.write('<a href="javascript:void(0)" onClick="makePicPage2(\'', picPath+picFileName, '\' )">')
  document.write('<img src="',picPath+'t-'+picFileName,'" alt="" border="0" ')
  if ( alignment == 0 ) {} // do nothing
  if ( alignment == 1 ) { document.write(' align="right"')}
  if ( alignment == 2 ) { document.write(' align="left"')}
  document.write('/></a>')
}


function picPageLink2( picPath, picFileNames, alignment ) {
  var fnArray = picFileNames.split('|')
  for (i = 0; i < fnArray.length; i++ ) {
    document.write('<a href="javascript:void(0)" onClick="makePicPage2(\'', picPath+fnArray[i], '\' )">')
    document.write('<img src="',picPath+'t-'+fnArray[i],'" alt="" border="0" ')
    if ( alignment == 0 ) {} // do nothing
    if ( alignment == 1 ) { document.write(' align="right"')}
    if ( alignment == 2 ) { document.write(' align="left"')}
    document.write('/></a> ')
  }
}

function amazonLink(isbn) {
  document.write('<a target="0" href="http://www.amazon.com/exec/obidos/ASIN/', isbn, '/');
  document.write('theofficialharry/"><img src="amazoncom.png" alt="Amazon.com" border="0"/></a>');
}

function amazonUKLink(isbn) {
  document.write('<a target="0" href="http://www.amazon.co.uk/exec/obidos/ASIN/', isbn, '/');
  document.write('theofficialhar00/"><img src="amazoncouk.png" alt="Amazon.co.uk" border="0"/></a>');
}


function writeContents() {
  document.write('<table width="95%" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td bgcolor="0">')
  document.write('<a href="index.htm"><img name="cont_home" src="cont_home.png" border="0" align="left" /></a>')
  document.write('<a href="http://www.turmoilcolour.com/razorjack" target="0"><img name="cont_rj" src="cont_rj.png" border="0" align="right" /></a>')
  document.write('<center><a href="news.htm"><img name="cont_news" src="cont_news.png" border="0" /></a>')
  document.write('<a href="gallerymain.htm"><img name="cont_gallery" src="cont_gallery.png" border="0" /></a>')
  document.write('<a href="features.htm"><img name="cont_features" src="cont_features.png" border="0" /></a>')
  document.write('<a href="bibmain.htm"><img name="cont_bib" src="cont_bib.png" border="0" /></a>')
  document.write('<a href="odds.htm"><img name="cont_odds" src="cont_odds.png" border="0" /></a>')
  document.write('<a href="shop.htm"><img name="cont_shop" src="cont_shop.png" border="0" /></a>')
  document.write('<a href="links.htm"><img name="cont_links" src="cont_links.png" border="0" /></a></center>')
  document.write('</td></tr></table>');
}

