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 shapeWrapper_left(lineHeight,Xs,container_id) {
	var out = '';
	Xvalues = Xs.split('|');
	for(i=0; i < Xvalues.length; i++) 
		out += '<div style="float:left;clear:left;height:'+lineHeight+'px;width:'+ Xvalues[i]+'px">&nbsp;</div>';
	document.getElementById(container_id).innerHTML=out+document.getElementById(container_id).innerHTML;
}
function shapeWrapper_right(lineHeight,Xs,container_id) {
	var out = '';
	Xvalues = Xs.split('|');
	for(i=0; i < Xvalues.length; i++) 
		out += '<div id='+i+' style="float:right;clear:right;height:'+lineHeight+'px;width:'+ Xvalues[i]+'px">&nbsp;</div>';
	document.getElementById(container_id).innerHTML=out+document.getElementById(container_id).innerHTML;
}
var site_video_clone=document.createElement("div");
var clouds
function show_clouds()
{
	var the_intval_form=setInterval(
	function ()
	{
		site_video_clone.innerHTML=document.getElementById("the_video").innerHTML;
		document.getElementById("the_video").innerHTML="<embed src=\"/media/clouds_replay.swf\" flashvars=\"\" quality=\"high\" scale=\"noscale\" width=\"960\" height=\"462\" name=\"Clouds\" salign=\"LT\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"  wmode=\"transparent\" id=\"clouds\">";
		the_intval_form=clearInterval(the_intval_form);
	},10);
}
function replay_video()
{
	var the_intval_form=setInterval(
	function ()
	{
		document.getElementById("the_video").innerHTML=site_video_clone.innerHTML;
		//document.getElementById("nav_video").appendChild(abc);
		the_intval_form=clearInterval(the_intval_form);
	},10);
	
	//document.getElementById("nav_video").innerHTML=abc.innerHTML+document.getElementById("nav_video").innerHTML
	//alert(abc.id);
}
function open_testimonial(file_path,page_id)
{
	document.getElementById('the_video').innerHTML="<embed src=\"/players/site_player.swf\" flashvars=\"&streamName="+file_path+"&page_id="+page_id+"\" quality=\"high\" scale=\"noscale\" width=\"770\" height=\"462\" name=\"FLVPlayer\" salign=\"LT\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"  wmode=\"transparent\">";
	if (!document.getElementById('testimonials').style.backgroundImage)
		document.getElementById('testimonials').style.backgroundImage="url(/images/Testimonial-side.jpg)";
	return false;
}
function show_sub()
{/*
	var the_intval_form=setInterval(
	function ()
	{
		document.getElementById('the_video').innerHTML='';
		the_intval_form=clearInterval(the_intval_form);
	},10);*/
	document.getElementById('testimonials').style.display="block";
}