function ackapa(nesneadi)
{
    if(document.getElementById(nesneadi).style.display == "none")
    {
        document.getElementById(nesneadi).style.display = "block";
    }else{
    	document.getElementById(nesneadi).style.display = "none";
    }
}
function ac(nesneadi)
{    document.getElementById(nesneadi).style.display = "block";}
function kapa(nesneadi)
{    document.getElementById(nesneadi).style.display = "none";}
function Gizle(nesneadi)
{    document.getElementById(nesneadi).style.visibility = "hidden";}
function Goster(nesneadi)
{    document.getElementById(nesneadi).style.visibility = "visible";}


function SadeceRakam(e, allowedchars){
	var key = e.charCode == undefined ? e.keyCode : e.charCode;
	if ( (/^[0-9]+$/.test(String.fromCharCode(key))) || key==0 || key==13 || isPassKey(key,allowedchars) ){ return true;}
	else { return false;}
}
function isPassKey(key,allowedchars){
	if (allowedchars != null) {
		for (var i = 0; i < allowedchars.length; i++) {
			if (allowedchars[i]  == String.fromCharCode(key))			 
				return true;
		}
	}
	return false;
}
function SadeceRakamBlur(e,clear){
	var nesne = e.target ? e.target : e.srcElement;
	var val = nesne.value;
	val = val.replace(/^\s+|\s+$/g, "");
	if (clear)val = val.replace(/\s{2,}/g, " ");
	nesne.value = val;
}

function HarfKontrol(e) {
	olay = document.all ? window.event : e;
	tus = document.all ? olay.keyCode : olay.which;
	if(tus>=48&&tus<=57) {
		if(document.all) { olay.returnValue = false; } else { olay.preventDefault(); }
	}
	if(tus==39||tus==34||tus==43||tus==44||tus==40||tus==41||tus==39||tus==46||tus==47||tus==60||tus==62||tus==63||tus==64||tus==126||tus==45||tus==58||tus==59||tus==94||tus==38||tus==92||tus==91||tus==93||tus==123||tus==125||tus==61||tus==42) {
		if(document.all) { olay.returnValue = false; } else { olay.preventDefault(); }
	}
}
function CharKontrol(e) {
	olay = document.all ? window.event : e;
	tus = document.all ? olay.keyCode : olay.which;
	if(tus>=48&&tus<=57) {
		if(document.all) { olay.returnValue = false; } else { olay.preventDefault(); }
	}
	if(tus==39||tus==34||tus==43||tus==44||tus==40||tus==41||tus==39||tus==46||tus==47||tus==60||tus==62||tus==63||tus==64||tus==126||tus==45||tus==58||tus==59||tus==94||tus==38||tus==92||tus==91||tus==93||tus==123||tus==125||tus==61||tus==42) {
		if(document.all) { olay.returnValue = false; } else { olay.preventDefault(); }
	}
}
