var mainTabs;
$(function() {
	$.ajaxSetup({
		async: false,
		beforeSend: function(httpreq) {
			$("#ajaxloader").fadeIn("fast");
			httpreq.setRequestHeader("Content-Transfer-Encoding", "UTF-8");
			$("input[type='button']").attr("disabled","disabled");
		},
		complete: function(httpreq) {
			$("#ajaxloader").fadeOut("slow");
			$("input[type='button']").attr("disabled","");
		},
		error: function (XMLHttpRequest, textStatus, errorThrown) {
			$("#errorWindow").html(textStatus+"<br>"+errorThrown);
			$("#errorWindow").dialog("open");
		},
		url : webpath + "/?",
		type : "post"
	});
	
	$("#errorWindow").dialog({
		autoOpen : false,
		buttons : { "Tamam" : function(){ $(this).dialog("close"); } },
		closeOnEscape : true,
		modal : true,
		resizable : false
	});

});

function checkRegexp(val,regexp) {
	if ( !( regexp.test( val ) ) ) {
		return false;
	} else {
		return true;
	}
}

