// insert the line below where the picture / video duo should pop up
//<a target="_blank" id="VidSrc" name="VidSrc" ><img align="middle" name="imgSrc" id="imgSrc"></a>
// <a href="javascript:next()">next</a>
// <a href="javascript:prev()">prev</a>

//set the size of numPics to the number of pictures
var numPics = 2;
var myImg= new Array(numPics)
var myVid = new Array(numPics)

  
  //myImg is image array set array values to the picture file name
  myImg[0]= "../video/images/today.jpg";
  myVid[0]= "../video/html/v1.html"	
  
  myImg[1]= "../video/images/maybe1day.jpg";
  myVid[1]= "../video/html/v2.html"
  

  
  // repeat this line for every picture/video duo on the site 	 
  //myImg[4]="/myPic.jpg"; 
  //myVid[4]= "/default/videos/8/"
  
  

var i = 0;

// Create function to load image
function loadImg(){
  document.imgSrc.src =myImg[i];
  //document.getElementById('VidSrc').href = myVid[i];
}



// Create link function to switch image backward
function prev(){
  if(i==0){
    var l = myImg.length-1;
	i=l;
  } else {
    var l = i-=1;
  }
  document.imgSrc.src = myImg[l];
}


// Create link function to switch image forward
function next(){
  if(i == myImg.length - 1 ){
    var l = 0;
	i=l;
  } else {
    var l = i+=1;
  }
  document.imgSrc.src =myImg[l];

}

function viewVideo(){
   var l = i  
  window.open(myVid[l],  'Option', 'dependent =yes, width=425, height=360, titlebar=no,scrollbars=yes,status=yes,resizable=no');


  
}





