/////////////////////////////////////////////////////////////////////////////
// JavaScriptler
/////////////////////////////////////////////////////////////////////////////
//=============================================================================
// Flash taramak, yazmak, flash yok ise resim koymak için
//=============================================================================
function hangiFlash(hangiSurum)
{
	flashDurumu = 0;
	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)
	{
		if (navigator.plugins && navigator.plugins["Shockwave Flash"] && (surumDizini = navigator.plugins["Shockwave Flash"].description.indexOf(".")) != -1)
		{
			var surumMetni = navigator.plugins["Shockwave Flash"].description.substring(surumDizini - 1, surumDizini);
			surumDizini = parseInt(surumMetni);
			if (surumDizini >= hangiSurum)
			{
				flashDurumu = 1;
			}
		}
	}
	else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0 && (navigator.userAgent.indexOf("Windows 95") >= 0 || navigator.userAgent.indexOf("Windows 98") >= 0 || navigator.userAgent.indexOf("Windows NT") >= 0))
	{
		satirYaz = 'flashDurumu = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.' + hangiSurum + '"))) \n';
		document.write('<script language=VBScript\> \n');
		document.write('on error resume next \n');
		document.write(satirYaz);
		document.write('</script\> \n');
	}
	return flashDurumu;
}
//-----------------------------------------------------------------------------
function flashYaz(flashVersiyon, flDizinOnEki, flIsimVeID, en, boy, zeminRengi, pencereDurumu, rsmIsim, degiskenler, rsmLink)
{
	if (hangiFlash(flashVersiyon))
	{
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + flashVersiyon + ',0,0,0" width="' + en + '" height="' + boy + '" id="' + flIsimVeID + '" align="middle">');
		document.write('<param name="allowScriptAccess" value="sameDomain">');
		document.write('<param name="movie" value="' + flDizinOnEki + flIsimVeID + '.swf' + degiskenler + '">');
		document.write('<param name="menu" value="false">');
		document.write('<param name="quality" value="best">');
		document.write('<param name="wmode" value="' + pencereDurumu + '">');
		document.write('<param name="bgcolor" value="#' + zeminRengi + '">');
		document.write('<embed src="' + flDizinOnEki + flIsimVeID + '.swf' + degiskenler + '" menu="false" quality="best" wmode="' + pencereDurumu + '" bgcolor="#' + zeminRengi + '" width="' + en + '" height="' + boy + '" name="' + flIsimVeID + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">');
		document.write('</object>');
	}
	else
	{
		if (rsmLink)
		{
			document.write('<a href="' + rsmLink + '"><img src="medya/resim/' + rsmIsim + '" width="' + en + '" height="' + boy + '" border="0"></a>');
		}
		else
		{
			document.write('<img src="medya/resim/' + rsmIsim + '" width="' + en + '" height="' + boy + '" border="0">');
		}
	}
}

