function checkdomains() {
	

	var fld = escape(document.getElementById("fld").value);
	var tld = document.getElementById("tld").value;

	if(fld && fld != "wunschname" && fld.length>=2) {
	
		document.getElementById("checkdomainresult").style.display = "block";

		document.getElementById("checkeddomains").innerHTML="";
			
		var postData = "action=checkdomain&fld=" + fld + "&tld=" + tld;
	
	    var request1 = new CheckDomain_Request("?httprequest=true&display=no", postData);
	    request1.send();
	}	
}


function closeresult() {
	
	document.getElementById("checkdomainresult").style.display = "none";
	
}



function CheckDomain_Request(url, postData) {

    var div1  = document.getElementById("checkeddomains");
    var error = false;

    this.send = function() {
        
        div1.innerHTML  += '<img src="/img/loading.gif" border="0" alt="loading">';

        var request = YAHOO.util.Connect.asyncRequest("POST", url, callback, postData); 
    }

    var handleSuccess = function(o){

        //alert(o.responseText);

        var result = o.responseText;
        div1.innerHTML  = result;
        
    }

    var handleFailure = function(o) { 
      
      div1.innerHTML = '<b><font color="#ff0000">WHOIS Server antwortet nicht!</font>';
    } 
    
    var callback = 
    { 
      success: handleSuccess, 
      failure: handleFailure,
      timeout: 20000
    };
}