function Only_Numeric(e) {
	var whichCode = (window.Event) ? e.which : e.keyCode;
	//alert(whichCode);
	if (whichCode == 13) return true;  // Enter
	if (whichCode > 57 ) return false;
	if (whichCode < 48 && whichCode > 13) return false;
}

function trimNumber(s) {
	return s.replace(/^\s*/,"").replace(/\s*$/, "");
}

function FormatPhoneNumber(thisis) {
	var tempstr,newstr,str,i,str2 ;
	var commapos,aftercomma,commacount;

	thisis.value = trimNumber(thisis.value);
	str = thisis.value;
	str = str.replace(/ /g, "");

	if (str.length > 9) {
		tempstr = str;
		newstr = "";
		newstr = tempstr.substr(0, 4) + " " + tempstr.substr(4, 3) + " " + tempstr.substr(7, 2) + " " + tempstr.substr(9);
		thisis.value = newstr;
	} else if (str.length > 7) {
		tempstr = str;
		newstr = "";
		newstr = tempstr.substr(0, 4) + " " + tempstr.substr(4, 3) + " " + tempstr.substr(7);
		thisis.value = newstr;
	} else if (str.length > 4) {
		tempstr = str;
		newstr = "";
		newstr = tempstr.substr(0, 4) + " " + tempstr.substr(4);
		thisis.value = newstr;
	}
}

function ulkeChange() {
	var lstCountry = document.getElementById("ulke");
	var rowSehir = document.getElementById("trSehir");

	if (rowSehir != null && lstCountry != null)
		rowSehir.style.display = (lstCountry.value == "1") ? "" : "none";	
}

