
function validateForm () {

	var form = document.formone;

//	if (form.title.value)

}

function writeRegions (dd) {

var selectName = "";
var country = "";

if (dd == 'user_country'){

	selectName = "region";
	country = (document.formone.country[document.formone.country.selectedIndex].value);

	options = "";

	for (i = 0; i < regions.length; i++){

		if (country == regions[i][0]){

			for (j = 0; j < regions[i][1].length; j++){
				options += ("<option value=\""+(regions[i][1][j])+"\">"+(regions[i][1][j])+"</option>\n"); // elements of the options array
			}
		}
	}

	if (options != ""){
		document.all.u_region.innerHTML = '<SELECT name=\"'+selectName+'\">'+options+'</SELECT>';
	}else{
		document.all.u_region.innerHTML = "";
	}

}else if (dd == 'search_country'){

	selectName = "search_region";
	country = (document.formone.search_country[document.formone.search_country.selectedIndex].value);

	options = "";

	for (i = 0; i < regions.length; i++){

		if (country == regions[i][0]){

			for (j = 0; j < regions[i][1].length; j++){
				options += ("<option value=\""+(regions[i][1][j])+"\">"+(regions[i][1][j])+"</option>\n"); // elements of the options array
			}
		}
	}


	if (options != ""){
		document.all.s_region.innerHTML = '<SELECT name=\"'+selectName+'\">'+options+'</SELECT>';
	}else{
		document.all.s_region.innerHTML = "";
	}
}

}


function disable (elementName) {

//	if (document.all || document.getElementById) {
//		for (i = 0; i < document.forms[0].length; i++) {
//		var tempobj = document.forms[0].elements[i];
//			if (tempobj.name.toLowerCase() == elementName && document.forms[0].custom_buyprice_from.selectedIndex == 14){
//				tempobj.disabled = true;
//				document.forms[0].custom_buyprice_to.selectedIndex = 14;
//			}else{
//				tempobj.disabled = false;
//			}
//		}
//	}

	eval("document.formone.search_"+elementName+"price_to.selectedIndex = document.formone.search_"+elementName+"price_from.selectedIndex");

}
