
function onFlashReady() {
		sendToAS("another test message");
    }

    function callJS(value) {
        onFlashReady();
        return "Hi Flash.";
    }

    function thisMovie(movieName) {
         if (navigator.appName.indexOf("Microsoft") != -1) {
             return window[movieName];
         } else {
             return document[movieName];
         }
     }
     function sendToAS(value) {
         thisMovie("wcsplayer").callAS(value);
     }
	 
	 function seekVideo(minute,seconde) {
	// var timeArg = timeCode.split("|");
	//var bobo= int('45.3');
	 var timeCode = (minute*60)+seconde;
	 
		thisMovie("wcsplayer").flashFunctionSeekVideo(timeCode);
}

function loadFlash(movieFolder,movieName,movieWidth, movieHeight,position) { 
document.write("<div style=\"float:"+position+";margin:5px;\"><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"" + movieWidth + "\" height=\"" + movieHeight + "\" id=\"wcsplayer\" align=\"middle\">"); 
document.write("<param name=\"allowScriptAccess\" value=\"always\" />"); 
document.write("<param name=\"allowFullScreen\" value=\"false\" />"); 
document.write("<param name=\"movie\" value=\"http://www.webcastory.com/webcast/" + movieName + "?folder=http://www.webcastory.com/webcast/"+movieFolder+"\" /><param name=\"quality\" value=\"high\" /><param name=\"bgcolor\" value=\"#ffffff\" />	"); 
document.write("<embed src=\"http://www.webcastory.com/webcast/" + movieName + "?folder=http://www.webcastory.com/webcast/"+movieFolder+"\" quality=\"high\" bgcolor=\"#ffffff\" width=\"" + movieWidth + "\" height=\"" + movieHeight + "\" name=\"wcsplayer\" align=\"middle\" allowScriptAccess=\"always\" allowFullScreen=\"false\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />"); 
document.write("</object></div>"); 
}




/*var flashMovie;
function init() {
   if (document.getElementById) {
            //flashMovie = document.getElementById("wcsplayer");
			flashMovie = document.getElementById('wcsplayer');

   }
}
// wait for the page to fully load before initializing
window.onload = init;

function seekVideo(timeCode){
alert (flashMovie);
   if(flashMovie){
      flashMovie.flashFunctionSeekVideo(timeCode);
   }
}



function seekVideoOLD(timeCode) {
	
	thisMovie("wcsplayer").flashFunctionSeekVideo(timeCode);
	
}


function thisMovie(movieName) {
     if (navigator.appName.indexOf("Microsoft") != -1) {
          return window[movieName]
     }
     else {
          return document[movieName]
     }
}

function loadFlashold(serverUrl,movieFolder,movieName,movieWidth, movieHeight, backColour, version) { 
   document.write("<object id=\"wcsplayer\" name=\"wcsplayer\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=" + version + ",0,0,0\" width=\"" + movieWidth + "\" height=\"" + movieHeight + "\">"); 
   	document.write("<param name=movie value=\"http://" +serverUrl + movieName + "?folder=http://"+serverUrl+movieFolder+"\">"); 
   	document.write("<param name=\"allowScriptAccess\" value=\"always\" />"); 
   	document.write("<param name=menu value=false>"); 
	document.write("<param name=scale value=noscale>"); 
   	document.write("<param name=quality value=high>"); 
     document.write("<param name=allowFullScreen value=true />"); 
document.write("<param name=align value=middle>");
	document.write("<param name=salign value=m>"); 
   document.write("<PARAM NAME=bgcolor VALUE=#" + backColour + ">"); 
   document.write("<embed src=\"http://" + serverUrl + movieName + "?folder=http://"+serverUrl+movieFolder+"\" menu=false quality=high  bgcolor=#" + backColour + " pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" id=\"wcsplayer\" name=\"wcsplayer\" allowScriptAccess=\"always\" width=\"" + movieWidth + "\" height=\"" + movieHeight + "\">"); 
   document.write("</embed></object>"); 
} */