function description(text) {
	document.getElementById('nsbDescription').firstChild.data=text;
}

function moveProducts(setPos) {
	document.getElementById('productsmove').style.marginLeft='-' + (setPos * 2) + 'px';
}
function directJump(Ereignis,event) { // 
  elementPosX = document.getElementById("nsb_slider_slit").offsetLeft;
  if (!Ereignis){
    Ereignis = window.event;
    if(event){
    Ereignis = event;
    }
	elementWidth = document.getElementById("slider1").offsetWidth;
	setPos = Math.round(Ereignis.clientX - elementPosX - (elementWidth / 2));
	}else{
	  if(Ereignis == "end"){
		setPos = 265;
	  }else{
	  	setPos = 0;
	  }
	}
	oldLeft = document.getElementById("slider1").offsetLeft;
	posOldLeft = oldLeft - elementPosX;
	elementLeft = document.getElementById("slider1").offsetLeft;
	document.getElementById('slider1').style.left=setPos+'px';
	if(posOldLeft < setPos){
	  //vor
	  var bewegung = new Array( Math.round((setPos - posOldLeft)/2), 
	  							Math.round((setPos - posOldLeft)/1.5), 
	  							Math.round((setPos - posOldLeft)/1.3), 
	  							Math.round((setPos - posOldLeft)/1.2), 
	  							Math.round((setPos - posOldLeft)/1.1), 
	  							Math.round((setPos - posOldLeft)/1.05),
	  							Math.round((setPos - posOldLeft)/1.02),
	  							Math.round((setPos - posOldLeft)/1.01),
	  							Math.round((setPos - posOldLeft)/1.005)
	  							);
	  x = 1;
	  while(x < 9){
	  setTimeout("moveProducts("+(posOldLeft+bewegung[x])+")",(x*100));
	  x++;
	  }
	}else{
	  //zurŸck
	  var bewegung = new Array( Math.round((posOldLeft - setPos)/2), 
	  							Math.round((posOldLeft - setPos)/1.5), 
	  							Math.round((posOldLeft - setPos)/1.3), 
	  							Math.round((posOldLeft - setPos)/1.2), 
	  							Math.round((posOldLeft - setPos)/1.1), 
	  							Math.round((posOldLeft - setPos)/1.05),
	  							Math.round((posOldLeft - setPos)/1.02),
	  							Math.round((posOldLeft - setPos)/1.01),
	  							Math.round((posOldLeft - setPos)/1.005)
	  							);
	  x = 1;
	  while(x < 9){
	  setTimeout("moveProducts("+(posOldLeft-bewegung[x])+")",(x*70));
	  x++;
	  }
	}
	setTimeout("moveProducts("+setPos+")",740);
}

var nsbDefaultSliderLength      = 265
var nsbWidthThen                  = 2
var nsbSliderDefaultOrientation = 'horizontal'
var nsbSliderClassName          = 'nsb_slider'
var nsbSliderDisplayClassName   = 'nsb_slider_display'

// nsbGetElementsByClass: Cross-browser function that returns
// an array with all elements that have a class attribute that
// contains className

