function findObj(theObj, theDoc)
{
  var p, i, foundObj;
  
  if(!theDoc) theDoc = document;
  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  {
    theDoc = parent.frames[theObj.substring(p+1)].document;
    theObj = theObj.substring(0,p);
  }
  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  for (i=0; !foundObj && i < theDoc.forms.length; i++) 
    foundObj = theDoc.forms[i][theObj];
  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
    foundObj = findObj(theObj,theDoc.layers[i].document);
  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  
 
  return foundObj;
}


function hideAllSub(){
	for(var i=0; i<10; i++){
		var mys=findObj('smenu'+i,document);
		if(mys != null){
			mys.style.visibility='hidden';
			}
		}
	}

function showSub(me){
	hideAllSub();
	var mys2=findObj('smenu'+me,document);
	//window.status=mys2;
	if(mys2 != null){
			mys2.style.visibility='visible';
			}
	}
	
function showkatsub(noo){
	
	for(var i=0; i<20; i++){
		var mykatsub=findObj('katsub'+i, document);
		if(mykatsub != null && i != noo){
			
			mykatsub.style.display='none';
			}
		}
		var myaktkatsub=findObj('katsub'+String(noo), document);
		
		myaktkatsub.style.display='block';
		
	}	
	
function showkat2sub(par,id){
	
	for(var i=0; i<20; i++){
		var mykatsub=findObj('kat'+par+'sub'+i, document);
		if(mykatsub != null)
			if(i != id){
			mykatsub.style.display='none';
			}else{
			mykatsub.style.display='block';
			}
		
		}
		
		
		
		
	}		
	
	
function showkat3sub(par,id1,id2){
	
	for(var i=0; i<20; i++){
		var mykatsub=findObj('kat'+par+'sub'+id1+'sub'+i, document);
		if(mykatsub != null)
			if(i != id2){
			mykatsub.style.display='none';
			}else{
			mykatsub.style.display='block';
			}
		
		}
		
	}			
