function RegisterNamespaces(){
for(var i=0;i<arguments.length;i++){
var p=arguments[i].split("."),w=window;
for(var j=0;j<p.length;j++){
if(!w[p[j]]){
w[p[j]]=new Object();
}
w=w[p[j]];
}
}
}
RegisterNamespaces("Inpl.Navigation");
Inpl.Navigation=new function(){
var _4=this,timeout={},timein={},current={},clicked={},fn="Inpl.Navigation.";
this.Init=function(_5,_6){
try{
_6=_6||_5+"tabs";
fixOpera7(_5,_6);
var _7=-1,li=$(_5).getElementsByTagName("LI"),i,tabs=$(_6).getElementsByTagName("DIV"),f,g,a,k;
for(i=0;i<li.length;i++){
if(-1!=li[i].className.indexOf("selected")){
_7=i;
current[_5]=i;
break;
}
}
if(tabs[_7]){
if(tabs[_7].offsetHeight<10){
tabs[_7].innerHTML=tabs[_7].innerHTML+"&nbsp;";
}
if(tabs[_7].offsetHeight>10){
$(_6).style.height=tabs[_7].offsetHeight+"px";
}
}
for(i=0;i<li.length;i++){
clicked[_5]=-1;
a="\""+_5+"\",\""+_6+"\","+i+","+_7;
f=new Function(fn+"ToHide("+a+")");
g=new Function(fn+"Click("+a+")");
li[i].onmouseover=new Function(fn+"ToShow("+a+")");
li[i].onmouseout=f;
li[i].onclick=g;
if(tabs[i]){
tabs[i].onmouseover=new Function(fn+"Show("+a+")");
tabs[i].onmouseout=f;
a=tabs[i].getElementsByTagName("A");
for(k=0;k<a.length;k++){
a[k].onclick=g;
}
}
}
}
catch(e){
}
};
this.Click=function(_8,_9,i,_b){
if(!window.opera){
clicked[_8]=i;
var g=new Function(fn+"PageShow(\""+_8+"\",\""+_9+"\","+i+","+_b+")");
window.setTimeout(g,500);
window.onpageshow=g;
}
};
this.PageShow=function(_d,_e,i,_10){
try{
if(-1!=clicked[_d]){
clicked[_d]=-1;
_4.Hide(_d,_e,i,_10);
}
}
catch(e){
}
};
function fixOpera7(b,c){
if(window.opera&&-1!=navigator.userAgent.indexOf("Opera 7.")){
var ul,li,w=0,a=[b,c];
for(u in a){
ul=$(a[u]).getElementsByTagName("UL");
for(i=0;i<ul.length;i++){
li=ul[i].getElementsByTagName("LI");
for(k=0;k<li.length;k++){
w+=li[k].offsetWidth;
}
ul[i].style.width=(w?w+"px":"100%");
w=0;
}
}
}
}
this.ToShow=function(_14,_15,i,_17){
ClearHide(_14,i);
timein[_14+i]=window.setTimeout(fn+"Show(\""+_14+"\",\""+_15+"\","+i+","+_17+")",250);
};
this.Show=function(_18,_19,i,_1b){
try{
ClearHide(_18,i);
var li=$(_18).getElementsByTagName("LI")[i],tab=$(_19).getElementsByTagName("DIV")[i];
if(li&&-1==li.className.indexOf("selected")){
var oH=$(_19).offsetHeight;
if("undefined"!=typeof current[_18]){
_4.Hide(_18,_19,current[_18]);
}
li.className+=" "+(-1!=li.className.indexOf("first")?"first":"")+"selected";
if(tab&&-1==tab.className.indexOf("selected")){
tab.className+="selected";
}
if(current[_18]!=i&&tab&&tab.offsetHeight>oH&&-1==tab.className.indexOf("more")){
tab.className+=" more";
}
current[_18]=i;
}
}
catch(e){
}
};
this.ToHide=function(_1e,_1f,i,_21){
if((!ClearShow(_1e,i)||i==current[_1e])&&clicked[_1e]!=i){
timeout[_1e+i]=window.setTimeout(fn+"Hide(\""+_1e+"\",\""+_1f+"\","+i+","+_21+")",1000);
}
};
function ClearHide(_22,i){
if(timeout[_22+i]){
window.clearTimeout(timeout[_22+i]);
timeout[_22+i]=null;
}
}
function ClearShow(_24,i){
var r=false;
if(timein[_24+i]){
window.clearTimeout(timein[_24+i]);
timein[_24+i]=null;
r=true;
}
return r;
}
this.Hide=function(_27,_28,i,_2a){
try{
if(i!=_2a){
ClearHide(_27,i);
var li=$(_27).getElementsByTagName("LI")[i],tab=$(_28).getElementsByTagName("DIV")[i];
if(li){
li.className=li.className.replace(/[ ]*firstselected|[ ]*selected/g,"");
}
if(tab){
tab.className=tab.className.replace("selected","");
tab.className=tab.className.replace("more","");
}
if("undefined"!=typeof _2a){
_4.Show(_27,_28,_2a);
}
}
}
catch(e){
}
};
function $(n){
return document.getElementById(n);
}
};