function nsbGetElementsByClass(className)
{
	var classElements = new Array()
	var els = document.getElementsByTagName("*")
	var elsLen = els.length
	var pattern = new RegExp("\\b" + className + "\\b")
	for (i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i]
			j++
		}
	}
	return classElements;
}
// nsbLeft: Cross-browser version of "element.style.left"
// Returns or sets the horizontal position of an element.
function nsbLeft(elmnt, pos)
{
	if (!(elmnt = document.getElementById(elmnt))) return 0;
	if (elmnt.style && (typeof(elmnt.style.left) == 'string')) {
		if (typeof(pos) == 'number') elmnt.style.left = pos + 'px';
		else {
			pos = parseInt(elmnt.style.left);
			if (isNaN(pos)) pos = 0;
		}
	}
	else if (elmnt.style && elmnt.style.pixelLeft) {
		if (typeof(pos) == 'number') elmnt.style.pixelLeft = pos;
		else pos = elmnt.style.pixelLeft;
	}
	return pos;
}
// nsbTop: Cross-browser version of "element.style.top"
// Returns or sets the vertical position of an element.
function nsbTop(elmnt, pos)
{
	if (!(elmnt = document.getElementById(elmnt))) return 0;
	if (elmnt.style && (typeof(elmnt.style.top) == 'string')) {
		if (typeof(pos) == 'number') elmnt.style.top = pos + 'px';
		else {
			pos = parseInt(elmnt.style.top);
			if (isNaN(pos)) pos = 0;
		}
	}
	else if (elmnt.style && elmnt.style.pixelTop) {
		if (typeof(pos) == 'number') elmnt.style.pixelTop = pos;
		else pos = elmnt.style.pixelTop;
	}
	return pos;
}
// moveSlider: Handles slider and display while dragging
function moveSlider(evnt)
{
	var evnt = (!evnt) ? window.event : evnt; // The mousemove event
	if (mouseover) { // Only if slider is dragged
		x = slider.startOffsetX + evnt.screenX // Horizontal mouse position relative to allowed slider positions
		y = slider.startOffsetY + evnt.screenY // Horizontal mouse position relative to allowed slider positions
		if (x > slider.xMax) x = slider.xMax // Limit horizontal movement
		if (x < 0) x = 0 // Limit horizontal movement
		if (y > slider.yMax) y = slider.yMax // Limit vertical movement
		if (y < 0) y = 0 // Limit vertical movement
		nsbLeft(slider.id, x)  // move slider to new horizontal position
		nsbTop(slider.id, y) // move slider to new vertical position
		sliderVal = x + y // pixel value of slider regardless of orientation
		sliderPos = (slider.distance / display.valuecount) * 
			Math.round(display.valuecount * sliderVal / slider.distance)
		v = Math.round((sliderPos * slider.scale + slider.from) * // calculate display value
			Math.pow(10, display.decimals)) / Math.pow(10, display.decimals)
		display.style.marginLeft='-' + v*nsbWidthThen + 'px'
		display.value = v // put the new value in the slider display element
		return false
	}
	return
}
// slide: Handles the start of a slider move.
function slide(evnt)
{
	if (!evnt) evnt = window.event; // Get the mouse event causing the slider activation.
	slider = (evnt.target) ? evnt.target : evnt.srcElement; // Get the activated slider element.
	dist = parseInt(slider.getAttribute('distance')) // The allowed slider movement in pixels.
	slider.distance = dist ? dist : nsbDefaultSliderLength // Deafault distance from global var.
	ori = slider.getAttribute('orientation') // Slider orientation: 'horizontal' or 'vertical'.
	orientation = ((ori == 'horizontal') || (ori == 'vertical')) ? ori : nsbSliderDefaultOrientation
		// Default orientation from global variable.
	displayId = slider.getAttribute('display') // ID of associated display element.
	display = document.getElementById(displayId) // Get the associated display element.
	display.sliderId = slider.id // Associate the display with the correct slider.
	dec = parseInt(display.getAttribute('decimals')) // Number of decimals to be displayed.
	display.decimals = dec ? dec : 0 // Default number of decimals: 0.
	val = parseInt(display.getAttribute('valuecount'))  // Allowed number of values in the interval.
	display.valuecount = val ? val : slider.distance + 1 // Default number of values: the sliding distance.
	from = parseFloat(display.getAttribute('from')) // Min/start value for the display.
	from = from ? from : 0 // Default min/start value: 0.
	to = parseFloat(display.getAttribute('to')) // Max value for the display.
	to = to ? to : slider.distance // Default number of values: the sliding distance.
	slider.scale = (to - from) / slider.distance // Slider-display scale [value-change per pixel of movement].
	if (orientation == 'vertical') { // Set limits and scale for vertical sliders.
		slider.from = to // Invert for vertical sliders. "Higher is more."
		slider.xMax = 0
		slider.yMax = slider.distance
		slider.scale = -slider.scale // Invert scale for vertical sliders. "Higher is more."
	}
	else { // Set limits for horizontal sliders.
		slider.from = from
		slider.xMax = slider.distance
		slider.yMax = 0
	}
	slider.startOffsetX = nsbLeft(slider.id) - evnt.screenX // Slider-mouse horizontal offset at start of slide.
	slider.startOffsetY = nsbTop(slider.id) - evnt.screenY // Slider-mouse vertical offset at start of slide.
	mouseover = true
	document.onmousemove = moveSlider // Start the action if the mouse is dragged.
	document.onmouseup = sliderMouseUp // Stop sliding.
	return false
}
// sliderMouseUp: Handles the mouseup event after moving a slider.
// Snaps the slider position to allowed/displayed value. 
function sliderMouseUp()
{
	if (mouseover) {
		v = (display.value) ? display.value : 0 // Find last display value.
		pos = (v - slider.from)/(slider.scale) // Calculate slider position (regardless of orientation).
		if (slider.yMax == 0) {
			pos = (pos > slider.xMax) ? slider.xMax : pos
			pos = (pos < 0) ? 0 : pos
			nsbLeft(slider.id, pos) // Snap horizontal slider to corresponding display position.
		}
		if (slider.xMax == 0) {
			pos = (pos > slider.yMax) ? slider.yMax : pos
			pos = (pos < 0) ? 0 : pos
			nsbTop(slider.id, pos) // Snap vertical slider to corresponding display position.
		}
		if (document.removeEventListener) { // Remove event listeners from 'document' (W3C).
			document.removeEventListener('mousemove', moveSlider, false)
			document.removeEventListener('mouseup', sliderMouseUp, false)
		}
		else if (document.detachEvent) { // Remove event listeners from 'document' (IE).
			document.detachEvent('onmousemove', moveSlider)
			document.detachEvent('onmouseup', sliderMouseUp)
		}
	}
	mouseover = false // Stop the sliding.
}
function focusDisplay(evnt)
{
	if (!evnt) evnt = window.event; // Get the mouse event causing the display activation.
	display = (evnt.target) ? evnt.target : evnt.srcElement; // Get the activated display element.
	lock = display.getAttribute('typelock') // Is the user allowed to type into the display?
	if (lock == 'on') {
		display.blur()
	}
	return
}
window.onload = function() // Set up the sliders and the displays.
{
	sliders = nsbGetElementsByClass(nsbSliderClassName) // Find the horizontal sliders.
	for (i = 0; i < sliders.length; i++) {
		sliders[i].onmousedown = slide // Attach event listener.
	}
	displays = nsbGetElementsByClass(nsbSliderDisplayClassName) // Find the displays.
	for (i = 0; i < displays.length; i++) {
		displays[i].onfocus = focusDisplay // Attach event listener.
	}
}

