function Title(newtitle)
	{
		 document.title = newtitle;
	}
	
function Meta(id,value)
	{
		metatags = document.getElementsByTagName("meta");
	
		for (cnt = 0; cnt < metatags.length; cnt++)
		{
			if (metatags[cnt].getAttribute("name") == id)
			{
				metatags[cnt].setAttribute("content", value);
			}
		}	
	}
	
function Facebook(id)
	{
		window.open(id,"mywindow","location=1,status=1,scrollbars=1,height=451, width=601");
	}
	
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 Degis3(resim,id)
	{
		document.getElementById("Menu"+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;
	}	
	
	
