
function isim_kaydir(e) {
	if (e.name == "username") {
		let ipt1 = document.getElementById("input_baslik1")
		ipt1.style.marginTop = "-8%";
		ipt1.style.color = "dodgerblue";
		ipt1.style.fontSize = "15px";

	}
	else if (e.name == "password") {
		let ipt1 = document.getElementById("input_baslik2")
		ipt1.style.marginTop = "-8%";
		ipt1.style.color = "dodgerblue";
		ipt1.style.fontSize = "15px";
	}
}
function isim_kaydir_2(e) {
	let ilk_input = document.getElementById('login_input_username')
	let ikinci_input = document.getElementById('login_input_password')
	let ipt1 = document.getElementById("input_baslik1")
	let ipt2 = document.getElementById("input_baslik2")
	if (e.name == "username" && ilk_input.value == "") {
		console.log(ilk_input.value)
		ipt1 = document.getElementById("input_baslik1")
		ipt1.style.marginTop = "0%";
		ipt1.style.color = "gray";
		ipt1.style.fontSize = "20px";
	}
	else if (e.name == "password" && ikinci_input.value == "") {
		ipt2 = document.getElementById("input_baslik2")
		ipt2.style.marginTop = "0%";
		ipt2.style.color = "gray";
		ipt2.style.fontSize = "20px";
	}
}

let a = 1;
function visibilty() {
	let id_ = document.getElementById('visibility_img');
	let input_id = document.getElementById('login_input_password');
	switch (a % 2) {
		case 0:
			id_.setAttribute('src', '../images/visibility_of.png')
			input_id.type = 'password';
			a++;
			break;
		case 1:
			id_.setAttribute('src', '../images/visibility.png')
			input_id.type = 'text';
			a++;
			break;
	}
}
let a1 = 0;
function register_visibilty() {
	let input_id = document.getElementById('register_password_input');
	switch (a % 2) {
		case 0:
			input_id.type = 'password';
			a++;
			break;
		case 1:
			input_id.type = 'text';
			a++;
			break;
	}
}

function register_area_on() {
	var x = document.getElementById('register_div_ic')
	var x1 = document.getElementById('register_div')
	x.style.width = "420px";
	x.style.height = "400px";
	x1.style.marginTop = "-17%";
	x1.style.marginLeft = "0%";
	x1.style.transition = "1500ms";
	x.style.zIndex = "50";
	x.style.transition = "1500ms";
}
function register_area_off() {
	var x = document.getElementById('register_div_ic')
	var x1 = document.getElementById('register_div')
	x.style.width = "1px";
	x.style.height = "1px";
	x1.style.marginTop = "-8%";
	x1.style.transition = "1500ms";
	x1.style.marginLeft = "0%";
	x.style.zIndex = "50";
	x.style.transition = "1500ms";
}
function forgot_password() {
	var forgot_div = document.createElement('div');
	forgot_div.id = "forgot_div";
	forgot_div.style.transition = "2s";
	forgot_div.style.width = "200px";
	forgot_div.style.height = "200px";
	forgot_div.style.position = "absolute";
	forgot_div.style.backgroundColor = "dodgerblue";
	var metin = document.createElement('input');
	metin.value = "merhabalar";
	forgot_div.appendChild(metin);
	document.getElementById('container').appendChild(forgot_div);
}
function login_error(par1, par2) {
	var x = document.getElementById('kullanici_kontrol');
	x.style.display = "block";
	x.style.transition = "1500ms";
	document.getElementById("email_p").innerText = par1;
	document.getElementById("sifre_p").innerHTML = par2;
	var x1=setTimeout(()=>{
		document.getElementById('kullanici_kontrol').style.display = "none";
	},5000);
}
function register_state(par) {
	switch (par) {
		case 1:
			document.getElementById('database_result').style.display = "block";
			document.getElementById('database_result').style.backgroundColor = "green";
			document.getElementById('database_result').style.color = "green";
			document.getElementById('_register_state').style.color = "azure";
			document.getElementById('_register_state').style.zIndex = "10";
			document.getElementById('register_div').style.display = "none";
			
			
		
			break;
		case -1:
			
			document.getElementById('database_result').style.display = "block";
			document.getElementById('database_result').style.backgroundColor = "Red";
			document.getElementById('database_result').style.color = "azure";
			document.getElementById('_register_state').style.color = "red";
			document.getElementById('_register_state').style.zIndex = "-10";
			break;		
	}
	setTimeout(()=>{
		document.getElementById('database_result').style.display = "none";
	},5000)		

}