/********************
file.....: js/xmlhttprequestFunctions.js
Descr....:  xmlhttp
Author...: George Stathis
Copyright: G&G - George Stathis - Gina Theodorly (www.gandg.gr)
*******************/
<!--
function fillBox(sel,sel2,fillwith,divname,lng) {
//alert(sel)
//alert(fillwith)
//alert("./includes/XmlHttpRequests/fillBox.asp?sel="+sel+"&amp;fillwith="+fillwith)
 xmlhttp1.open("GET", "./includes/XmlHttpRequests/fillBox.asp?fixtext=no&lng="+lng+"&sel="+sel+"&sel2="+sel2+"&fillwith="+fillwith,true);
 xmlhttp1.onreadystatechange=function() {
if (xmlhttp1.readyState==4) {
 document.getElementById(divname).innerHTML = xmlhttp1.responseText; 
//alert(xmlhttp1.responseText);
 }
 }
 xmlhttp1.send(null)
}

function fillBox1(sel,sel2,fillwith,divname,lng) {
xmlhttp2.open("GET", "./includes/XmlHttpRequests/fillBox.asp?fixtext=no&lng="+lng+"&sel="+sel+"&sel2="+sel2+"&fillwith="+fillwith,true);
xmlhttp2.onreadystatechange=function() {
if (xmlhttp2.readyState==4) {
 document.getElementById(divname).innerHTML = xmlhttp2.responseText; 
 }
 }
xmlhttp2.send(null)
}

function fillBox2(sel,sel2,fillwith,divname,lng) {
xmlhttp3.open("GET", "./includes/XmlHttpRequests/fillBox.asp?fixtext=no&lng="+lng+"&sel="+sel+"&sel2="+sel2+"&fillwith="+fillwith,true);
xmlhttp3.onreadystatechange=function() {
if (xmlhttp3.readyState==4) {
 document.getElementById(divname).innerHTML = xmlhttp3.responseText; 
 }
 }
xmlhttp3.send(null)
}


function fillPage(pagename,divname) {
 xmlhttp1.open("GET",pagename,true);
 xmlhttp1.onreadystatechange=function() {
  if (xmlhttp1.readyState==4) {
document.getElementById(divname).innerHTML = xmlhttp1.responseText; 
//alert(xmlhttp1.responseText);
  }
 }
xmlhttp1.send(null)
}

function addvProperty(pid,lng) {
 xmlhttp1.open("GET","./includes/XmlHttpRequests/addvproperty.asp?lng="+lng+"&pid="+pid,true);
xmlhttp1.onreadystatechange=function() {
if (xmlhttp1.readyState==4) {
//alert(xmlhttp1.responseText);
 }
 }
xmlhttp1.send(null)
}


function fillBoxA(sel,fillwith,divname,lng) {
//alert(sel);
//alert(fillwith);
//alert("./includes/XmlHttpRequests/fillBox.asp?sel="+sel+"&amp;fillwith="+fillwith)
 xmlhttp1.open("GET", "./includes/XmlHttpRequests/fillBox.asp?lng="+lng+"&sel="+sel+"&fillwith="+fillwith,true);
 xmlhttp1.onreadystatechange=function() {
if (xmlhttp1.readyState==4) {
 document.getElementById(divname).innerHTML = xmlhttp1.responseText; 
//alert(xmlhttp1.responseText);
 }
 }
 xmlhttp1.send(null)
}

function fillBoxA1(sel,fillwith,divname,lng) {
xmlhttp2.open("GET", "../includes/XmlHttpRequests/fillBox.asp?lng="+lng+"&sel="+sel+"&fillwith="+fillwith,true);
xmlhttp2.onreadystatechange=function() {
if (xmlhttp2.readyState==4) {
 document.getElementById(divname).innerHTML = xmlhttp2.responseText; 
 }
 }
xmlhttp2.send(null)
}


function selfillBoxCity(sel,lng,fromid,fsubmit) {
	var rt = "";
	xmlhttp1.open("GET","./includes/XmlHttpRequests/selfillBox.asp?getselid=cityID&lng="+lng+"&sel="+sel+"&fromid="+fromid,true);
	xmlhttp1.onreadystatechange=function() 
	{
		if (xmlhttp1.readyState==4)
		{
			if (fromid == "cityID") rt = sel
			else rt = xmlhttp1.responseText
			//alert(rt);
			for(i=0;i<document.getElementById('city').length;i++)
			{
				if(document.getElementById('city').options[i].value==rt)
				{
				document.getElementById('city').selectedIndex=i;
				}
			}
			if (fsubmit == true)
			document.getElementById('SearchForm').submit();
		}
	}
	xmlhttp1.send(null)
}

function selfillBoxArea(sel,lng,fromid,fsubmit) {
	var rt = "";
	xmlhttp2.open("GET","./includes/XmlHttpRequests/selfillBox.asp?getselid=areaID&lng="+lng+"&sel="+sel+"&fromid="+fromid,true);
	xmlhttp2.onreadystatechange=function() 
	{	
		if (xmlhttp2.readyState==4) 
		{
			rt = xmlhttp2.responseText
			//alert(rt)
			for(i=0;i<document.getElementById('area').length;i++)
			{
				if(document.getElementById('area').options[i].value==rt)
				{	
					document.getElementById('area').selectedIndex=i;
				}
			}
		if (fsubmit == true)
		document.getElementById('SearchForm').submit();
		}
	}
	xmlhttp2.send(null)
}


//-->

