function highlightLinks(obj) {
   var linkList = document.getElementById("menu").getElementsByTagName("a");
   //alert(linkList);
   for (i = 0; i < linkList.length; i++) {
      linkList[i].className = "";
   }
   obj.className = "active";
}

function ajaxFunction(divid, pagename)
{
	var xmlhttp;
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }

xmlhttp.open("POST",pagename+".php",false);
xmlhttp.setRequestHeader("Content-Type","text/html; charset=iso-8859-1");
xmlhttp.send();

document.getElementById(divid).innerHTML=xmlhttp.responseText;
run_cufon();

}

function ajaxFunctionParam(divid, pagename)
{
	var xmlhttp;
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }

xmlhttp.open("POST",pagename,false);
xmlhttp.setRequestHeader("Content-Type","text/html; charset=iso-8859-1");
xmlhttp.send();

document.getElementById(divid).innerHTML=xmlhttp.responseText;
run_cufon();

}

function entry_cut(span_id_to_display, span_id_to_hide, mode)
{
	if(mode == 'hide')
	{
		document.getElementById(span_id_to_display).style.display = 'none';
		document.getElementById(span_id_to_hide).style.display = '';
	}

	if(mode == 'show')
	{
		document.getElementById(span_id_to_hide).style.display = 'none';
		document.getElementById(span_id_to_display).style.display = '';
	}

}

function alankontrolu()
{
	
	if(document.getElementById('visitor').value == '')
	{
		alert('Lütfen adınızı giriniz.');
		return false;
	}
	if(document.getElementById('visitormail').value == '')
	{
		alert('Lütfen e-mailinizi giriniz.');
		return false;
	}
	if(document.getElementById('notes').value == '')
	{
		alert('Lütfen mesajınızı giriniz.');
		return false;
	}
	return true;
}

 function run_cufon()
{
Cufon.replace('h1, h4, h3', { fontFamily: 'arial' });
Cufon.replace('h2', { fontFamily: 'sketch' })
}

function adjustHikaye(val)
{
	
	if(val == 'Yorum')
	{
		document.getElementById('selecthikaye').style.display = "";
	}
	else
	{
		document.getElementById('selecthikaye').style.display = 'none';
		document.getElementById('hikaye').value = "";
	}
}

