// no spam email

function noSpam(user,domain) {
	locationstring = 'mailto:' + user + '@' + domain;
	window.location = locationstring;
}


// slideshow

function showPic (whichpic) {
 if (document.getElementById) {
  document.getElementById('placeholder').src = whichpic.href;
  if (whichpic.title) {
   document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
  } else {
   document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
  }
  return false;
 } else {
  return true;
 }
}


// thumbnail popup

function resizePhoto(img){
  photo1= new Image();
  photo1.src=(img);
  controller(img);
}
function controller(img){
  if((photo1.width!=0)&&(photo1.height!=0)){
    viewPhoto(img);
  }
  else{
    altResult="controller('"+img+"')";
    interval=setTimeout(altResult,20);
  }
}
function viewPhoto(img){
  winWidth=photo1.width+20;
  winHeight=photo1.height+20;
  txtString="width="+winWidth+",height="+winHeight;
  postResults=window.open(img,"",txtString);
}


// RandomImage from Javascript Source for Design & Planning 
var theImages = new Array()

theImages[0] = 'http://augustaanimalemergency.com/images/aae_poster_01.jpg'
theImages[1] = 'http://augustaanimalemergency.com/images/aae_poster_02.jpg'
theImages[2] = 'http://augustaanimalemergency.com/images/aae_poster_03.jpg'
theImages[3] = 'http://augustaanimalemergency.com/images/aae_poster_04.jpg'
theImages[4] = 'http://augustaanimalemergency.com/images/aae_poster_05.jpg'


var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img class="fig" src="'+theImages[whichImage]+'">');
}

// Date Stamp

function stampIt() {

var now = new Date();
var year = now.getFullYear();

document.write("<p>Copyright &copy; " + year + " Rollins Ceramics - All rights reserved.</p>");
}