
/*------------------------------------------------------------------------------------------------------------------------*/
/* browser & os check */
/*------------------------------------------------------------------------------------------------------------------------*/
var ua = navigator.userAgent.toUpperCase();
var apver = navigator.appVersion.toUpperCase();
var apnm = navigator.appName.toUpperCase();;

var mac = apver.indexOf("MAC",0) >= 0;
var win = apver.indexOf("WIN",0) >= 0;
var xp = ua.match(/NT 5\.1|XP/);

var ie  = apnm.indexOf("MICROSOFT INTERNET EXPLORER",0) >= 0;
var nn  = apnm.indexOf("NETSCAPE",0) >= 0;
var firefox  = ua.indexOf("FIREFOX",0) >= 0;
var gecko = ua.indexOf("GECKO",0) >= 0;
var safari = ua.indexOf("SAFARI",0) >= 0;
var opera = window.opera;
var apvernum = parseInt(apver);
//var ver = parseInt(navigator.appVersion); // ex. 3

var nn4  = ((nn && apvernum <= 4));
var winIE55 = ((win && ua.indexOf('MSIE 5.5',0) >= 0));
var macIE5 = ((mac && ua.indexOf('MSIE 5.',0) >= 0));
var macIE4 = ((mac && ua.indexOf('MSIE 4.',0) >= 0));
var macIE3 = ((mac && ua.indexOf('MSIE 3.',0) >= 0));
var iCab = (ua.indexOf("iCab",0)  >= 0);

uaName = navigator.userAgent;
appName = navigator.appVersion;
/*------------------------------------------------------------------------------------------------------------------------*/

/*------------------------------------------------------------------------------------------------------------------------*/
function setBgChange(){
	var inputObj = $('input')
	inputObj.each(function(){
		if(this.getAttribute("type") == "text"){
			this.onfocus = function(){
				this.style.backgroundColor = "#ffffcc";
			}
			this.onblur = function(){
				this.style.backgroundColor = "#f5f5f5";
			}
		}
	});
	$('textarea').each(function(){
			this.onfocus = function(){
				this.style.backgroundColor = "#ffffcc";
			}
			this.onblur = function(){
				this.style.backgroundColor = "#f5f5f5";
			}
	});
}

try {
	window.addEventListener('load',setBgChange , false);
} catch(e){
	window.attachEvent('onload',setBgChange);
}
