var rootpath;
var htmlroot;
var lang;

(function() {

var meta = document.all ? document.all.tags('META') :
	document.getElementsByTagName ?
	document.getElementsByTagName ('META') : new Array();

var html = document.all ? document.all.tags('HTML') :
	document.getElementsByTagName ?
	document.getElementsByTagName ('HTML') : new Array();

lang = html[0].lang;
htmlroot = document.location.href.match(/http:\/\/[^\/]+(\/.*html\/)/i)[1];

if( meta.length ) {
	var len = meta.length;
	var i = 0;
	for ( ; i<len; i++) {
		if( meta[i].name == 'Document-Path' ) {
			var s = meta[i].content.replace(/\s*=\s*([0-9a-z- _.\/]+|)(?=;|$)/gi, "='$1'"); // wrap quote
			eval(s);
		}
	}
}

document.write(
'<link rel="stylesheet" type="text/css" href="'+rootpath+'css/'+lang+'.css"/>'
);

var require = function(script) {
	document.write('<script type="text/javascript" src="'+script+'"></script>');
};

require(rootpath+'js/date-functions.js');
require(rootpath+'js/jquery-1.2.6.pack.js');
require(rootpath+'js/jquery.ulExpand.js');
require(rootpath+'js/MM.js');
require(rootpath+'js/function.js');
require(rootpath+'js/init.js');
require(rootpath+'js/'+lang+'.js');

})();

