function getImage(type)
{
  var imgNumber = 26;
  // Array of images
  var imgArray = new Array(imgNumber);
  // Picked image
  var strImage;
  imgArray[0] = 'Butterfly 1 (600 x 450).jpg';
  imgArray[1] = 'Cherry 1 (600 x 450).jpg';
  imgArray[2] = 'Ethel 1.jpg';
  imgArray[3] = '001 Gole Zard.jpg';
  imgArray[4] = '002 Gole Ghermez.jpg';
  imgArray[5] = '003 Gole Zard.jpg';
  imgArray[6] = '052 Roses.jpg';  
  imgArray[7] = 'Lizard 1 (600 x 450).jpg';
  imgArray[8] = 'Ethel (600 x 450).jpg';
  imgArray[9] = '053 Yellow.jpg';
  imgArray[10] = '054 Red.jpg';
  imgArray[11] = 'heic0106b (600 x 450).jpg';
  imgArray[12] = 'heic0109a (600 x 450).jpg';
  imgArray[13] = 'heic0206h (600 x 450).jpg';
  imgArray[14] = 'heic0305a (600 x 450).jpg';
  imgArray[15] = 'heic0503a (600 x 450).jpg';
  imgArray[16] = 'heic0601a (600 x 450).jpg';  
  imgArray[17] = 'heic0702a_h (600 x 586).jpg';
  imgArray[18] = 'heic0706a (600 x 450).jpg';
  imgArray[19] = 'heic0715a (600 x 450).jpg';
  imgArray[20] = 'heic0910e (600 x 450).jpg';
  imgArray[21] = 'heic0910i (600 x 450).jpg';  
  imgArray[22] = 'heic0911c (600 x 450).jpg';
  imgArray[23] = 'heic1007a (600 x 450).jpg';
  imgArray[24] = 'heic1007c (600 x 450).jpg';
  imgArray[25] = 'heic1007e (600 x 450).jpg';
  //Get seconds from system clock set a random image
  var now = new Date();
  var sec = now.getSeconds();
  
  strImage = "images/" + imgArray[sec % imgNumber];

  if (type==1)
  {
	  // Write to document
	document.write("<a href='http://www.spacetelescope.org'>");
	document.write("<image src='"+strImage+"' border=0 alt= 'Discover beauty and serenity of nature...' width=\"500\" height=\"400\">");
	document.write("</a>");
  }
  else //if (type==2)
  {
	  // Write to document
	document.write("<a href='http://www.spacetelescope.org'>");
	document.write("<image src='"+strImage+"' border=0 alt= 'Look within before searching without...' width=\"354\" height=\"247\">");
	document.write("</a>");
  }
//  else
//  {
//	document.write(strImage);
//	  return strImage;
//  }
}

function getBGImage()
{
  // Number of images
  var bgiNumber = 13;
  // Array of images
  var bgiArray = new Array(bgiNumber);
  // Picked image
  var strImage;

  bgiArray[0] = "bg00.gif";
  bgiArray[1] = "bg00.jpg";
  bgiArray[2] = "bg01.gif";
  bgiArray[3] = "bg01.jpg";
  bgiArray[4] = "bg02.jpg";
  bgiArray[5] = "bg03.gif";
  bgiArray[6] = "bg04.gif";
  bgiArray[7] = "bg05.gif";
  bgiArray[8] = "bk06.gif";
  bgiArray[9] = "bg07.gif";
  bgiArray[10] = "bg08.gif";
  bgiArray[11] = "bg09.gif";
  bgiArray[12] = "bg10.gif";

        
  //Get seconds from system clock set a random image
  var now = new Date();
  var sec = now.getDay();

  strImage = "images/" + bgiArray[sec];
  // Write to document
  document.write("<body background='"+strImage+"' LEFTMARGIN='0' TOPMARGIN='0' RIGHTMARGIN='0' BOTTOMMARGIN='0' oncontextmenu='return false' bgproperties='fixed'>");
  // document.write("<p align='center'>"+strImage+"</p>");
}

function getSound(howmany)
{
  // Number of sounds
  var sndNumber = 3;
  // Array of sounds
  var sndArray = new Array(sndNumber);
  // Picked sound
  var strSound;

  sndArray[0] = 'Happy.mid';
  sndArray[1] = 'Brikwall.mid';
  sndArray[2] = 'Whisper.mid';
        
  //Get seconds from system clock set a random image
  var now = new Date();
  var sec = now.getSeconds();

  strSound = "waves/" + sndArray[sec % sndNumber];

  // Write to document
  document.write("<bgsound src='"+strSound+"' loop='"+howmany+"'>");
}