//=============================================================================
// Formu sınamak için
//=============================================================================
function formSina()
{
	var durum = true;
	if (iformu.adsoyad.value.length < 2)
	{
		alert('Lütfen isminizi giriniz.');
		durum = false;
	}
	else if (iformu.telefon.value.length < 7)
	{
		alert('Lütfen geçerli bir telefon numarası giriniz.');
		durum = false;
	}
	else if (!iformu.eposta.value.length || iformu.eposta.value.indexOf("@") == -1 || iformu.eposta.value.indexOf(".") == -1)
	{
		alert('Lütfen geçerli bir e-posta adresi giriniz.');
		durum = false;
	}
	else if (iformu.adres.value.length < 4)
	{
		alert('Lütfen adresinizi giriniz.');
		durum = false;
	}
	else if (iformu.istek.value.length < 4)
	{
		alert('Lütfen istek ve görüşlerinizi giriniz.');
		durum = false;
	}
	return (durum);
}
//=============================================================================
// Uste pencere ac
//=============================================================================
function ustePencAc(resimAdi, en, boy, baslik)
{
	if (resimAdi == "abhaberpopup")
	{
		penBoy = 400;
		ekranYuks = screen.height;
		ekranGens = screen.width;
		ustMesafe = (ekranYuks - penBoy) / 2;
		solMesafe = (ekranGens - en) / 2;
		yeniPencere = window.open("", "urunler", "width=" + (en+20) + ",height=" + penBoy + ",left=" + solMesafe + ",top=" + ustMesafe + ",resizable=no,status=no,scrollbars=yes");
		var rsmUzanti = ".gif";
	}
	else
	{
		ekranYuks = screen.height;
		ekranGens = screen.width;
		ustMesafe = (ekranYuks - boy) / 2;
		solMesafe = (ekranGens - en) / 2;
		yeniPencere = window.open("", "urunler", "width=" + en + ",height=" + boy + ",left=" + solMesafe + ",top=" + ustMesafe + ",resizable=no,status=no,scrollbars=no");
		var rsmUzanti = ".jpg";
	}
	yeniPencere.document.writeln("<html>");
	yeniPencere.document.writeln("<head>");
	yeniPencere.document.writeln("<title>" + baslik + "</title>");
	yeniPencere.document.writeln("<meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-9\">");
	yeniPencere.document.writeln("</head>");
	yeniPencere.document.writeln("<body topmargin=0 leftmargin=0 bottommargin=\"0\" rightmargin=\"0\">");
	yeniPencere.document.writeln("<a href=\"javascript:window.close()\;\"><img src=\"medya/resim/" + resimAdi + rsmUzanti + "\" width=\"" + en + "\" height=\"" + boy + "\" border=\"0\" alt=\"Kapatmak için resme tıklayın!\"></a>");
	yeniPencere.document.writeln("</body>");
	yeniPencere.document.writeln("</html>");
	yeniPencere.document.close();
}
//=============================================================================
// Referans icerik getirmek icin 
//=============================================================================
function portfolyoDegis(icerikAdi, dil)
{
	var flashMtn, flashVersiyon, flDizinOnEki, flIsimVeID, en, boy, zeminRengi, pencereDurumu, rsmIsim, degiskenler, rsmLink, pencereLink, portEk
	pencereLink = location.pathname;
	if (pencereLink.match("portfolyodiger") == null)
	{
		portEk = "";
	}
	else
	{
		portEk = "diger";
	}
	flashVersiyon = "8";
	flDizinOnEki = "medya/flash/";
	flIsimVeID = "ab" + icerikAdi;
	en = "457";
	boy = "360";
	zeminRengi = "FFFFFF";
	pencereDurumu = "transparent";
	rsmIsim = "";
	degiskenler = "?dil=" + dil;
	rsmLink = "";

	flashMtn = ('<table width="457" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top">');
	flashMtn += ('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + flashVersiyon + ',0,0,0" width="' + en + '" height="' + boy + '" id="' + flIsimVeID + '" align="middle">');
	flashMtn += ('<param name="allowScriptAccess" value="sameDomain">');
	flashMtn += ('<param name="movie" value="' + flDizinOnEki + flIsimVeID + '.swf' + degiskenler + '">');
	flashMtn += ('<param name="menu" value="false">');
	flashMtn += ('<param name="quality" value="best">');
	flashMtn += ('<param name="wmode" value="' + pencereDurumu + '">');
	flashMtn += ('<param name="bgcolor" value="#' + zeminRengi + '">');
	flashMtn += ('<embed src="' + flDizinOnEki + flIsimVeID + '.swf' + degiskenler + '" menu="false" quality="best" wmode="' + pencereDurumu + '" bgcolor="#' + zeminRengi + '" width="' + en + '" height="' + boy + '" name="' + flIsimVeID + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">');
	flashMtn += ('</object>');
	flashMtn += ('<br><img src="medya/resim/abhakk_czg.gif" width="457" height="27"><br><a href="portfolyo'+ portEk +'.asp'+degiskenler+'"><img src="medya/resim/abportic_dgm.gif" width="440" height="38" border="0"></a></td></tr></table>');
	document.getElementById("sonucYaz").innerHTML = flashMtn;
}

//=============================================================================
// Devam
//=============================================================================
function sayacYil(degiskenadiyil, buyil)
{
	document.write("<select name='" + degiskenadiyil + "'>");
	document.write("<option value='Yıl' selected>Yıl</option>");
	for (i=(buyil-70); i<=buyil; i++)
	{
		document.write("<option value="+i+">"+i+"</option>");
	}
	document.write("</select>");
}

function sayacAy(degiskenadiay)
{
	document.write("<select name='" + degiskenadiay + "'>");
	document.write("<option value='Ay' selected>Ay</option>");
	for (i=1; i<=12; i++)
	{
		document.write("<option value="+i+">"+i+"</option>");
	}
	document.write("</select>");
}

function sayacGun(degiskenadigun)
{
	document.write("<select name='" + degiskenadigun + "'>");
	document.write("<option value='Gün' selected>Gün</option>");
	for (i=1; i<=31; i++)
	{
		document.write("<option value="+i+">"+i+"</option>");
	}
	document.write("</select>");
}
//=============================================================================
// Devam
//=============================================================================
function icerikOrt(alanboyu,alanadi){
	var pencYuks = document.body.clientHeight;
	var ustMesafe = ((pencYuks - alanboyu)/2);
	document.getElementById(alanadi).style.paddingTop=ustMesafe+"px";
	//alert("ustMesafe:" + ustMesafe );
}
//=============================================================================
// Devam
//=============================================================================
function menuGosterGizle(islem){
	if (islem == "gizle")
	{
		document.getElementById("menu").style.visibility="hidden";
		document.getElementById("menu").style.display="none";
		document.getElementById("icerik").style.height="427px";
	}
	else
	{
		document.getElementById("menu").style.visibility="visible";
		document.getElementById("menu").style.display="block";
		document.getElementById("icerik").style.height="187px";
	}
}
//=============================================================================
// Devam
//=============================================================================
function rsmDegis(hedef, resimAdi) {
    document[hedef].src = resimAdi;
}

//=============================================================================
// Devam
//=============================================================================
function oncekiSayfa() {
	javascript:history.back(-1);
}