// JavaScript Document
/*URL地址处理*/
var str=window.location.href; 

if (str=="http://www.southgis.cn/bz" || str=="192.168.10.17/bz" || str=="http://localhost/")
{
	//alert(str)
	//alert(document.getElementById('home').className)
	//document.getElementById('home').className=document.getElementById('home').className+" menus_xz";
	document.getElementById('home').className="menus_xz_home";
	//alert(document.getElementById('home').className)
}
var tagsid=strRight(str,"tags=");

if (tagsid!="")
{
	document.getElementById(tagsid).className="menus_xz";
}


var cateid=strRight(str,"cate=");

if (cateid!="")
{
	document.getElementById("m_"+cateid).className="mlixz";
	//alert(document.getElementById("m_"+cateid).className)
}

var htmlid=strLeft(str,".html");

if (htmlid!="")
{
	if(document.getElementById('lmid').innerText!="")
	{
		var lmid=""
		lmid=document.getElementById("lmid").innerText.split(" ")[0]
		//alert(lmid)
		document.getElementById(lmid).className="menus_xz";
	}
	
	if(document.getElementById('qhid').innerText!="")
	{
		//alert(document.getElementById('qhid').innerText)
		var qhid=""
		qhid=document.getElementById("qhid").innerText.split(" ")[0]
		//alert(qhid)
		
		document.getElementById("m_"+qhid).className="mlixz";
	}
	//document.getElementById(tagsid).className="menus_xz";
	//document.getElementById(tagsid).className="menus_xz";
}







/*字符处理*/
function strRight(strSource,subStr)
	{ 
	if(strSource.indexOf(subStr)==-1)
		return "";
	else
		return strSource.substr(strSource.indexOf(subStr) + subStr.length);
	}

function strRightBack(strSource,subStr)
	{
	if(strSource.indexOf(subStr)==-1)
		return "";
	else
		return strSource.substr(strSource.lastIndexOf(subStr) + subStr.length );
	}

function strLeft(strSource,subStr)
	{
	if(strSource.indexOf(subStr)==-1)
		return "";
	else
		return strSource.substr(0,strSource.indexOf(subStr));
	}

function strLeftBack(strSource,subStr)
	{
	if(strSource.indexOf(subStr)==-1)
		return "";
	else
		return strSource.substr(0,strSource.lastIndexOf(subStr));
	}

function Instr(strSource,subStr)
	{
	if(strSource.indexOf(subStr)==-1)
		return false;
	else
		return true;
	}
