function createRequestObject() {
    var tmpXmlHttpObject;
    
    //depending on what the browser supports, use the right way to create the XMLHttpRequest object
    if (window.XMLHttpRequest) { 
        // Mozilla, Safari would use this method ...
        tmpXmlHttpObject = new XMLHttpRequest();
	
    } else if (window.ActiveXObject) { 
        // IE would use this method ...
        tmpXmlHttpObject = new ActiveXObject("Microsoft.XMLHTTP");
    }
    
    return tmpXmlHttpObject;
}

//call the above function to create the XMLHttpRequest object
var http = createRequestObject();
if (window.XMLHttpRequest) { 
        // Mozilla, Safari would use this method ...
	//http.overrideMimeType('text/xml');
	
    } 
//http.overrideMimeType('text/xml');
	 
function UyeKontrol(islem, id) {
    //make a connection to the server ... specifying that you intend to make a GET request 
    //to the server. Specifiy the page name and the URL parameters to send
	
	if (document.getElementById){
		e = document.getElementById('frmKayit').frmKullaniciAdi;
	}
	else{
		if (document.layers){ //NS4
			e = document.frmKullaniciAdi;
		}
		else
		{ //IE4
			e = document.all.frmKullaniciAdi;
		}
	}
	
	http.open('get', 'uyekontrol.php?kullaniciadi='+e.value);

	
	
    //assign a handler for the response
    http.onreadystatechange = processResponseUyeKontrol;
	
    //actually send the request to the server
    http.send(null);
	
}

function processResponseUyeKontrol()
{
	
    //check if the response has been received from the server
    if(http.readyState == 4){
	
        //read and assign the response from the server
        var response = http.responseText;
		
        //do additional parsing of the response, if needed
		
        //in this case simply assign the response to the contents of the <div> on the page.
		if (document.getElementById){
			document.getElementById('dinamik').innerHTML = response;
		}
		else{
			if (document.layers){ //NS4
				document.dinamik.innerHTML = response;
			}
			else
			{ //IE4
				document.all.dinamik.innerHTML = response;
			}
		}
        document.getElementById('dinamik').innerHTML = response;
		
        //If the server returned an error message like a 404 error, that message would be shown within the div tag!!. 
        //So it may be worth doing some basic error before setting the contents of the <div>
    }
}



var pixelArray =  new Array('10','12','16','20','24','30','40');
var emArray =  new Array('0.7','0.9','1.0','1.5','2.0','2.5','3');
var initSize = 1;

function fontSizer(inc,unit) {
	if (!document.getElementById) 
		return;
	var size = initSize;
		size += inc;
	if (size < 0 ) {
		size = 0;
}
	if (size > 6 ) {
		size = 6;
}
		initSize = size;
	document.getElementById('bolge1').style.fontSize = (unit=='px') ? pixelArray[size]+unit: emArray[size]+unit;
}


