function openNewWindow(page, wname, wi, he, extra)
{
	l = (window.screen.width - wi) / 2;
	t = (window.screen.height- he) / 2;

	window.open(page, wname,
		'width=' + wi + ',' +
		'height=' + he + ',' +
		'left=' + l + ',' +
		'top=' + t + ',' +
		(extra ? extra : "scrollbars=1,resizable=1")
	);
}

function getSemts(ajaxURL)
{

	$.ajax(
			{			  
			   beforeSend: function(){
					$("#ajaxloader").show();
					$("#semtler").attr('style','background-color:#f5f5f5');				 
			   },
			   complete: function(){
			      	$("#ajaxloader").hide();
					$("#semtler").attr('style','background-color:#fff');					
			   },
			  
			  type: "POST",			  
			  url   : ajaxURL,
			  data  : "data[User][ilce_id]=" + $('#ilceler').val(),
			  cache: false,			  
			  success: function(html){
			  			$("#semtler").html(html);
						}
			}				
		);
}

function isOnlyNumbers(elem) {
    var str = elem.val();
    var re = /^\d+$/;
    if (!str.match(re)) {        
        return false;
    } else {
        return true;
    }
}

$(document).ready(function()
{
$("#id_search").keydown(function(event) {
     if(event.keyCode == 13){    
       checkIlanNo();
       return false;
     }
  });


});