function showsublinks(elem) {

var e = document.getElementById(elem);
if (e.style.display == 'none') {
Effect.BlindDown(elem,{duration:1.0});
}

}

function IM_quoteGen() {
	var list = new Array();
	list[0] = "The ultimate measure of a man is not where he stands in moments of comfort and convenience, but where he stands at times of challenge and controversy - Martin Luther King";
	list[1] = "We will help you to use your inner resources to overcome obstacles in the way of your goals";
	list[2] = "The secret of joy in work is contained in one word: excellence - Pearl Buck";
	list[3] = "Happiness is when what you think, what you say, and what you do are in harmony - Mahatma Ghandi";
	list[4] = "When we coach you we will encourage you to align your values, thoughts and actions";
	list[5] = "Any fact facing us is not as important as our attitude toward it, for that determines our success or failure. The way you think about a fact may defeat you before you ever do anything about it. You are overcome by the fact because you think you are - Zig Ziglar";
	list[6] = "Coaching helps you see things from new perspectives";
	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 make_selected(objName,objStyle,selCol,unselCol) {
var SetStatus = window.event.srcElement.checked;
if (SetStatus == false) {
MM_changeProp(objName,'',objStyle,unselCol);
} else {
MM_changeProp(objName,'',objStyle,selCol);
}
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') {
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (val<min || max<val) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}

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);