
//                                BANNER DE ESQUINA ESCONDIDA SUPERIOR DERECHA


//----------------------------------------------------------------------------------------------------------------------
//----------------------ESTE ARCHIVO SOLO ES VÁLIDO PARA UN AFILIADO Y UNA CREATIVIDAD----------------------------------
//----------------PARA APLICARLO A DIFERENTES AFILIADOS DEBE CREARSE UNA COPIA DE ESTE SCRIPT---------------------------
//-------------------------------MODIFICANDO LAS VARIABLES CORRESPONDIENTES---------------------------------------------
//----------------------------------------------------------------------------------------------------------------------


//----------------------------------------URL DE DESTINO DEL BANNER-----------------------------------------------------
//Generalmente será un Tracking link extraído de netRefer a través del afiliado correspondiente
//----------------------------------------------------------------------------------------------------------------------

var WNZdestination = 'http://www.imdb.com/title/tt0063869/';



//-------------------------------------------CONTENIDO DEL BANNER-------------------------------------------------------
//JPG, SWF, GIF... creatividad que será mostrada tras la página abierta, ha de incluir el reclamo de la esquina
//----------------------------------------------------------------------------------------------------------------------

var WNZcontent = 'http://www.winzingo.com/data/scratch/superbanners/WNZbenny.jpg';



//--------------------------------------------TAMAÑO DEL BANNER---------------------------------------------------------
//Tamaño del banner desplegado, el banner es de proporción cuadrada
//----------------------------------------------------------------------------------------------------------------------

var WNZsize = 540;



//--------------------------------------------AREA DE ACTIVACIÓN--------------------------------------------------------
//Atencíon, es el tamaño del recuadro de activación del banner, si es demasiado pequeño puede recortarse la creatividad
//Es recomendable no modificar esta variable a no ser que tape contenido importante de la web del afiliado
//----------------------------------------------------------------------------------------------------------------------

var WNZsmall = 75;



//----------------------------------------------------------------------------------------------------------------------
//-----------------------------------------NO TOCAR A PARTIR DE AQUÍ----------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------

var WNZfile = 'https://www.winzingo.com/data/scratch/superbanners/WNZcornerflip.swf';
var WNZtimeout;

function WNZgetWidth(){
	var pos;
	if (window.innerWidth){
		pos =window.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientWidth){
		pos= document.documentElement.clientWidth;
	}
	else if (document.body){
		pos= document.body.clientWidth;
	}
	return pos;
}

function WNZinit(){
	document.getElementById('WNZp').style.left = '' + (WNZgetWidth() - WNZsmall) + 'px';
	document.getElementById('WNZp').style.width = '' + WNZsmall + 'px';
	document.getElementById('WNZp').style.height = '' + WNZsmall + 'px';
	document.getElementById('WNZc').style.left = '' + (WNZsmall-WNZsize) + 'px';
}

function WNZbig(){
	if (WNZtimeout){
		clearTimeout(WNZtimeout);
		WNZtimeout = null;
	}
		
	document.getElementById('WNZp').style.left = '' + (WNZgetWidth() - WNZsize) + 'px';
	document.getElementById('WNZp').style.width = '' + WNZsize + 'px';
	document.getElementById('WNZp').style.height = '' + WNZsize + 'px';
	document.getElementById('WNZc').style.left = '' + 0 + 'px';
}

function WNZtest(input){
	alert('[TEST:] ' + input);
	return;
}

document.write('<div ronmouseover="WNZbig();" ronmouseout="WNZjsinit();" id="WNZp" style="position:absolute; top:0px; left:100px; width:' + WNZsmall + '; height:' + WNZsmall + '; overflow:hidden; text-align:right">');
document.write('	<div id="WNZc" style="position:relative; width:' + WNZsize + 'px; height:' + WNZsize + 'px; left:' + (WNZsmall-WNZsize) + 'px">');
document.write('		<object wmode="transparent" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + WNZsize + '" height="' + WNZsize + '" id="WNZcorner" align="middle">');
document.write('		<param name="allowScriptAccess" value="always" />');
document.write('		<param name="allowFullScreen" value="false" />');
document.write('		<param name="FlashVars" value="clickTag=' + WNZdestination + '&contenido=' + WNZcontent + '"/>');
document.write('		<param name="movie" value="' + WNZfile + '?clickTag=' + WNZdestination + '&contenido=' + WNZcontent + '" />');
document.write('		<param name="quality" value="high" />');
document.write('		<param name="wmode" value="transparent" />');
document.write('		<param name="bgcolor" value="#ffffff" />');
document.write('		<embed wmode="transparent" src="' + WNZfile + '?clickTag=' + WNZdestination + '&contenido=' + WNZcontent + '" quality="high" bgcolor="#FF0000" width="' + WNZsize + '" height="' + WNZsize + '" name="video" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('		</object>');
document.write('	</div>');
document.write('</div>');

if (window.attachEvent) window.attachEvent('onload',WNZinit);
else window.addEventListener("load",WNZinit,false);

if (window.attachEvent) window.attachEvent('onresize',WNZinit);
else window.addEventListener("resize",WNZinit,false);
