// B : Load-TIME-Stopper
function MSL_Seconds_GONE() { var MSL_Current_SECONDS_Obj=new Date(); return MSL_Current_SECONDS_Obj.getTime(); } // end function
var MSL_Start_LOAD_Time_Int=MSL_Seconds_GONE(); // COUNTER Load-TIME : START-Wert in Sekunden seit BASIS-Wert
// E : Load-TIME-Stopper
// RELATION-Funktionen : ILLU-Pics TO MARKETING-Highlight-BUTTON (Bezug zu BUTTON-Bar)
function MSL_Highlight_button_PIC(MSL_id_Str) {
  document.getElementById(MSL_id_Str).style.backgroundImage='url(images/091124_marketing-menu-button-hover.png)';
} // end function
function MSL_Reset_button_PIC(MSL_id_Str) {
  document.getElementById(MSL_id_Str).style.backgroundImage=''; //ehemals : 'url(images/091124_marketing-menu-button.png)'; 
  // ehemals : document.getElementById('m-button-stu').id='m-button-stu';
} // end function
function MSL_Exchange_Basket_State_VAR() {
  MSL_Basket_FULL_Bol=MSL_Basket_FULL_Bol?false:true;
} // end function
// END : RELATION-Funktionen : ILLU-Pics TO MARKETING-Highlight-BUTTON (Bezug zu BUTTON-Bar)
// RELATION-Funktionen : MARKETING-Button TO ILLU-Blending-PIC-s (Bezug zu ILLU-Bar)
function MSL_Highlight_illu_PIC(MSL_id_Str) {
  document.getElementById(MSL_id_Str).style.opacity=1; // FF
  document.getElementById(MSL_id_Str).style.filter='alpha(opacity=100)'; // MSIE
} // end function
function MSL_Reset_illu_PIC(MSL_id_Str) {
  if (document.all) document.getElementById(MSL_id_Str).style.removeAttribute('filter', 'false'); // MSIE
  document.getElementById(MSL_id_Str).style.opacity=''; // FF
  // ehemals UR-Zustand PIC : document.getElementById('illu-stu').style.opacity=.7; document.getElementById('illu-stu').style.filter='alpha(opacity=70)'; document.getElementById('illu-stu').id='illu-stu';
} // end function
// END : RELATION-Funktionen : MARKETING-Button TO ILLU-Blending-PIC-s (Bezug zu ILLU-Bar)

// EIN- oder AUS-BLENDEN : UNTER-Ebenen-DIV (statische STRUKTUR)
function MSL_Set_DIV_Status() {
  if (window.location.search!='' && window.location.search.search(/menu\=DL/)!=-1) {
    // alert(window.location.search+':'+window.location.search.search(/menu\=DL/));
    document.getElementById('u-menu').style.display='block';
  } // end if
  else document.getElementById('u-menu').style.display='none';
} // end function

// EIN-Blenden : Zoom-BLOCK zu VORSCHAU-Bild
function MSL_Zoom_IN(MSL_Obj) {
  // ACHTUNG : CSS setzt / behandelt NUR feste STATI

  // TEST-Show WERTE (IN style ODER css) : alert(MSL_Obj.width+':'+MSL_Obj.height);
  // ONLY a ACTIVATION of Dimensions (IN style) WITH :
  // 	a) MSIE+FF = ONLY if STYLE-in-TAG (width+height) : 
  MSL_Obj.style.width=null; MSL_Obj.style.height=null; // NOT working by width+height via CSS-Datei
  // ONLY a ACTIVATION of Dimensions (IN style) WITH :
  // 	a) NUR MSIE-Syntax : MSL_Obj.style.removeAttribute("width", false); MSL_Obj.style.removeAttribute("height", false); // false = KEINE ! Beachtung G-K-Schreibung
  // NOT a ACTIVATION of Dimensions (IN style ODER css) WITH :
  // 	a) MSIE+FF : MSL_Obj.removeAttribute("width"); MSL_Obj.removeAttribute("height");

  // TEST-Show WERTE (IN style ODER css) : alert(MSL_Obj.width+':'+MSL_Obj.height);

  MSL_Obj.style.border='solid #002e67 1px';
  // ACTION : RE-hide LUPE
  MSL_Obj.style.opacity=1.0; // FF
  MSL_Obj.style.filter='alpha(opacity='+100+')'; // MSIE

  // alert(MSL_Obj.parentNode.nodeName+':'+MSL_Obj.parentNode.title+':'+MSL_Obj.parentNode.style.zIndex);
  // MSL_Obj.parentNode.style.zIndex=10; // old TEST
  MSL_Obj.parentNode.parentNode.style.zIndex=10;
  // alert(MSL_Obj.parentNode.nodeName+':'+MSL_Obj.parentNode.title+':'+MSL_Obj.parentNode.style.zIndex);

  // alert(MSL_Obj.parentNode.lastChild.nodeName);
  if (MSL_Obj.parentNode.lastChild.nodeName.toUpperCase()=='P') {
    MSL_Obj.parentNode.style.width=(MSL_Obj.width+2)+'px'; // only FOR msie : p-Tag IN parent-DIV = LIKE img-WIDTH
    MSL_Obj.parentNode.lastChild.style.display='block';
  } // end if
} // end function

