﻿var ref_url; 
var ref_local_path;
ref_url="";

var subhead_blanktab = '<td background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><img src="'+ local_path +'images/spacer.gif" width="100" height="10"></td> ';

function url_replace(url_input){
  url_input = url_input.replace("http://", "");
  url_input = url_input.replace("https://", "");
  url_input = url_input.replace(".html", "");
  url_input = url_input.replace(".htm", "");
  url_input = url_input.replace(".aspx", "");
  url_input = url_input.replace("../", "");
  url_input = url_input.replace("?lang="+lang, "");
  url_input = url_input.replace("&lang="+lang, "");
  url_input = url_input.replace("?style=ypyt", "");
  url_input = url_input.replace("&style=ypyt", "");
  url_input = url_input.replace("?style=ywets", "");
  url_input = url_input.replace("&style=ywets", "");
  url_input = url_input.replace("?style=yptp", "");
  url_input = url_input.replace("&style=yptp", "");
  url_input = url_input.replace(yes_url+yes_url_base+lang+"/", "");
  url_input = url_input.replace(yes_url+yes_url_base, "");
  url_input = url_input.replace(ywets_url+ywets_url_base+lang+"/", "");
  url_input = url_input.replace(ywets_url+ywets_url_base, "");
  url_input = url_input.replace(yptp_url+yptp_url_base+lang+"/", "");
  url_input = url_input.replace(yptp_url+yptp_url_base, "");
  return (url_input);
}

function print_tab_blank(){
  document.write('<td background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><img src="'+ local_path +'images/spacer.gif" width="100" height="10"></td> ');
}

function print_tab_Curr(tab_url, tab_desc) {
  document.write('<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" valign="top"><img src="'+ local_path +'images/go.gif" width="11" height="11" border="0" align="absmiddle"></td><td><a href="'+ tab_url +'" class="txtStandard"><span style="text-decoration: none;color:#ffffff"> ');
  document.write(tab_desc+'</span></a></td></tr></table></td>');
}

function print_tab_Norm(tab_url, tab_desc) {
  document.write('<td valign="top" background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" valign="top"><img src="'+ local_path +'images/go.gif" width="11" height="11" border="0" align="absmiddle"></td><td><a href="'+tab_url+'" class="txtStandard"><span style="text-decoration: none;"> ');
  document.write(tab_desc+'</span></a></td></tr></table></td>');
}

