// Random Image Link Script
// By Website Abstraction (http://www.wsabstract.com)
// and Java-scripts.net (http://www.java-scripts.net)
// Modified by Neil Dempster 2009
// Added functions to allow multiple rotations on each page (09-12-09)
// Added alt tag specificity (09-12-09)
// Added level1 and level2 graphic folder capability (e.g., graphic/ versus ../graphic/ (09-13-09)
// Added function to check if javascript enabled

function random_header(){
	var myimages=new Array()
	//specify random images below. You can have as many as you wish
	myimages[1]="../graphics/alt_header/headerl2.01.jpg"
	myimages[2]="../graphics/alt_header/headerl2.02.jpg"
	myimages[3]="../graphics/alt_header/headerl2.03.jpg"
	myimages[4]="../graphics/alt_header/headerl2.04.jpg"
	myimages[5]="../graphics/alt_header/headerl2.05.jpg"
	myimages[6]="../graphics/alt_header/headerl2.06.jpg"
	myimages[7]="../graphics/alt_header/headerl2.07.jpg"
	myimages[8]="../graphics/alt_header/headerl2.08.jpg"
	myimages[9]="../graphics/alt_header/headerl2.09.jpg"
	myimages[10]="../graphics/alt_header/headerl2.10.jpg"
	myimages[11]="../graphics/alt_header/headerl2.11.jpg"


	//specify corresponding alt tags below
	var imagealttag=new Array()
	imagealttag[1]="Call Neil! He is an expert in creating high-performing cultures."
	imagealttag[2]="Call Neil! He is an expert in peak performance strategies."
	imagealttag[3]="Call Neil! He is an expert in employee engagement strategies."
	imagealttag[4]="Call Neil! He is an expert in unleashing employee creativity."
	imagealttag[5]="Call Neil! He is an expert in strategy and implementation."
	imagealttag[6]="Call Neil! He is an expert in vision-based leadership."
	imagealttag[7]="Call Neil! He is an expert in learning and employee performance."
	imagealttag[8]="Call Neil! He is an expert in creating cultures of accountability."
	imagealttag[9]="Call Neil! He is an expert in creating high-performing organizations."
	imagealttag[10]="Call Neil! He is an expert in creating high-performing organizations."
	imagealttag[11]="Call Neil! He is an expert in creating high-performing organizations."

	var ry=Math.floor(Math.random()*myimages.length)

	if (ry==0)
		ry=1
		document.write('<img src="'+myimages[ry]+'" alt="'+imagealttag[ry]+'" width="419" height="205" border="0" /></a>')
}

function random_testimonial(level){
	//level 1 = home page; level 2 = all sub-pages
	var myimages=new Array()
	//specify random images below. You can have as many as you wish
	myimages[1]="graphics/alt_testimonials/bettyscharfman.png"
	myimages[2]="graphics/alt_testimonials/bonniemckrill.png"
	myimages[3]="graphics/alt_testimonials/debbiegarnett.png"
	myimages[4]="graphics/alt_testimonials/denisebrock.png"
	myimages[5]="graphics/alt_testimonials/gretchenmcclanahan.png"
	myimages[6]="graphics/alt_testimonials/lisageorge.png"
	myimages[7]="graphics/alt_testimonials/luannfoster.png"
	myimages[8]="graphics/alt_testimonials/paulamiller.png"
	myimages[9]="graphics/alt_testimonials/sarahmackin.png"

	var ry=Math.floor(Math.random()*myimages.length)

	if (ry==0)
		ry=1
		if (level==1) {
			document.write('<img src="'+myimages[ry]+'" width="160" height="148" border="0" /></a>')
		}
		else {
			document.write('<img src="../'+myimages[ry]+'" width="160" height="148" border="0" /></a>')
		}
}

