function select_body_bg(module) {

	client_width = window.screen.width;
	client_height = window.screen.height;
	body = document.getElementById("dombody");
	
	body.style.backgroundAttachment = "fixed";
	body.style.backgroundRepeat="no-repeat";

	if (module == "road") {
	  body.style.backgroundPosition="bottom right";
	} else if (module == "ontario") {
	  body.style.backgroundPosition="top center"; 
	}

	if (client_width < 1300 && client_height < 900) {
		body.style.backgroundImage="url(/gfx/"+module+"/bg_1300.jpg)";
	} else if (client_width < 1700 && client_height < 1100) {
		body.style.backgroundImage="url(/gfx/"+module+"/bg_1700.jpg)";
	} else if(client_width < 2000 && client_height < 1300) {
		body.style.backgroundImage="url(/gfx/"+module+"/bg_2000.jpg)";
	} else if(client_width < 2400 && client_height < 1600) {
		body.style.backgroundImage="url(/gfx/"+module+"/bg_2400.jpg)";
	} else { //owerflow
		body.style.backgroundImage="url(/gfx/defaultbg.png)";
		body.style.backgroundPosition="top left";
		body.style.backgroundRepeat="repeat";
	}
}

function validateNotEmptyInputText(elmInput, elmSubmit) {
	isValid = elmInput.value.replace(/^\s+|\s+$/g, '').length > 0;
	
	elmSubmit.disabled = !isValid;
	elmInput.style.backgroundColor = isValid ? '#cfc' : '#fff';
	
	return isValid;
}

