// Get base url
url = document.location.href;
xend = url.lastIndexOf("/") + 1;
var base_url = url.substring(0, xend);

function ajax (url) {
        // Does URL begin with http?
        if (url.substring(0, 4) != 'http') {
                url = base_url + url ;
        }

        // Create new JS element
        var jsel = document.createElement('SCRIPT');
        jsel.type = 'text/javascript';
        jsel.src = url;

        // Append JS element (therefore executing the 'AJAX' call)
        document.body.appendChild (jsel);
}

function goster( elementId, setTo ) {
   var theElement;
  if( document.getElementById ) {
    theElement = document.getElementById( elementId );
  } else if( document.all ) {
    theElement = document.all[ elementId ];
  }
  if( !theElement ) {
    return;
  }
  if( theElement.style ) { theElement = theElement.style; }
  if( typeof( theElement.display ) == 'undefined' ) {
    window.alert( 'Your browser does not support this' );
    return;
  }
  theElement.display = setTo;
}

function limitText(limitField, limitNum) {
    if (limitField.value.length > limitNum) {
        limitField.value = limitField.value.substring(0, limitNum);
    } 
}

function pencerebuyut(kim,ne){
   parent.document.getElementById(kim).rows = ne + ',*';
}

function resimyuklendiyse(ne) {
	document.getElementById(ne).style.backgroundImage = "";
	//alert(ne);
}

//clipboarddan kopyaliyor
function kopyele(s){

	if( window.clipboardData && clipboardData.setData )	{clipboardData.setData("Text", s);}
	else{  
	}
}

//seçiyor tamamen
function odakle(ney){
ney.focus();
ney.select();
}

function kilit(kilitneye , nasil){	
	document.getElementById(kilitneye).disabled=nasil;
}