function print_subhead(){
document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#E8EEC0">');
document.write('  <tr>');
document.write('    <td bgcolor="#e8eec0"><img src="'+local_path+'images/spacer.gif" width="50" height="8"></td>');
document.write('  </tr>');
document.write('</table>');
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
document.write('  <tr>');
document.write('    <td><table height="23" width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#00CC33">');
document.write('        <tr> ');
if (self.location.href.indexOf("/sch_")!=-1){
	for (i=0; i<arr_sch_hdr.length; i++){
		if (arr_sch_hdr[i]["name"]!=""){
			ref_url = arr_sch_hdr[i]["url"];
			ref_url = ref_url.replace(".htm", "");
			ref_url = ref_url.replace(".aspx", "");
			ref_url = ref_url.replace("?lang="+lang, "");
			ref_url = ref_url.replace("../", "");
			if (arr_sch_hdr[i]["url"].indexOf(".aspx")!=-1){
				arr_sch_hdr[i]["url"] = local_path + arr_sch_hdr[i]["url"];
			}else{
				arr_sch_hdr[i]["url"] = local_path + lang+ "/" +arr_sch_hdr[i]["url"];
			}
			if (self.location.href.indexOf(ref_url)!=-1){
				document.write('<td><img src="'+local_path+'images/go.gif" width="11" height="11" border="0" align="absmiddle"><a href="'+arr_sch_hdr[i]["url"]+'" class="txtStandard"><span style="text-decoration: none;color:#ffffff"> ');
			}else{
				document.write('<td background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><img src="'+ local_path +'/images/go.gif" width="11" height="11" border="0" align="absmiddle"><a href="'+arr_sch_hdr[i]["url"]+'" class="txtStandard"><span style="text-decoration: none;"> ');
			}
			document.write(arr_sch_hdr[i]["name"]+'</span></a></td>');
		}else{
			document.write('<td background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom">&nbsp;</td>');
		}
	}
}

if (self.location.href.indexOf("/ywets_public/applicant/update_placement.aspx")!=-1){
	for (i=0; i<arr_job_hdr.length; i++){
		if (arr_job_hdr[i]["name"]!=""){
			if (arr_job_hdr[i]["url"].indexOf(".htm")!=-1) arr_job_hdr[i]["url"] = '/'+ lang + '/' +arr_job_hdr[i]["url"];
			if (arr_job_hdr[i]["url"].indexOf(".aspx")!=-1){
				if (arr_job_hdr[i]["url"].indexOf("tm_intro")!=-1){
					arr_job_hdr[i]["url"] = '/'+ lang + '/' + arr_job_hdr[i]["url"];
				}else{
					arr_job_hdr[i]["url"] = '/'+ arr_job_hdr[i]["url"];
				}
			}
			if (arr_job_hdr[i]["url"].indexOf("update_placement.aspx")!=-1){
				document.write('<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" valign="top"><img src="'+ local_path +'images/go.gif" width="11" height="11" border="0" align="absmiddle"></td><td><a href="'+ arr_job_hdr[i]["url"]+'" class="txtStandard"><span style="text-decoration: none;color:#ffffff"> ');
			}else{
				document.write('<td valign="top" background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" valign="top"><img src="'+ local_path +'images/go.gif" width="11" height="11" border="0" align="absmiddle"></td><td><a href="'+ arr_job_hdr[i]["url"]+'" class="txtStandard"><span style="text-decoration: none;"> ');
			}
			document.write(arr_job_hdr[i]["name"]+'</span></a></td></tr></table></td>');
		}else{
				document.write('<td background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><img src="'+ local_path +'images/spacer.gif" width="100" height="10"></td> ');
		}
	}
}

if (self.location.href.indexOf("/job_")!=-1 || self.location.href.indexOf("/tm_")!=-1){
	for (i=0; i<arr_job_hdr.length; i++){
		if (arr_job_hdr[i]["name"]!=""){
			ref_url = arr_job_hdr[i]["url"];
			ref_url = ref_url.replace(".htm", "");
			ref_url = ref_url.replace(".aspx", "");
			ref_url = ref_url.replace("../", "");
			ref_url = ref_url.replace("?lang="+lang, "");
			if (arr_job_hdr[i]["url"].indexOf(".aspx")!=-1 && arr_job_hdr[i]["url"].indexOf("tm_intro")==-1){
				arr_job_hdr[i]["url"] = local_path + arr_job_hdr[i]["url"];
			}else{
				arr_job_hdr[i]["url"] = local_path + lang+ "/" +arr_job_hdr[i]["url"];
			}
			if (self.location.href.indexOf(ref_url)!=-1 || (self.location.href.indexOf(ref_url.substring(0,6))!=-1 && ref_url == "tm_its_intro") || (self.location.href.indexOf(ref_url.substring(0,12))!=-1 && ref_url == "tm_super_its_intro")){
				document.write('<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" valign="top"><img src="'+ local_path +'images/go.gif" width="11" height="11" border="0" align="absmiddle"></td><td><a href="'+ arr_job_hdr[i]["url"]+'" class="txtStandard"><span style="text-decoration: none;color:#ffffff"> ');
			}else{
				document.write('<td valign="top" background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" valign="top"><img src="'+ local_path +'images/go.gif" width="11" height="11" border="0" align="absmiddle"></td><td><a href="'+ arr_job_hdr[i]["url"]+'" class="txtStandard"><span style="text-decoration: none;"> ');
			}
			document.write(arr_job_hdr[i]["name"]+'</span></a></td></tr></table></td>');
		}else{
				document.write('<td background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><img src="'+ local_path +'images/spacer.gif" width="100" height="10"></td> ');
		}
	}
}
if (self.location.href.indexOf("/tne_")!=-1){
	for (i=0; i<arr_tne_hdr.length; i++){
		if (arr_tne_hdr[i]["name"]!=""){
			ref_url = arr_tne_hdr[i]["url"];
			ref_url = ref_url.replace(".htm", "");
			ref_url = ref_url.replace(".aspx", "");
			ref_url = ref_url.replace("../", "");
			ref_url = ref_url.replace("?lang="+lang, "");
			if (arr_tne_hdr[i]["url"].indexOf(".aspx")!=-1){
				arr_tne_hdr[i]["url"] = local_path + arr_tne_hdr[i]["url"];
			}else{
				arr_tne_hdr[i]["url"] = local_path + lang+ "/" +arr_tne_hdr[i]["url"];
			}
			if (self.location.href.indexOf(ref_url)!=-1){
				document.write('<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" valign="top"><img src="'+ local_path +'images/go.gif" width="11" height="11" border="0" align="absmiddle"></td><td><a href="'+ arr_tne_hdr[i]["url"]+'" class="txtStandard"><span style="text-decoration: none;color:#ffffff"> ');
			}else{
				document.write('<td valign="top" background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" valign="top"><img src="'+ local_path +'images/go.gif" width="11" height="11" border="0" align="absmiddle"></td><td><a href="'+ arr_tne_hdr[i]["url"]+'" class="txtStandard"><span style="text-decoration: none;"> ');
			}
			document.write(arr_tne_hdr[i]["name"]+'</span></a></td></tr></table></td>');
		}else{
				document.write('<td colspan=2 background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><img src="'+ local_path +'images/spacer.gif" width="100" height="10"></td> ');
		}
	}
}
if (self.location.href.indexOf("/cmg_")!=-1){
	for (i=0; i<arr_cmg_hdr.length; i++){
		if (arr_cmg_hdr[i]["name"]!=""){
			ref_url = arr_cmg_hdr[i]["url"];
			ref_url = ref_url.replace(".htm", "");
			ref_url = ref_url.replace(".aspx", "");
			ref_url = ref_url.replace("../", "");
			ref_url = ref_url.replace("?lang="+lang, "");
			if (arr_cmg_hdr[i]["url"].indexOf(".aspx")!=-1){
				arr_cmg_hdr[i]["url"] = local_path + arr_cmg_hdr[i]["url"];
			}else{
				arr_cmg_hdr[i]["url"] = local_path + lang+ "/" +arr_cmg_hdr[i]["url"];
			}
			if (self.location.href.indexOf(ref_url)!=-1){
				document.write('<td><a href="'+ arr_cmg_hdr[i]["url"]+'" class="txtStandard"><span style="text-decoration: none;color:#ffffff"><img src="'+ local_path +'images/go.gif" width="11" height="11" border="0" align="absmiddle"> ');
			}else{
				document.write('<td background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><a href="'+ arr_cmg_hdr[i]["url"]+'" class="txtStandard"><span style="text-decoration: none;"><img src="'+ local_path +'images/go.gif" width="11" height="11" border="0" align="absmiddle"> ');
			}
			document.write(arr_cmg_hdr[i]["name"]+'</span></a></td>');
		}else{
				document.write('<td background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><img src="'+ local_path +'images/spacer.gif" width="100" height="10"></td> ');
		}
	}
}
if (self.location.href.indexOf("/emp_")!=-1){
	for (i=0; i<arr_emp_hdr.length; i++){
		if (arr_emp_hdr[i]["name"]!=""){
			ref_url = arr_emp_hdr[i]["url"];
			ref_url = ref_url.replace(".htm", "");
			ref_url = ref_url.replace(".aspx", "");
			ref_url = ref_url.replace("../", "");
			ref_url = ref_url.replace("?lang="+lang, "");
			if (arr_emp_hdr[i]["url"].indexOf(".aspx")!=-1){
				arr_emp_hdr[i]["url"] = local_path + arr_emp_hdr[i]["url"];
			}else{
				arr_emp_hdr[i]["url"] = local_path + lang+ "/" +arr_emp_hdr[i]["url"];
			}
			if (self.location.href.indexOf(ref_url)!=-1){
				document.write('<td><a href="'+ arr_emp_hdr[i]["url"]+'" class="txtStandard"><span style="text-decoration: none;color:#ffffff"><img src="'+ local_path +'images/go.gif" width="11" height="11" border="0" align="absmiddle"> ');
			}else{
				document.write('<td background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><a href="'+ arr_emp_hdr[i]["url"]+'" class="txtStandard"><span style="text-decoration: none;"><img src="'+ local_path +'images/go.gif" width="11" height="11" border="0" align="absmiddle"> ');
			}
			document.write(arr_emp_hdr[i]["name"]+'</span></a></td>');
		}else{
				document.write('<td background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><img src="'+ local_path +'images/spacer.gif" width="100" height="10"></td> ');
		}
	}
}
if (self.location.href.indexOf("/fil_")!=-1){
	for (i=0; i<arr_fil_hdr.length; i++){
		if (arr_fil_hdr[i]["name"]!=""){
			ref_url = arr_fil_hdr[i]["url"];
			ref_url = ref_url.replace(".htm", "");
			ref_url = ref_url.replace(".aspx", "");
			ref_url = ref_url.replace("../", "");
			ref_url = ref_url.replace("?lang="+lang, "");
			if (arr_fil_hdr[i]["url"].indexOf(".aspx")!=-1){
				arr_fil_hdr[i]["url"] = local_path + arr_fil_hdr[i]["url"];
			}else{
				arr_fil_hdr[i]["url"] = local_path + lang+ "/" +arr_fil_hdr[i]["url"];
			}
			if (self.location.href.indexOf(ref_url)!=-1){
				document.write('<td><a href="'+ arr_fil_hdr[i]["url"]+'" class="txtStandard"><span style="text-decoration: none;color:#ffffff"><img src="'+ local_path +'images/go.gif" width="11" height="11" border="0" align="absmiddle"> ');
			}else{
				document.write('<td background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><a href="'+ arr_fil_hdr[i]["url"]+'" class="txtStandard"><span style="text-decoration: none;"><img src="'+ local_path +'images/go.gif" width="11" height="11" border="0" align="absmiddle"> ');
			}
			document.write(arr_fil_hdr[i]["name"]+'</span></a></td>');
		}else{
				document.write('<td background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><img src="'+ local_path +'images/spacer.gif" width="100" height="10"></td> ');
		}
	}
}
if (self.location.href.indexOf("/dbf_")!=-1){
	for (i=0; i<arr_dbf_hdr.length; i++){
		if (arr_dbf_hdr[i]["name"]!=""){
			ref_url = arr_dbf_hdr[i]["url"];
			ref_url = ref_url.replace(".htm", "");
			ref_url = ref_url.replace(".aspx", "");
			ref_url = ref_url.replace("../", "");
			ref_url = ref_url.replace("?lang="+lang, "");
			if (arr_dbf_hdr[i]["url"].indexOf(".aspx")!=-1){
				arr_dbf_hdr[i]["url"] = local_path + arr_dbf_hdr[i]["url"];
			}else{
				arr_dbf_hdr[i]["url"] = local_path + lang+ "/" +arr_dbf_hdr[i]["url"];
			}
			if (self.location.href.indexOf(ref_url)!=-1){
				document.write('<td><a href="'+ arr_dbf_hdr[i]["url"]+'" class="txtStandard"><span style="text-decoration: none;color:#ffffff"><img src="'+ local_path +'images/go.gif" width="11" height="11" border="0" align="absmiddle"> ');
			}else{
				document.write('<td background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><a href="'+ arr_dbf_hdr[i]["url"]+'" class="txtStandard"><span style="text-decoration: none;"><img src="'+ local_path +'images/go.gif" width="11" height="11" border="0" align="absmiddle"> ');
			}
			document.write(arr_dbf_hdr[i]["name"]+'</span></a></td>');
		}else{
				document.write('<td background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><img src="'+ local_path +'images/spacer.gif" width="100" height="10"></td> ');
		}
	}
}
if (self.location.href.indexOf("/mtr_")!=-1){
	for (i=0; i<arr_mtr_hdr.length; i++){
		if (arr_mtr_hdr[i]["name"]!=""){
			ref_url = arr_mtr_hdr[i]["url"];
			ref_url = ref_url.replace(".htm", "");
			ref_url = ref_url.replace(".aspx", "");
			ref_url = ref_url.replace("../", "");
			ref_url = ref_url.replace("?lang="+lang, "");
			if (arr_mtr_hdr[i]["url"].indexOf(".aspx")!=-1){
				arr_mtr_hdr[i]["url"] = local_path + arr_mtr_hdr[i]["url"];
			}else{
				arr_mtr_hdr[i]["url"] = local_path + lang+ "/" +arr_mtr_hdr[i]["url"];
			}
			if (self.location.href.indexOf(ref_url)!=-1){
				document.write('<td><a href="'+ arr_mtr_hdr[i]["url"]+'" class="txtStandard"><span style="text-decoration: none;color:#ffffff"><img src="'+ local_path +'images/go.gif" width="11" height="11" border="0" align="absmiddle"> ');
			}else{
				document.write('<td background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><a href="'+ arr_mtr_hdr[i]["url"]+'" class="txtStandard"><span style="text-decoration: none;"><img src="'+ local_path +'images/go.gif" width="11" height="11" border="0" align="absmiddle"> ');
			}
			document.write(arr_mtr_hdr[i]["name"]+'</span></a></td>');
		}else{
				document.write('<td background="'+ local_path +'images/bg_tab.gif" class="TdOutLineTabBottom"><img src="'+ local_path +'images/spacer.gif" width="100" height="10"></td> ');
		}
	}
}
document.write('        </tr>');
document.write('      </table>');
document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#00CC33">');
document.write('  <tr>');
document.write('    <td><img src="'+local_path+'images/spacer.gif" width="10" height="5"></td>')
document.write('  </tr>')
document.write('</table>');
}

