function MM_CheckFlashVersion(reqVerStr,msg){
  with(navigator){
    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin){  
      var flashVer = -1;
      if (plugins && plugins.length > 0){
        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
        if (desc == "") flashVer = -1;
        else{
          var descArr = desc.split(" ");
          var tempArrMajor = descArr[2].split(".");
          var verMajor = tempArrMajor[0];
          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
          flashVer =  parseFloat(verMajor + "." + verMinor);
        }
      }
      // WebTV has Flash Player 4 or lower -- too low for video
      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

      var verArr = reqVerStr.split(",");
      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
  
      if (flashVer < reqVer){
        if (confirm(msg))
          window.location = "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
      }
    }
  } 
}
function openwindow(url,w,h)
{
  var winwidth = screen.availWidth;
  var winheight = screen.availHeight;
  var leftt=Math.floor((winwidth/2)-(w/2));
  var topt=Math.floor((winheight/2)-(h/2));
  window.open(url,'popup','left='+leftt+',top='+topt+',width='+w+', height='+h+', toolbar=0,  location=0, directories=0,status=0, titlebar=0, menubar=0, resizable=1, scrollbars=1')
};

function show_testimonial(instance){
  switch(instance)
  {
		case 1:
			video_width = 400;
			video_height = 225;
			video_url = "/f/video.php?videoname=webxray&videowidth="+video_width+"&videoheight="+video_height;
			break;
		case 2:
			/*
			video_width = 400;
			video_height = 225;
			video_url = "/f/video.php?videoname=webxray&videowidth="+video_width+"&videoheight="+video_height;
			*/
			break;
		case 3:
			video_width = 400;
			video_height = 225;
			video_url = "/f/video.php?videoname=weblumineers&videowidth="+video_width+"&videoheight="+video_height;
			break;
		case 4:
			video_width = 400;
			video_height = 225;
			video_url = "/f/video.php?videoname=websedation&videowidth="+video_width+"&videoheight="+video_height;
			break;
		case 5:
			video_width = 400;
			video_height = 225;
			video_url = "/f/video.php?videoname=webnitrous&videowidth="+video_width+"&videoheight="+video_height;
			break;
		case 6:
			video_width = 400;
			video_height = 225;
			video_url = "/f/video.php?videoname=webinvisiline&videowidth="+video_width+"&videoheight="+video_height;
			break;
		case 7:
			video_width = 400;
			video_height = 225;
			video_url = "/f/video.php?videoname=webfillings&videowidth="+video_width+"&videoheight="+video_height;
			break;
		case 8:
			video_width = 400;
			video_height = 225;
			video_url = "/f/video.php?videoname=webrootcanals&videowidth="+video_width+"&videoheight="+video_height;
			break;
    case 9:
			video_width = 400;
			video_height = 225;
			video_url = "/f/video.php?videoname=webcrowns&videowidth="+video_width+"&videoheight="+video_height;
			break;
    case 10:
			video_width = 400;
			video_height = 225;
			video_url = "/f/video.php?videoname=webgums&videowidth="+video_width+"&videoheight="+video_height;
			break;
    case 11:
			video_width = 400;
			video_height = 225;
			video_url = "/f/video.php?videoname=webdentures&videowidth="+video_width+"&videoheight="+video_height;
			break;	
    case 12:
			video_width = 400;
			video_height = 225;
			video_url = "/f/video.php?videoname=webtmj&videowidth="+video_width+"&videoheight="+video_height;
			break;
    
		case 13:
			video_width = 640;
			video_height = 360;
			video_url = "/f/video.php?videoname=sedation&videowidth="+video_width+"&videoheight="+video_height;
			break;
    
		case 14:
			video_width = 400;
			video_height = 266;
			video_url = "/f/video.php?videoname=lumineers1&videowidth="+video_width+"&videoheight="+video_height;
			break;				

    default:
			break;
  }
	
	openwindow(video_url,(video_width+20),(video_height+20));
	
}
