function MM_findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function Cor_setIT(){ 
 document.Cor_TAbOver="_over";
 document.Cor_TAbDown="_down";
 var dt=false;if(document.getElementsByTagName){dt=true;}if(document.Cor_TAbBar){return;}
 var i,k=-1,g,x,gg,tl,ts,ti,tm,tt,tsn,tu,el,args=Cor_setIT.arguments;
 Cor_TAbProp=new Array();for(i=0;i<args.length;i++){Cor_TAbProp[i]=args[i];}
 Cor_TAbIM=new Array();Cor_TAbSB=new Array();if(dt){tm=document.getElementsByTagName("IMG");
 }else{tm=document.images;}tm=document.images;tt=new Array();tt=tt.concat(tm);
 if(document.layers){for(i=0;i<document.layers.length;i++){ti=document.layers[i].document.images;
 if(ti){tt=tt.concat(ti);}for(x=0;x<document.layers[i].document.layers.length;x++){
 ti=document.layers[i].document.layers[x].document.images;if(ti){tt=tt.concat(ti);}}}tm=tt;}
 for(i=0;i<tm.length;i++){tl=tm[i].name; if(dt&&!tl){tl=tm[i].id;}
 if(tl && tl.indexOf("corTbim")==0){ts=tl.replace("corTbim","");
 tsn="corTbsub"+ts;k++;Cor_TAbIM[k]=tl;if((g=MM_findObj(tsn))!=null){Cor_TAbSB[k]=tsn;
 gg=(document.layers)?g:g.style;gg.visibility="hidden";}else{Cor_TAbSB[k]='N';}}}
 document.corTbswapd=new Array();document.corTbswapo=new Array();for(i=0;i<Cor_TAbIM.length;i++){
 g=MM_findObj(Cor_TAbIM[i]);gg=g.src;g.corTbim=g.src;tu=gg.lastIndexOf(".");
 g.corTbimo=gg.substring(0,tu)+document.Cor_TAbOver+gg.substring(tu,gg.length);
 g.corTbimd=gg.substring(0,tu)+document.Cor_TAbDown+gg.substring(tu,gg.length);
 if(Cor_TAbProp[2]>1){document.corTbswapo[i]=new Image();document.corTbswapo[i].src=g.corTbimo;}
 if(Cor_TAbProp[2]>0){if(Cor_TAbProp[2]==3){g.corTbimd=g.corTbimo;}document.corTbswapd[i]=new Image();
 }}if((g=MM_findObj('Cor_TAbH'))!=null){gg=(document.layers)?g:g.style;
 gg.visibility="hidden";}if(dt&&Cor_TAbProp[3]!='none'&&!window.opera){
 g=document.getElementsByTagName("A");for(i=0;i<g.length;i++){if(g[i].hasChildNodes()){el=g[i].firstChild;
 while (el){if(el.nodeType==3){gg=el.nodeValue;if(Cor_TAbProp[3]==gg.replace("\n","")){
 g[i].className=Cor_TAbProp[4];break;}}el=el.firstChild;}}}}document.Cor_TAbBar=true;
}

function cor_TriMM2(bu){ //v2.0 by PVII
 if(!document.Cor_TAbBar){return;}var i,g,d,dB=-1,tF=false,sF=false;
 for(i=0;i<Cor_TAbSB.length;i++){sF=false;if((g=MM_findObj(Cor_TAbSB[i]))!=null){g=MM_findObj(Cor_TAbSB[i]);
 gg=(document.layers)?g:g.style;sF=true;}d=MM_findObj(Cor_TAbIM[i]);if(Cor_TAbIM[i]==Cor_TAbProp[0]){
 dB=i;}if(Cor_TAbIM[i]==bu){tF=true;if(sF){gg.visibility="visible";}if(Cor_TAbProp[2]>0){
 if(i==dB){}else if (Cor_TAbProp[2]>1){}}if((g=MM_findObj('Cor_TAbH'))!=null){
 gg=(document.layers)?g:g.style;gg.visibility="visible";}}else{if(sF){gg.visibility="hidden";}
 if(Cor_TAbProp[2]>0){}}}if(!tF){if(dB>-1){d=MM_findObj(Cor_TAbIM[dB]);
 if((g=MM_findObj(Cor_TAbSB[dB]))!=null&&Cor_TAbProp[1]==0){gg=(document.layers)?g:g.style;
 gg.visibility="visible";}if(Cor_TAbProp[2]>0){}}
 if((g=MM_findObj('Cor_TAbH'))!=null){gg=(document.layers)?g:g.style;gg.visibility="hidden";}}
}
