function isDefined( variable)
{
    return (typeof(window[variable]) == "undefined")?  false: true;
}
function Isss()
{
	var agent = navigator.userAgent.toLowerCase();
	this.major = parseInt(navigator.appVersion);
	this.minor = parseFloat(navigator.appVersion);
	this.ns = ((agent.indexOf('mozilla') !=  - 1) && (agent.indexOf('spoofer') ==  - 1) && (agent.indexOf('compatible') ==  - 1) && (agent.indexOf('opera') ==  - 1) && (agent.indexOf('webtv') ==  - 1));
	this.ie = (agent.indexOf("msie") !=  - 1);
	this.ns4 = (this.ns && (this.major == 4));
	this.ns6 = (this.ns && (this.major >= 5));
	this.ie4 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5.0") !=  - 1));
	this.ie5 = (this.ie && (this.major >= 4));
}

function ZAPLO(id, width, height, left, top, disp, visib)
{
	if (isss.ie5 || isss.ns6)
	{
		this.obj = document.getElementById(id).style;
	}
	else if (isss.ie4)
	{
		this.obj = document.all[id].style;
	}
	else if (isss.ns4)
	{
		this.obj = document.layers[id];
	}
	this.obj.width = width;
	this.obj.height = height;
	this.obj.left = left;
	this.obj.top = top;
	this.obj.display = disp;
	this.obj.visibility = visib;
}
function ZAPHPC()
{
	if (isss.ns)
	{
		ZAPAW = innerWidth - 20;
		ZAPAH = innerHeight;
		ZAPAT = document.body.scrollTop;
		VISIB = 'show';
	}
	else if (isss.ie)
	{
		ZAPAW = document.body.clientWidth;
		ZAPAH = document.body.clientHeight;
		ZAPAT = document.body.scrollTop;
		VISIB = 'visible';
	}
	if (ZAPAW > ZAPSW)
	{
		ZAPLO('zapstckyR', (ZAPAW - ZAPSW), (ZAPAH - ZAPMO), ZAPSW, (ZAPAT + 5), 'inline', VISIB);
	}
	else
	{
		ZAPLO('zapstckyR', 1, 1, 1, 1, 'none', 'hidden');
	}
}

if(!isDefined('leftOffset'))
	leftOffset = 820;
	
var ZAPSW = leftOffset;
var ZAPMO = 10;

var isss = new Isss();
document.write('<div align="left" id="zapstckyR" name="zapstckyR" style="position:absolute;  top:-200 left:-200; width:1; height:1; display: none; visibility:visible" >');
document.write('	<table width="100%" height="100%" border="0" align="right" cellspacing="0" cellpadding="0"   >');
document.write('		<tr>');
document.write('			<td align="right" valign="top" width="100%" height="100%" align="center">');
document.write('			<a href="' + bannerLink + '" target="_blank"><img border="0" src="images/1.gif" width="100%" height="100%"></a>');
document.write('			</td>');
document.write('		</tr>');
document.write('	</table>');
document.write('</div>');

if (isss.ns)
{
	ZAPAW = innerWidth - 20;
	ZAPAH = innerHeight;
	ZAPAT = document.body.scrollTop;
	VISIB = 'show';
}
else if (isss.ie)
{
	ZAPAW = document.body.clientWidth;
	ZAPAH = document.body.clientHeight;
	ZAPAT = document.body.scrollTop;
	VISIB = 'visible';
}

ZAPLO('zapstckyR', (ZAPAW - ZAPSW), (ZAPAH - ZAPMO), ZAPSW, (ZAPAT + 5), 'inline', VISIB);
if (isss.ns)
{
	addEventListener("resize", ZAPHPC, false);
	addEventListener("scroll", ZAPHPC, false);
	addEventListener("blur", ZAPHPC, false);
}
else if (isss.ie)
{
	window.attachEvent("onresize", ZAPHPC);
	window.attachEvent("onscroll", ZAPHPC);
	window.attachEvent("onblur", ZAPHPC);
}

if (ZAPAW > ZAPSW)
{
	setTimeout("ZAPHPC();", 10);
	document.body.style.background = "url('" + bannerSource + "') " + leftOffset + "px top no-repeat fixed";
	ZAPHPC();
}
