//===========================================================================
// JavaScriptler
//===========================================================================
//alert("merhaba");

//=============================================================================
// + Flash yazdırma
//=============================================================================
function flashYaz (flIsimVeID, en, boy, pencereDurumu/*opaque, transparent*/) {
//alert(flIsimVeID+"\n"+en+"\n"+boy+"\n"+pencereDurumu);

document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http:\/\/fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+ en +'" height="'+ boy +'" id="'+ flIsimVeID +'" align="middle">');
document.write('<param name="allowScriptAccess" value="sameDomain">');
document.write('<param name="movie" value="medya/flash/'+ flIsimVeID +'.swf">');
document.write('<param name="menu" value="false">');
document.write('<param name="quality" value="high">');
document.write('<param name="scale" value="noscale">');
document.write('<param name="wmode" value="'+ pencereDurumu +'">');
document.write('<param name="bgcolor" value="#ffffff">');
document.write('<embed src="medya/flash/'+ flIsimVeID +'.swf" menu="false" quality="high" scale="noscale" wmode="'+ pencereDurumu +'" bgcolor="#ffffff" 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>');
//alert(flIsimVeID +" - "+ pencereDurumu);

}


//=============================================================================
// + Popup pencere açmak için
//=============================================================================

function ustePencereAc(belgeDizinIsim, popupYuks, popupGens){
ekranYuks = screen.height;
ekranGens = screen.width;
ustMesafe = (ekranYuks - popupYuks)/2;
solMesafe = (ekranGens - popupGens)/2;
//alert("Y: " + ekranYuks + "\nG: " + ekranGens);

window.open(""+belgeDizinIsim+"","","height="+popupYuks+",width="+popupGens+",left="+solMesafe+",top="+ustMesafe+",resizable=no,status=no,scrollbars=no");
}


//=============================================================================
// + İçerik değiştirmek için
//=============================================================================

function solResimGoster (dizi, gelenSayi, nereye)
{
	var yaziAlani = document.getElementById (nereye);
	yaziAlani.innerHTML = dizi[gelenSayi];
}
function sagResimGoster (dizi, gelenSayi, nereye)
{
	var yaziAlani = document.getElementById (nereye);
	yaziAlani.innerHTML = dizi[gelenSayi];
}

//=============================================================================
// + Ürün popup pencere açmak için
//=============================================================================

function resimGoster(resim, baslik){
	en = 480;
	boy = 640;
	ekranYuks = screen.height;
	ekranGens = screen.width;
	ustMesafe = (ekranYuks - boy)/2;
	solMesafe = (ekranGens - en)/2;
	//alert("Y: " + ekranYuks + "\nG: " + ekranGens+ "\nustten: " + ustMesafe + "\nsol: " + solMesafe);
	yeniPencere = window.open("","urunler","width="+en+",height="+boy+",left="+solMesafe+",top="+ustMesafe+",resizable=no,status=no,scrollbars=no");
	yeniPencere.document.writeln("<html>");
	yeniPencere.document.writeln("<head>");
	yeniPencere.document.writeln("<title>Torrini Leather</title>");
	yeniPencere.document.writeln("</head>");
	yeniPencere.document.writeln("<body topmargin='0' leftmargin='0' bottommargin='0' rightmargin='0' bgcolor='#ffffff'>");
	yeniPencere.document.writeln("<a href=\"javascript:window.close()\;\"><img src=\"../medya/rsm_collection/"+resim+"\" width=\""+en+"\" height=\""+boy+"\" border=\"0\" alt=\"Close\"></a>");
	yeniPencere.document.writeln("</body>");
	yeniPencere.document.writeln("</html>");
	yeniPencere.document.close();

}
/*
function resimGoster(resim) {
	window.open("resim_goster.asp?resim="+resim,"","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizeable=0,width=480,height=640,screenX=5,screenY=5,top=5,left=5")
	}
*/


//=============================================================================
// Devam
//=============================================================================

function toparla1() {
document.resim.rResim1.value = document.resim.resim1.value;
document.resim.rResim2.value = document.resim.resim2.value;
document.resim.submit();
}

function toparla2() {
if (document.resimler.resim1.value != "") {document.resimler.rResim1.value = document.resimler.resim1.value;}
if (document.resimler.resim2.value != "") {document.resimler.rResim2.value = document.resimler.resim2.value;}
document.resimler.submit();
}
//=============================================================================
// Form sınamak için
//=============================================================================

//function valid () {
function formSina () {
	var email = document.theform.uyeEmail.value;
	if (email == "") {
		alert ("Please enter your e-mail address.");
		document.theform.uyeEmail.focus ();
		return false;
	}
	if (email.indexOf ('@', 0) == -1 || email.indexOf ('.', 0) == -1) {
		alert ("Your e-mail address is wrong. Please try another one.");
		document.theform.uyeEmail.focus ();
		return false;
	}
	var isim = document.theform.uyeAd.value;
	var isimLength = document.theform.uyeAd.value.length;
	if (isimLength < 2 || isim == "") {
		alert ("Please enter your name.");
		document.theform.uyeAd.focus ();
		return false;
	}
	var soyisim = document.theform.uyeSoyad.value;
	var soyisimLength = document.theform.uyeSoyad.value.length;
	if (soyisimLength < 2 || soyisim == "") {
		alert ("Please enter your last name .");
		document.theform.uyeSoyad.focus ();
		return false;
	}
	var firma_adi = document.theform.uyeFirmaAdi.value;
	var firma_adiLength = document.theform.uyeFirmaAdi.value.length;
	if (firma_adiLength < 1 || firma_adi == "") {
		alert ("Please enter your company name.");
		document.theform.uyeFirmaAdi.focus ();
		return false;
	}
	var unvan = document.theform.uyeUnvan.value;
	var unvan_Length = document.theform.uyeUnvan.value.length;
	if (unvan_Length < 2 || unvan == "") {
		alert ("Please enter your title.");
		document.theform.uyeUnvan.focus ();
		return false;
	}
	var telefon = document.theform.uyeTelIs.value;
	var telefon_Length = document.theform.uyeTelIs.value.length;
	if (telefon_Length < 7 || telefon == "") {
		alert ("Please enter your telephone number.");
		document.theform.uyeUnvan.focus ();
		return false;
	}
}

//=============================================================================
// Devam
//=============================================================================