/*
selectOptionByValue
parameter:
	   selectName
	   Name der Select-Box und Get-Variable
	   
	   qpValue
	   Wert der Select-Box und der Get-Variable
returns: 0
*/

function selectOptionByValue( selectName, qpValue ) {
        var selectBox = eval ( "document."+selectName );
        if ( selectBox != undefined ) {
                var found = false;
                var sLength = selectBox.length;
                var i = 0;
                while ( !found && ( i < sLength ) ) {
                        i++;
                        if ( selectBox.options[i] != undefined ) {
                                found = selectBox.options[i].value == qpValue;
                        }
                }
                if ( found ) {
                        selectBox.selectedIndex = i;
                }
        }
        return 0;
}

/*
setSelectedOptionByGetVariable
parameter: 
	   formName
	   Name des Formulars der Select-Box

	   selectName
	   Name der Select Box und Get-Variable
returns: 0
*/

function setSelectedOptionByGetVariable( formName, selectName ) {
        var qs = new Querystring();
        var qpValue = qs.get( selectName , "0");
        if (qpValue=="volumen") qpValue = qpValue+";d=1";
        if (qpValue=="erstnotierunghan") qpValue = qpValue+";b=han";
        if (qpValue=="erstnotierungham") qpValue = qpValue+";b=ham";
        selectOptionByValue( formName+"."+selectName, qpValue )
}

