﻿function Navigator() {
	var path = window.location.href.toLowerCase();
	try {
		$("#MainNav > li").each(function() {
			$(this).attr("class", "tp");
			if (path.indexOf("dl100/") != -1 || path.indexOf("production/") != -1) {
				$("#li2").attr("class", "focus tp");
			}
			else if (path.indexOf("information/news") != -1) {
				$("#li3").attr("class", "focus tp");
			}
			else if ((path.indexOf("applications/") != -1 && path.indexOf("newslist.aspx") == -1) || path.indexOf("project/") != -1) {
				$("#li4").attr("class", "focus tp");
			}
			else if (path.indexOf("service/") != -1 || path.indexOf("survey/") != -1 || path.indexOf("leaveword/") != -1) {
				$("#li5").attr("class", "focus tp");
			}
			else if (path.indexOf("cooperate/condition.aspx") != -1) {
				$("#li6").attr("class", "focus tp");
			}
			else if (path.indexOf("about/aboutus.aspx") != -1) {
				$("#li7").attr("class", "focus tp");
			}
			else {
				$("#li1").attr("class", "focus tp");
			}
		});
	}
	catch (e)
    { }
}

function ShowSubMenu(obj) {
	if ($(obj).attr("id") != "li1") {
		$(".tags").hide();
		$(".secNav").each(function(o) {
			$(this).hide();
		});
		$(obj).find(".secNav").show();
	}
	else {
		$(".tags").show();
		$(".secNav").each(function(o) {
			$(this).hide();
		});
	}
}

