/* utf8 marker ö */

/*+******************************************************************
 * Module / Library: CM2
 * File:  $RCSfile: cm_js_viewuser.js,v $
 * $Revision: 1.4 $
 * $State: Exp $
 * ---------------------------------------------------------------- *
 * Copyright (c) 2002 by                                            *
 * InterConcept GmbH                                                *
 * www.interconcept.de                                              *
 ********************************************************************
 * Purpose:
 * $Locker:  $
 * ----------------------------------------------------------------
 * History
 *  $Log: cm_js_viewuser.js,v $
 *  Revision 1.4  2007/06/21 11:08:33  johannes
 *  changes for utf8 support, added utf8 marker
 *
 *  Revision 1.3  2005/11/28 07:56:08  jimmy
 *  after code improvements
 *
 * ---------------------------------------------------------------- *
 * Function list
 *
 * -----------------------------------------
 * LOCAL functions  - should not be called from extenal
 * -----------------------------------------
 *
 * -----------------------------------------
 * IMPLEMENTATION INTERFACE
 * -----------------------------------------
 * usefull functions
 * -----------------------------------------
 *
 * -----------------------------------------
 * THE IMPLEMENTATION
 * -----------------------------------------
 * common part:
 * -----------------------------------------
 *
 *****************************************************************+*/

/*+**************************************************************** *
 * 
 *  PROCEDURES FOR SEARCH CEs
 *
 * **************************************************************** */

var cmSeaLevelSelect = new Array();
var cmSeaLevelSelectCount = 0;

/*+---------------------------------------------------------------- *
 * function cmSea_AddLevelSelect()
 * ---------------------------------------------------------------- *
 * Purpose: Define one new level for a select
 * Parameters:  FrmLevel, 
 *              FrmName
 * returns: 
 * ----------------------------------------------------------------+*/
function cmSea_AddLevelSelect(FrmLevel, FrmName){
	cmSeaLevelSelect[FrmLevel] = new Array(FrmName);
}

/*+---------------------------------------------------------------- *
 * function cmSea_ResetLevelSelect()
 * ---------------------------------------------------------------- *
 * Purpose: Define one new level for a select
 * Parameters:  CurrForm, 
 *              FrmLevel, 
 *              FrmName, 
 *              FrmTplId
 * returns: 
 * ----------------------------------------------------------------+*/
function cmSea_ResetLevelSelect(CurrForm, FrmLevel, FrmName, FrmTplId){
    //set the submited level
    if(CurrForm.elements[FrmName]){
        CurrForm.elements["cmlevel_" + FrmTplId].value = FrmLevel;
    }

	for(var i=0; i < cmSeaLevelSelect.length; i++){
		if(cmSeaLevelSelect[i] && (i > FrmLevel)){
			//reset the select
			CurrForm.elements[cmSeaLevelSelect[i]].selectedIndex = -1;
		}
	}
}


/*+---------------------------------------------------------------- *
 * function cmSea_ChangeStyle()
 * ---------------------------------------------------------------- *
 * Purpose: Change styles from defined objects
 * Parameters:  ElementID   =>  Element to be changed 
 *              ClaseName   =>  New style of the element
 * returns: 
 * ----------------------------------------------------------------+*/
function cmSea_ChangeStyle(ElementID, ClaseName){
    var Target;
    Target = document.getElementById(ElementID);

    if(Target != null){
        Target.className = ClaseName;
    }
}        




