var globalEffectInMotion= new Object();
globalEffectInMotion['searchbox']=0


function toggleSearch(openStatus){
    if(globalEffectInMotion['searchbox']==0){
        if(openStatus=='show'){
    	Element.show('tx_indexedsearchSword');
    	Element.show('searchSubmit');
    	}else if(openStatus=='appear'){
    	Effect.Appear('tx_indexedsearchSword', { duration: 0.5,beforeStart:SearchEffectStart,afterFinish:SearchEffectEnd });
    	Effect.Appear('searchSubmit', { duration: 0.5 });
    	}else if(openStatus=='fade'){
    	Effect.Fade('tx_indexedsearchSword', { duration: 0.5 });
    	Effect.Fade('searchSubmit', { duration: 0.5 });
        }else if(openStatus=='blinddown'){	    
    	Effect.blindDown('tx_indexedsearchSword', { duration: 0.5 });
    	Effect.blindDown('searchSubmit', { duration: 0.5 });
        }else if(openStatus=='slidedown'){        
    	Effect.slideDown('tx_indexedsearchSword', { duration: 0.5 });
    	Effect.slideDown('searchSubmit', { duration: 0.5 });
        }else{
    	Element.hide('tx_indexedsearchSword');
    	Element.hide('searchSubmit');
        }
    	if(Element.getStyle('tx_indexedsearchSword','display')!='none'){
    		Field.focus('tx_indexedsearchSword');
    	}
    }
}

function SearchEffectStart(){
globalEffectInMotion['searchbox']=1;
}
function SearchEffectEnd(){
globalEffectInMotion['searchbox']=0;
}

function ix_showBranch(thisEl){
	if(thisEl.id!='activeBranch'){
	var ulArr= $(thisEl).getElementsByTagName('ul');
	Element.setStyle(ulArr[0], {left:'auto'} );
	Element.show(ulArr[0]);
	if($('activeBranchInner')){
	    Element.setStyle('activeBranchInner', {left:'-999em'} );
	    Element.hide('activeBranchInner');
	}
}
}

function ix_hideBranch(thisEl){
	if(thisEl.id!='activeBranch'){
	var ulArr= $(thisEl).getElementsByTagName('ul');
	Element.setStyle(ulArr[0], {left:'-999em'} );
	Element.hide(ulArr[0]);
	if($('activeBranchInner')){
	    Element.setStyle('activeBranchInner', {left:'auto'} );
	    Element.show('activeBranchInner');
	}
}
}

function ix_setInvalidAttribute(thisID,attName, attValue){
    if($(thisID)){
        $(thisID).setAttribute(attName, attValue);
    }
}

