function convert()
{
	var result =(document.getElementById('dovizText').value * (document.getElementById('doviz1').value)/ document.getElementById('doviz2').value);

	result = (Math.round(result*100))/100;

	document.getElementById('dovizText').value = result;
}
	
function showImage(code,emlakNo,imageNo,totalImage){
		
		for(p = 1; p<(totalImage+1);p++){
			document.getElementById(code+"-"+emlakNo+"-"+p).style.display="none";	
		}
		document.getElementById(code+"-"+emlakNo+"-"+imageNo).style.display="";	
}


function changeOpac(opacity, id)
{
var object = document.getElementById(id).style;
object.MozOpacity = (opacity / 100);
object.KhtmlOpacity = (opacity / 100);
} 

function setValues(){
   document.form1.satilik.value = document.formHidden.satilik2.value;
   document.form1.tip.value = document.formHidden.tip2.value;
   arrange();
   document.form1.bolgeler.value = document.formHidden.bolgeler2.value;
   document.form1.fiyatlar.value = document.formHidden.fiyatlar2.value;
   document.form1.buyuklukler.value = document.formHidden.buyuklukler2.value;
}

function runSlideShow() {
	
	
	
	if(document.all){
	document.getElementById('SlideShow').style.filter="blendTrans(duration=crossFadeDuration)";
	document.getElementById('SlideShow').filters.blendTrans.Apply();
	document.getElementById('SlideShow2').style.filter="blendTrans(duration=crossFadeDuration)";
	document.getElementById('SlideShow2').filters.blendTrans.Apply();
	
	}
	else{

	}	
	document.images.SlideShow.src = preLoad[j].src;
	
	document.images.SlideShow2.src = preLoad[j+1].src;


	if(document.all){
		document.getElementById('SlideShowName2').innerHTML = textA[j+1];
		document.getElementById('SlideShowFiyat2').innerHTML = "Fiyat: "+fiyatlarArray[j+1];
		document.getElementById('SlideShowLink2').setAttribute('href','emlakDetay.php?emlakID='+ linkler[j+1]);


		document.getElementById('SlideShowName').innerHTML = textA[j];
		document.getElementById('SlideShowFiyat').innerHTML = "Fiyat: "+fiyatlarArray[j];
		document.getElementById('SlideShowLink').setAttribute('href','emlakDetay.php?emlakID='+ linkler[j]);

		document.getElementById('SlideShow').filters.blendTrans.Play();
		document.getElementById('SlideShow2').filters.blendTrans.Play();

	}
	else
	{
		document.getElementById('SlideShowName2').innerHTML = textA[j+1];
		document.getElementById('SlideShowFiyat2').innerHTML = "Fiyat: "+fiyatlarArray[j+1];
		document.getElementById('SlideShowLink2').setAttribute('href','emlakDetay.php?emlakID='+ linkler[j+1]);


		document.getElementById('SlideShowName').innerHTML = textA[j];
		document.getElementById('SlideShowFiyat').innerHTML = "Fiyat: "+fiyatlarArray[j];
		document.getElementById('SlideShowLink').setAttribute('href','emlakDetay.php?emlakID='+ linkler[j]);

		var speed = Math.round(2000 / 100);
  		var timer = 0;
		for(i = 0; i < 100; i++) {
        setTimeout("changeOpac(" + i + ",'SlideShow'" + ")",(timer * speed));
        setTimeout("changeOpac(" + i + ",'SlideShow2'" + ")",(timer * speed));
      
	    timer++;
			
		document.getElementById('SlideShow').style.MozOpacity = (0);
		document.getElementById('SlideShow').style.KhtmlOpacity = (0);
	
		document.getElementById('SlideShow2').style.MozOpacity = (0);
		document.getElementById('SlideShow2').style.KhtmlOpacity = (0);
		}
		
    }
	
	
	j = j + 2;
	if (j > (p - 1)) j = 0;
	t = setTimeout('runSlideShow()', slideShowSpeed);
}