function nsbStartAnim() {
	var bewegung = new Array( 
							  Math.round((250)/2), 
	  						  Math.round((250)/1.5), 
	  						  Math.round((250)/1.3), 
	  						  Math.round((250)/1.2), 
	  						  Math.round((250)/1.1), 
	  						  Math.round((250)/1.05),
	  						  Math.round((250)/1.02),
	  						  Math.round((250)/1.01),
	  						  Math.round((250)/1.005)
	  						);
	  x = 1;
	  while(x < 9){
	  setTimeout("moveProducts("+(250-bewegung[x])+")",(x*70));
	  x++;
	  }
}
function nsbCorrectionCSS() {
  if(navigator.platform.substring(0,5)=='Linux'){
	document.write('<style type="text/css">');
	document.write('.nsbTheBox h3 {font-size: 11px; letter-spacing: 0px;}');
	document.write('.nsbTheBox p {font-size: 10px; letter-spacing: 0px;}');
	document.write('.nsbTheBox #linkR {margin-top: 2px; font-size: 10px;}');
	document.write('.nsbTheBox #linkL {margin-top: 2px; font-size: 10px;}');
	document.write('</style>');
  }
  if((navigator.appName=='Netscape')&&(navigator.platform.substring(0,3)=='Win')){
	document.write('<style type="text/css">');
	document.write('.nsbTheBox .nsb_horizontal_slider_display_combo {margin-top: -14px;}');
	//document.write('.nsbTheBox #linkR {margin-top: 0px;}');
	//document.write('.nsbTheBox .productUl {margin-top: -2px;}');
	//document.write('.nsbTheBox #linkL {top: 0px;}');
	document.write('</style>');
  }
}
/* the whole box */
function nsbWriteBox(){
nsbCorrectionCSS();
document.write('<div class="nsbTheBox">');
document.write('<h3>Europe\'s No. 1 online ordering platform for dental implants.</h3>');
document.write('<p>Providing state-of-the art implants and abutments for factory-direct prices.</p>');
document.write('<b id="linkR" onClick="directJump(\'end\');">');
document.write('Compatibility Lines&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
document.write('</b>');
document.write('<b id="linkL" onClick="directJump(\'anfang\')">');
document.write('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Spectra System');
document.write('</b>');
document.write('<div class="nsb_horizontal_slider_display_combo">');
document.write('	<div class="nsb_horizontal_slider_track">');
document.write('		<div id="nsb_slider_slit" class="nsb_slider_slit" onClick="directJump(\'\',event)">&nbsp;</div>');
document.write('		<div class="nsb_slider" id="slider1" display="productsmove">&nbsp;</div>');
document.write('	</div>');
document.write('</div>');
document.write('  <div class="nsbInlay">');
document.write('	<ul id="productsmove" class="productUl">');
document.write('	  <li><a href="/eu/productsOverview_Implants_ScrewPlant.asp" id="prod1" onMouseOver="description(this.name)" name="Bone Level Implant for two-stage procedures.">S-Plant</a></li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_ScrewPlus.asp" id="prod2" onMouseOver="description(this.name)" name="Tissue Level Implant for one-stage procedures.">&nbsp;S-Plus&nbsp;</a></li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_ScrewDirect.asp" id="prod3" onMouseOver="description(this.name)" name="One-piece Implant for immediate restorations.">S-Direct</a></li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_ScrewIndirect.asp" id="prod4" onMouseOver="description(this.name)" name="One-piece Implant for edentulous restorations.">S-InDirect</a></li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_ScrewRedirect.asp" id="prod5" onMouseOver="description(this.name)" name="One-piece Implant for esthetic restorations.">S-ReDirect</a></li>');
document.write('	  <li>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_Legacy.asp" id="prod6" onMouseOver="description(this.name)" name="Surgical and prosthetic compatibility to Zimmer Dental">Legacy (Zimmer)</a></li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_RePlus.asp" id="prod7" onMouseOver="description(this.name)" name="Prosthetic compatibility to Nobel Biocare">RePlus (NB)</a></li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_RePlant.asp" id="prod8" onMouseOver="description(this.name)" name="Surgical and prosthetic compatibility to Nobel Biocare">RePlant (NB)</a></li>');
document.write('	</ul>');
document.write('  </div>');
document.write('  <h4 id="nsbDescription">&nbsp;</h4>');
document.write('</div>');

setTimeout("nsbStartAnim()",1100);
}
function nsbWriteBoxDE(){
nsbCorrectionCSS();
document.write('<div class="nsbTheBox">');
document.write('<h3>Europas Nr. 1 f&uuml;r Zahnimplantate im Internet.</h3>');
document.write('<p>Hochqualitative Implantate und Abutments zu niedrigen Direktpreisen.</p>');
document.write('<b id="linkR" onClick="directJump(\'end\');">');
document.write('Compatibility Lines&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
document.write('</b>');
document.write('<b id="linkL" onClick="directJump(\'anfang\')">');
document.write('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Spectra System');
document.write('</b>');
document.write('<div class="nsb_horizontal_slider_display_combo">');
document.write('	<div class="nsb_horizontal_slider_track">');
document.write('		<div id="nsb_slider_slit" class="nsb_slider_slit" onClick="directJump(\'\',event)">&nbsp;</div>');
document.write('		<div class="nsb_slider" id="slider1" display="productsmove">&nbsp;</div>');
document.write('	</div>');
document.write('</div>');
document.write('  <div class="nsbInlay">');
document.write('	<ul id="productsmove" class="productUl">');
document.write('	  <li><a href="/eu/productsOverview_Implants_ScrewPlant.asp" id="prod1" onMouseOver="description(this.name)" name="Bone Level Implantat f&uuml;r zweizeitige Versorgungen.">S-Plant</a></li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_ScrewPlus.asp" id="prod2" onMouseOver="description(this.name)" name="Tissue Level Implantat f&uuml;r einzeitige Versorgungen.">&nbsp;S-Plus&nbsp;</a></li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_ScrewDirect.asp" id="prod3" onMouseOver="description(this.name)" name="Einteiliges Implantat f&uuml;r zementierbare Sofortversorgungen.">S-Direct</a></li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_ScrewIndirect.asp" id="prod4" onMouseOver="description(this.name)" name="Einteiliges Implantat f&uuml;r verschraubbare Stegversorgungen.">S-InDirect</a></li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_ScrewRedirect.asp" id="prod5" onMouseOver="description(this.name)" name="Einteiliges Implantat f&uuml;r zementierbare anteriore Versorgungen.">S-ReDirect</a></li>');
document.write('	  <li>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_Legacy.asp" id="prod6" onMouseOver="description(this.name)" name="Chirugisch und prothetisch kompatibel mit Zimmer Dental">Legacy (Zimmer)</a></li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_RePlus.asp" id="prod7" onMouseOver="description(this.name)" name="Prothetisch kompatibel mit Nobel Biocare">RePlus (NB)</a></li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_RePlant.asp" id="prod8" onMouseOver="description(this.name)" name="Chriurgisch und prothetisch mit Nobel Biocare">RePlant (NB)</a></li>');
document.write('	</ul>');
document.write('  </div>');
document.write('  <h4 id="nsbDescription">&nbsp;</h4>');
document.write('</div>');

setTimeout("nsbStartAnim()",1100);
}
function nsbWriteBoxFR(){
document.write('<style type="text/css">');
document.write('.nsbTheBox h3 {font-size: 12px; letter-spacing: 0px;}');
document.write('</style>');

nsbCorrectionCSS();

document.write('<div class="nsbTheBox">');
document.write('<h3>N&deg; 1 europ&eacute;en sur Internet dans le domaine des implants dentaires.</h3>');
document.write('<p>Des implants et proth&egrave;ses de pointe &agrave; prix mod&eacute;r&eacute;.</p>');
document.write('<b id="linkR" onClick="directJump(\'end\');">');
document.write('Syst&egrave;me Compatible&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
document.write('</b>');
document.write('<b id="linkL" onClick="directJump(\'anfang\')">');
document.write('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Syst&egrave;me Spectra');
document.write('</b>');
document.write('<div class="nsb_horizontal_slider_display_combo">');
document.write('	<div class="nsb_horizontal_slider_track">');
document.write('		<div id="nsb_slider_slit" class="nsb_slider_slit" onClick="directJump(\'\',event)">&nbsp;</div>');
document.write('		<div class="nsb_slider" id="slider1" display="productsmove">&nbsp;</div>');
document.write('	</div>');
document.write('</div>');
document.write('  <div class="nsbInlay">');
document.write('	<ul id="productsmove" class="productUl">');
document.write('	  <li><a href="/eu/productsOverview_Implants_ScrewPlant.asp" id="prod1" onMouseOver="description(this.name)" name="Bone Level Implant for two-stage procedures.">S-Plant</a></li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_ScrewPlus.asp" id="prod2" onMouseOver="description(this.name)" name="Tissue Level Implant for one-stage procedures.">&nbsp;S-Plus&nbsp;</a></li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_ScrewDirect.asp" id="prod3" onMouseOver="description(this.name)" name="One-piece Implant for immediate restorations.">S-Direct</a></li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_ScrewIndirect.asp" id="prod4" onMouseOver="description(this.name)" name="One-piece Implant for edentulous restorations.">S-InDirect</a></li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_ScrewRedirect.asp" id="prod5" onMouseOver="description(this.name)" name="One-piece Implant for esthetic restorations.">S-ReDirect</a></li>');
document.write('	  <li>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_Legacy.asp" id="prod6" onMouseOver="description(this.name)" name="Surgical and prosthetic compatibility to Zimmer Dental">Legacy (Zimmer)</a></li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_RePlus.asp" id="prod7" onMouseOver="description(this.name)" name="Prosthetic compatibility to Nobel Biocare">RePlus (NB)</a></li>');
document.write('	  <li><a href="/eu/productsOverview_Implants_RePlant.asp" id="prod8" onMouseOver="description(this.name)" name="Surgical and prosthetic compatibility to Nobel Biocare">RePlant (NB)</a></li>');
document.write('	</ul>');
document.write('  </div>');
document.write('  <h4 id="nsbDescription">&nbsp;</h4>');
document.write('</div>');

setTimeout("nsbStartAnim()",1100);
}












