//// random number function ////
function randomNumber(limit) {
	
	// returns random number based on limit
	return Math.floor(Math.random()*limit);
}

//// function to write random image ////
function randImage(path) {
	
  	// instantiate variables
	var imgSrc, r;
  	
	// create a random number within limits
	r = randomNumber(15);
  
  	// create image source with appropriate path
  	imgSrc = "assets/images/"+path+"/hm-"+path+"-"+r+".jpg";
	
	// writes the image tag into the html
  	document.write("<img src=\""+imgSrc+"\" alt=\""+path+"\" width=\"230\" height=\"90\" border=\"0\" />");
}
