var emailFiltre=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
function hataTemizle() 
{
	return true;
}

window.onerror = hataTemizle;

function getData(sayfa,content,scrl,param)
{
	
	$('#'+content+'').html("<br><br><div align='center'><img src='_images/loading2.gif'></div>");
	
	$.post("_post/_postKonum.php", {rnd:Math.random(),konum:sayfa,param:param});
	$.get("_get/_get"+sayfa+".php?rnd="+Math.random()+param, function(data){$('#'+content+'').html(data);setPiroBox();});

	if (scrl==true)
	{
		$('html, body').animate({scrollTop:0}, 'slow');
	}
	 
	
}

function clearSession()
{
$.post("_post/_postKonumSil.php", {rnd:Math.random()});	
}

function sssCevapGoster(id)
{
	
	if ($("#divTitle"+id+"").attr('class')=='faqStyle1')
	{
		$("#divTitle"+id+"").attr('class','faqStyle');
	}
	else
	{
		$("#divTitle"+id+"").attr('class','faqStyle1');
	}
	
	$("#divCevap"+id+"").slideToggle("slow");

}

function arkaPlanRengiDegistir(renk,obj)
{
	$('#'+obj+'').css("background-color",""+renk+"");
}


function setPiroBox()
{
	$('.piro_overlay,.pirobox_content').remove();
	jQuery().piroBox({
			my_speed: 600, 
			bg_alpha: 0.5,
			radius: 4, 
			scrollImage : false, 
			pirobox_next : 'piro_next',
			pirobox_prev : 'piro_prev',
			close_all : '.piro_close',
			slideShow : 'slideshow', 
			slideSpeed : 4 
	});	
}

function saat()
{	
	var d = new Date();
	var saat=("00"+d.getHours()).substr(("00"+d.getHours()).length-2,2);
	var dakika=("00"+d.getMinutes()).substr(("00"+d.getMinutes()).length-2,2);
	var saniye=("00"+d.getSeconds()).substr(("00"+d.getSeconds()).length-2,2);

	$('#saat').html(saat+":"+dakika+":"+saniye);
	tmrSaat=setTimeout("saat()",1000);
}

function post(postParam,btnName)
{
	$("#"+btnName).attr("disabled","disabled");
	$.post("_post/_postData.php", postParam, function(){$("#"+btnName).attr("disabled","");}, "script");	
}

function yaziBoyutu(alan,buyuk)
{
	var boyutPx=""+$('#'+alan).css('fontSize')+"";
	var lhPx=""+$('#'+alan).css('lineHeight')+"";
	var boyut=boyutPx.split("px");
	var lh=lhPx.split("px");
	boyut[0]=boyut[0]*1;
	lh[0]=lh[0]*1;
	if (buyuk==true)
	{
		if (boyut[0]<20)
		{
			boyut[0]=boyut[0]+1;
			lh[0]=lh[0]+1;
		}
	}
	else
	{
		if (boyut[0]>10)
		{
			boyut[0]=boyut[0]-1;
			lh[0]=lh[0]-1;
		}
	}
	$("#"+alan).css("font-size",boyut[0]+"px");
	$("#"+alan).css("line-height",lh[0]+"px");
}

String.prototype.buyukHarf=function() 
{

	var str = [];
	for(var i = 0; i < this.length; i++) {
	var ch = this.charCodeAt(i);
	var c = this.charAt(i);
	if(ch == 105) str.push('İ');
	else if(ch == 305) str.push('I');
	else if(ch == 287) str.push('Ğ');
	else if(ch == 252) str.push('Ü');
	else if(ch == 351) str.push('Ş');
	else if(ch == 246) str.push('Ö');
	else if(ch == 231) str.push('Ç');
	else if(ch >= 97 && ch <= 122) str.push(c.toUpperCase());
	else str.push(c);
	}
	return str.join('');
} //onkeyup="this.value=this.value.buyukHarf()"


