// Use a variable to reference the embedded SWF.
var flashVideoPlayer;

var ns4 = (document.layers)? true:false;         //NS 4
var ie4 = (document.all)? true:false;         //IE 4
var dom = (document.getElementById)? true:false;   //NS 6 ou IE 5
var ie = navigator.appName.indexOf("Microsoft") != -1;

function callFlashPlayVideo(url, ztime) {
	var so = new SWFObject("/_flash/videotour/VideoShell.swf", "theFlvVideo", "400", "350", "8", "#ffffff");
	so.addParam("quality", "high");
	so.addParam("wmode", "transparent");
	so.addParam("allowScriptAccess", "sameDomain");
	so.write("zvideo");

	flashVideoPlayer = (ie) ? window['theFlvVideo'] : document['theFlvVideo'];
	
	if (flashVideoPlayer!=undefined) {
		document.getElementById("loading").style.visibility="visible";
		document.getElementById("loading").style.zIndex="99";
		setTimeout('ReallyStardVid("'+url+'", "'+ztime+'")',500);
	}
}
function ReallyStardVid(url, ztime) {
	flashVideoPlayer.playVideo(url, ztime);
}
function callFlashStopVideo() {
	if (flashVideoPlayer!=undefined) {
		flashVideoPlayer.stopVideo();
	}
}

function unLoadFlashVideo() {

  if (dom) {
      document.getElementById("zvideo").innerHTML = " ";
         return;
      }
      if (ie4) {
          document.all["zvideo"].innerHTML = " ";
         return;
      }
      if (ns4) {
          with (eval('document.'+zvideo+'.document')) {
             open();
             write(" ");
             close();
         }
         return;
      }
}

function hideWaitText() {
	document.getElementById("loading").style.visibility="hidden";
}
