/******************************************************************************
*                                                                             *
*     customjava.js  -  javascript file by Green Wave Technology              *
*                                                                             *
******************************************************************************/

function emailwriter(prefix, suffix, domain)
{
address=(prefix + '@' + suffix + '.' + domain)
document.write('<A href="mailto:' + address + '">' + address + '</a>')
}


function popup_window1()
{
 newwin = window.open('','popup','toolbar=yes,menubar=yes,location=yes,status=yes,width=660,height=440,screenX=100,left=100,screenY=110,top=110,scrollbars=1,resizable=1');
}


function swapImageTop()
{
imageArray = new Array('',
   'swatch1.jpg',
   'swatch2.jpg',
   'swatch3.jpg',
   'swatch4.jpg',
   'swatch5.jpg',
   'swatch6.jpg',
   'swatch7.jpg',
   'swatch8.jpg',
   'swatch9.jpg')

   num = Math.round(Math.random()*9)
   if ( (num == 0) || (num >= imageArray.length) ) document.write("<img src='swatches/top/swatch1.jpg' alt=' scene from holloway house ' WIDTH='62' HEIGHT='62'>")
   else document.write("<img src='swatches/top/"+imageArray[num]+"' alt=' scene from holloway house ' WIDTH='62' HEIGHT='62'>")
}


function swapImageMiddle()
{
imageArray = new Array('',
   'swatch1.jpg',
   'swatch2.jpg',
   'swatch3.jpg',
   'swatch4.jpg',
   'swatch5.jpg',
   'swatch6.jpg',
   'swatch7.jpg',
   'swatch8.jpg',
   'swatch9.jpg')

   num = Math.round(Math.random()*9)
   if ( (num == 0) || (num >= imageArray.length) ) document.write("<img src='swatches/middle/swatch1.jpg' alt=' scene from holloway house ' WIDTH='62' HEIGHT='62'>")
   else document.write("<img src='swatches/middle/"+imageArray[num]+"' alt=' scene from holloway house ' WIDTH='62' HEIGHT='62'>")
}


function swapImageBottom()
{
imageArray = new Array('',
   'swatch1.jpg',
   'swatch2.jpg',
   'swatch3.jpg',
   'swatch4.jpg',
   'swatch5.jpg',
   'swatch6.jpg',
   'swatch7.jpg',
   'swatch8.jpg',
   'swatch9.jpg')

   num = Math.round(Math.random()*9)
   if ( (num == 0) || (num >= imageArray.length) ) document.write("<img src='swatches/middle/swatch1.jpg' alt=' scene from holloway house ' WIDTH='62' HEIGHT='62'>")
   else document.write("<img src='swatches/bottom/"+imageArray[num]+"' alt=' scene from holloway house ' WIDTH='62' HEIGHT='62'>")
}


function preloadImages()
{
 if (document.images) 
  {
 
   image1       = new Image();
   image1.src   = "graphics/titles/abbeyfield.gif";

   image2       = new Image();
   image2.src   = "graphics/titles/charges.gif";

   image3       = new Image();
   image3.src   = "graphics/titles/contact.gif";

   image4       = new Image();
   image4.src   = "graphics/titles/eligibility.gif";

   image5       = new Image();
   image5.src   = "graphics/titles/ethos.gif";

   image6       = new Image();
   image6.src   = "graphics/titless/events.gif";

   image7       = new Image();
   image7.src   = "graphics/titles/friends.gif";

   image8       = new Image();
   image8.src   = "graphics/titles/holloway.gif";

   image9       = new Image();
   image9.src   = "graphics/titles/management.gif";

   image10      = new Image();
   image10.src  = "graphics/titles/volunteering.gif";

   image11      = new Image();
   image11.src  = "graphics/titles/welcome.gif";

  }
}