function showLayer(layerId,show) {
	if (document.getElementById && document.getElementById(layerId)) { objLayer = document.getElementById(layerId); } else if (document.all && document.all[layerId]) { objLayer = document.all[layerId]; } else if (document.layers && document.layers[layerId]) { objLayer = document.layers[layerId]; } else { objLayer = null; }
	if (objLayer !== null) { objLayer.style.display = (show == 1) ? 'block' : 'none'; }
}

function GetXmlHttpObject() {
	var xmlHttp=null;
	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");
		}
	}
	return xmlHttp;
}

function ajaxEval(strURL) {
	xmlHttp = GetXmlHttpObject();
	if (xmlHttp == null) return;
	xmlHttp.onreadystatechange = function() { 
		if (xmlHttp.readyState == 4) {
			eval(xmlHttp.responseText);
		}
	};
	xmlHttp.open("GET",strURL,true);
	xmlHttp.send(null);
}

function ajaxUpdate(strDiv,strURL) {
	xmlHttp = GetXmlHttpObject();
	if (xmlHttp == null) return;
	xmlHttp.onreadystatechange = function() {
		if (xmlHttp.readyState == 4) {
			document.getElementById(strDiv).innerHTML = xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET",strURL,true);
	xmlHttp.send(null);
}

function provinces(c,ssl) {
	ajaxUpdate('select_provinces','/scripts/provinces/?c='+c+'&ssl='+ssl);
}