function smartOver() {
	smartRollover('container')
}
function smartRollover(idName) {
	if(document.getElementsByTagName) {
		var images = document.getElementById(idName).getElementsByTagName("img");

		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match(/_off\./))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}
if(window.addEventListener) {
	window.addEventListener("load", smartOver, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartOver);
}
else{
	window.onload = smartOver;
}

var flag;
var flag2;

function textAnable(fl) {
	flag = fl;
        if (flag == 2) {
			document.propose.name.disabled = false;
			document.propose.age.disabled = false;
			for(i=0; i<2 ; i++){
			document.propose.seibetsu[i].disabled = false;
			}
			document.propose.address.disabled = false;
			document.propose.telmail.disabled = false;
			document.propose.mailaddress.disabled = false;
			document.propose.bikou.disabled = false;
        } else if(flag == 1) {
        	document.propose.name.disabled = true;
			document.propose.age.disabled = true;
			for(i=0; i<2 ; i++){
			document.propose.seibetsu[i].disabled = true;
			}
			document.propose.address.disabled = true;
			document.propose.telmail.disabled = true;
			document.propose.mailaddress.disabled = true;
			document.propose.bikou.disabled = true;
        }
        
}
function textEnable(fl) {
	flag2 = fl;        
        if (flag2 == 4) {
			document.contact.name.disabled = false;
			document.contact.age.disabled = false;
			for(i=0; i<2 ; i++){
			document.contact.seibetsu[i].disabled = false;
			}
			document.contact.address.disabled = false;
			document.contact.telmail.disabled = false;
			document.contact.mailaddress.disabled = false;			
			document.contact.bikou.disabled = false;
        } else if(flag2 == 3) {
        	document.contact.name.disabled = true;
			document.contact.age.disabled = true;
			for(i=0; i<2 ; i++){
			document.contact.seibetsu[i].disabled = true;
			}
			document.contact.address.disabled = true;
			document.contact.telmail.disabled = true;
			document.contact.mailaddress.disabled = true;			
			document.contact.bikou.disabled = true;
        }

}

function gotFocus() {
	textAnable(flag2);
	textEnable(flag2);
}


