window.HandleSlideClick=function(qzim,qzgx,sliderPosition,sorting,ascending,page,filter,tableSetting) {
 var mouseX=cart_browser_ie?event.clientX+document.body.scrollLeft:qzim.pageX,sliderX=qzAfx(qzgx),offsetX=mouseX-sliderX;
 if(offsetX<sliderPosition) {
  getTable(sorting,ascending,page-1,filter,tableSetting);
 } else {
  getTable(sorting,ascending,page+1,filter,tableSetting);
 };
 return false;
}

window.HandleSlideStart=function(qzim,qzgx,sorting,ascending,page,filter,tableSetting,lastPage) {
 ComponentArt_CancelEvent(qzim);
 var qzp=cart_browser_ie?event.clientX+(document.documentElement&&document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft):qzim.pageX;
 Brettspill_SliderStartX=qzp;
 Brettspill_SliderStartEffectiveX=qzgx.style.left?parseInt(qzgx.style.left):0;
 Brettspill_SliderObject=qzgx;
 Brettspill_SliderPage=page;
 Brettspill_SliderCurrentPage=page;
 Brettspill_SliderLastPage=lastPage;
 Brettspill_Sorting=sorting;
 Brettspill_Ascending=ascending;
 Brettspill_Filter=filter;
 Brettspill_TableSetting=tableSetting;
 Brettspill_SliderPopupX=qzAfx(qzgx.parentNode);
 Brettspill_SliderPopupY=qzAfw(qzgx)-45;
 document.onmousemove=HandleSlide;
 document.onmouseup=HandleSlideDone;
}

window.HandleSlide=function(qzim) {
 ComponentArt_CancelEvent(qzim);
 var qzp=cart_browser_ie?event.clientX+(document.documentElement&&document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft):qzim.pageX,effectiveX=qzp-Brettspill_SliderStartX,finalX=Brettspill_SliderStartEffectiveX+effectiveX;
 Brettspill_SliderPage=Math.max(1,Math.min(Brettspill_SliderLastPage,Math.round(Brettspill_SliderLastPage*finalX/(Brettspill_SliderObject.parentNode.offsetWidth-Brettspill_SliderObject.offsetWidth))));
 Brettspill_SliderObject.style.left=Math.max(0,Math.min(finalX,Brettspill_SliderObject.parentNode.offsetWidth-Brettspill_SliderObject.offsetWidth))+'px';
 PopupShow();
}

window.HandleSlideDone=function(qzim) {
 ComponentArt_CancelEvent(qzim);
 PopupHide();
 if(Brettspill_SliderPage!=Brettspill_SliderCurrentPage) {
  getTable(Brettspill_Sorting,Brettspill_Ascending,Brettspill_SliderPage,Brettspill_Filter,Brettspill_TableSetting);
 };
 document.onmousemove=null;
 document.onmouseup=null;
 return false;
}

window.Brettspill_Popup=null;

window.PopupShow=function() {
 if(!Brettspill_Popup) {
  Brettspill_Popup=document.createElement('div');
  Brettspill_Popup.style.zIndex=9999;
  Brettspill_Popup.style.position='absolute';
  Brettspill_Popup.style.visibility='hidden';
  document.body.insertBefore(Brettspill_Popup,document.body.firstChild);
 };
 Brettspill_Popup.style.border='1px solid black';
 Brettspill_Popup.style.padding='8px';
 Brettspill_Popup.style.width='134px';
 Brettspill_Popup.style.fontFamily='Verdana, Arial, Helvetica, sans-serif';
 Brettspill_Popup.style.fontSize='11px';
 Brettspill_Popup.style.textAlign='center';
 Brettspill_Popup.style.backgroundColor='#DDDDFF';
 Brettspill_Popup.innerHTML='Side <strong>'+Brettspill_SliderPage+'</strong> av <strong>'+Brettspill_SliderLastPage+'</strong>';
 Brettspill_Popup.style.left=Brettspill_SliderPopupX+'px';
 Brettspill_Popup.style.top=Brettspill_SliderPopupY+'px';
 Brettspill_Popup.style.visibility='visible';
}

window.PopupHide=function() {
 qzff(Brettspill_Popup);
 Brettspill_Popup=null;
}

window.qzff=function(qzbc) {
 if(qzbc) {
  if(cart_browser_ie) {
   qzbc.removeNode(true);
  } else {
   qzbc.parentNode.removeChild(qzbc);
  };
 };
}