// Funktionen zum Highlighten von Menues
function menu_aktive (menu1) {
  if (parent.frames[0]) {
    parent.blex_top.document.getElementById(menu1).style.color='black';
	} else {
	  document.getElementById(menu1).style.color='black';
	}
}

function menu_inaktive (menu1) {
  if (parent.frames[0]) {
    parent.blex_top.document.getElementById(menu1).style.color='';
	} else {
	  document.getElementById(menu1).style.color='';
	}
}


// Functionen zum Oeffnen von Hilfsfenstern
function get_x(val) {
  if(window.screenX) {
    return window.screenX+val+220;
  } else {
    return window.screenLeft+val;
  }
}
function get_y(val) {
  if(window.screenY) {
    return window.screenY+val+205;
  } else {
    return window.screenTop+val;
  }
}
function show_window(url,width,height,x,y) {
  F1=window.open(url,'format','height='+height+',width='+width+',left='+get_x(x)+',top='+get_x(y)+',status=yes,toolbar=no,scrollbars=yes,menubar=no,location=no,resizable=yes');
  F1.focus();
}

function sm_reset() {
  if (location.href.indexOf("?") > 0) {
	  location.href+='&clear=1';
	} else {
	  location.href+='?clear=1';
	}
}

function sm_add_product(val) {
  if (parent.blex_search.document.sm.search) {
	  parent.blex_search.document.sm.search.value=val;
	} else if (parent.blex_search.document.sm.product) {
	  parent.blex_search.document.sm.product.value=val;
	}
}