﻿function DoCallback(url , thisid, post){
 	var xmlhttp=false;
 	var my_respons = '';
	document.getElementById(thisid).innerHTML='<img src="images/loading.gif" width="16" border="0">';
if(!xmlhttp) { 
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlhttp=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
	 }
    }
    if(!xmlhttp) { xmlhttp=new XMLHttpRequest();}
     	xmlhttp.open('POST', url, true);
        xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); post=post+'&my_time='+escape(new Date().getTime());
        xmlhttp.send(post); 
        xmlhttp.onreadystatechange = function() {
              if(xmlhttp.readyState == 4  && xmlhttp.status == 200){
				my_respons=xmlhttp.responseText;
				my_respons = my_respons.replace('\n', '');
				my_respons = my_respons.replace('\r', '');
				document.getElementById(thisid).innerHTML =my_respons;
             }
        }
}



function DoCallbackWithCity(url,thisid,post){
 	var xmlhttp=false;
 	var my_respons = '';
	document.getElementById(thisid).innerHTML='<img src="images/loading.gif" width="16" border="0">';
if(!xmlhttp) { 
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlhttp=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
	 }
    }
    if(!xmlhttp) { xmlhttp=new XMLHttpRequest();}
     	xmlhttp.open('POST', url, true);
        xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); post=post+'&my_time='+escape(new Date().getTime());
        xmlhttp.send(post); 
        xmlhttp.onreadystatechange = function() {
              if(xmlhttp.readyState == 4  && xmlhttp.status == 200){
				my_respons=xmlhttp.responseText;
				my_respons = my_respons.replace('\n', '');
				my_respons = my_respons.replace('\r', '');
				document.getElementById(thisid).innerHTML =my_respons;
             }
        }
}

function showdalil(thisid,ID) {
	if (document.getElementById(thisid).cheked == true) {
		document.getElementById(ID).style.display = 'none';
	} else {
		document.getElementById(ID).style.display = '';
	}
	
}

function hidedalil(ID) {
	document.getElementById(ID).style.display = 'none';
}