function openWin(URL, w, h, l, t) {  // Nick Wardle - March 06
a=openWin.arguments; if(a.length<4)l=200; if(a.length<4)t=200;
newWindow = window.open(URL, "popup", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width="+w+",height="+h+",left="+l+",top="+t);
}

function IM_quoteGen() {
	var list = new Array();
	list[0] = "Think like a wise man but communicate in the language of the people - William Butler Yeats";
	list[1] = "Good order is the foundation of all things - Edmund Burke";
	list[2] = "The secret of joy in work is contained in one word: excellence - Pearl Buck";
	list[3] = "Pleasure in the job puts perfection in the work  Aristotle";
	list[4] = "It is not enough that we do our best; sometimes we have to do what is required of us - Winston Churchill";
	list[5] = "Many a small thing has been made large by the right kind of advertising - Mark Twain";
	list[6] = "We don’t see things as they are, we see things as we are - Anais Nin";
	list[7] = "Drive thy business or it will drive thee - Benjamin Franklin";
	list[8] = "If the point is sharp and the arrow is swift, it can pierce through the dust no matter how thick - Bob Dylan";
	list[9] = "Good order is the foundation of all things - Edmund Burke";
	list[10] = "Words are, of course, the most powerful drug used by mankind - Rudyard Kipling"; 
	list[11] = "Imagination is the beginning of creation - George Bernard Shaw";
	list[12] = "To know the road ahead, ask those coming back - Chinese Proverb";
	list[13] = "A journey of a thousand miles begins with a single step - Lao Tzu";
	list[14] = "Take the utmost trouble to find the right thing to say and then say it with the utmost levity - George Bernard Shaw";
	list[15] = "You can't wait for inspiration.  You have to go after it with a club - Jack London";
	list[16] = "To see what is in front of our nose needs a constant struggle - George Orwell";
	list[17] = "Everything you can imagine is real - Pablo Picasso";
	list[18] = "The creative mind plays with objects it loves - Carl Jung";
	list[19] = "Neither man nor nation can exist without a sublime idea - Fyodor Dostoevsky";
	list[20] = "Take the time to deliberate, but when the time for action has arrived, stop thinking and go in - Napoleon Bonaparte";
	list[21] = "The beginning is the most important part of the work - Pablo Picasso";
	list[22] = "The real voyage of discovery consists not in seeking new landscapes but in having new eyes - Marcel Proust";
	list[23] = "A goal without a plan is just a wish - Antoine de Saint Exupery";
	list[24] = "Three o’clock is always too late or too early for anything you want to do - Jean Paul Sartre";
	list[25] = "Ideas are like rabbits.  You get a couple and learn how to handle them and pretty soon you have a dozen - John Steinbeck";

	n = Math.round(Math.random() * list.length) - 1; if(n<0) n=0;
	document.write(list[n]);
}

function putDate() {  // Nick Wardle - Feb 2006 v3.0
var months = new Array(13);
months[1] = "January";
months[2] = "February";
months[3] = "March";
months[4] = "April";
months[5] = "May";
months[6] = "June";
months[7] = "July";
months[8] = "August";
months[9] = "September";
months[10] = "October";
months[11] = "November";
months[12] = "December";
var suff = new Array();
suff[1] = "st";
suff[2] = "nd";
suff[3] = "rd";
// build date, +=1900 glitch with some browsers that display year as 105..!
var realDate = new Date(); var tyear = realDate.getYear(); if(tyear<2000)tyear+=1900;
var tmonth = months[realDate.getMonth() + 1]; var date = realDate.getDate();
var sf="th"; var s=String(date).charAt(String(date).length-1); if(s<suff.length)sf=suff[s];
var lead = "HILLSPEED RACING - "; document.write(lead + " " + date + sf + " " + tmonth + ", " + tyear);
}

function putSplitDate() {  // Nick Wardle - Feb 2006 v2.0
var fullDate = new Date(); var yr = fullDate.getYear(); if(yr<2000)yr+=1900;
var dy = fullDate.getDate(); if(fullDate.getDate()<10)dy="0"+fullDate.getDate();
var mt = fullDate.getMonth()+1; if(fullDate.getMonth()<9)mt="0"+(fullDate.getMonth()+1);
document.write(dy + "<br>" + mt + "<br>" + yr);
}

function picGen() {  // random picture generator (onLoad) IMIG 11.05
  var i; pic=new Array;
		
	pic[0] = "images/banner1.jpg";
	pic[1] = "images/banner2.jpg";
	pic[2] = "images/banner3.jpg";
	pic[3] = "images/banner4.jpg";
	pic[4] = "images/banner5.jpg";
	pic[5] = "images/banner6.jpg";
	pic[6] = "images/banner7.jpg";
	//pic[7] = "images/banner8.jpg";
	//pic[8] = "images/portfolio/sisscd2.jpg";							
	//pic[9] = "images/portfolio/brunt1.jpg";
	//pic[10] = "images/portfolio/brunt2.jpg";
	//pic[11] = "images/portfolio/brunt3.jpg";			
	//pic[12] = "images/portfolio/aston1.jpg";
	//pic[13] = "images/portfolio/aston2.jpg";
	//pic[14] = "images/portfolio/aston3.jpg";			
	//pic[15] = "images/portfolio/port_disp_mm_r2_c2.jpg";
	
	i = Math.round(Math.random() * (pic.length - 1));	
		
	// generate image to screen
	MM_swapImage('swapIMG','',pic[i],1);
}


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);