function print_subhead_new(){

//document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#E8EEC0">');
document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#54CADF">');
document.write('  <tr>');
document.write('    <td bgcolor="#D7DDFF"><img src="'+local_path+'images/spacer.gif" width="50" height="5"></td>');
document.write('  </tr>');
document.write('</table>');
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
document.write('  <tr>');
document.write('    <td><table height="23" width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#43b9ce">');
document.write('        <tr> ');
if (self.location.href.indexOf("/sch_")!=-1){
	for (i=0; i<arr_sch_hdr.length; i++){
		if (arr_sch_hdr[i]["name"]!=""){
			ref_url = url_replace(arr_sch_hdr[i]["url"]);
            if (arr_sch_hdr[i]["url"].indexOf(".aspx")!=-1){
                //arr_sch_hdr[i]["url"] = local_path + arr_sch_hdr[i]["url"];
            }else{
                //arr_sch_hdr[i]["url"] = local_path + lang+ "/" +arr_sch_hdr[i]["url"];
            }
            if (self.location.href.indexOf(ref_url)!=-1){
                print_tab_Curr(arr_sch_hdr[i]["url"], arr_sch_hdr[i]["name"]);
            }else{
                print_tab_Norm(arr_sch_hdr[i]["url"], arr_sch_hdr[i]["name"]);
            }
        }else{
            print_tab_blank();
        }
    }
}

if (self.location.href.indexOf("/ywets_public/applicant/update_placement.aspx")!=-1){
    for (i=0; i<arr_job_hdr.length; i++){
        if (arr_job_hdr[i]["name"]!=""){
            if (arr_job_hdr[i]["url"].indexOf(".htm")!=-1) {
				//arr_job_hdr[i]["url"] = '/'+ lang + '/' +arr_job_hdr[i]["url"];
			}
            if (arr_job_hdr[i]["url"].indexOf(".aspx")!=-1){
                if (arr_job_hdr[i]["url"].indexOf("tm_intro")!=-1){
                    //arr_job_hdr[i]["url"] = '/'+ lang + '/' + arr_job_hdr[i]["url"];
                }else{
                    //arr_job_hdr[i]["url"] = '/'+ arr_job_hdr[i]["url"];
                }
            }
            if (arr_job_hdr[i]["url"].indexOf("update_placement.aspx")!=-1){
                print_tab_Curr(arr_job_hdr[i]["url"], arr_job_hdr[i]["name"]);
            }else{
                print_tab_Norm(arr_job_hdr[i]["url"], arr_job_hdr[i]["name"]);
            }
        }else{
                print_tab_blank();
        }
    }
}

if (self.location.href.indexOf("/job_")!=-1 || self.location.href.indexOf("/tm_")!=-1){
    for (i=0; i<arr_job_hdr.length; i++){
        if (arr_job_hdr[i]["name"]!=""){
            ref_url = url_replace(arr_job_hdr[i]["url"]);
            if (arr_job_hdr[i]["url"].indexOf(".aspx")!=-1 && arr_job_hdr[i]["url"].indexOf("tm_intro")==-1){
                //arr_job_hdr[i]["url"] = local_path + arr_job_hdr[i]["url"];
            }else{
                //arr_job_hdr[i]["url"] = local_path + lang+ "/" +arr_job_hdr[i]["url"];
            }
            if (self.location.href.indexOf(ref_url)!=-1 || (self.location.href.indexOf(ref_url.substring(0,6))!=-1 && ref_url == "tm_its_intro_ypyt") || (self.location.href.indexOf(ref_url.substring(0,12))!=-1 && ref_url == "tm_super_its_intro_ypyt")){
                print_tab_Curr(arr_job_hdr[i]["url"], arr_job_hdr[i]["name"]);
            }else{
                print_tab_Norm(arr_job_hdr[i]["url"], arr_job_hdr[i]["name"]);
            }
        }else{
                print_tab_blank();
        }
    }
}

if (self.location.href.indexOf("/tne_")!=-1){
    for (i=0; i<arr_tne_hdr.length; i++){
        if (arr_tne_hdr[i]["name"]!=""){
            ref_url = url_replace(arr_tne_hdr[i]["url"]);
//document.write(ref_url);
            if (arr_tne_hdr[i]["url"].indexOf(".aspx")!=-1){
                //arr_tne_hdr[i]["url"] = arr_tne_hdr[i]["url"];
                //arr_tne_hdr[i]["url"] = local_path + arr_tne_hdr[i]["url"];
            }else{
                //arr_tne_hdr[i]["url"] = arr_tne_hdr[i]["url"];
                //arr_tne_hdr[i]["url"] = local_path + lang+ "/" +arr_tne_hdr[i]["url"];
            }
            if (self.location.href.indexOf(ref_url)!=-1){
                print_tab_Curr(arr_tne_hdr[i]["url"], arr_tne_hdr[i]["name"]);
            }else{
                print_tab_Norm(arr_tne_hdr[i]["url"], arr_tne_hdr[i]["name"]);
            }
        }else{
                print_tab_blank();
        }
    }
}

if (self.location.href.indexOf("/cmg_")!=-1){
    for (i=0; i<arr_cmg_hdr.length; i++){
        if (arr_cmg_hdr[i]["name"]!=""){
            ref_url = url_replace(arr_cmg_hdr[i]["url"]);
            if (arr_cmg_hdr[i]["url"].indexOf(".aspx")!=-1){
                //arr_cmg_hdr[i]["url"] = local_path + arr_cmg_hdr[i]["url"];
            }else{
                //arr_cmg_hdr[i]["url"] = local_path + lang+ "/" +arr_cmg_hdr[i]["url"];
            }
            if (self.location.href.indexOf(ref_url)!=-1){
                print_tab_Curr(arr_cmg_hdr[i]["url"], arr_cmg_hdr[i]["name"]);
            }else{
                print_tab_Norm(arr_cmg_hdr[i]["url"], arr_cmg_hdr[i]["name"]);
            }
        }else{
                print_tab_blank();
        }
    }
}

if (self.location.href.indexOf("/tby_")!=-1){
    for (i=0; i<arr_tby_hdr.length; i++){
        if (arr_tby_hdr[i]["name"]!=""){
            ref_url = url_replace(arr_tby_hdr[i]["url"]);
            if (arr_tby_hdr[i]["url"].indexOf(".aspx")!=-1){
                //arr_tby_hdr[i]["url"] = local_path + arr_tby_hdr[i]["url"];
            }else{
                //arr_tby_hdr[i]["url"] = local_path + lang+ "/" +arr_tby_hdr[i]["url"];
            }
            if (self.location.href.indexOf(ref_url)!=-1){
                print_tab_Curr(arr_tby_hdr[i]["url"], arr_tby_hdr[i]["name"]);
            }else{
                print_tab_Norm(arr_tby_hdr[i]["url"], arr_tby_hdr[i]["name"]);
            }
        }else{
                print_tab_blank();
        }
    }
}

if (self.location.href.indexOf("/emp_intro")!=-1){
    for (i=0; i<arr_emp_hdr.length; i++){
        if (arr_emp_hdr[i]["name"]!=""){
            ref_url = url_replace(arr_emp_hdr[i]["url"]);
            if (arr_emp_hdr[i]["url"].indexOf(".aspx")!=-1){
                //arr_emp_hdr[i]["url"] = local_path + arr_emp_hdr[i]["url"];
            }else{
                //arr_emp_hdr[i]["url"] = local_path + lang+ "/" +arr_emp_hdr[i]["url"];
            }
            if (self.location.href.indexOf(ref_url)!=-1){
                print_tab_Curr(arr_emp_hdr[i]["url"], arr_emp_hdr[i]["name"]);
            }else{
                print_tab_Norm(arr_emp_hdr[i]["url"], arr_emp_hdr[i]["name"]);
            }
        }else{
                print_tab_blank();
        }
    }
}

if (self.location.href.indexOf("/emp_wpa")!=-1 || (self.location.href.indexOf("/emp_download_ypyt")!=-1 && self.location.host == yptp_url)){
    for (i=0; i<arr_ewpa_hdr.length; i++){
        if (arr_ewpa_hdr[i]["name"]!=""){
            ref_url = url_replace(arr_ewpa_hdr[i]["url"]);
            if (arr_ewpa_hdr[i]["url"].indexOf(".aspx")!=-1){
                //arr_ewpa_hdr[i]["url"] = local_path + arr_ewpa_hdr[i]["url"];
            }else{
                //arr_ewpa_hdr[i]["url"] = local_path + lang+ "/" +arr_ewpa_hdr[i]["url"];
            }
            if (self.location.href.indexOf(ref_url)!=-1){
                print_tab_Curr(arr_ewpa_hdr[i]["url"], arr_ewpa_hdr[i]["name"]);
            }else{
                print_tab_Norm(arr_ewpa_hdr[i]["url"], arr_ewpa_hdr[i]["name"]);
            }
        }else{
                print_tab_blank();
        }
    }
}

if (self.location.href.indexOf("/emp_ojt")!=-1 || (self.location.href.indexOf("/emp_download_ypyt")!=-1 && self.location.host == ywets_url)){
    for (i=0; i<arr_eojt_hdr.length; i++){
        if (arr_eojt_hdr[i]["name"]!=""){
            ref_url = url_replace(arr_eojt_hdr[i]["url"]);
            if (arr_eojt_hdr[i]["url"].indexOf(".aspx")!=-1){
                //arr_eojt_hdr[i]["url"] = local_path + arr_eojt_hdr[i]["url"];
            }else{
                //arr_eojt_hdr[i]["url"] = local_path + lang+ "/" +arr_eojt_hdr[i]["url"];
            }
            if (self.location.href.indexOf(ref_url)!=-1){
                print_tab_Curr(arr_eojt_hdr[i]["url"], arr_eojt_hdr[i]["name"]);
            }else{
                print_tab_Norm(arr_eojt_hdr[i]["url"], arr_eojt_hdr[i]["name"]);
            }
        }else{
                print_tab_blank();
        }
    }
}

if (self.location.href.indexOf("/fil_")!=-1){
    for (i=0; i<arr_fil_hdr.length; i++){
        if (arr_fil_hdr[i]["name"]!=""){
            ref_url = url_replace(arr_fil_hdr[i]["url"]);
            if (arr_fil_hdr[i]["url"].indexOf(".aspx")!=-1){
                //arr_fil_hdr[i]["url"] = local_path + arr_fil_hdr[i]["url"];
            }else{
                //arr_fil_hdr[i]["url"] = local_path + lang+ "/" +arr_fil_hdr[i]["url"];
            }
            if (self.location.href.indexOf(ref_url)!=-1){
                print_tab_Curr(arr_fil_hdr[i]["url"], arr_fil_hdr[i]["name"]);
            }else{
                print_tab_Norm(arr_fil_hdr[i]["url"], arr_fil_hdr[i]["name"]);
            }
        }else{
                print_tab_blank();
        }
    }
}
if (self.location.href.indexOf("/dbf_")!=-1){
    for (i=0; i<arr_dbf_hdr.length; i++){
        if (arr_dbf_hdr[i]["name"]!=""){
            ref_url = url_replace(arr_dbf_hdr[i]["url"]);
            if (arr_dbf_hdr[i]["url"].indexOf(".aspx")!=-1){
                //arr_dbf_hdr[i]["url"] = local_path + arr_dbf_hdr[i]["url"];
            }else{
                //arr_dbf_hdr[i]["url"] = local_path + lang+ "/" +arr_dbf_hdr[i]["url"];
            }
            if (self.location.href.indexOf(ref_url)!=-1){
                print_tab_Curr(arr_dbf_hdr[i]["url"], arr_dbf_hdr[i]["name"]);
            }else{
                print_tab_Norm(arr_dbf_hdr[i]["url"], arr_dbf_hdr[i]["name"]);
            }
        }else{
                print_tab_blank();
        }
    }
}
if (self.location.href.indexOf("/mtr_")!=-1){
    for (i=0; i<arr_mtr_hdr.length; i++){
        if (arr_mtr_hdr[i]["name"]!=""){
            ref_url = url_replace(arr_mtr_hdr[i]["url"]);
            if (arr_mtr_hdr[i]["url"].indexOf(".aspx")!=-1){
                //arr_mtr_hdr[i]["url"] = local_path + arr_mtr_hdr[i]["url"];
            }else{
                //arr_mtr_hdr[i]["url"] = local_path + lang+ "/" +arr_mtr_hdr[i]["url"];
            }
            if (self.location.href.indexOf(ref_url)!=-1){
                print_tab_Curr(arr_mtr_hdr[i]["url"], arr_mtr_hdr[i]["name"]);
            }else{
                print_tab_Norm(arr_mtr_hdr[i]["url"], arr_mtr_hdr[i]["name"]);
            }
        }else{
                print_tab_blank();
        }
    }
}
if (self.location.href.indexOf("/wpa_")!=-1){
    for (i=0; i<arr_wpa_hdr.length; i++){
        if (arr_wpa_hdr[i]["name"]!=""){
            ref_url = url_replace(arr_wpa_hdr[i]["url"]);
            if (arr_wpa_hdr[i]["url"].indexOf(".aspx")!=-1){
                //arr_wpa_hdr[i]["url"] = local_path + arr_wpa_hdr[i]["url"];
            }else{
                //arr_wpa_hdr[i]["url"] = local_path + lang+ "/" +arr_wpa_hdr[i]["url"];
            }
            if (self.location.href.indexOf(ref_url)!=-1){
                print_tab_Curr(arr_wpa_hdr[i]["url"], arr_wpa_hdr[i]["name"]);
            }else{
                print_tab_Norm(arr_wpa_hdr[i]["url"], arr_wpa_hdr[i]["name"]);
            }
        }else{
                print_tab_blank();
        }
    }
}

if (self.location.href.indexOf("/course_")!=-1){
    for (i=0; i<arr_cou_hdr.length; i++){
        if (arr_cou_hdr[i]["name"]!=""){
            ref_url = url_replace(arr_cou_hdr[i]["url"]);
            if (arr_cou_hdr[i]["url"].indexOf(".aspx")!=-1){
                //arr_cou_hdr[i]["url"] = local_path + arr_cou_hdr[i]["url"];
            }else{
                //arr_cou_hdr[i]["url"] = local_path + lang+ "/" +arr_cou_hdr[i]["url"];
            }
            if (self.location.href.indexOf(ref_url)!=-1){
                print_tab_Curr(arr_cou_hdr[i]["url"], arr_cou_hdr[i]["name"]);
            }else{
                print_tab_Norm(arr_cou_hdr[i]["url"], arr_cou_hdr[i]["name"]);
            }
        }else{
                print_tab_blank();
        }
    }
}

document.write('        </tr>');
document.write('      </table>');
document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#43b9ce">');
document.write('  <tr>');
document.write('    <td><img src="'+local_path+'images/spacer.gif" width="10" height="5"></td>')
document.write('  </tr>')
document.write('</table>');
}

if(typeof def_style != 'undefined'){
  switch (def_style) {
    case 'ypyt':
      print_subhead_new();
      break;

    case 'ywets':
      print_subhead();
      break;

    default:
      print_subhead();
  }
}else{
  print_subhead();
}
