var html="";
html+='<link rel="stylesheet" type="text/css" media="screen, tv, projection, print" href="' + dirPath + 'css/noscript.css" />';
document.write(html);

var gAction = "false";
var gPreLoadList = new Array(
							 dirPath + 'images/h_nav_home_on.gif'
							,dirPath + 'images/h_nav_whyialab_on.gif'
							,dirPath + 'images/h_nav_service_on.gif'
							,dirPath + 'images/h_nav_casestudy_on.gif'
							,dirPath + 'images/h_nav_ia-blog_on.gif'
							,dirPath + 'images/h_nav_jobs_on.gif'
							,dirPath + 'images/h_nav_company_on.gif'
);
function preLoad() {
	;
}
function changeImage(imageName, fileName) {
	;
}

var KLT = {
	dirPath: dirPath,
	_debug: false,
	
	loadJS: function() {
		if(document.documentElement && !navigator.userAgent.match(/AppleWebKit||MSIE 5.+Mac/)) {
			for(var i=0; i<arguments.length; i++) {
				oScript = document.createElement('script');
				oScript.type = 'text/javascript';
				oScript.src = this.dirPath + 'js/' + arguments[i];
				document.getElementsByTagName('head')[0].appendChild(oScript);
			}
		} else {
			for(var i=0; i<arguments.length; i++) {
				document.write('<script type="text/javascript" src="' + this.dirPath + 'js/' + arguments[i] + '"><\/script>');
			}
		}
	},
	
	// cookie
	
	setCookie: function(name,value,days,path,domain,secure) {
		var expires, date;
		if (typeof days == "number") {
			date = new Date();
			date.setTime( date.getTime() + (days*24*60*60*1000) );
			expires = date.toGMTString();
		}
		document.cookie = name + "=" + escape(value) +
		((expires) ? "; expires=" + expires : "") +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		((secure) ? "; secure" : "");
	},
	
	getCookie: function(name) {
		var nameq = name + "=";
		var c_ar = document.cookie.split(';');
		for (var i=0; i<c_ar.length; i++) {
			var c = c_ar[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameq) == 0) return unescape( c.substring(nameq.length, c.length) );
		}
		return null;
	},
	
	deleteCookie: function(name,path,domain) {
		if (this.getCookie(name)) {
		document.cookie = name + "=" +
			((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
			"; expires=Thu, 01-Jan-70 00:00:01 GMT";
		}
	},
	
	// event
	
	addEvent: function(obj, evType, fn) {
		if(obj.addEventListener) {
			obj.addEventListener(evType, fn, false);
		} else if(obj.attachEvent) {
			obj.attachEvent('on' + evType, fn);
		} else {
			var prev = obj['on' + evType];
			obj['on' + evType] = prev ? function() { prev(); fn() } : fn;
		}
	},
	
	addOnload: function(fn) {
		this.addEvent(window, 'load', fn);
	}
};


window.onerror = function() {
	if (KLT._debug) {
		var msg = 
			'Error: ' + arguments[0] + '\n' +
			'File: '  + arguments[1] + '\n' + 
			'Line: '  + arguments[2];
		alert(msg);
	}
	return true;
}


KLT.loadJS(
	'utils.js',
	'font-size.js',
	'client.js',
	'window.js',
	'changeimage.js'
);


