/*
	function $(id)
		{
			return document.getElementById(id);	
		}
*/

function VideoOynat(id)
	{
		window.open("video.php?id="+id,"mywindow","location=1,status=1,scrollbars=1,height=451, width=601");
	}
	
function FiyatAc()
	{
		window.open("fiyatlar.php","mywindow","location=1,status=1,scrollbars=1,height=650, width=500");
	}
	
function ResimAc(id)
	{
		window.open("resim.php?id="+id,"mywindow","location=1,status=1,scrollbars=1,height=600, width=950");
	}
	
function ResimAc2(id)
	{
		window.open("urunresim.php?id="+id,"mywindow","location=1,status=1,scrollbars=1,height=600, width=950");
	}

function MenuResimDegis(id)
	{
		document.getElementById('Menu'+id).style.background = "url(images/SolBtnAnaKategori2.jpg)";
		document.getElementById('Menu'+id).style.background = "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (src='images/SolBtnAnaKategori2.jpg',sizingMethod='scale')";
	}
	
function MenuResimDuzelt(id)
	{
		document.getElementById('Menu'+id).style.background = "url(images/SolBtnAnaKategori1.jpg)";
		document.getElementById('Menu'+id).style.background = "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (src='images/SolBtnAnaKategori1.jpg',sizingMethod='scale')";
	}	
	
function MenuResimDegis2(id)
	{
		document.getElementById('AltMenu'+id).style.background = "url(images/SolBtnAltKategori2.jpg)";
		document.getElementById('AltMenu'+id).style.background = "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (src='images/SolBtnAltKategori2.jpg',sizingMethod='scale')";
	}
	
function MenuResimDuzelt2(id)
	{
		document.getElementById('AltMenu'+id).style.background = "url(images/SolBtnAltKategori1.jpg)";
		document.getElementById('AltMenu'+id).style.background = "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (src='images/SolBtnAltKategori1.jpg',sizingMethod='scale')";
	}
	
function FormKontrol()
	{
		var form	=	document.forms['adasdasdas'];
		var ad		=	form.ad.value + " " + form.soyad.value;
		var telefon	=	form.tel.value;
		var mail	=	mailKontrol(form.email.value,form.hata2.value);
		var baslik	=	form.baslik.value;	
		var soru	=	form.soru.value;
		var hata	=	form.hata.value;		
		if(ad == '' || soru == '' || mail == false)
			{
				alert(hata);
				return false;
			}
		else
			{
				form.submit();
			}
	}
	
function FormKontrol2()
	{
		var form	=	document.forms['adasdasdas'];
		var ad		=	form.ad.value + " " + form.soyad.value;
		var telefon	=	form.tel.value;
		var mail	=	mailKontrol(form.email.value,form.hata2.value);
		var konu	=	form.konu.value;	
		var mesaj	=	form.mesaj.value;
		var hata	=	form.hata.value;
		if(ad == '' || mesaj == '' || mail == false)
			{
				alert(hata);
				return false;
			}
		else
			{
				form.submit();
			}
	}
	
function regKontrol(pattern,email,hata)
	{
	   r = new RegExp(pattern,"g");
	   return r.test(email,hata);
	}

function mailKontrol(email,hata)
	{
		 patternEposta = "^"+"([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0-9_\.\-]+)"+"@"+"([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0-9_\.\-]+)"+"[\.]"+"([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0-9_\.\-]+)"+"$";
		 if(!regKontrol(patternEposta,email))
			{
			 	alert(hata);
			 	return false;
			}
		else
			{
				return true;
			}
	}	
	
function Ac(id)
	{
		document.getElementById(id).style.visibility = 'visible';
	}
	
function Kapat(id)
	{
		document.getElementById(id).style.visibility = 'hidden';
	}	
	
	