// JavaScript Document
function Nv(p_id,p_img,p_ifcl,p_wscale,p_hscale,p_alpha,p_dlgcl){
	var thisobj=this;
	thisobj.cbt;
	thisobj.lastbt;
	thisobj.tout;
	thisobj.cont=document.getElementById(p_id);
	//alert(thisobj.frm.name);
	thisobj.isstop=false;
	thisobj.links=new Array();
	for(var i=0;i<thisobj.cont.childNodes.length;i++){
		if(thisobj.cont.childNodes[i].tagName.toLowerCase()=="a"){	
			if(!isIEM()){
				if(isNFVers(3.3)){
					//nothing	
				}else{
					if(thisobj.cont.childNodes[i].target=="_blank"){
						thisobj.cont.childNodes[i].href="javascript:nIF('"+thisobj.cont.childNodes[i].href+"','"+p_ifcl+"','"+String(p_wscale)+"','"+String(p_hscale)+"','"+String(p_alpha)+"','"+p_dlgcl+"');";
						thisobj.cont.childNodes[i].removeAttribute("target");
					}
				}
				if(Number(thisobj.cont.childNodes[i].id.substring(thisobj.cont.childNodes[i].id.length-1))>0){
					thisobj.links.push(new Bt(thisobj.cont.childNodes[i],p_img+"sb",thisobj));
				}else{
					thisobj.links.push(new Bt(thisobj.cont.childNodes[i],p_img,thisobj));
				}
				i++;
			}
		}
	}
	thisobj.btmover=function(p_bt){
		thisobj.showHideSub(p_bt);
	};
	thisobj.btmout=function(p_bt){		
		thisobj.lastbt=p_bt;
		thisobj.tout=window.setTimeout(thisobj.out,500);
	};
	thisobj.out=function(){
		for(var i=0;i<thisobj.links.length;i++){
			if(thisobj.isstop==false){
				if(thisobj.lastbt==thisobj.cbt){
					if(thisobj.links[i].sident>0){
						thisobj.links[i].setVisible(false);
					}
				}
			}else{
				break;	
			}
		}
		thisobj.resCont();
	};
	thisobj.btmdown=function(p_bt){
	};
	thisobj.btmup=function(p_bt){
		if(thisobj.frm!=null){
			thisobj.frm.focus();
		}
		for(var i=0;i<thisobj.links.length;i++){
			if(thisobj.links[i]!=p_bt){
				if(thisobj.links[i].img!=null){
					thisobj.links[i].img.src=thisobj.links[i].nsrc;
				}
			}
		}
	};
	thisobj.btmclick=function(p_bt){
		
	};
	thisobj.closeSubbt=function(p_bt){
		
	};
	thisobj.showHideSub=function(p_bt){
		thisobj.cbt=p_bt;
		if(thisobj.lastbt!=null){
			thisobj.isstop=true;
			window.clearTimeout(thisobj.tout);
			for(var i=0;i<thisobj.links.length;i++){
				if((thisobj.links[i].sident==thisobj.cbt.ident)||(thisobj.isParentoRoot(thisobj.links[i],thisobj.cbt))){
					thisobj.links[i].setVisible(true);	
				}else{
					if((thisobj.links[i].sident>0)&&(thisobj.links[i].sident!=thisobj.cbt.sident)){
						thisobj.links[i].setVisible(false);		
					}
				}
			}
		}else{
			for(var i=0;i<thisobj.links.length;i++){
				if((thisobj.links[i].sident==thisobj.cbt.ident)||((thisobj.links[i].sident==thisobj.cbt.sident)&&(thisobj.cbt.sident>0))){
					thisobj.links[i].setVisible(true);	
				}
			}
		}
		thisobj.resCont();
		thisobj.isstop=false;
	};
	thisobj.resCont=function(){
		var nwcw=0;
		var nwch=0;
		for(var i=0;i<thisobj.links.length;i++){
			if(thisobj.links[i].alink.style.display!="none"){
				var tmpw=Number(thisobj.links[i].alink.style.width.substring(0,thisobj.links[i].alink.style.width.length-2))+Number(thisobj.links[i].alink.style.left.substring(0,thisobj.links[i].alink.style.left.length-2));
				if(tmpw>nwcw){
					nwcw=tmpw;	
				}
				var tmph=Number(thisobj.links[i].alink.style.height.substring(0,thisobj.links[i].alink.style.height.length-2))+Number(thisobj.links[i].alink.style.top.substring(0,thisobj.links[i].alink.style.top.length-2));
				if(tmph>nwch){
					nwch=tmph;	
				}
			}
		}
		thisobj.cont.style.width=String(nwcw*1.2)+"px";
		thisobj.cont.style.height=String(nwch*1.2)+"px";
	};
	thisobj.isParentoRoot=function(p_bt,p_sub){		
		if(p_sub.sident==p_bt.ident){
			return true;	
		}
		var tmpident=p_sub.sident;
		while(tmpident>0){
			if((p_bt.ident==tmpident)||(p_bt.sident==tmpident)){
				return true;
			}
			for(i=0;i<thisobj.links.length;i++){
				if(thisobj.links[i].ident==tmpident){
					tmpident=thisobj.links[i].sident;
					break;
				}
			}
		}
		return false;
	};	
	thisobj.resCont();
}