
	
function Degis(resim,id)
	{
		document.getElementById("Menu"+id).style.background = "url(Yonetim/Upload/"+resim+")";
		
	}
function Degis2(resim,id)
	{
		document.getElementById("AMenu"+id).style.background = "url("+resim+")";
	}	
function Yonlen(url)
	{
		document.location.href = url;
	}	
	
function ClassDegis(id,class)
	{
		document.getElementById("AMenu"+id).className = class;
	}	
	
function VideoOynat(id)
	{
		window.open("oynat.php?id="+id,"mywindow","location=1,status=1,scrollbars=1,height=451, width=601");
	}
	
function FormKontrol()
	{
		var ad 		= document.getElementById('ad').value;
		var soyad   = document.getElementById('soyad').value;
		var telefon = document.getElementById('telefon').value;
		var mail 	= mailKontrol(document.getElementById('email').value);
		var konu 	= document.getElementById('konu').value;
		var mesaj   = document.getElementById('mesaj').value;
		if(ad == '' || soyad == '' || mail == false)
			{
				alert('Lütfen Bütün Alanları Doldurun');
				return false;
			}
		else
			{
				document.forms['Iletisim'].submit();
			}
	}	
	
function regKontrol(pattern,value)
	{
	   r = new RegExp(pattern,"g");
	   return r.test(value);
	}

function mailKontrol(email)
	{
		 patternEposta = "^"+"([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0-9_\.\-]+)"+"@"+"([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0-9_\.\-]+)"+"[\.]"+"([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0-9_\.\-]+)"+"document.getElementById";
		 if ( !regKontrol(patternEposta,email))
			 {
				  alert('Lütfen doğru bir mail adresi giriniz.');
				  return false;
			 }
		 return true;
	}	
	
	