var _POPUP_FEATURES = 	 ', toolbar=no'
			+', location=no'
			+', directories=no'
			+', status=no'
			+', menubar=no'
			+', scrollbars=yes'
			+', resizable=yes'
			+', left=22'
			+', top=22 ';

function raw_popup(url, target, width, height, features) {
	var bla;
	// pops up a window containing url optionally named target, optionally having features
	if (features === bla) features = _POPUP_FEATURES;
	if (target === bla) target   = '_blank';
	var theWindow = window.open(url, target, ' width=' + width + ', height=' + height + features);
	theWindow.focus();
	return theWindow;
}

function openWindow(src, width, height, features) {
	// to be used in an html event handler as in: <a href="..." onclick="link_popup(this,...)" ...
	// pops up a window grabbing the url from the event source's href
	return raw_popup(src.getAttribute('href'), src.getAttribute('target') || '_blank', width, height, features);
}

function RedirectMenuTo(dropdownlist) {
    var selectedIndex = dropdownlist.selectedIndex;
    var selectedValue = dropdownlist.options[selectedIndex].value;

    if (selectedValue == "/profil/profil_back_frameset.asp") {
        window.open(selectedValue, "ProfileBackgroundWin", 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=660, height=578, left=22, top=22');
        return false;
    }
    else {
        top.location.href = selectedValue;
    }

    return true;
}