function getPath(){
	var langs = ['en', 'tc', 'sc'];
	var currentPath = "";
	var currentLang = langs[1];
	for(x in langs){
		if(location.href.search("/"+langs[x]+"/")!=-1){
			currentPath = location.href.substr(0, location.href.search('/'+currentLang+'/'));
			currentLang = langs[x];
		}
	}
	return [currentPath, currentLang];
}

if (typeof(currentPath)=="undefined") {
	var temp = getPath();
	var currentPath = temp[0];
	var currentLang = temp[1];
	var charsetId = 2;
	var currentPathLang = temp[0] + '/' + temp[1] + '/';
}

document.writeln('<script type="text/javascript" src="'+currentPath+'/filemanager/system/common/js/template.js"></script>');
document.writeln('<link href="'+currentPath+'/filemanager/template/'+currentLang+'/css/index.css" type="text/css" rel="stylesheet" />');

function showHeader() {
	document.writeln(' <div id="wrap_outer" class="template4"> ');
	document.writeln(' <div id="wrapper"> ');
	document.writeln(' <div id="top_zone"> ');
	document.writeln(' <div id="top_nav"> ');
	showTopZone();
	document.writeln(' </div> ');
	document.writeln(' <div id="menu"> ');
	document.writeln(' <div id="menu_flash"> ');
	document.writeln(' </div> ');
	document.writeln(' </div> ');
	generateFlashMenu();
	document.writeln(' </div> ');
	document.writeln(' <div id="middle_zone"> ');
	document.writeln(' <div id="content_wrap"> ');
	document.writeln(' <div id="content">');
}

function showFooter() {
	document.writeln(' </div> ');
	document.writeln(' </div> ');
	document.writeln(' </div> ');
	document.writeln(' <div id="footer"> ');
	document.writeln(' <div id="footer_zone"> ');
	showCopyright();
	document.writeln(' </div> ');
	document.writeln(' </div> ');
	document.writeln(' </div> ');
	document.writeln(' </div> ');
}
