var interval = null, pause = null, was = null;

// ----------------------------------------

function nowww() {
	var inpt = document.getElementById('d');

	var original = inpt.value;

	inpt.value = inpt.value.replace(/^www([.])/i,'');

	if (original != inpt.value) {

		was = inpt.style.background;
		inpt.style.background = '#ff0000';

		if (pause) {
			window.clearInterval(pause);
		}
		pause = window.setInterval(endwww, 1000);
	}
}

function endwww () {
	document.getElementById('d').style.background = was;
}

function iwantgmap (lat, lon) {
	document.getElementById('mymap').style.display = 'none';
	document.getElementById('googleframe').style.display = '';
	document.getElementById('googleframe').src = '/resources/googlemap.php?lat='+lat+'&lon='+lon;
}

function iwantkmap () {
	document.getElementById('mymap').style.display = '';
	document.getElementById('googleframe').style.display = 'none';
}