function arrange(){
		
		
		if(document.form1.satilik.value=="1"){

			
			switch(document.form1.tip.value){
				case "1":
					document.form1.fiyatlar.options.length = 6;
					document.form1.buyuklukler.options.length = 5;

					
					document.form1.fiyatlar.options[1].value = "<100000";
					document.form1.fiyatlar.options[1].innerHTML = "100,000 YTL'den az";
					document.form1.fiyatlar.options[2].value = "100000<250000";
					document.form1.fiyatlar.options[2].innerHTML = "100,000 – 250.000 YTL";
					document.form1.fiyatlar.options[3].value = "250000<400000";
					document.form1.fiyatlar.options[3].innerHTML = "250,000 – 400.000 YTL";
					document.form1.fiyatlar.options[4].value = "400000<750000";
					document.form1.fiyatlar.options[4].innerHTML = "400,000 – 750.000 YTL";
					document.form1.fiyatlar.options[5].value = "750000<";
					document.form1.fiyatlar.options[5].innerHTML = "750,000 YTL'den fazla";
					
					document.form1.buyuklukler.options[1].value = "<50";
					document.form1.buyuklukler.options[1].innerHTML = "50 m<sup>2</sup> den az";
					document.form1.buyuklukler.options[2].value = "50<100";
					document.form1.buyuklukler.options[2].innerHTML = "50 m<sup>2</sup> - 100 m<sup>2</sup>";
					document.form1.buyuklukler.options[3].value = "100<200";
					document.form1.buyuklukler.options[3].innerHTML = "100 m<sup>2</sup> - 200 m<sup>2</sup>";
					document.form1.buyuklukler.options[4].value = "200<";
					document.form1.buyuklukler.options[4].innerHTML = "200 m<sup>2</sup> den fazla";

					
				break;
				case "2":
					document.form1.fiyatlar.options.length = 6;
					document.form1.buyuklukler.options.length = 5;
					
					document.form1.fiyatlar.options[1].value = "<100000";
					document.form1.fiyatlar.options[1].innerHTML = "100,000 YTL'den az";
					document.form1.fiyatlar.options[2].value = "100000<250000";
					document.form1.fiyatlar.options[2].innerHTML = "100,000 – 250.000 YTL";
					document.form1.fiyatlar.options[3].value = "250000<400000";
					document.form1.fiyatlar.options[3].innerHTML = "250,000 – 400.000 YTL";
					document.form1.fiyatlar.options[4].value = "400000<750000";
					document.form1.fiyatlar.options[4].innerHTML = "400,000 – 750.000 YTL";
					document.form1.fiyatlar.options[5].value = "750000<";
					document.form1.fiyatlar.options[5].innerHTML = "750,000 YTL'den fazla";
					
					document.form1.buyuklukler.options[1].value = "<1000";
					document.form1.buyuklukler.options[1].innerHTML = "1000 m<sup>2</sup> den az";
					document.form1.buyuklukler.options[2].value = "1000<5000";
					document.form1.buyuklukler.options[2].innerHTML = "1000 m<sup>2</sup> - 5000 m<sup>2</sup>";
					document.form1.buyuklukler.options[3].value = "5000<10000";
					document.form1.buyuklukler.options[3].innerHTML = "5000 m<sup>2</sup> - 10000 m<sup>2</sup>";
					document.form1.buyuklukler.options[4].value = "10000<";
					document.form1.buyuklukler.options[4].innerHTML = "10000 m<sup>2</sup> den fazla";
				
				break;
				case "3":
					document.form1.fiyatlar.options.length = 6;
					document.form1.buyuklukler.options.length = 5;
					
					document.form1.fiyatlar.options[1].value = "<100000";
					document.form1.fiyatlar.options[1].innerHTML = "100,000 YTL'den az";
					document.form1.fiyatlar.options[2].value = "100000<250000";
					document.form1.fiyatlar.options[2].innerHTML = "100,000 – 250.000 YTL";
					document.form1.fiyatlar.options[3].value = "250000<400000)";
					document.form1.fiyatlar.options[3].innerHTML = "250,000 – 400.000 YTL";
					document.form1.fiyatlar.options[4].value = "400000<750000";
					document.form1.fiyatlar.options[4].innerHTML = "400,000 – 750.000 YTL";
					document.form1.fiyatlar.options[5].value = "750000<";
					document.form1.fiyatlar.options[5].innerHTML = "750,000 YTL'den fazla";
					
					document.form1.buyuklukler.options[1].value = "<50";
					document.form1.buyuklukler.options[1].innerHTML = "50 m<sup>2</sup> den az";
					document.form1.buyuklukler.options[2].value = "50<100";
					document.form1.buyuklukler.options[2].innerHTML = "50 m<sup>2</sup> - 100 m<sup>2</sup>";
					document.form1.buyuklukler.options[3].value = "100<200";
					document.form1.buyuklukler.options[3].innerHTML = "100 m<sup>2</sup> - 200 m<sup>2</sup>";
					document.form1.buyuklukler.options[4].value = "200<";
					document.form1.buyuklukler.options[4].innerHTML = "200 m<sup>2</sup> den fazla";
				
				break;
				case "4":
					document.form1.fiyatlar.options.length = 4;
					document.form1.buyuklukler.options.length = 5;
					
					document.form1.fiyatlar.options[1].value = "<500000";
					document.form1.fiyatlar.options[1].innerHTML = "500,000 YTL'den az";
					document.form1.fiyatlar.options[2].value = "500000<1000000";
					document.form1.fiyatlar.options[2].innerHTML = "500,000 – 1,000,000 YTL";
					document.form1.fiyatlar.options[3].value = "1000000<";
					document.form1.fiyatlar.options[3].innerHTML = "1,000,000 YTL'den fazla";
					
					document.form1.buyuklukler.options[1].value = "<50";
					document.form1.buyuklukler.options[1].innerHTML = "50 yatak den az";
					document.form1.buyuklukler.options[2].value = "50<100";
					document.form1.buyuklukler.options[2].innerHTML = "50 yatak - 100 yatak";
					document.form1.buyuklukler.options[3].value = "100<400";
					document.form1.buyuklukler.options[3].innerHTML = "100 yatak - 200 yatak";
					document.form1.buyuklukler.options[4].value = "400<";
					document.form1.buyuklukler.options[4].innerHTML = "400 yataktan fazla";
				
				break;
			}
			
		}
		else{

			
			switch(document.form1.tip.value){
				case "1":
					document.form1.fiyatlar.options.length = 5;
					document.form1.buyuklukler.options.length = 5;
										
					document.form1.fiyatlar.options[1].value = "<500";
					document.form1.fiyatlar.options[1].innerHTML = "500 YTL'den az";
					document.form1.fiyatlar.options[2].value = "500<750";
					document.form1.fiyatlar.options[2].innerHTML = "500 – 750 YTL";
					document.form1.fiyatlar.options[3].value = "750<1250";
					document.form1.fiyatlar.options[3].innerHTML = "750 – 1,250 YTL";
					document.form1.fiyatlar.options[4].value = "1250<";
					document.form1.fiyatlar.options[4].innerHTML = "1,250 YTL'den fazla";

					
					document.form1.buyuklukler.options[1].value = "<50";
					document.form1.buyuklukler.options[1].innerHTML = "50 m<sup>2</sup> den az";
					document.form1.buyuklukler.options[2].value = "50<100";
					document.form1.buyuklukler.options[2].innerHTML = "50 m<sup>2</sup> - 100 m<sup>2</sup>";
					document.form1.buyuklukler.options[3].value = "100<200";
					document.form1.buyuklukler.options[3].innerHTML = "100 m<sup>2</sup> - 200 m<sup>2</sup>";
					document.form1.buyuklukler.options[4].value = "200<";
					document.form1.buyuklukler.options[4].innerHTML = "200 m<sup>2</sup> den fazla";

				
				break;
				case "2":
					document.form1.fiyatlar.options.length = 4;
					document.form1.buyuklukler.options.length = 5;
					
					document.form1.fiyatlar.options[1].value = "<20000";
					document.form1.fiyatlar.options[1].innerHTML = "Yıllık 20,000 YTL'den az";
					document.form1.fiyatlar.options[2].value = "20000<50000";
					document.form1.fiyatlar.options[2].innerHTML = "Yıllık 20,000 – 50,000 YTL";
					document.form1.fiyatlar.options[3].value = "50000<";
					document.form1.fiyatlar.options[3].innerHTML = "Yıllık 50,000 YTL'den fazla";

					
					document.form1.buyuklukler.options[1].value = "<1000";
					document.form1.buyuklukler.options[1].innerHTML = "1000 m<sup>2</sup> den az";
					document.form1.buyuklukler.options[2].value = "1000<5000";
					document.form1.buyuklukler.options[2].innerHTML = "1,000 m<sup>2</sup> - 5,000 m<sup>2</sup>";
					document.form1.buyuklukler.options[3].value = "5000<10000";
					document.form1.buyuklukler.options[3].innerHTML = "5,000 m<sup>2</sup> - 10,000 m<sup>2</sup>";
					document.form1.buyuklukler.options[4].value = "10000<";
					document.form1.buyuklukler.options[4].innerHTML = "10,000 m<sup>2</sup> den fazla";
				
		
				
				break;
				case "3":
					document.form1.fiyatlar.options.length = 5;
					document.form1.buyuklukler.options.length = 5;
					
					document.form1.fiyatlar.options[1].value = "<500";
					document.form1.fiyatlar.options[1].innerHTML = "500 YTL'den az";
					document.form1.fiyatlar.options[2].value = "500<750";
					document.form1.fiyatlar.options[2].innerHTML = "500 – 750 YTL";
					document.form1.fiyatlar.options[3].value = "750<1250";
					document.form1.fiyatlar.options[3].innerHTML = "750 – 1,250 YTL";
					document.form1.fiyatlar.options[4].value = "1250<";
					document.form1.fiyatlar.options[4].innerHTML = "1,250 YTL'den fazla";

					
					document.form1.buyuklukler.options[1].value = "<50";
					document.form1.buyuklukler.options[1].innerHTML = "50 m<sup>2</sup> den az";
					document.form1.buyuklukler.options[2].value = "50<100";
					document.form1.buyuklukler.options[2].innerHTML = "50 m<sup>2</sup> - 100 m<sup>2</sup>";
					document.form1.buyuklukler.options[3].value = "100<200";
					document.form1.buyuklukler.options[3].innerHTML = "100 m<sup>2</sup> - 200 m<sup>2</sup>";
					document.form1.buyuklukler.options[4].value = "200<";
					document.form1.buyuklukler.options[4].innerHTML = "200 m<sup>2</sup> den fazla";
				
				
				break;
				case "4":
					document.form1.fiyatlar.options.length = 5;
					document.form1.buyuklukler.options.length = 5;
					
					document.form1.fiyatlar.options[1].value = "<100,000";
					document.form1.fiyatlar.options[1].innerHTML = "Yıllık 100,000 YTL'den az";
					document.form1.fiyatlar.options[2].value = "100000<25,000";
					document.form1.fiyatlar.options[2].innerHTML = "Yıllık 100,000 – 250,000 YTL";
					document.form1.fiyatlar.options[3].value = "250000<400000";
					document.form1.fiyatlar.options[3].innerHTML = "Yıllık 250,000 – 400,000 YTL";
					document.form1.fiyatlar.options[4].value = "400000<";
					document.form1.fiyatlar.options[4].innerHTML = "Yıllık 400,000 YTL'den fazla";

						
					document.form1.buyuklukler.options[1].value = "<50";
					document.form1.buyuklukler.options[1].innerHTML = "50 yatak den az";
					document.form1.buyuklukler.options[2].value = "50<100";
					document.form1.buyuklukler.options[2].innerHTML = "50 yatak - 100 yatak";
					document.form1.buyuklukler.options[3].value = "100<400";
					document.form1.buyuklukler.options[3].innerHTML = "100 yatak - 200 yatak";
					document.form1.buyuklukler.options[4].value = "400 <";
					document.form1.buyuklukler.options[4].innerHTML = "400 yataktan fazla";
				
				
				break;
			}
			
			
		}
		
	}
	
	
	function arrangeForIndex(){
		
		
		if(document.form1.satilik.value=="1"){

			
			switch(document.form1.tip.value){
				case "1":
					document.form1.fiyatlar.options.length = 6;
					

					
					document.form1.fiyatlar.options[1].value = "<100000";
					document.form1.fiyatlar.options[1].innerHTML = "100,000 YTL'den az";
					document.form1.fiyatlar.options[2].value = "100000<250000";
					document.form1.fiyatlar.options[2].innerHTML = "100,000 – 250.000 YTL";
					document.form1.fiyatlar.options[3].value = "250000<400000";
					document.form1.fiyatlar.options[3].innerHTML = "250,000 – 400.000 YTL";
					document.form1.fiyatlar.options[4].value = "400000<750000";
					document.form1.fiyatlar.options[4].innerHTML = "400,000 – 750.000 YTL";
					document.form1.fiyatlar.options[5].value = "750000<";
					document.form1.fiyatlar.options[5].innerHTML = "750,000 YTL'den fazla";
					
	
				break;
				case "2":
					document.form1.fiyatlar.options.length = 6;
					
					
					document.form1.fiyatlar.options[1].value = "<100000";
					document.form1.fiyatlar.options[1].innerHTML = "100,000 YTL'den az";
					document.form1.fiyatlar.options[2].value = "100000<250000";
					document.form1.fiyatlar.options[2].innerHTML = "100,000 – 250.000 YTL";
					document.form1.fiyatlar.options[3].value = "250000<400000";
					document.form1.fiyatlar.options[3].innerHTML = "250,000 – 400.000 YTL";
					document.form1.fiyatlar.options[4].value = "400000<750000";
					document.form1.fiyatlar.options[4].innerHTML = "400,000 – 750.000 YTL";
					document.form1.fiyatlar.options[5].value = "750000<";
					document.form1.fiyatlar.options[5].innerHTML = "750,000 YTL'den fazla";
					

				break;
				case "3":
					document.form1.fiyatlar.options.length = 6;
					
					
					document.form1.fiyatlar.options[1].value = "<100000";
					document.form1.fiyatlar.options[1].innerHTML = "100,000 YTL'den az";
					document.form1.fiyatlar.options[2].value = "100000<250000";
					document.form1.fiyatlar.options[2].innerHTML = "100,000 – 250.000 YTL";
					document.form1.fiyatlar.options[3].value = "250000<400000)";
					document.form1.fiyatlar.options[3].innerHTML = "250,000 – 400.000 YTL";
					document.form1.fiyatlar.options[4].value = "400000<750000";
					document.form1.fiyatlar.options[4].innerHTML = "400,000 – 750.000 YTL";
					document.form1.fiyatlar.options[5].value = "750000<";
					document.form1.fiyatlar.options[5].innerHTML = "750,000 YTL'den fazla";
					

				break;
				case "4":
					document.form1.fiyatlar.options.length = 4;
					
					
					document.form1.fiyatlar.options[1].value = "<500000";
					document.form1.fiyatlar.options[1].innerHTML = "500,000 YTL'den az";
					document.form1.fiyatlar.options[2].value = "500000<1000000";
					document.form1.fiyatlar.options[2].innerHTML = "500,000 – 1,000,000 YTL";
					document.form1.fiyatlar.options[3].value = "1000000<";
					document.form1.fiyatlar.options[3].innerHTML = "1,000,000 YTL'den fazla";
					
				break;
			}
			
		}
		else{

			
			switch(document.form1.tip.value){
				case "1":
					document.form1.fiyatlar.options.length = 5;
											
					document.form1.fiyatlar.options[1].value = "<500";
					document.form1.fiyatlar.options[1].innerHTML = "500 YTL'den az";
					document.form1.fiyatlar.options[2].value = "500<750";
					document.form1.fiyatlar.options[2].innerHTML = "500 – 750 YTL";
					document.form1.fiyatlar.options[3].value = "750<1250";
					document.form1.fiyatlar.options[3].innerHTML = "750 – 1,250 YTL";
					document.form1.fiyatlar.options[4].value = "1250<";
					document.form1.fiyatlar.options[4].innerHTML = "1,250 YTL'den fazla";

					
				break;
				case "2":
					document.form1.fiyatlar.options.length = 4;
						
					document.form1.fiyatlar.options[1].value = "<20000";
					document.form1.fiyatlar.options[1].innerHTML = "Yıllık 20,000 YTL'den az";
					document.form1.fiyatlar.options[2].value = "20000<50000";
					document.form1.fiyatlar.options[2].innerHTML = "Yıllık 20,000 – 50,000 YTL";
					document.form1.fiyatlar.options[3].value = "50000<";
					document.form1.fiyatlar.options[3].innerHTML = "Yıllık 50,000 YTL'den fazla";

					

				break;
				case "3":
					document.form1.fiyatlar.options.length = 5;
						
					document.form1.fiyatlar.options[1].value = "<500";
					document.form1.fiyatlar.options[1].innerHTML = "500 YTL'den az";
					document.form1.fiyatlar.options[2].value = "500<750";
					document.form1.fiyatlar.options[2].innerHTML = "500 – 750 YTL";
					document.form1.fiyatlar.options[3].value = "750<1250";
					document.form1.fiyatlar.options[3].innerHTML = "750 – 1,250 YTL";
					document.form1.fiyatlar.options[4].value = "1250<";
					document.form1.fiyatlar.options[4].innerHTML = "1,250 YTL'den fazla";


				break;
				case "4":
					document.form1.fiyatlar.options.length = 5;
					
					document.form1.fiyatlar.options[1].value = "<100,000";
					document.form1.fiyatlar.options[1].innerHTML = "Yıllık 100,000 YTL'den az";
					document.form1.fiyatlar.options[2].value = "100000<25,000";
					document.form1.fiyatlar.options[2].innerHTML = "Yıllık 100,000 – 250,000 YTL";
					document.form1.fiyatlar.options[3].value = "250000<400000";
					document.form1.fiyatlar.options[3].innerHTML = "Yıllık 250,000 – 400,000 YTL";
					document.form1.fiyatlar.options[4].value = "400000<";
					document.form1.fiyatlar.options[4].innerHTML = "Yıllık 400,000 YTL'den fazla";

						
				break;
			}
			
			
		}
		
	}