
/** Hilfetexte **/

hilfeDaten = new Array();
hilfeDaten['helptext'] = new Object();
hilfeDaten['helptext']['hl'] = '<strong>Schowek</strong>';
hilfeDaten['helptext']['text'] = 'Interesujące produkty możecie Państwo umieścić w schowku i zapytać o nie podczas wizyty u Autoryzowanego Dealera STIHL.';

hilfeDaten['vergleichtext'] = new Object();
hilfeDaten['vergleichtext']['hl'] = '<strong>Porównanie produktu</strong>';
hilfeDaten['vergleichtext']['text'] = 'Proszę zaznaczyć maksymalnie 5 produktów w celu dokonania ich porównania.';

hilfeDaten['cookies'] = new Object();
hilfeDaten['cookies']['hl'] = '<strong>Cookie</strong>';
hilfeDaten['cookies']['text'] = 'Cookies są małymi plikami zapisywanymi na dysku twardym Państwa komputera. Ułatwiają one nawigację i w znacznym stopniu zwiększają komfort użytkownika przy przeglądaniu danej strony internetowej.  Oczywiście możecie Państwo przeglądać nasze strony również bez cookies. Większość przeglądarek internetowych akceptuje cookies automatycznie. Istnieje możliwość odłączenia zapisu cookies na dysku twardym Państwa komputera. ';
		
function getScrollPos_help()
{
	var browser = getBrowser();

//    if (document.body.scrollTop != undefined && navigator.appName.indexOf("Explorer") != -1 ) {
   if (browser=="ie5") {
      var res = (document.compatMode != "CSS1Compat") ? document.body : document.documentElement;
      return {x : res.scrollLeft, y : res.scrollTop};
   }
   else {
		if (document.body.scrollTop != undefined && navigator.appName.indexOf("Explorer") != -1 ) {
		  var res = (document.compatMode != "CSS1Compat") ? document.body : document.documentElement;
		  return {x : res.scrollLeft, y : res.scrollTop};
	   }
	   else {
		  return {x : window.pageXOffset, y : window.pageYOffset};
	   }
   }
}



function showHelp_stihl(e,typ)
{
    var scr = getScrollPos_help();
	var cordX = e.clientX + scr.x;
	var cordY = e.clientY + scr.y;
	var correctorY = e.clientY + document.getElementById("help").offsetHeight + 20 - window.innerHeight;

    text = '<span class="hl">' + hilfeDaten[typ]['hl'] + '</span>';
    text = text + '<br />' + hilfeDaten[typ]['text'];

    document.getElementById("help").style.visibility = "hidden";
	document.getElementById("help").innerHTML = text;
	document.getElementById("help").style.position = "absolute";
	document.getElementById("help").style.left = ( cordX + 10 ) + "px";

	if ( correctorY > 0 ) {
		document.getElementById("help").style.top = ( cordY - correctorY ) + "px";
	} else {
		document.getElementById("help").style.top = ( cordY + 10 ) + "px";
	}
	document.getElementById("help").style.visibility = "visible";
}



function hideHelp_stihl()
{
	document.getElementById("help").style.visibility = "hidden";
	document.getElementById("help").innerHTML = "false";
}


getBrowser = function(){
	if(document.ids)x='nc4';
	else if( document.all && !document.getElementById )x='ie4';
	else if( window.opera && !document.createElement )x='op5';
	else if( window.opera && window.getComputedStyle )  {
			  if(document.createRange)x='op8';
				else if(window.navigate)x='op7.5';
								 else x='op7.2';                   }
	else if( window.opera && document.compatMode )x='op7';
	else if( window.opera && document.releaseEvents )x='op6';
	else if( document.contains && !window.opera )x='kq3';
	else if(window.pkcs11&&window.XML)x='f15';
	else if( window.getSelection && window.atob )x='nn7';
	else if( window.getSelection && !document.compatMode )x='nn6';
	else if( window.clipboardData && document.compatMode )x='ie6';
	else if( window.clipboardData ){x='ie5';
		 if( !document.createDocumentFragment ) x+='.5';
		 if( document.doctype && !window.print ) x+='m';}
	else if( document.getElementById && !document.all ) x='op4';
	else if( document.images && !document.all ) x='nn3';
	else if(document.clientWidth&&!window.RegExp)x='kq2';
	else x='???';
	return x;
}