

var  address_showSampleValues=false;
var SampleCount=0;
var rsampleList = new Array();
selectData.length=0;

function address_queryForm() { //address_queryForm
	address_showSampleValues=false;
	SampleCount=0;
	selectData.length=0;
	f107();
}

function f106(newString,layerNm,XMLMode) { //find_sendQueryString

	newString = f29(newString);
	setQueryString=newString;
	selectionMode=1;
	selectData.length=1;
	rsampleList.length=0;
	shwRetrData();

	selectType=ActLyrTyp;
	selectCount=0;

	selectLeft.length=1;
	selectRight.length=1;
	selectTop.length=1;
	selectBottom.length=1;

	for (var i=0;i<layerCount;i++) {
	   if (lyrNm[i]==layerNm) {
			switch(lyrNm[i]){
				case RoadlyrNm:
					inActiveQueryLyr = lyrId[i];
					hasInActiveQueryLyr=true;
					selectType="line";
					break;
				case LandlyrNm:
					if (XMLMode=="1551"){   //lotplan
						inActiveQueryLyr = lyrId[i];
						hasInActiveQueryLyr=true;
						selectType="polygon";
						//lyrVis[i]=1;
						//lyrVis[i-1]=1;
					}else{
						var Alyr=lyrId[i];
						//lyrVis[i]=1; 
		//alert("active layer name? "+lyrNm[actLyrIndex]);		
						f43(i);
//						alert("here - land in else"+Alyr);
					}
				break;
				default:
					var Alyr=lyrId[i];
					lyrVis[i]=1;
//alert("111active layer name? "+lyrNm[actLyrIndex]);
					f43(i);
					alert("here - land in default");
				break;
		   	}	
		 	//next line added by ppunter for proper highlighting of property on find 
			selectType=ActLyrTyp;
			parent.TOCFrame.document.location=appDir+"toc.htm";
	   }
	}
	sendToServerASP(XMLMode);
}


function f107() { //address_writeQueryForm
		//Hashes cannot go through url, as they are reserved for hyperlinking within a document
		var webParams="";
		Win1 = window.open("Query_address.htm?"+webParams,"FormWindow","left="+((screen.width/2)-170)+",top="+((screen.height/2)-170)+",width=590,height=370,scrollbars=no,resizable=no,status=yes");
		addWin(Win1);

}

function fs106(newString,layerNm,XMLMode) { //find_sendQueryString

	newString = f29(newString);
	//setQueryString=newString;
	SearchQueryString=newString; 
	selectionMode=1;
	selectData.length=1;
	rsampleList.length=0;
	shwRetrData();

	selectType=ActLyrTyp;
	selectCount=0;

	selectLeft.length=1;
	selectRight.length=1;
	selectTop.length=1;
	selectBottom.length=1;

	var this_layer=layerNm;
	//alert(layerNm);
	for(var j=0;j<lyrId.length;j++) {
		if(lyrNm[j]==this_layer) {
			thelayervariable=lyrId[j]+"";
		}
	}
	//alert(thelayervariable);
	
	if(layerNm=="Roads"){
			searchlayertype="line";
			is_roads=true;
			inActiveQueryLyr = thelayervariable;
			hasInActiveQueryLyr=true;
	}else if(layerNm=="Localities"){
			searchlayertype="polygon";
			is_roads=false;
			inActiveQueryLyr = thelayervariable;
			hasInActiveQueryLyr=true;
    }else if(layerNm=="Cad Areas and Lot Text"){
			searchlayertype="polygon";
			is_roads=false;
			inActiveQueryLyr = thelayervariable;
			hasInActiveQueryLyr=true;
			if(XMLMode==1551){
			  if(last_property_str!=""){
				   var Win1 = parent.ResultsFrame;
				   var st="http://www.mimapsmackay.com.au/website/"+app_dir+"/asp/get_property1.asp?property="+last_property_str;
				   Win1.location=st; 
              }
			}
    }

	sendToServerASP(XMLMode);
}