function formCheck(formobj){
	// Enter name of mandatory fields
	var fieldRequired = Array("uname", "parola");
	// Enter field description to appear in the dialog box
	var fieldDescription = Array("Kullanıcı Adı", "Parola");
	// dialog message
	var alertMsg = "Aşağıdaki alanları boş geçmeyin:\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 == ""){
					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";
				}
				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 swapImage(obj,src)
{
    obj.src=src;
}
//anket start----------------------------------------------------
function validatePoll(objForm,ChoiceCount,pollID)
{
selectedChoice =-1;
var PollForm = document.getElementById(objForm);

for (i=0;i<ChoiceCount;i++) 
{
	if (PollForm.choice[i].checked) {
		selectedChoice=i;
		break;
	}
}

openstr= pollHref + "?pid=" + pollID;

if (selectedChoice!=-1) 
{
	openstr = openstr + '&choice=' + PollForm.choice[selectedChoice].value;
}

window.open(openstr,'pollPopup','left=100,top=100,toolbar=no,location=no,menubar=no,status=no,directories=no,scrollbars=yes,resizable=yes,width=600,height=350');
}

function pollResult(pollID) {

window.open(''+ pollHref +'?pid='+ pollID +'','anket','left=100,top=100,toolbar=no,location=no,menubar=no,status=no,directories=no,scrollbars=yes,resizable=yes,width=600,height=350');
}

function popupContact(url)
{
window.open(url,'Contact','left=100,top=100,toolbar=no,location=no,menubar=no,status=no,directories=no,scrollbars=yes,resizable=no,width=600,height=550');
}

function validateNews()
{
emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]+[\\w-_\.]+[.][\\w-_\.]+[a-zA-Z]$"
var regex = new RegExp(emailReg);


		if (document.uyelik.name.value=="")
			{
			alert("Lütfen adınızı girin.");
			return;
			}

		if (document.uyelik.email.value=="")
			{
			alert("Lütfen e-posta adresinizi girin.");
			return;
			}
			
		
		if (! (regex.test(document.uyelik.email.value)))
			{
			alert ("Lütfen e-posta adresinizi düzeltin !");
			return;
			}

	document.uyelik.submit();
}
//anket end----------------------------------------------------

