function openwindow(theURL,winName,features) { //pencere ac
  window.open(theURL,winName,features);
}

function AJAX() {
   var ajax = false;
   
   // Internet Explorer (5.0+)
   try {
     ajax = new ActiveXObject("Msxml2.XMLHTTP");  // yeni versiyon xmlhttp
   } catch (e) {
	   
      try {
        ajax = new ActiveXObject("Microsoft.XMLHTTP");  // eski versiyon xmlhttp
      } catch (e) {
        ajax = false;
      }

   }

   // Mozilla ve Safari
   if ( !ajax && typeof XMLHttpRequest != 'undefined' ) {
	   
     try{
        ajax = new XMLHttpRequest();
     }catch(e) {    
        ajax = false;
     }

   }

   // Diger
   if ( !ajax && window.createRequest ) {
     
	 try{
        ajax = window.createRequest();
     }catch(e) {  
        ajax = false;
     }

   }

	return ajax;
}


function alankontrol(dosya,alandeger,mesajalan) { // gelen alani php ile kontrol et
	ajax = new AJAX();
	
	dosya=dosya + '?' + 'alandeger=' + alandeger;
	
	if ( ajax ) {
		ajax.onreadystatechange = function () {};
		ajax.abort();
	}
		
	ajax.open('GET', dosya, true);
	ajax.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
	ajax.setRequestHeader("Connection", "close");
	ajax.send(null);
	
    ajax.onreadystatechange = function () {
		if( ajax.readyState == 4 ) {
			document.getElementById(mesajalan).innerHTML = ajax.responseText;
			function AJAX() {};
        }
	}
}


function tp(){ // bos fonksiyon
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


function ske(skesite,aciklama){ // sik kullanillanlara ekle
var bookmarkurl=skesite;
var bookmarktitle=aciklama;
if (document.all)
        window.external.AddFavorite(bookmarkurl,bookmarktitle)
}


var highlightcolor="DDDEE7"
var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

function checkel(which){
var intended=/INPUT|TEXTAREA|SELECT|OPTION/
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}

function highlight(e){
eventobj=ns6? e.target : event.srcElement
if (previous!=''){
if (checkel(previous))
previous.style.backgroundColor=''
previous=eventobj
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
}
else{
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
previous=eventobj
}
}
// renklendirme bitis

function Color(nesne,renk,fontrenk,xxx) 
{
  nesne.style.backgroundColor = renk;
  idname = "colorfont"+xxx ;
  eval('document.all["'+ idname +'"].style.color="'+ fontrenk +'"');
 // nesne.style.color="ffffff";
nesne.style.color=fontrenk
  nesne.style.cursor="hand";
}

function ata(){ //v1.0
document.form1.baslik.value=document.form1.baslik1.value;
}

function sil(varhref,bolum)  // silmek için onay al
         {         
		 var varhref,bolum;
if (bolum==1)
metin='kayit ';
if (bolum==2)
metin='mesaj ';
		  var sor=confirm('Seçilen '+metin+' silinecek\nDevam mı ? ');
           if (sor)
           {
            location.href=varhref;
           }
        }		
		

function expandcollapse (a1,a2){ 

	whichpost = document.getElementById(a1); 
	whichpost2 = document.getElementById(a2); 
   
   if (whichpost2.className=="postshown")
   whichpost2.className="posthidden";
   
   if (whichpost.className=="postshown") { 
      whichpost.className="posthidden";
   } 
   else { 
      whichpost.className="postshown";
	  
   } 
}
function krKontrol(objThis,sName,nMaxLength,sCountName)
		{
			var sFormName=objThis.form.name;
			document[sFormName][sCountName].value= nMaxLength;
			if (document[sFormName][sName].value.length > nMaxLength)
			{
				document[sFormName][sName].value = document[sFormName][sName].value.substring(0,nMaxLength);
				var charleft = 0;
			}
			else {charleft = nMaxLength - document[sFormName][sName].value.length}
			document[sFormName][sCountName].value = charleft;
		}
		
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function sayfayagit(varhref,selObj) {
		  varhref=varhref+"&page="+selObj.options[selObj.selectedIndex].value;		 
	      location.href=varhref;				
}