/*CVS Add-ins*/

/*

$Revision: 1.1 $

$RCSfile: flashbehaviour.js,v $

author: JDE

*/



/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */

/*

    flashbehaviour.js (AJ)

    16.02.2009  JDE

*/

/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */



/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */

/*Copyright (c) A&B FACE2NET GmbH*/



function check(){ alert("JS eingebunden"); }



if (typeof flashplayer == "undefined") { 

    var flashplayer = new Object(); 

}







flashplayer = function(widthStr, heightStr, reqVerStr) {

    

    this.pluginVer = swfobject.getFlashPlayerVersion();

    var requiredVer = new Array;

    this.requiredVer = reqVerStr.split(".");

    //this.url = swfUrlStr; 

    this.width = widthStr;

    this.height = heightStr;
	this.embed_video = function(video_url, containerID) {
		if(this.hasRequiredFlashVersion()) {

				  var flashparams = {};

				  flashparams.allowFullScreen="false";

					flashparams.bgcolor = "ffffff";

					flashparams.scale="noscale";

					flashparams.base="media";

				  flashparams.flashvars = "buffer=1&videoAutoPlay=false&viewBigMiddleButton=true&spaceKey=true&autoplay=false&videoURL="+video_url;

					swfobject.embedSWF(video_url, containerID, this.width, this.height, reqVerStr, false, false , flashparams, false);

        }else{

      	  this.writeErrorMessage();

        }

    }

		

		    

    this.hasRequiredFlashVersion = function() {

        this.requiredVer.major = this.requiredVer[0]!=null?parseInt(this.requiredVer[0]):0;

        if(this.pluginVer.major < this.requiredVer.major){ return false; }

        if(this.pluginVer.major > this.requiredVer.major){ return true;  }

        

        this.requiredVer.minor = this.requiredVer[1]!=null?parseInt(this.requiredVer[1]):0;

        if(this.pluginVer.minor < this.requiredVer.minor) { return false; }

        

        if(this.pluginVer.minor > this.requiredVer.minor) { return true;  }

        

        this.requiredVer.release = this.requiredVer[2]!=null?parseInt(this.requiredVer[2]):0;

        if(this.pluginVer.release < this.requiredVer.release) { return false; }

        return true;

        

    }

    

    this.writeErrorMessage = function() {

    	$(".basic_txt .nonscript").remove();
	//alert(this.pluginVer.major);
      if (this.pluginVer.major != 0 || this.pluginVer.minor != 0 || this.pluginVer.rev != 0) {

      	$(".videobox .errortxt").html("Sie haben den Adobe&reg; Flashplayer in der Version " + this.pluginVer.major + "." + this.pluginVer.minor + "." + this.pluginVer.release + ". Bitte aktualisieren Sie ihn. Die aktuelle Version ");

      }else{

      	$(".videobox .errortxt").html("Sie haben keinen Adobe&reg; Flashplayer installiert oder er ist deaktiviert. Die aktuelle Version ");

      }

				

    }

   

}



var flashPlayer = new flashplayer("464","262","9.0.115");



