﻿ function MailFormKontrol()
 {
 if (document.getElementById("usernameTemp").value != "" && document.getElementById("passwordTemp").value != "")
 {
 document.getElementById("username").value = document.getElementById("usernameTemp").value + "@icisleri.gov.tr";
 document.getElementById("password").value = document.getElementById("passwordTemp").value;
 document.getElementById("usernameTemp").value = "";
 document.getElementById("passwordTemp").value = "";
 return true;
 }
 return false;
 }

function buyut(obj)
{
switch (obj.style.fontSize){
case '24px':
obj.style.fontSize = '24px';
break;
case '22px':
obj.style.fontSize = '24px';
break;
case '20px':
obj.style.fontSize = '22px';
break;
case '18px':
obj.style.fontSize = '20px';
break;
case '16px':
obj.style.fontSize = '18px';
break;
case '14px':
obj.style.fontSize = '16px';
break;
case '12px':
obj.style.fontSize = '14px';
break;
case '10px':
obj.style.fontSize = '12px';
break;
case '8px':
obj.style.fontSize = '10px';
break;
case '6px':
obj.style.fontSize = '8px';
break;
default:
obj.style.fontSize = '10px';}
}
function kucult(obj)
{
switch (obj.style.fontSize){
case '6px':
obj.style.fontSize = '6px';
break;
case '8px':
obj.style.fontSize = '6px';
break;
case '10px':
obj.style.fontSize = '8px';
break;
case '12px':
obj.style.fontSize = '10px';
break;
case '14px':
obj.style.fontSize = '12px';
break;
case '16px':
obj.style.fontSize = '14px';
break;
case '18px':
obj.style.fontSize = '16px';
break;
case '20px':
obj.style.fontSize = '18px';
break;
case '22px':
obj.style.fontSize = '20px';
break;
case '24px':
obj.style.fontSize = '22px';
break;
default:
obj.style.fontSize = '10px';}
}

function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';

  cookie_str = document.cookie;
  cookie_str.toString();

  pos_start  = cookie_str.indexOf(name);
  pos_end    = cookie_str.indexOf('=', pos_start);

  cookie_name = cookie_str.substring(pos_start, pos_end);

  pos_start  = cookie_str.indexOf(name);
  pos_start  = cookie_str.indexOf('=', pos_start);
  pos_end    = cookie_str.indexOf(';', pos_start);
  
  if (pos_end <= 0) pos_end = cookie_str.length;
  cookie_val = cookie_str.substring(pos_start + 1, pos_end);
  if (cookie_name == name && cookie_val  == "done")
    return;

  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}
function MenuAc(obj) {
	var el = document.getElementById(obj);
	if ( el.style.display != "none" ) {
		el.style.display = 'none';
	}
	else {
		el.style.display = '';
	}
}
