$(document).ready(function() {
	$('#whois_domain').focus();
});

function go_to(){
	var argv = go_to.arguments;
	var argc = go_to.arguments.length;
	if(argc > 1){
		if(confirm(argv[1]))
			show_wait();
		window.location.href = argv[0];
	}
	else{
		show_wait();
		window.location.href = argv[0];
	}
}

function show_wait(){
	var div_wait = document.getElementById("div_wait")
	div_wait.style.top = getBodyScrollTop() + 280 + "px";
	div_wait.style.left = ( (parseInt(document.body.clientWidth)-300)/2 ) + "px";
	div_wait.style.display = 'block';
}
function hide_wait(){
	document.getElementById('div_wait').style.display = 'none';
}

function str_replace(str_search, str_replace, str_subject) {
	return str_subject.split(str_search).join(str_replace);
}
function str_ireplace(str_search, str_replace, str_subject) {
	str_subject = str_subject.toLowerCase();
	return str_subject.split(str_search).join(str_replace);
}

function pause ( mSec ) {
	var clock = new Date();
	var justMinute = clock.getTime();
	while( true ) {
		just = new Date();
		if( just.getTime() - justMinute > mSec ) break;
	}
}

function getBodyScrollTop(){
	return self.pageYOffset || (document.documentElement && document.documentElement.scrollTop) || (document.body && document.body.scrollTop);
}

function getBodyScrollLeft(){
	return self.pageXOffset || (document.documentElement && document.documentElement.scrollLeft) || (document.body && document.body.scrollLeft);
}

function pause (mSec) {
	clock = new Date();
	justMinute = clock.getTime();
	while (true) {
		just = new Date();
		if( just.getTime() - justMinute > mSec ) break;
	}
}
function offTimer() {
	if (document.timer) {
		window.clearTimeout(document.timer);
		document.timer = null;
	}
}
