function showWhoIsSearch(contentId, domainName)
{
	$(function(){
		var jContent = $( "#"+contentId );
		$.ajax(
			{
				url: "/services/whoissearch.php?domain="+domainName,
				type: "get",
				dataType: "html",
				
				error: function(){
					jContent.html( "<p>Server busy</p>" );
				},
				
				beforeSend: function(){
					jContent.html( '<div align="center" style="padding: 10px 0px"><img src="/ajax-loader.gif" /></div>' );
				},
				
				complete: function(){
					//jContent.html( "<p>Server busy</p>" );
				},
				
				success: function( strData ){
					jContent.html( strData );
				}
			}							
		);
	}
	);
}

function showWhoIs(contentId, domainName)
{
	$(function(){
		var jContent = $( "#"+contentId );
		$.ajax(
			{
				url: "/services/whoisdomain.php?domain="+domainName,
				type: "get",
				dataType: "html",
				
				error: function(){
					jContent.html( "<p>Server busy</p>" );
				},
				
				beforeSend: function(){
					jContent.html( '<img src="/loading.gif" />' );
				},
				
				complete: function(){
					//jContent.html( "<p>Server busy</p>" );
				},
				
				success: function( strData ){
					jContent.html( strData );
				}
			}							
		);
	}
	);
}

function removeSubStr(str_main, str_remove)
{ 
	var arr = str_main.split("&");
	var str = "";
	
	for (x in arr)
	{
	   str_check = ";" + arr[x];
	   
	   if(subStrFind(str_check, ";", "=") == str_remove)
	   {
			arr.splice(x,0);
	   }else if(str!="")
	   {
		  str += "&" + arr[x];
	   }else
	   {
		  str += arr[x];
	   }
	}
	
	return str;
}

function subStrFind(str_main, start_char, end_char)
{
	var arr1 = new Array();
	var arr2 = new Array();
	
	arr1 = str_main.split(start_char, 2);
	arr2 = arr1[1].split(end_char, 2);
	
	return arr2[0];
}

function reloadC () {
		var f = document.getElementById("captcha");
		f.src = f.src + "?" + Math.random();
	}
	
function addExt()
{
	var extvalue = '';
	
	var i = 0;
	
	while(document.getElementById('ext'+i))
	{
		if(document.getElementById('ext'+i).checked==true)
		{
			if(extvalue!='')
				extvalue += '|' + document.getElementById('ext'+i).value;
			else 
				extvalue += document.getElementById('ext'+i).value;
		}
		i++;
	}
	return extvalue;
}
