   var http_request = false;
   function makeGETRequest(url, parameters) {
      http_request = false;
      if (window.XMLHttpRequest) { // Mozilla, Safari,...
         http_request = new XMLHttpRequest();
         if (http_request.overrideMimeType) {
         	// set type accordingly to anticipated content type
            //http_request.overrideMimeType('text/xml');
            http_request.overrideMimeType('text/html');
         }
      } else if (window.ActiveXObject) { // IE
         try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!http_request) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }
      
      http_request.onreadystatechange = alertContents;
      http_request.open('GET', url, true);
      http_request.send(null);
   }

   function alertContents() {
      if (http_request.readyState == 4) {
         if (http_request.status == 200) {
            //alert(http_request.responseText);
            result = http_request.responseText;
  	    document.getElementById('domain_check_result').innerHTML = result;
         } else {
            alert('There was a problem with the request.');
         }
      }
   }
   
  function doCheckDomain() {
	var domain = document.getElementById('check_domain').value;
	var zone = document.getElementById('check_zone').value;
	document.getElementById('domain_check_result').innerHTML = '<span style="color:gray;">Идет проверка домена...</span>';
        makeGETRequest('gewhois?domain='+domain+'&ext='+zone,'');
  }

function geonload(){
  document.getElementById('IMGKOD').src='geimgkod.php?imgkod=1&'+
  document.getElementById('IDSESS').name+'='+
  document.getElementById('IDSESS').value
}

function geonsubmit(f){
 if (f.elements[1].checked && !document.getElementById('check_domain').value){
   alert('Не указан новый домен')
   return false
 }
 if (!f.elements[1].checked && !document.getElementById('transname').value){
   alert('Не указан существующий домен')
   return false
 }
 if(document.getElementById('tplan').value=='0'){
   alert('Не выбран тарифный план')
   return false
 }
 if(!document.getElementById('firstname').value){
   alert('Не указано имя')
   return false
 }
 if(!document.getElementById('lastname').value){
   alert('Не указана фамилия')
   return false
 }
 if(!document.getElementById('email').value){
   alert('Не указан E-mail')
   return false
 }
 if( !(/\w+@\w+\.[a-z]{2,4}/.test(document.getElementById('email').value))) {
   alert('Не правильный E-mail')
   return false
 }
 if(!document.getElementById('kod').value){
   alert('Не указан код проверки')
   return false
 }
 
 return true
}
