// JavaScript Document

// JavaScript Header Checker Function

	function header_lookup(uri) {
		if(uri.length == 0) {
			// Hide the suggestion box.
			//$('#suggestions').hide();
			alert("Please enter correct URL!");
		} else {
			$('#loading').show();
			$.post("/tools/xml_get_header.php", {uri: ""+uri+""}, function(data){
				if(data.length >0) {
					$('#loading').hide();
					$('#displayheader').html(data);
					$('#displayheader').show('slow');
				}
			});
		}
	} // 
	
	
		function ip_to_host(uri) {
		if(uri.length == 0) {
			// Hide the suggestion box.
			//$('#suggestions').hide();
			alert("Please enter IP Address!");
		} else {
			$('#loading').show();
			$.post("/tools/xml_ip_to_host.php", {uri: ""+uri+""}, function(data){
				if(data.length >0) {
					$('#loading').hide();
					$('#displayheader').html(data);
					$('#displayheader').show('slow');
				}
			});
		}
	} //
	
	
		
		function host_to_ip(uri) {
		if(uri.length == 0) {
			// Hide the suggestion box.
			//$('#suggestions').hide();
			alert("Please enter Host Name!");
		} else {
			$('#loading').show();
			$.post("/tools/xml_host_to_ip.php", {uri: ""+uri+""}, function(data){
				if(data.length >0) {
					$('#loading').hide();
					$('#displayheader').html(data);
					$('#displayheader').show('slow');
				}
			});
		}
	} //
	
		
		
		function ip_to_country(uri) {
		if(uri.length == 0) {
			// Hide the suggestion box.
			//$('#suggestions').hide();
			alert("Please enter Address or Host Name!");
		} else {
			$('#loading').show();
			$.post("/tools/xml_ip_to_country.php", {uri: ""+uri+""}, function(data){
				if(data.length >0) {
					$('#loading').hide();
					$('#displayheader').html(data);
					$('#displayheader').show('slow');
				}
			});
		}
	} //
	
		
		function domain_whois(uri) {
		if(uri.length == 0) {
			// Hide the suggestion box.
			//$('#suggestions').hide();
			alert("Please enter Address or Host Name!");
		} else {
			$('#loading').show();
			$.post("/tools/xml_domain_whois.php", {uri: ""+uri+""}, function(data){
				if(data.length >0) {
					$('#loading').hide();
					$('#displayheader').html(data);
					$('#displayheader').show('slow');
				}
			});
		}
	} //
	
	
	    function browse_site(uri) {
		if(uri.length == 0) {
			// Hide the suggestion box.
			//$('#suggestions').hide();
			alert("Please enter web address!");
		} else {
			$('#loading').show();
			$.post("/tools/xml_lynx_browser.php", {uri: ""+uri+""}, function(data){
				if(data.length >0) {
					$('#loading').hide();
					$('#displayheader').html(data);
					$('#displayheader').show('slow');
				}
			});
		}
	} //
	
	function port_scan(type) {
		if(uri.length == 0) {
			// Hide the suggestion box.
			//$('#suggestions').hide();
			//alert("Please enter web address!");
		} else {
			$('#loading').show();
			$.post("/tools/xml_portscan.php", {type: ""+type+""}, function(data){
				if(data.length >0) {
					$('#loading').hide();
					$('#displayheader').html(data);
					$('#displayheader').show('slow');
				}
			});
		}
	} //	
	
	
		function dns_info(domain) {
		if(domain.length == 0) {
			// Hide the suggestion box.
			//$('#suggestions').hide();
			alert("Please enter domain name wihout http://www.!");
		} else {
			$('#loading').show();
			$.post("/tools/xml_dns_info.php", {domain: ""+domain+""}, function(data){
				if(data.length >0) {
					$('#loading').hide();
					$('#displayheader').html(data);
					$('#displayheader').show('slow');
				}
			});
		}
	} //
	
		function mx_lookup(domain) {
		if(domain.length == 0) {
			// Hide the suggestion box.
			//$('#suggestions').hide();
			alert("Please enter domain name wihout http://www.!");
		} else {
			$('#loading').show();
			$.post("/tools/xml_mx_lookup.php", {domain: ""+domain+""}, function(data){
				if(data.length >0) {
					$('#loading').hide();
					$('#displayheader').html(data);
					$('#displayheader').show('slow');
				}
			});
		}
	} //
	
	
		function mx_email_verify(domain) {
		if(domain.length == 0) {
			// Hide the suggestion box.
			//$('#suggestions').hide();
			alert("Please enter email address!");
		} else {
			$('#loading').show();
			$.post("/tools/xml_mx_email_verify.php", {uri: ""+domain+""}, function(data){
				if(data.length >0) {
					$('#loading').hide();
					$('#displayheader').html(data);
					$('#displayheader').show('slow');
				}
			});
		}
	} //
	

		function ping_now(domain) {
		if(domain.length == 0) {
			// Hide the suggestion box.
			//$('#suggestions').hide();
			alert("Please enter email address!");
		} else {
			$('#loading').show();
			$.post("/tools/xml_ping_now.php", {uri: ""+domain+""}, function(data){
				if(data.length >0) {
					$('#loading').hide();
					$('#displayheader').html(data);
					$('#displayheader').show('slow');
				}
			});
		}
	} //
		
		function mail_server_verify(domain) {
		if(domain.length == 0) {
			// Hide the suggestion box.
			//$('#suggestions').hide();
			alert("Please enter domain name!");
		} else {
			$('#loading').show();
			$.post("/tools/xml_mx_server_verify.php", {domain: ""+domain+""}, function(data){
				if(data.length >0) {
					$('#loading').hide();
					$('#displayheader').html(data);
					$('#displayheader').show('slow');
				}
			});
		}
	} //
	
	function date_to_unix_timestamp(mon,day,year,hour,minn,sec) {
		//if(mon.length == 0) {
			// Hide the suggestion box.
			//$('#suggestions').hide();
			//alert("Please enter value!");
	//	} else {
			$('#displayheader').hide();
			$('#loading').show();
			$.post("/tools/xml_get_timestamp.php", {mon: ""+mon+"",day: ""+day+"",year: ""+year+"",hour: ""+hour+"",minn: ""+minn+"",sec: ""+sec+""}, function(data){
				if(data.length >0) {
					$('#loading').hide();
					$('#displayheader').html(data);
					$('#displayheader').show('slow');
				}
			});
		//}
	} // 
	
	function unix_timestamp_to_date(ustamp) {
		if(ustamp.length == 0) {
			// Hide the suggestion box.
			//$('#suggestions').hide();
			alert("Please enter value!");
		} else {
			$('#displayheader').hide();
			$('#loading').show();
			$.post("/tools/xml_get_tdate.php", {ustamp: ""+ustamp+""}, function(data){
				if(data.length >0) {
					$('#loading').hide();
					$('#displayheader').html(data);
					$('#displayheader').show('slow');
				}
			});
		}
	} // 