// AUS-Blenden : Zoom-BLOCK zu VORSCHAU-Bild
function MSL_Zoom_OUT(MSL_Obj) {
  MSL_Obj.style.width='20px'; MSL_Obj.style.height='20px';
  MSL_Obj.style.border='';
  // ACTION : RE-show LUPE
  MSL_Obj.style.opacity=0.1; // FF
  MSL_Obj.style.filter='alpha(opacity='+10+')'; // MSIE

  // MSL_Obj.parentNode.style.zIndex=1; // old TEST
  MSL_Obj.parentNode.parentNode.style.zIndex=1;

  if (MSL_Obj.parentNode.lastChild.nodeName.toUpperCase()=='P') MSL_Obj.parentNode.lastChild.style.display='none';
} // end function

// EIN-Blenden : Detail-BLOCK zu VORSCHAU-Text
function MSL_Detail_DIV_Show(MSL_DIV_Id_Str) {
  var b=document.getElementById(MSL_DIV_Id_Str);
  if (b.style.display=='block') {
    b.style.display='none';
	this.focus();
  } // end if
  else {
    b.style.display='block'; 
    b.focus();
  } // end else
} // end function

// BASKET-Funktionen : Inhalt-ANZEIGE
var MSL_Artikel_Anzahl_Int=0, MSL_Artikel_Summe_Int=0;
var MSL_Basket_FULL_Bol=false; // Basket-STATE-ID =INIT-Standard =NO =FALSE

function MSL_Show_Basket_PIC() {
  document.getElementById('basket-illu-text').style.display='none';
  document.getElementById('basket-illu-pic').style.display='block';
} // end function
function MSL_Show_Basket_Inhalt() {
  var MSL_Basket_EMPTY_Text_Str='Im Warenkorb befinden sich:<br><b>keine</b> Artikel.<br>Der Warenkorb ist <b>leer</b>.';
  var MSL_Basket_FULL_Text_Str='Im Warenkorb befinden sich:<br><b>'+MSL_Artikel_Anzahl_Int+'</b> Artikel: <b>'+MSL_Artikel_Summe_Int+' EUR</b><br>zzgl. MwSt., inkl. Versand-<br>kosten (gem. Warenwert)'; // 'Im Warenkorb befinden sich:<br><b>20</b> Artikel: <b>3000,00 EUR</b><br>zzgl. MwSt.<br>inkl. Versandkosten';
  // alert(document.getElementById('basket-illu-text').firstChild.innerHTML); // ehemals : .nodeValue ODER .nodeName
  document.getElementById('basket-illu-text').firstChild.innerHTML=MSL_Basket_FULL_Bol?MSL_Basket_FULL_Text_Str:MSL_Basket_EMPTY_Text_Str;
  document.getElementById('m-button-basket').innerHTML=MSL_Basket_FULL_Bol?'Ihr Warenkorb':'Zum Warenkorb';

  document.getElementById('basket-illu-pic').style.display='none';
  document.getElementById('basket-illu-text').style.display='block';
} // end function
// END : BASKET-Funktionen : Inhalt-ANZEIGE

// BASKET-Funktionen : Set-LINK
function MSL_Check_Basket_FORM_Active() { // ACHTUNG : order-FORM-Index = suche-FORM-Index+1
  return (document.forms[1] && document.forms[1].name!='Kontakt' || document.forms[2] && document.forms[2].name=='tobasket');
} // end function

