
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}



  function selectDiv(domain,ptype, value)
  {
        var changeStr;
        var theObj;
        var dispStr;
        domainstatus = ptype+"_"+value;

        value1 = "true";
        if (value == true)
                value1 = false;
        else
                value1 = true;
        domainstatus1 = ptype+"_"+value1;
	
        if (document.getElementById)
        {
                changeStr = "document.getElementById('status_" + domain + "_" + domainstatus + "')";
                theObj = eval(changeStr);
                if (theObj)
                {
                        blocking = "1";
                        theObj.style.display = 'block';
                }
                changeStr = "document.getElementById('status_" + domain + "_" + domainstatus1 + "')";
                theObj = eval(changeStr);
                if (theObj)
                {
                        if (blocking == "1"){
                                theObj.style.display = 'none';
                        } else {
                                 theObj.style.display = 'block';
			}
                }

        }
  }


function replaceText(sId, sText)
{
  var el;
  if (document.getElementById && (el = document.getElementById(sId)))
    {
      while (el.hasChildNodes())
        el.removeChild(el.lastChild);
      //el.appendChild(document.createTextNode(sText));
      el.innerHTML = sText;
    }
}


function handleTLDResponse(status,content,contentType)
{
  results = content.split(",");
	if (results[1] == 1)
  {
    AVAIL[results[0]] = 1;
    replaceText("td_" + results[0], "<b>Alınabilir</b>");
	replaceText("tdx_" + results[0], "<img alt=\"Bu domaini satın alabilirsiniz\" src=images/okal.gif width=16 height=16>");
    document.getElementById("td_" + results[0]).style.color = '#00cc00';
    document.getElementById('check_' + results[0]).disabled = false;
	    document.getElementById('selec_' + results[0]).disabled = false;
  }
  else
  {
    if(typeof(document.getElementById("td_" + results[0]).sedo)=="undefined" || document.getElementById("td_" + results[0]).sedo == 0)
    {
      AVAIL[results[0]] = 0;
      replaceText("td_" + results[0], "Alınamaz");
	  	replaceText("tdx_" + results[0], "<img alt=\"Bu Domain Bir Başkasına Aittir.\"  src=images/noal.gif width=16 height=16>");
      document.getElementById("td_" + results[0]).style.color = '#ff0000';
    }
  }
}

function HTTP() {
 var xmlhttp
 /*@cc_on @*/
 /*@if (@_jscript_version >= 5)
   try {
   xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")
  } catch (e) {
   try {
     xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
   } catch (E) {
    xmlhttp=false
   }
  }
 @else
  xmlhttp=false
 @end @*/
 if (!xmlhttp) {
  try {
   xmlhttp = new XMLHttpRequest();
  } catch (e) {
   xmlhttp=false
  }
 }
 return xmlhttp
}

if (typeof getURL=='undefined') {
 getURL=function(url,fn) {
  var xmlhttp=new HTTP();
  if (xmlhttp) {
   xmlhttp.open("GET",url,true);
   xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==4) {
     fn(xmlhttp.status,xmlhttp.responseText,xmlhttp.getResponseHeader("Content-Type"))
    }
   }

   xmlhttp.send(null)
  } else {
   //Some Appropriate Fallback...
  }
 }
}
if (typeof postURL=='undefined') {
 postURL=function(url,txt,fn,type,enc) {
  var xmlhttp=new HTTP();
  if (xmlhttp) {
   xmlhttp.open("POST",url,true);
   if (enc) xmlhttp.setRequestHeader("Content-Encoding",enc)
   if (type) xmlhttp.setRequestHeader("Content-Type",type)
   xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==4) {
     fn(xmlhttp.status,xmlhttp.responseText,xmlhttp.getResponseHeader("Content-Type"))
    }
   }
   xmlhttp.send(txt)
  } else {
   //Some Appropriate Fallback...
  }
 }
}


