function getkey(e)
{
if (window.event)
   return window.event.keyCode;
else if (e)
   return e.which;
else
   return null;
}


function goodchars(e, goods)
{
var key, keychar;
key = getkey(e);
if (key == null) return true;

// get character
keychar = String.fromCharCode(key);
keychar = keychar.toLowerCase();
goods = goods.toLowerCase();

// check goodkeys
if (goods.indexOf(keychar) != -1)
	return true;

// control keys
if ( key==null || key==0 || key==8 || key==9 || key==13 || key==27 )
   return true;

// else return false
return false;
}

function uyelik(theForm)
 {
	if ((theForm.emailim.value == "") || (theForm.emailim.value.indexOf('@',0) == -1)) 
	{
		alert("Email adresiniz geçersiz");
		theForm.emailim.focus();
		theForm.emailim.select();
		return false;
	}	

	if (theForm.gsifresi.value == "" )
	{
		alert("Lütfen geçerli şifrenizi yazınız.");
		theForm.gsifresi.focus();
		return(false);
  	}
	if (theForm.adim.value == "" )
	{
		alert("Lütfen adınızı Giriniz.");
		theForm.adim.focus();
		return(false);
  	}
	if (theForm.soyadim.value == "" )
	{
		alert("Lütfen soyadınızı Giriniz.");
		theForm.soyadim.focus();
		return(false);
  	}
	if (theForm.alankodu.value == "" )
	{
		alert("Lütfen cep telefonu operatör numaranızı giriniz.");
		theForm.alankodu.focus();
		return(false);
  	}
	if (theForm.telnom.value == "" )
	{
		alert("Lütfen cep telefonu numaranızı giriniz.");
		theForm.telnom.focus();
		return(false);
  	}
	if (theForm.gkod.value == "" )
	{
		alert("Lütfen güvenlik kodunu giriniz.");
		theForm.gkod.focus();
		return(false);
  	}

}

function bildirim(href, target)
{
	window.open(href, target, 'width=300, height=200, top=0, toolbar=0, location=0, directories=0, status=0, menuBar=0, scrollBars=0, resizable=1');
	return false;
}

function mesajg(theForm)
 {

	if (theForm.mesaj.value == "" )
	{
		alert("Lütfen mesajınızı yazınız.");
		theForm.mesaj.focus();
		return(false);
  	}
}
