function dhlBanner5600(){
	this.intNbX = 2;
	this.intNbY = 2;
	this.strModelFile = "2_20_17_";
	this.intModelFile = 0;
	this.strJsModelFile = '';
	this.merchantId = 4743;
	this.pageId = 4;
	this.blnDisplayed = false;
	this.intNbMaxModel = 100;
	this.strSiteUrl = 'www.realliveguys.com//';
	this.strSiteDomain = 'www.realliveguys.com';
	this.strSiteMainDir = '';
	this.strPageTarget = '_blank';
	this.intProgram = '1';
	this.intCampain = '';
	this.strExternalUserKey = (typeof(strInoExternalUserKey) != 'undefined'?strInoExternalUserKey:'');
	
	dhlBanner5600.prototype.dhlGetMoreModel = function(){
		document.write('<scr' + 'ipt src="http://' + this.strSiteDomain + '/shared/dynamicbanner/model/model_' + this.strModelFile + this.intModelFile + '.js?rnd=' + Math.random() + '"></scr' + 'ipt>');
		this.intModelFile++;
	}

	dhlBanner5600.prototype.GetDisplayed = function(){
		return this.blnDisplayed;
	}

	dhlBanner5600.prototype.SetDisplayed = function(attblnValue){
		this.blnDisplayed = attblnValue;
	}

	dhlBanner5600.prototype.dhlStartBanner = function (){
		document.write('<st' +  'yle type="text/css"><!'+ '--'+
			'.dhlTablebg5600 {background-color: #101010;}' +
			'.dhlTdModel5600 {padding-bottom:3px; padding-left:5px; padding-right:5px; padding-top:3px;}' +
			'.dhlNameText5600 {font-family: Arial, Helvetica, sans-serif; font-size: 11px;color: #FFFF00;}' +
			'a.dhl5600:link {border-style: none;	text-decoration:underline; border-style: none; font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #FFFF00;}' +
			'a.dhl5600:visited {border-style: none;	text-decoration:underline; border-style: none; font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #FFFF00;}' +
			'a.dhl5600:hover {border-style: none;	text-decoration:underline; border-style: none; font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #FFFF00;}' +
			'a.dhl5600:active {border-style: none;	text-decoration:underline; border-style: none; font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #FFFF00;}' +
			'.dhlbodyborder5600 {border-width: thin; border-style: solid;	border-color: #EFEBEF; }' +
			'.dhlImg5600 { border-color: #DF7247; border-width: 2px;	border-style: solid; }' +
			'--></st' + 'yle>');
		document.write('<div name="previewDiv5600" id="previewDiv5600" style="width:260;height:185;overflow:auto;"><table border="0" cellspacing="0" cellpadding="0" class="dhlTablebg5600">');
	}

	dhlBanner5600.prototype.dhlEndBanner = function (){
		document.write('</table></div>');
	}

	dhlBanner5600.prototype.dhlOutputBanner = function(arrObjModel)
	{
		if(arrObjModel)
		{
			if(arrObjModel.length < this.intNbX * this.intNbY)
				this.dhlGetMoreModel();
			else
			{
				this.dhlStartBanner();
				var intNbModel = 0;
				for(var intY = 0; intY < this.intNbY && intNbModel < this.intNbMaxModel; intY++)
				{
					
					
					document.write('<tr>' +
										'<td>'+
											'<table border="0" class="dhlTablebg5600" cellspacing="0" cellpadding="0">'+
												'<tr> ');
					for(var intX = 0; intX < this.intNbX && intNbModel < this.intNbMaxModel; intX++)
					{
						var strNickname = arrObjModel[intNbModel].getNickname();
						var strModelUrl = 'http://' + this.strSiteUrl + '?p=' + this.pageId + '&m=' + arrObjModel[intNbModel].getId() + '&ID=' + this.merchantId;
						if(this.intProgram != '')
							strModelUrl = strModelUrl + '&pid=' + this.intProgram;
						if(this.intCampain != '')
							strModelUrl = strModelUrl + '&sub=' + this.intCampain;
						if(this.strExternalUserKey != '')
							strModelUrl = strModelUrl + '&externaluserkey=' + this.strExternalUserKey;
						document.write(
							'<td class="dhlTdModel5600"> ' +
								'<table border="0" width="100%"  cellspacing="0" cellpadding="0">' +
									'<tr><td width="100%">' +
									'<a href="' + strModelUrl + '" class="dhl5600" target="' + this.strPageTarget + '"><img src="http://' + this.strSiteDomain + arrObjModel[intNbModel].getImage() + '" alt="" class="dhlImg5600"/></a>'+
									'</td></tr>' +
									'<tr><td width="100%" align="center">' +
									'<a href="' + strModelUrl + '" class="dhl5600" target="' + this.strPageTarget + '">' + strNickname.substring(0,13) + '</a>'+
									'</td></tr>' +
								'</table>' +
							 '</td>'
							 );
					  intNbModel++;
					}
					document.write('</tr> ' +
									'</table>' +
									'</td>' +
								'</tr>');
					this.SetDisplayed(true);
				}
				this.dhlEndBanner();
			}
		}
	}
}

function dhlLoadModelList(){
	document.write('<scr' + 'ipt src="http://www.realliveguys.com/shared/dynamicbanner/model.js?rnd=' + Math.random() + '"></scr' + 'ipt>');
	objDHLCallBack.dhlAdd(objDHLBanner5600);
}

if(typeof objDHLCallBack == 'undefined')
{
	function dhlBannerCallBack(){
		var arrCallBack = null;
		dhlBannerCallBack.prototype.dhlAdd = function(attobjCallBack){
			if(!this.arrCallBack)
				this.arrCallBack = new Array(attobjCallBack);
			else
				this.arrCallBack.push(attobjCallBack);
		}

		dhlBannerCallBack.prototype.callBack = function(arrModel){
			for(var intI=0; intI < this.arrCallBack.length; intI++)
				if(!this.arrCallBack[intI].GetDisplayed())
					this.arrCallBack[intI].dhlOutputBanner(arrModel);
		}
	}
	var objDHLCallBack = new dhlBannerCallBack();
}

var objDHLBanner5600 = new dhlBanner5600();
dhlLoadModelList();