function random_mktg(level){
	//level 1 = home page; level 2 = all sub-pages
	var myimages=new Array()
	//specify random images below. You can have as many as you wish
	myimages[1]="graphics/alt_mktg/mktg.01.jpg"
	myimages[2]="graphics/alt_mktg/mktg.02.jpg"
	myimages[3]="graphics/alt_mktg/mktg.03.jpg"
	myimages[4]="graphics/alt_mktg/mktg.04.jpg"
	myimages[5]="graphics/alt_mktg/mktg.05.jpg"
	myimages[6]="graphics/alt_mktg/mktg.06.jpg"
	myimages[7]="graphics/alt_mktg/mktg.07.jpg"
	myimages[8]="graphics/alt_mktg/mktg.08.jpg"
	myimages[9]="graphics/alt_mktg/mktg.09.jpg"
	myimages[10]="graphics/alt_mktg/mktg.10.jpg"
	myimages[11]="graphics/alt_mktg/mktg.11.jpg"
	myimages[12]="graphics/alt_mktg/mktg.12.jpg"
	myimages[13]="graphics/alt_mktg/mktg.13.jpg"
	myimages[14]="graphics/alt_mktg/mktg.14.jpg"
	myimages[15]="graphics/alt_mktg/mktg.15.jpg"
	myimages[16]="graphics/alt_mktg/mktg.16.jpg"
	myimages[17]="graphics/alt_mktg/mktg.17.jpg"
	myimages[18]="graphics/alt_mktg/mktg.18.jpg"
	myimages[19]="graphics/alt_mktg/mktg.19.jpg"
	myimages[20]="graphics/alt_mktg/mktg.20.jpg"
	myimages[21]="graphics/alt_mktg/mktg.21.jpg"
	myimages[22]="graphics/alt_mktg/mktg.22.jpg"
	myimages[23]="graphics/alt_mktg/mktg.23.jpg"
	myimages[24]="graphics/alt_mktg/mktg.24.jpg"
	myimages[25]="graphics/alt_mktg/mktg.25.jpg"
	myimages[26]="graphics/alt_mktg/mktg.26.jpg"
	myimages[27]="graphics/alt_mktg/mktg.27.jpg"
	myimages[28]="graphics/alt_mktg/mktg.28.jpg"
	myimages[29]="graphics/alt_mktg/mktg.29.jpg"
	myimages[30]="graphics/alt_mktg/mktg.30.jpg"
	myimages[31]="graphics/alt_mktg/mktg.31.jpg"
	myimages[32]="graphics/alt_mktg/mktg.32.jpg"
	myimages[33]="graphics/alt_mktg/mktg.33.jpg"
	myimages[34]="graphics/alt_mktg/mktg.34.jpg"

	//specify corresponding links below
	var imagelinks=new Array()
	imagelinks[1]="http://www.neildempster.com"
	imagelinks[2]="http://www.neildempster.com"
	imagelinks[3]="http://www.neildempster.com"
	imagelinks[4]="http://www.neildempster.com"
	imagelinks[5]="http://www.neildempster.com"

	//specify corresponding alt tags below
	var imagealttag=new Array()
	imagealttag[1]="Neil Dempster motivates audiences to get better results"
	imagealttag[2]="Neil Dempster specializes in employee motivation and performance"
	imagealttag[3]="Neil Dempster motivates audiences to get better results"
	imagealttag[4]="Neil Dempster specializes in employee motivation and performance"

	var ry=Math.floor(Math.random()*myimages.length)

	if (ry==0)
		ry=1
		if (level==1) {
			document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" alt="'+imagealttag[ry]+'" width="145" height="200" border="0" /></a>')
		}
		else {
			document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="../'+myimages[ry]+'" alt="'+imagealttag[ry]+'" width="145" height="200" border="0" /></a>')
		}
}

function random_imglink(){
  var myimages=new Array()
  //specify random images below. You can have as many as you wish
  myimages[1]="../graphics/alt_header/header2.01.jpg"
  myimages[2]="../graphics/alt_header/header2.02.jpg"

  //specify corresponding links below
  var imagelinks=new Array()
  imagelinks[1]="http://www.wsabstract.com"
  imagelinks[2]="http://www.dynamicdrive.com"

  var ry=Math.floor(Math.random()*myimages.length)

  if (ry==0)
     ry=1
     document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" alt="Neil Dempster motivates audiences to get better results" width="994" height="305" border="0"></a>')
}