
/** Hilfetexte **/

hilfeDaten = new Array();
hilfeDaten['helptext'] = new Object();
hilfeDaten['helptext']['hl'] = '<strong>Product list</strong>';
hilfeDaten['helptext']['text'] = 'You can add products that you like into a list which you can print off and take to your local STIHL Approved Dealer.   ';

hilfeDaten['vergleichtext'] = new Object();
hilfeDaten['vergleichtext']['hl'] = '<strong>Product comparison</strong>';
hilfeDaten['vergleichtext']['text'] = 'Select up to 5 products to compare.  ';

hilfeDaten['cookies'] = new Object();
hilfeDaten['cookies']['hl'] = '<strong>Cookie</strong>';
hilfeDaten['cookies']['text'] = 'A cookie is a small text file with information that is transmitted to your browser.  The file stores the name of the web pages that are sent and can also read the cookies only by this again.  If you do not allow cookies in your browser, your information will not be saved, however the contents of the STIHL web pages will not be affected.  ';
		
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;
}