function getQuote()
{
  // Number of quotes
  var quoteNumber = 34;
  // Array of quotes
  var quoteArray = new Array(quoteNumber);
  // Array of authors
  var authorArray = new Array(quoteNumber);
  // Picked quote
  var strQuote;
  // Picked author
  var strAuthor;

  quoteArray[0] = 'Universities are full of knowledge; the freshman bring a little in and the seniors take none away, and knowledge accumulates.';
  quoteArray[1] = 'A retentive memory is a good thing, but the ability to forget is the true token of greatness.';
  quoteArray[2] = 'Success usually comes to those who are too busy to be looking for it.';
  quoteArray[3] = 'Better to remain silent and be thought a fool than to speak out and remove all doubt.';
  quoteArray[4] = 'You can get much farther with a kind word and a gun than you can with a kind word alone.';
  quoteArray[5] = 'One seeks many times the reason for his failures in the environment, which one considers hostile, when the place to look for them is inside oneself.';
  quoteArray[6] = 'That which I spent I have lost. That which I possessed I gave to others. But that which I have given belongs to me.';
  quoteArray[7] = 'Your vision will become clear only when you look into your own heart. Who looks outside, dreams; who looks inside, awakes.';
  quoteArray[8] = 'Success is not final, failure is not fatal: it is the courage to continue that counts.';
  quoteArray[9] = 'You are never a loser until you quit trying.';
  quoteArray[10] = 'The whole of science is nothing more than a refinement of everyday thinking.';
  quoteArray[11] = 'I think that only daring speculation can lead us further and not accumulation of facts.';
  quoteArray[12] = 'We cannot change anything unless we accept it. Condemnation does not liberate, it oppresses.';
  quoteArray[13] = 'Where love rules, there is no will to power.. and where power predominates, there love is lacking.';
  quoteArray[14] = 'Only knowledge that is used sticks in your mind.';
  quoteArray[15] = 'Self knowledge is a more reliable guide to behavior than adherence to arbitrarily imposed standards.';
  quoteArray[16] = 'A leader is best when people barely know he exists, when his work is done, his aim fulfilled, they will say: we did it ourselves.';
  quoteArray[17] = 'Give a man a fish and you feed him for a day. Teach him how to fish and you feed him for a lifetime.';
  quoteArray[18] = 'Do the difficult things while they are easy and do the great things while they are small. A journey of a thousand miles must begin with a single step.';
  quoteArray[19] = 'A scholar who cherishes the love of comfort is not fit to be deemed a scholar.';
  quoteArray[20] = 'By letting it go it all gets done. The world is won by those who let it go. But when you try and try. The world is beyond the winning.';
  quoteArray[21] = 'Wo(man)kind with all its intelligence has NOT built a product more efficient than a leaf on a tree. We are blind and deaf. And we do not know it.';
  quoteArray[22] = 'As our circle of knowledge expands, so does the circumference of darkness surrounding it.';
  quoteArray[23] = 'Only two things are infinite, the universe and human stupidity, and I am not sure about the former.';
  quoteArray[24] = 'The belief that there is only one truth and that oneself is in possession of it seems to me the deepest root of all evil that is in the world.';
  quoteArray[25] = 'Many people have died for their beliefs. The real courage is living and suffering for what you believe.';
  quoteArray[26] = 'To doubt everything or to believe everything are two equally convenient solutions; both dispense with the necessity of reflection.';        
  quoteArray[27] = 'Do the right thing because it is the right thing to do, and then all beneficial rewards will come to you also.';
  quoteArray[28] = 'Whatever you do, you must remain nimble in your thinking. Do not become so attached to any one belief that you cannot see past it to another possibility.';        
  quoteArray[29] = 'Do the right thing because it is the right thing to do, and then all beneficial rewards will come to you also.';
  quoteArray[30] = 'A belief which leaves no place for doubt is not a belief; it is a superstition.';        
  quoteArray[31] = 'Do the right thing because it is the right thing to do, and then all beneficial rewards will come to you also.';
  quoteArray[32] = 'The belief that there is only one truth and that oneself is in possession of it seems to me the deepest root of all evil that is in the world.';
  quoteArray[33] = 'Anyone who has never made a mistake has never tried anything new.';        
  
  authorArray[0] = 'Abbott Lowell';
  authorArray[1] = 'E. Hubbard';
  authorArray[2] = 'David Thoreau';
  authorArray[3] = 'Abraham Lincoln';
  authorArray[4] = 'Al Capone';
  authorArray[5] = 'Alberto Machado';
  authorArray[6] = 'Amado Nervo';
  authorArray[7] = 'Carl Jung';
  authorArray[8] = 'Winston Churchill';
  authorArray[9] = 'Mike Ditka';
  authorArray[10] = 'Albert Einstein';
  authorArray[11] = 'Albert Einstein';
  authorArray[12] = 'Carl Jung';
  authorArray[13] = 'Carl Jung';
  authorArray[14] = 'Dale Carnegie';
  authorArray[15] = 'Chin Ning Chu';
  authorArray[16] = 'Lao Tzu';
  authorArray[17] = 'Lao Tzu';
  authorArray[18] = 'Lao Tzu';
  authorArray[19] = 'Lao Tzu';
  authorArray[20] = 'Lao Tzu';
  authorArray[21] = 'Moi';
  authorArray[22] = 'Albert Einstein';
  authorArray[23] = 'Albert Einstein';
  authorArray[24] = 'Max Born, as quoted in Judith Sherven\'s The New Intimacy';
  authorArray[25] = 'Christopher Paolini, Eragon';
  authorArray[26] = 'Henri Poincare, Of Science and Hypotheses';
  authorArray[27] = 'Zurasthra';
  authorArray[28] = 'Christopher Paolini, Brisingr';
  authorArray[29] = 'Zurasthra';
  authorArray[30] = 'Jose Bergamin, El cohete y la estrella';
  authorArray[31] = 'Zurasthra';
  authorArray[32] = 'Max Born, as quoted in Judith Sherven\'s The New Intimacy';
  authorArray[33] = 'Albert Einstein';

  //Get seconds from system clock set a random image
  var now = new Date();
  var sec = now.getSeconds();

  strQuote = quoteArray[sec % quoteNumber];
  strAuthor = authorArray[sec % quoteNumber];
  document.write("<i><font align='left' color='000000' size=3 face='Georgia, Arial, Century Gothic, High Tower Text, Times New Roman, Arial, Century Gothic'>\""+strQuote+"\"<br /><br /><b><font color='Red' size=2>"+strAuthor+"</b></font></font>");
}
