function is_in_array(arr, strval) {
 isFound = false;
 for(var i=0; i<arr.length; i++) {
     if (arr[i] == strval) {
	isFound = true; 
	break;
     }
 }
 return isFound;
}

//for displaying random videos & title 

theTitles = [  
"Chinese Counterfeits", 
"Bull Market",  
"Protecting Your Gold",  
"Best Ways to Sell Your Gold",
"NRA and 1st American Reserve",
"Choosing the Right Dealer &amp; Understanding Coin Pricing"
];  

theVideos = [ 
"06 Chinese Counterfeits AME_F8 360p (16x9)",
"07 Bull Market AMER_F8 360p (16x9)",
"08 Protecting You Gold AMER_F8 360p (16x9)",
"10 Best Ways AMER_F8 360p (16x9)",
"11 NRA AMER_QT 360p (16x9)",
"14.First American Reserve. Mark up Video"
]; 

randno = Math.floor( Math.random() * theVideos .length );  

//all the mp4 files need to be listed here
mp4list = [4,5]; 

//title 
document.write('<h2>' + theTitles[randno] + '</h2>');

//video & images 
if(is_in_array(mp4list, randno)) {
	var myVid = "videos/" + theVideos[randno] + ".mp4"; 
} else {
	var myVid = "videos/" + theVideos[randno] + ".flv"; 
}
var myImg = "videos/" + theVideos[randno] + ".jpg"; 
