			var DivId;
			var status = true;
			var time = 0;
			var DepIDbefore = 0;
			var TabIDbefore = 1;
			var FirstGo = true;
			//var objektai = new Array();
			
			var tmpDivIds = new Array();
			
			function XmlHttp( ){
                this.CreateXmlHttpObject = CreateXmlHttpObject;
                this.GetUrlContent              = GetUrlContent;
                this.GetResponseText          = GetResponseText;
                this.GetReadyState              = GetReadyState;           
                this.HttpMethod = 'POST'; // default
                this.objXmlHttp = this.CreateXmlHttpObject();
            }

            // Initialize XMLHttpObject
            function CreateXmlHttpObject(){
                var xmlhttp=false;
                try {
                    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
                } catch (e) {
                try {
                    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (E) {
                    xmlhttp = false;
                }
            }
       

            if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest();
            }
                return xmlhttp;
            }
            var objXMLHttp =  new XmlHttp();
                   
            function GetReadyState( ){
				return this.objXmlHttp.readyState;
            }
 
            function GetResponseText( ){
                return this.objXmlHttp.responseText;
            }

			function GetResponse(){
				if (objXMLHttp!=null && objXMLHttp.GetReadyState()==4) {
				var objDivIds = new Array();
					if (objXMLHttp.GetResponseText( )!=''){
						var i = 0;
						objDivIds = objXMLHttp.GetResponseText( ).split('||');
						
						for(i=0;i<objDivIds.length;i++) {
							document.getElementById(tmpDivIds[i]).innerHTML = objDivIds[i];
							if ((i>3)&&(i<8)) {
								if (objDivIds[i] != "0") {
									document.getElementById(tmpDivIds[i]).parentNode.style.display="block";
								} else {
									document.getElementById(tmpDivIds[i]).parentNode.style.display="none";
								}
							}
							if (i>7) {
								if (objDivIds[i].length > 0) {
									//child node 5 is question mark image. please change if html is modified
									if (document.getElementById(tmpDivIds[i]).parentNode.childNodes[5]){
									document.getElementById(tmpDivIds[i]).parentNode.childNodes[5].style.display="block";}
								} else {
									//child node 5 is question mark  image. please change if html is modified
									if (document.getElementById(tmpDivIds[i]).parentNode.childNodes[5]){
									document.getElementById(tmpDivIds[i]).parentNode.childNodes[5].style.display="none";
								}
								}
							}
						}
					}
				}		
			}					
 
            // Function performs Get request to absolute url(strUrl)
            // using XmlHttp object (asynchroni)
            // Response returned into objResult element using innerHTML.
            // When state of XmlHttp object is changed - objOnReadyStateChangeFunction called
			function GetUrlContent( strUrl, toSend ,objOnReadyStateChangeFunction,filename){
				if (objXMLHttp.HttpMethod == "GET") {
					this.objXmlHttp.open(this.HttpMethod, strUrl, true);
	                this.objXmlHttp.setRequestHeader('Content-Type', 'text/xml; charset=UTF-8');
				} else {
					this.objXmlHttp.open(this.HttpMethod, filename, true);
	                this.objXmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	                this.objXmlHttp.setRequestHeader("Content-length", strUrl.length);
	                this.objXmlHttp.setRequestHeader("Connection", "close");
	            }
				
				if(objOnReadyStateChangeFunction){
					this.objXmlHttp.onreadystatechange=function(){
						objOnReadyStateChangeFunction();
					}
				}
				this.objXmlHttp.send(strUrl);
				status = true;
			}
           
            //This function is called when we get the data back from the server.       
            function UpdateDiv(DivId, Page, filename, method ) {
				objXMLHttp.HttpMethod = method;
				if (FirstGo==false && objXMLHttp.GetReadyState()!=4){
					UpdateDivByTimeOut(DivId, Page, filename, method);
				} else {
					FirstGo = false;
					status = false;
						tmpDivIds = DivId.split(',');
						if( Page !='' ) {
							objXMLHttp.GetUrlContent( Page, null ,GetResponse, filename);							
						}
				}
				return true;
            }			
			
			function UpdateDivByTimeOut(a, b, c, d){
				if (FirstGo == true){
				UpdateDiv(a, b, c, d);
				} else {
					if(objXMLHttp.GetReadyState()!=4 && time<2001){
					//alert(time);
					time++;				
						if (time==2001){ alert("server is not answering, please try later");}
						setTimeout('UpdateDivByTimeOut("'+a+'", "'+b+'")', 100);
					}
					if(objXMLHttp.GetReadyState()==4 && time<2001){
						UpdateDiv(a, b, c, d);
					}
				}
			}