
window.location.href.match(/(http:\/\/.*?\..*?\.com\/).*/)[1];
var baseUrl = RegExp.$1;
var p7tbma=new Array();
var p7tbmt=new Array();
var inOutCount = 0;
var defaultTab;
function P7_initTBM(){ //v1.0.2 by PVII-www.projectseven.com
	//define over and down image suffix
	var Iv = "_f2";
	var Id = "_f3";
	var i,j,x,k,d,nV,tB,tbs,iM,im,ts,tA,sA,sL,nA=new Array();
	//Get the active tab/submenu item
	var urlParts = window.location.href.split(/\/+/);
	var urlTabName, tabId, tabUrlParts, tabName;
	if ((urlParts.length > 2) && (urlParts[2] != '')) { /i;
	k=-1,kk=-1;
	tM=document.getElementById('p7TBM');
	tA=tM.getElementsByTagName("A");
	for(j=0;j<tA.length;j++){
		aU=tA[j].href.replace(r1,'');
		if(op>0){
			if(tA[j].href==wH||aU==wH||aU + "/" == wH||(wH.indexOf(aU) > -1 && aU != baseUrl)){
				k=j;
				kk=-1;
				break;
			}
		}
		if(op==2){
			if(tA[j].firstChild){
				if(tA[j].firstChild.nodeValue==mt[1]){
					kk=j;
				}
			}
		}
		if(op==3 && tA[j].href.indexOf(mt[1])>-1){
			kk=j;
		}
		if(op==4){
			for(x=1;x<mt.length;x+=2){
				if(wH.indexOf(mt[x])>-1){
					if(tA[j].firstChild&&tA[j].firstChild.nodeValue){
						if(tA[j].firstChild.nodeValue==mt[x+1]){
							kk=j;
						}
					}
				}
			}
		}
	}
	k=(kk>k)?kk:k;
	if(k>-1){
		a=false;
		if(!tA[k].hasIm&&!tA[k].isRoot){
			cl=tA[k].className;
			tA[k].className=(cl&&cl.length>0)?cl+" p7TBMmark":"p7TBMmark";
		}
		pp=tA[k].parentNode;
		while(pp){
			if(pp.id&&pp.id=='p7TBMroot'){
				a=tA[k];
				break;
			}
			if(pp.id&&pp.id.indexOf('p7TBMsub')>-1){
				nd='p7TBMt'+pp.id.replace('p7TBMsub','');
				a=document.getElementById(nd);
				break;
			}
			pp=pp.parentNode;
		}
		if(a){
			P7_TBMdown(a);
		}
	}
}
