function selecttab(obj,s)
{
var _tablar=document.getElementById("filtreleme_ul")
var _tablar=_tablar.getElementsByTagName("li")


for(var a=0;a<_tablar.length;a++)
	{
	var _tab_a=_tablar[a]
		_tab_a.setAttribute("class","")
		try{_tab_a.className=""}catch(e){}
	var _kutu=document.getElementById("fl_kutu"+(a+1))
	if(_kutu)if(s==a+1)_kutu.style.display="block";else _kutu.style.display="none";
	}
	try{obj.className="act"}catch(e){}
	obj.setAttribute("class","act")
}

function selecttab1(obj,s)
{
var _tablar=document.getElementById("ilan_tab_ul")
var _tablar=_tablar.getElementsByTagName("li")


for(var a=0;a<_tablar.length;a++)
	{
	var _tab_a=_tablar[a]
		_tab_a.setAttribute("class","")
		try{_tab_a.className=""}catch(e){}
	var _kutu=document.getElementById("ilan_kutu"+(a+1))
	if(_kutu)if(s==a+1)_kutu.style.display="block";else _kutu.style.display="none";
	}
	try{obj.className="act"}catch(e){}
	obj.setAttribute("class","act")

}

function getStyle(el,styleProp)
{
	var x = document.getElementById(el);
	if (x.currentStyle)
		var y = x.currentStyle[styleProp];
	else if (window.getComputedStyle)
		var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
	return y;
}

var stobj=new Array()
var otostnum=0;


function styleto(obj,g,hiz,prop,recall)
{
if(typeof(obj)=="string")obj=document.getElementById(obj)
if(!obj.id)obj.id="otoidst_"+(otostnum++);
if(!stobj[obj.id])
	{
	stobj[obj.id]=new Object()
	mrgleft = getStyle(obj.id,prop)
//	mrgleft = !mrgleft?getStyle(obj.id,"margin").split(" ")[3]:mrgleft
	mrgleft = !mrgleft?0:mrgleft
	stobj[obj.id].katx=hiz?hiz:4
	stobj[obj.id].prop=prop
	stobj[obj.id].recall=recall
	stobj[obj.id].def=parseInt(mrgleft)
	
	stobj[obj.id].cur=parseInt(mrgleft);//css .tabbtn margin-left*-1 de?eri
	//if(!obj.onmouseout)obj.onmouseout=function(){ tbkay(this,tbsobj[this.id].def)}
	}
var _obj=stobj[obj.id]
if(g || g==0)
	{
	_obj.ycur=g;
	_obj.tmo=null
	if(prop)_obj.prop=prop
	if(hiz)_obj.katx=hiz
	if(hiz)_obj.recall=recall
	_obj.yon=(_obj.ycur>_obj.cur)?1:-1
	_obj.tfark=Math.abs(_obj.ycur-_obj.cur)
	}

_obj.cfark=Math.abs(_obj.ycur-_obj.cur)
var kat=_obj.katx*(_obj.cfark/_obj.tfark)+0.5
if(Math.abs(_obj.ycur-_obj.cur)>kat)
		{
		_obj.cur+=kat*_obj.yon;
		if(_obj.tmo)clearTimeout(_obj.tmo)
		_obj.tmo=setTimeout("styleto('"+obj.id+"')",35)
		}
else	{
		_obj.cur=_obj.ycur;
		if(_obj.recall)eval(_obj.recall)
		}
eval('obj.style.'+_obj.prop+'="'+_obj.cur+'px"')
}

	
	function _uyeturu()
	{
	var _firma=document.getElementById("uyeturu_firma")
	if(_firma.checked)
			{
			styleto("uye_turu_aciklama",150,20,"height")
			styleto("firma_logo",78,15,"height")
			}
		else{
			styleto("uye_turu_aciklama",0,20,"height")
			styleto("firma_logo",0,15,"height")
		}
	}
	
	function _sehir(obj)
	{
	if(obj.selectedIndex==0)styleto("ilce_select",0,10,"height")
	else styleto("ilce_select",36,10,"height")
	}
	
	function _sehir_listele(obj){
		var il_tag=document.getElementById("ilceler_select");
		il_tag.innerHTML="<option>Yükleniyor...</option>";
		
		if(typeof(obj)=="object"){
			var sindex=obj.selectedIndex;
			var svalue=obj.getElementsByTagName("option")[sindex].value;
			ajaxrecall = '_sehir_listele(restxt)';
			ajaxLoader("/Ajax/ilceler","deger="+svalue+"&rand="+(Math.random()*1000))
			}
		else{il_tag.innerHTML="";
		var optlist=obj.split("!")
		for(var f=0;f<optlist.length-1;f++)
			{
			var opx=document.createElement('OPTION');
			opx.value =optlist[f].split("|")[0];
			opx.innerHTML = optlist[f].substring(optlist[f].split("|")[0].length+1,optlist[f].length);
			il_tag.appendChild(opx);
			}
		}
	}
	

	
	function _model_listele(obj, svalue){
		var il_tag= document.getElementById('modeller');
		il_tag.innerHTML = '<option value="0">Yükleniyor...</option>';
		if( typeof(obj)== 'object'){
			var sindex=obj.selectedIndex;
			var svalue=obj.getElementsByTagName("option")[sindex].value;
			ajaxrecall = '_model_listele(restxt)';
			ajaxLoader("/Ajax/modeller","deger="+svalue+"&rand="+(Math.random()*1000)); //AJXsonucAl('modeller', svalue);
			}
		else{il_tag.innerHTML="";
		var optlist=obj.split("!")
		for(var f=0;f<optlist.length-1;f++)
			{
			var opx=document.createElement('OPTION');
			opx.value =optlist[f].split("|")[0];
			opx.innerHTML = optlist[f].substring(optlist[f].split("|")[0].length+1,optlist[f].length);
			il_tag.appendChild(opx);
			}
		}
	}

	
function _mesajform(a,b,c,d)
{document.getElementById('_back100').style.display='block';document.getElementById('_mesaj_gonder').style.display='block';}



/*	function AJXsonucAl(Adi, Deger){			
		 $.ajax({
		 	type: 'POST',
		 	url: '/Ajax/'+Adi,
		 	data: 'Deger=' + Deger,
		 	success: function(sonuc){
		 		_model_listele(sonuc);
		 	},
		 	error: function(xhr, ajaxOptions, thrownError){
		 		alert("Ajax Hatasi. Lütfen Yönetimle iletisime geciniz ! " + xhr.status + " ---- " + thrownError);
		 	}
		 });
		return false;
	}*/
