/*
 *	myXpass Video Wall
 *	www.myxpass.com
 *
 *	Copyright 2008 - All right reserved.
 *	Version 1.0
 *
 */
 


function VideoWall(nb_col, nb_row)
{
	this.col = nb_col;
	this.row = nb_row;
	this.affid = null;
	this.afftracker = null;
	this.animation = true;
	this.logo = "left";
	
	this.videowall_version = '0.7';
	
	this.display = function() {
		// Compute size
		var width = this.col * 108 + 65;
		var height = this.row * 85 + 50;
		
		// Compute params
		var params = "col=" + this.col + "&row=" + this.row;
		if(this.affid) params += "&affid=" + this.affid;
		if(this.afftracker) params += "&afftracker=" + this.afftracker;
		if(!this.animation) params += "&animation=false";
		if(this.logo != "left") params += "&logo=" + this.logo;
		
		// Compute html
		var html = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ' +
					'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" ' +
					'width="' + width + '" height="' + height + '" id="videowall" align="middle">' +
					'<param name="allowScriptAccess" value="always" />' +
					'<param name="allowFullScreen" value="false" />' +
					'<param name="flashVars" value="' + params + '" />' +
					'<param name="wmode" value="transparent">' +
					'<param name="movie" value="http://myxpass.com/promo/videowall/videowall-v' + this.videowall_version + '.swf" />' +
					'<param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> ' +
					'<embed src="http://myxpass.com/promo/videowall/videowall-v' + this.videowall_version + '.swf" quality="high" bgcolor="#ffffff" width="' + width + '" height="' + height + 
					'" name="videowall" align="middle" wmode="transparent" ' +
					'allowScriptAccess="always" allowFullScreen="false" flashVars="' + params + '" type="application/x-shockwave-flash" ' +
					'pluginspage="http://www.macromedia.com/go/getflashplayer" />' +
					'</object>';
		
		// Display html
		document.write(html);
	}
}