var file_url='http://d1y4agkprmq44z.cloudfront.net/MWP/';var file_name='MWP_Australia_Gemini4.flv';var script_url='http://webvideoapp.com/va/';var app_url='http://webvideoapp.com/';var stats_url='https://webvideoapp-stats.com/stats';var session_id='681c2961c189cac5548155f0a3da2a19';var file = file_url + file_name;
var v_id='664';var v_title='MWP Australia - Gemini';var divId='va-container';var swfId='swfContainer';var video_length='53';var player_url='http://webvideoapp.com/playerfiles/';var player_name='player.swf';var player = player_url + player_name;	
	var frequency=0;var color='133458';var valogo='1';var position='top-left';var xpos='0';var ypos='350';var player_xpos='55';var player_ypos='0';var vwidth='300';var vheight='600';var zindex='999';var autoplay='1';var elementid='';var valogo='1';var flip='0';var maxplays='0';var vadebug='0';var google_code='';var back_link='';var link='';var jslink='';var show_button='1';var show_button='1';
var button_position='top-left';var button_xpos='0';var button_ypos='350';var button_width='102';var button_height='40';var button_zindex='999';var button_code='<a id=\"btnpresenters\" href=\"javascript:StartVideo();\" title=\"Play Video\"><p class=\"playnow\">Play Video</p></a>';	
	var h5videos ='' ;var cuepoints1 = "";
	function pFun(videoid) {
                //alert(videoid);
              };
              function pWindow(videoid) {
	
	                this.videoid = v_id;
	                this.second = 0;
					this.video_action = "play";
					this.xpos = 0;
					this.ypos = 0;
					this.width = 100;
					this.height = 100;
					this.zindex = 1000;
					this.divId = "vapop";
					this.position = "top-left";
					this.closebutton = 0;
					this.close_with_video = 0;
					this.content = "<h3>HELLO POPUP WINDOW</h3>";
					
	            };
	
		pWindow.prototype.createWindow = function() {
			var divTag0 = document.createElement("div"); divTag0.style.zIndex = this.zindex;
	    	divTag0.style.left="0"; divTag0.style.width="100%";
	    	divTag0.style.height="0px"; 
	    	divTag0.style.display = "block"; divTag0.style.position ="absolute";
			divTag0.style.textAlign="center"; divTag0.style.align="center";
			divTag0.id = this.divId+"0"; document.body.appendChild(divTag0);
			
			var divTag = document.createElement("div"); divTag.id = this.divId;       
	
			divTag.style.height = this.height+"px"; divTag.style.width = this.width+"px";
			divTag.style.textAlign="left"; 
			divTag.style.backgroundColor=this.background;
	        divTag.style.zIndex = this.zindex;
	
			switch(this.position)
				{
				case "top-left":
					divTag.style.position="absolute"; divTag0.style.top = this.ypos+"px";
		  			divTag.style.left = this.xpos+"px"; divTag.style.overflow = "hidden";
					break;			
				case "top-right":
					divTag.style.top = "0"; divTag.style.position="absolute";
			  		divTag0.style.top = this.ypos+"px"; divTag.style.right = this.xpos+"px";
		  			divTag.style.overflow = "hidden";
		  			break;
				case "top-center":
					divTag.style.position="relative"; divTag0.style.top = this.ypos+"px";
					divTag.style.left = this.xpos+"px"; divTag.style.marginLeft= "auto";
					divTag.style.marginRight= "auto"; divTag.style.overflow = "hidden";
					break;
				case "bottom-left":
					divTag.style.bottom = "0px"; divTag.style.position="absolute";
					divTag0.style.bottom = this.ypos+"px"; divTag.style.left = this.xpos+"px";
		  			divTag.style.overflow = "hidden";
					break;
				case "bottom-center":
					divTag.style.bottom = "0px";
					divTag0.style.bottom = parseInt(this.ypos)+parseInt(this.height)+"px";
		  			divTag.style.left = this.xpos+"px"; divTag.style.overflow = "hidden";
					divTag.style.marginLeft= "auto"; divTag.style.marginRight= "auto";
					divTag.style.marginTop= "0"; divTag.style.marginBottom= "0";
					break;
				case "bottom-right":
					divTag.style.bottom = "0"; divTag.style.position="absolute";
					divTag0.style.bottom = this.ypos+"px"; divTag.style.right = this.xpos+"px";
		  			divTag.style.overflow = "hidden";
		  			break;
		  		case "fixed-top-left":
	   				divTag.style.top = "0px"; divTag.style.position="fixed";
		  			divTag0.style.top = this.ypos+"px"; divTag.style.left = this.xpos+"px";
					break;
				case "fixed-top-center":
					divTag.style.top = "0px"; divTag0.style.position="fixed";
					divTag.style.position="relative"; divTag0.style.top = this.ypos+"px";
					divTag.style.left = this.xpos+"px"; divTag.style.marginLeft= "auto";
					divTag.style.marginRight= "auto"; divTag.style.overflow = "hidden"; 
		  			break;
				case "fixed-top-right":
					divTag.style.top = "0px"; divTag.style.position="fixed";
		  			divTag0.style.top = this.ypos+"px"; divTag.style.right = this.xpos+"px";
		  			break;	
		  		case "fixed-bottom-left":
					divTag.style.bottom = "0px"; divTag0.style.position="fixed";
					divTag.style.position="relative"; 
					divTag0.style.bottom = parseInt(this.ypos)+parseInt(this.height)+"px";
		  			divTag.style.marginRight= "auto"; divTag.style.left = this.xpos+"px";					  			
					break;
				case "fixed-bottom-center":
					divTag.style.bottom = "0px"; divTag0.style.position="fixed";
					divTag.style.position="relative";
					divTag0.style.bottom = parseInt(this.ypos)+parseInt(this.height)+"px";
					divTag.style.left = _xpos+"px"; divTag.style.marginLeft= "auto";
					divTag.style.marginRight= "auto"; divTag.style.overflow = "hidden"; 				
		  			break;
				case "fixed-bottom-right":
					divTag.style.bottom = "0px"; divTag0.style.position="fixed";
					divTag.style.position="relative"; 
					divTag0.style.bottom = parseInt(this.ypos)+parseInt(this.height)+"px";
		  			divTag.style.marginLeft= "auto"; divTag.style.right = this.xpos+"px";
		  			break;	
				default:
					//default is top-left
					divTag.style.position="absolute"; divTag0.style.top = this.ypos+"px";
		  			divTag.style.left = this.xpos+"px"; divTag.style.overflow = "hidden";
				};
				    
			    divTag0.appendChild(divTag); 
				
				var close_str="";
				if (this.closebutton==1){
					if (this.video_action=="stop"){
						close_str = "<div id=\"closeb\"><img src=\""+app_url+"images/close.png\" onclick=\"removeElement('"+divTag0.id+"');playFLV();\"/></div>";
					}else{
						close_str = "<div id=\"closeb\"><img src=\""+app_url+"images/close.png\" onclick=\"removeElement('"+divTag0.id+"');\"/></div>";
						
					};
				};
				divTag.innerHTML = this.content + close_str;
			    
			    if (this.video_action=="stop"){
			   	  	pauseFLV();
			    };
			    		
		};			
	
		pWindow.prototype.closeWindow = function() {
				removeElement(this.divId+"0");
		};
			    
			function decode64_(input) {
		     var output = "";
		     var chr1, chr2, chr3 = "";
		     var enc1, enc2, enc3, enc4 = "";
		     var i = 0;
		 
			 var keyStr = "ABCDEFGHIJKLMNOP" +
		               "QRSTUVWXYZabcdef" +
		               "ghijklmnopqrstuv" +
		               "wxyz0123456789+/" +
		               "=";
		 
		     // remove all characters that are not A-Z, a-z, 0-9, +, /, or =
		     var base64test = /[^A-Za-z0-9\+\/\=]/g;
		     if (base64test.exec(input)) {
		        alert("There were invalid base64 characters in the input text.\n" +
		              "Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\n" +
		              "Expect errors in decoding.");
		     };
		     input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
		 
		     do {
		        enc1 = keyStr.indexOf(input.charAt(i++));
		        enc2 = keyStr.indexOf(input.charAt(i++));
		        enc3 = keyStr.indexOf(input.charAt(i++));
		        enc4 = keyStr.indexOf(input.charAt(i++));
		 
		        chr1 = (enc1 << 2) | (enc2 >> 4);
		        chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
		        chr3 = ((enc3 & 3) << 6) | enc4;
		 
		        output = output + String.fromCharCode(chr1);
		 
		        if (enc3 != 64) {
	           output = output + String.fromCharCode(chr2);
		        };
		        if (enc4 != 64) {
		           output = output + String.fromCharCode(chr3);
		        };
		 
		        chr1 = chr2 = chr3 = "";
		        enc1 = enc2 = enc3 = enc4 = "";
		 
		     } while (i < input.length);
		 
		     return unescape(output);
		  };
	
	
		var headID = document.getElementsByTagName("head")[0];var cssNode = document.createElement('link');
		cssNode.type = 'text/css';
		cssNode.rel = 'stylesheet';
		cssNode.href = script_url+'va.css';
		cssNode.media = 'screen';
		headID.appendChild(cssNode);
		
		
    function loadScript(mysrc) {
        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.src = mysrc;
        document.body.appendChild(script);
    };
    function loadScripts(){
        loadScript(script_url+'swfobject.js');
        loadScript(script_url+'va.obf.js');
    };
    window.onload = loadScripts();     

     


 
