// Display or Hide district- or province files
// *******************************************
function show_hide(x,RsCounter,recent){
	
	counter = 0;
	ImgName = "img" + x + "-" + counter;

	if(document.all[ImgName].style.visibility == "hidden"){
		
		while(document.all[ImgName]){
			document.all[ImgName].style.visibility = "visible";
			counter = counter + 1;
			ImgName = "img" + x + "-" + counter;
			}
		ArrIDList[RsCounter] = ArrIDListOld[RsCounter];
		}
	else{
	
		while(document.all[ImgName]){
			document.all[ImgName].style.visibility = "hidden";
			counter = counter + 1;
			ImgName = "img" + x + "-" + counter;
			}
		
		ArrIDList[recent + RsCounter] = 0;
		}
	
	
	}

	
// Print command
// *************
//	(If browser = IE v.4.0)
function print_document(){
	alert("Please change page layout under printer settings to 'Landscape'.");
	if(document.all && navigator.appVersion.substring(22,23)==4) {
		self.focus();
		var OLECMDID_PRINT = 6;
		var OLECMDEXECOPT_DONTPROMPTUSER = 2;
		var OLECMDEXECOPT_PROMPTUSER = 1;
		var WebBrowser = '<object id="WebBrowser1" width="0" height="0" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object>';
		document.body.insertAdjacentHTML('beforeEnd',WebBrowser);
		WebBrowser1.ExecWB(OLECMDID_PRINT,OLECMDEXECOPT_DONTPROMPTUSER);
		WebBrowser1.outerHTML = '';
		}
	else{
		window.print();
		}
	}


// Navigation
// **********
function GoTo(x)
	{
	document.FrmData.TmpIDList.value = ArrIDList.join(",")
	document.FrmData.start.value = x;
	document.FrmData.submit();
	}


// Re-draw Map
// ***********
function ReDraw()
	{
	document.FrmData.IDList.value = ArrIDList.join(",");
	document.FrmData.TmpIDList.value = "";
	document.FrmData.start.value = 1;
	document.FrmData.submit();
	}