var queryDelay=750;var validateDelay=150;var timeOut;var timeOut1;var timeOut2;var timeOut3;var timeOut4;var validateTimeOut;var serverpath = "";/*Domain Name validation takes in to account the following criteria:      - domain names should have only alpha numeric values and '-'      - domain names should not begin/end with '-'      - domain names should not have special characters      - domain extension should be a defined extension	  */function checkDomain(nname){	var arr = new Array(	".com",".net",".org",".biz",".info",".us",".ca", ".co.uk",".org.uk",".me.uk", ".edu",".uk",".am");		var mai = nname;	var val = true;		var dot = mai.lastIndexOf(".");	var dname = mai.substring(0,dot);	var ext = mai.substring(dot,mai.length);			if(dot>2 && dot<57)	{		for(var i=0; i<arr.length; i++)		{			if(ext == arr[i])			{				val = true;				break;			}			else			{				val = false;			}		}		if(val == false)		{			return false;		}		else		{			for(var j=0; j<dname.length; j++)			{				var dh = dname.charAt(j);				var hh = dh.charCodeAt(0);				if((hh > 47 && hh<59) || (hh > 64 && hh<91) || (hh > 96 && hh<123) || hh==45 || hh==46)				{					if((j==0 || j==dname.length-1) && hh == 45)						{						  return false;					}				}				else				{					return false;				}			}		}	}	else	{		return false;	}		return true;}function performValidation() {	var domainForm = $('domainForm').value;			if ($('cb1').checked || $('cb2').checked || $('cb3').checked || $('cb4').checked) {		if (domainForm.lastIndexOf(".") >= 0) {		}	} else {		var domainValid = checkDomain(domainForm);			if (domainForm == "" ||  domainValid == false) {			showReplyBox(false);		}			showError(!domainValid && domainForm != "");	}}function onLoad_index() {	// Prevent W3 html validation error	var form = document.getElementById("whoisForm");	form.domainForm.setAttribute("autocomplete","off");	focusDomainBox();		beginWhois();		/* Google Analytics */	//_uacct = "UA-9599987666554-9";	urchinTracker();	Element.hide('response');	Element.hide('response_com');	Element.hide('response_net');	Element.hide('response_org');	Element.hide('response_biz');	$('cb1').checked = true;	$('cb2').checked = true;	$('responseBoxes').className = "responseBoxes";	Element.show('response_com');	Element.show('response_net');}function loadTracker(tracker) {	setTimeout(	function() { (new Image(1,1)).src = tracker; }, 1 );}function focusDomainBox(select) {	var form = document.getElementById("whoisForm");	form.domainForm.focus();		if (select != null && select)		whoisForm.domainForm.select();}function beginWhois() {		triggerValidation();		triggerWhois(); 			}function beginWhoisOnCheck(tld) {		triggerWhoisOnCheck(tld);}function trim(str){   return str.replace(/^\s*|\s*$/g,"");}function triggerWhois() {	window.clearTimeout(timeOut);	window.clearTimeout(timeOut1);	window.clearTimeout(timeOut2);	window.clearTimeout(timeOut3);	window.clearTimeout(timeOut4);	var d = $('domainForm').value;	if (d.lastIndexOf(".") >= 0) {		showMainReplyBox(true);		showReplyBox(false, "com");		showReplyBox(false, "net");		showReplyBox(false, "org");		showReplyBox(false, "biz");		timeOut = window.setTimeout("fetchMainWhois()", queryDelay);	} else if (trim(d) != ""){		showMainReplyBox(false);		showReplyBox($('cb1').checked, "com");		showReplyBox($('cb2').checked, "net");		showReplyBox($('cb3').checked, "org");		showReplyBox($('cb4').checked, "biz");		var d = $('domainForm').value;		if ($('cb1').checked) {			timeOut1 = window.setTimeout("fetchWhois('" + d + "', 'com')", queryDelay);		}		if ($('cb2').checked) {			timeOut2 = window.setTimeout("fetchWhois('" + d + "', 'net')", queryDelay);		}		if ($('cb3').checked) {			timeOut3 = window.setTimeout("fetchWhois('" + d + "', 'org')", queryDelay);		}		if ($('cb4').checked) {			timeOut4 = window.setTimeout("fetchWhois('" + d + "', 'biz')", queryDelay);		}	} else {		showMainReplyBox(false);		showReplyBox($('cb1').checked, "com");		showReplyBox($('cb2').checked, "net");		showReplyBox($('cb3').checked, "org");		showReplyBox($('cb4').checked, "biz");	}}function triggerWhoisOnCheck(tld) {	var d = $('domainForm').value;	window.setTimeout("fetchWhois('" + d + "', '" + tld + "')", queryDelay);}function triggerValidation() {	window.clearTimeout(validateTimeOut);		validateTimeOut = window.setTimeout("performValidation()", validateDelay);}function fetchWhois(domainForm, tld) {	domainForm = $('domainForm').value + "." + tld;	var url = serverpath + "whois.php";	var pars = 'd=' + domainForm + '&showWhois=0';		if (domainForm != "" && checkDomain(domainForm)) {		$('whoisResult_' + tld).innerHTML = "<center><img src=\"images/spinner.gif\" alt=\"\"/></center>";		$('status_' + tld).innerHTML = "<strong>Looking up " + domainForm + "</strong>";		if (tld == "com") {			var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars, onComplete: showComWhoisResponse} );		} else if (tld =="net") {			var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars, onComplete: showNetWhoisResponse} );		} else if (tld =="org") {			var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars, onComplete: showOrgWhoisResponse} );		} else if (tld =="biz") {			var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars, onComplete: showBizWhoisResponse} );		}	}}function fetchMainWhois(domainForm) {	if (domainForm == null) { domainForm = $('domainForm').value; }		var url = serverpath + "whois.php";	var pars = 'd=' + domainForm + '&showWhois=0';		$('whoisResult').innerHTML = "";	showMainReplyBox(true);			if (domainForm != "" && checkDomain(domainForm)) {		$('whoisResult').innerHTML = "<center><img src=\"images/spinner.gif\" alt=\"\"/></center>";		$('status').innerHTML = "<strong>Looking up " + domainForm + "</strong>";		var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars, onComplete: showMainWhoisResponse} );	}	else		showMainReplyBox(false);}function showWhoisResponse(originalRequest, tld) {	$('resultbox_' + tld).className = "resultbox_hot";	$('rounded_' + tld).className = "rounded_hot";	$('whoisResult_' + tld).className = "whoisResult";	$('whoisResult_' + tld).innerHTML = originalRequest.responseText;	var d = $('domainForm').value + "." + tld;	if (originalRequest.responseText == "taken!") {		$('status_' + tld).innerHTML = "<strong>" + d + " is already " + originalRequest.responseText + "</strong><a href=\"#\" onclick=\"addToFavorites('" + d + "')\"><"+"img src='images/verysmalljellyfish.gif' alt='Add to Favorites' style=\"display: inline;\" /></a>";		$('whoisResult_' + tld).innerHTML = "<a href=\"#\" onClick=\"showWhois(\'" + d + "');\">Whois</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http://www." + d + "\" target=\"_blank\">Website</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http://alexa.com/data/details/traffic_details?url=" + d + "\" target=\"_blank\">Web Stats</a>";	} else if (originalRequest.responseText == "available!") {		$('status_' + tld).innerHTML = "<strong>" + d + " is " + originalRequest.responseText + "</strong><a href=\"#\" onclick=\"addToFavorites('" + d + "')\" ><"+"img src='images/verysmalljellyfish.gif' alt='Add to Favorites' style=\"display: inline;\"/></a>";		$('whoisResult_' + tld).innerHTML = "<p><strong> Register this DOMAIN for FREE! Limited Time Offer!</strong></p>"+"<p><li><a href=\"http://www.dpbolvw.net/click-2330546-10375662\" target=\"_blank\">BlueHost<b>  FREE Domain</b></a>"+"<p><li><a href=\"http://www.jdoqocy.com/click-2330546-10421839\" target=\"_blank\">HostMonster<b> FREE Domain</b></a>"+"<p><li><a href=\"http://www.tkqlhce.com/click-2330546-10434552\" target=\"_blank\">1and1<b> FREE Domain</b></a>"+"<p><li><a href=\"http://www.dpbolvw.net/click-2957463-10517718\" target=\"_blank\">WHP<b> FREE Domain</b></a>"	}	focusDomainBox();}function showComWhoisResponse(originalRequest) {	showWhoisResponse(originalRequest, "com");}function showNetWhoisResponse(originalRequest) {	showWhoisResponse(originalRequest, "net");}function showOrgWhoisResponse(originalRequest) {	showWhoisResponse(originalRequest, "org");}function showBizWhoisResponse(originalRequest) {	showWhoisResponse(originalRequest, "biz");}function showMainWhoisResponse(originalRequest) {	$('resultbox').className = "resultbox_hot";	$('rounded').className = "rounded_hot";	$('whoisResult').className = "whoisResult";	$('whoisResult').innerHTML = originalRequest.responseText;	if (originalRequest.responseText == "taken!") {		$('status').innerHTML = "<strong>" + $('domainForm').value + " is already " + originalRequest.responseText + "</strong><a href=\"#\" onclick=\"addToFavorites($('domainForm').value)\" class=\"digs\"><"+"img src='images/verysmalljellyfish.gif' alt='Add to Favorites' style=\"display: inline;\" /></a>";		$('whoisResult').innerHTML = "<a href=\"#\" onClick=\"showWhois(\'" + $('domainForm').value + "');\">Whois</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http://www." + $('domainForm').value + "\" target=\"_blank\">Website</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http://alexa.com/data/details/traffic_details?url=" + $('domainForm').value + "\" target=\"_blank\">Alexaholic</a>";	} else if (originalRequest.responseText == "available!") {		$('status').innerHTML = "<strong>" + $('domainForm').value + " is " + originalRequest.responseText + "</strong><a href=\"#\" onclick=\"addToFavorites($('domainForm').value)\" ><"+"img src='images/verysmalljellyfish.gif' alt='Add to Favorites' style=\"display: inline;\"/></a>";		$('whoisResult').innerHTML = "<p><strong> Register this DOMAIN for FREE! Limited Time Offer!</strong></p>"+"<p><li><a href=\"http://www.dpbolvw.net/click-2330546-10375662\" target=\"_blank\">BlueHost<b>  FREE Domain</b></a>"+"<p><li><a href=\"http://www.jdoqocy.com/click-2330546-10421839\" target=\"_blank\">HostMonster<b> FREE Domain</b></a>"+"<p><li><a href=\"http://www.tkqlhce.com/click-2330546-10434552\" target=\"_blank\">1and1<b> FREE Domain</b></a>"+"<p><li><a href=\"http://www.dpbolvw.net/click-2957463-10517718\" target=\"_blank\">WHP<b> FREE Domain</b></a>"	}	focusDomainBox();}function showReplyBox(visibility, tld) {	if (visibility) {		$('replyBox_' + tld).style.visibility="visible";		$('replyBox_' + tld).style.overflow="auto";		$('resultbox_' + tld).className = "resultbox";		$('rounded_' + tld).className = "rounded";		$('whoisResult_' + tld).innerHTML = "Waiting for your input...";		$('status_' + tld).innerHTML = "." + tld;		if ($('response_' + tld).visibility != "visible")			new Effect.Appear('response_' + tld);	}	else {		$('replyBox_' + tld).style.visibility="visible";		$('replyBox_' + tld).style.overflow="auto";		$('resultbox_' + tld).className = "resultbox";		$('rounded_' + tld).className = "rounded";		$('whoisResult_' + tld).innerHTML = "Waiting for your input...";		$('status_' + tld).innerHTML = "." + tld;		Element.hide('response_' + tld);	}}function showMainReplyBox(visibility) {	if (visibility) {		$('replyBox').style.visibility="visible";		//$('replyBox').style.height="100px";		$('replyBox').style.overflow="auto";		$('resultbox').className = "resultbox";		$('rounded').className = "rounded";		new Effect.Appear('response');		$('response').className = "response";	}	else {		$('replyBox').style.visibility="visible";		$('replyBox').style.overflow="auto";		$('resultbox').className = "resultbox";		$('rounded').className = "rounded";		$('whoisResult').innerHTML = "Waiting for your input...";		$('status').innerHTML = "&nbsp;"		Element.hide('response');		$('response').className = "responseHidden";	}}function showError(visibility) {	if (visibility) {		$('domainForm').className="domainboxerr";		//$('err').style.visibility="visible";	}	else {		$('domainForm').className="domainbox";		//$('err').style.visibility="hidden";	}}