function MSL_Set_Warenkorb_Links() { // NICHT : bei Warenkorb + ORDER-Seiten !
  var MSL_Basket_DEFAULT_Replace_LINK_Str="javascript:MSL_GoTo_Page('change-warenkorb');"; // BEI onclick = #;
  var MSL_Basket_DEFAULT_None_LINK_Str='#';

  // TEIL 1 = REPLACE alle BASKET-Links (HREF-Tag) mit NAME-Kennung
  var MSL_Basket_Link_DEFAULT_Name_Str='Call-Basket'; // Kennung MARKED-Basket-LINK
  for (bsk=0; bsk < document.getElementsByName(MSL_Basket_Link_DEFAULT_Name_Str).length; bsk++)
    document.getElementsByName(MSL_Basket_Link_DEFAULT_Name_Str)[bsk].href=MSL_Basket_DEFAULT_Replace_LINK_Str;

  // BELEGEN onclick = "MSL_GoTo_Page('change-warenkorb');" ODER provisorisch : href = "javascript: ..." !
  // TEIL 2 = Alle BASKET-Links mit URL-Kennung
  var MSL_Basket_Link_DEFAULT_URL_Str='call-warenkorb.html'; // Kennung SIMPLE-Basket-LINK
  var MSL_Basket_Link_Inner_Reg_Exp_AS_Str=MSL_Basket_Link_DEFAULT_URL_Str.replace(/\./, "\\."); // Relevante Zeichen ersetzen : einfacher Punkt ! // alert(MSL_Basket_Link_Inner_Reg_Exp_AS_Str);
  var MSL_Basket_Link_Search_Reg_Exp=new RegExp(MSL_Basket_Link_Inner_Reg_Exp_AS_Str, "i"); // alert(MSL_Basket_Link_Search_Reg_Exp);

  for (bsk=0; bsk < document.getElementsByTagName("a").length; bsk++)
    if ( document.getElementsByTagName("a")[bsk].href.search(MSL_Basket_Link_Search_Reg_Exp) >= 0 ) {
	  if (MSL_Basket_Valid_Int) // ACHTUNG : (NUR) wenn MSL_CHECK_Session_Active == true ( siehe main-menu-INC ) !
	    if (MSL_Check_Basket_FORM_Active()) {
	      document.getElementsByTagName("a")[bsk].href=MSL_Basket_DEFAULT_Replace_LINK_Str; // set LINK =active JS-Cal TO Basket
		  // EXTRA wegen BASKET aktive = menu ENTRY magenta-HG = Basket VALID + Basket-FORM active
		  document.getElementsByTagName("a")[bsk].style.color='#F0037F'; // active LINK =Magenta-COLOR ! ehemals v32 : '#ffffff';
		  // ehemals v32 : AUCH set BG : document.getElementsByTagName("a")[bsk].style.backgroundColor ='#F0037F'; // Magenta-COLOR

		  document.getElementsByTagName("a")[bsk].title='Hier gelangen Sie direkt zum Warenkorb.';
		} // end if
		else {
		  document.getElementsByTagName("a")[bsk].href="javascript:window.location.href='warenkorb.php'+window.location.search;";
		} // end else
	  else {
	    document.getElementsByTagName("a")[bsk].href=MSL_Basket_DEFAULT_None_LINK_Str;
		document.getElementsByTagName("a")[bsk].style.color='#a3a3a3'; // passive LINK =Gray-COLOR ! 

		document.getElementsByTagName("a")[bsk].title='Es wurden noch keine Artikel in den Warenkorb gelegt, daher Aufruf nicht möglich !';
	  } // end else
    } // end if
} // end function
// END : BASKET-Funktionen : Set-LINK

function MSL_Cookie_Check_Info() {
  var MSL_Cookie_INFO_Str='Sie haben leider keine Cookies aktiviert.\n\nBei einer Bestellung ist dies aus Sicherheitsgründen angeraten,\num Ihre Bestellung sicherer vor Manipulationen zu machen.\n\nDies geschieht durch die Verwendung eines dafür oft  gebräuchlichen nur temporären Sitzungs-<Cookies>, welches nach Ihrer Bestellung wieder gelöscht wird\nund daher keiner weiteren Speicherung oder Bearbeitung zugeführt werden kann.\n\nAus diesem Grund ist es für Sie vollkommen unbedenklich, gibt Ihnen aber ein mehr an Sicherheit.\n\nBei Fragen wenden Sie sich bitte vertrauensvoll an uns. Wir geben gern weitere Auskünfte.';
  if (!navigator.cookieEnabled || navigator.cookieEnabled==false) alert(MSL_Cookie_INFO_Str); // document.write('Leider keine Cookies');
} // end function
if (0) MSL_Cookie_Check_Info(); // TEST