function formCheck(formobj)
{
	// Enter name of mandatory fields
var fieldRequired = Array("unvan","adres","sehir","istel","ceptel","faks","eposta","sirketsahibi","elemansayi","alan","sure","urunler","teminat","elemanayir","ekleme","adsoyad","gorev","email");
	// Enter field description to appear in the dialog box
	var fieldDescription = Array("Title of the Company","Adress","City","Business Telephone","Mobile Telephone","Fax","E-mail","Owner of the Company","Number of the employees","The activity areas of your company","For how long is your company active?","The companies and products that you perform dealership for","Can you supply credit letter?","Can your reserve personnel in the field?","Additional Comments","Name Surname","Position ","Email");
	// dialog message
	var alertMsg = "Please fill in the following blanks:\n";
	
	var l_Msg = alertMsg.length;
	
	for (var i = 0; i < fieldRequired.length; i++){
		var obj = formobj.elements[fieldRequired[i]];
		if (obj){
			switch(obj.type){
			case "select-one":
				if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == "-- Gün --" || obj.options[obj.selectedIndex].text == "-- Ay --" || obj.options[obj.selectedIndex].text == "-- Yıl --" || obj.options[obj.selectedIndex].text == "-- Seçiniz --" ){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "select-multiple":
				if (obj.selectedIndex == -1){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "text":
			case "password":
			case "textarea":
				if (obj.value == "" || obj.value == null ){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				else if(obj.name=="email" || obj.name=="eposta")
				{
					emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]+[\\w-_\.]+[.][\\w-_\.]+[a-zA-Z]$";
					var regex = new RegExp(emailReg);
					if (! (regex.test(obj.value)))
					{
					alertMsg += " - " +"Please correct your e-mail address!\n";
					}
				}
				break;
			default:
			}
			if (obj.type == undefined){
				var blnchecked = false;
				for (var j = 0; j < obj.length; j++){
					if (obj[j].checked){
						blnchecked = true;
					}
				}
				if (!blnchecked){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
			}
		}
	}
if (alertMsg.length == l_Msg){

		return true;

	}else{

		alert(alertMsg);

		return false;

	}
}
function validateNews()
{
emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]+[\\w-_\.]+[.][\\w-_\.]+[a-zA-Z]$"
var regex = new RegExp(emailReg);
		if (! (regex.test(document.uyelik.email.value)))
			{
			alert ("Lütfen e-mail adresinizi düzeltin !");
			return;
			}
	document.uyelik.submit();
}
