$(document).ready(function() {
	$("#DilDegistir").AmadCombobox( {
		tip : "image",
		showIcon : false,
		width : 120,
		onChange : function(selectedIndex, selectedValue, index, object) {
			location.href = $("base").attr("href") + "?rel=" + selectedIndex;
		},
		useKeyboard : true
	});
	$("#arama_button").click(function() {
		$(this).blur();
		var $aramatext = $("#arama_text");
		if($aramatext.val() == "") {
			$aramatext.focus()
		} else {
			location.href="_/" + $aramatext.val();
		}
	});
	$("#arama_text").keydown(function(event){
		if(event.keyCode == 13) {
			$("#arama_button").click();
		}
	});
	adethazirla();
	title_hazirla();
	if(jQuery.browser.msie == true && jQuery.browser.version == 7) {
		setTimeout('$(".tabmain .l").append("&nbsp;")',1000);
		//$(".icerik_blok .icerik_orta").css("background","url(images/icerik_ust.png) repeat-y 0 0 scroll transparent");
	}
});

function adethazirla() {
	$("input.adet").each(function(index, obje) {
		obje = $(obje);
		var deger;
		obje.focus(function() {
			obje.select();
		});
		obje.blur(function() {
			if (!IsNumeric($(this).val())) {
				$(this).val(0);
			} else {
				$(this).val(parseInt($(this).val()));
			}
		});
		obje.keydown(function(event) {
			var kc = event.keyCode;
			if (!((kc >= 37 && kc <= 40) || (kc >= 48 && kc <= 57) || (kc >= 96 && kc <= 105) || kc == 46 || kc == 8 || kc == 9)) {
				return false;
			}
			
		});
	});
}

