
function SetSliderSize() {
   if(document.getElementById('slider-wrapper')){
      var myWidth = 0;
      if( typeof( window.innerWidth ) == 'number' ) {
        //Non-IE
        myWidth = window.innerWidth;
      } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
        //IE 6+ in 'standards compliant mode'
        myWidth = document.documentElement.clientWidth;
      } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
      }
      var sliderWrapperWidth = myWidth+((2560 - myWidth)/2);
      var sliderWrapperMarginLeft = ((2560 - myWidth)/2)*-1;
      var nivoMarginLeft = (myWidth/2)+(((myWidth-2560)/2)*-1)-500;
      document.getElementById('slider-wrapper').style.width = sliderWrapperWidth+'px';
      document.getElementById('slider-wrapper').style.marginLeft = sliderWrapperMarginLeft+'px';
      document.getElementById('nivoId').style.marginLeft = nivoMarginLeft+'px';
     // document.getElementById('slider-wrapper').setAttribute('style','width:'+sliderWrapperWidth+'px;');
     // document.getElementById('slider-wrapper').setAttribute('style','margin-left:'+sliderWrapperMarginLeft+'px;');

      //var sliderWrapperWidth = myWidth+((2560 - myWidth)/2);
      //var sliderWrapperMarginLeft = ((2560 - myWidth)/2)*-1;
      
      //document.getElementById('nivoId').style.marginLeft = (myWidth/2)+(((myWidth-2560)/2)*-1)-500;
      
   }
}

jQuery(window).load(function() {
                jQuery('#slider').nivoSlider({
                    effect:'fade',
                    directionNav:false,
                    controlNav:true,
                    animSpeed:500,
                    pauseTime:6000
                });
                SetSliderSize()
        });

$(document).ready(function() {

                  $('#sitemap').hide();
                  $('#sitemap-link-hide').hide();

                  $('a#sitemap-slideshow').click(function() {
                     $('#sitemap').slideDown('fast');
                     $('#sitemap-link-show').hide();
                     $('#sitemap-link-hide').show();
                     return false;
                  });
                  $('a#sitemap-slidehide').click(function() {
                     $('#sitemap').slideUp('fast');
                     $('#sitemap-link-show').show();
                     $('#sitemap-link-hide').hide();
                     return false;
                  });
            });

function ClickHereToPrint(){
try{
var oIframe = document.getElementById('ifrmPrint');
var oDoc = (oIframe.contentWindow || oIframe.contentDocument);
var oContentA = document.getElementById('formulierA').innerHTML;
var oContentB = document.getElementById('formulierB').innerHTML;
var oKlacht = document.redform.reden.value;
var frmCheck = document.getElementById('frmCheck').innerHTML;
if (frmCheck != 'ok') {
    alert('U heeft geen artikelen geselecteerd.');
} else if (oKlacht.length == 0) {
    alert('U moet een reden opgeven voor retour')
} else {

jQuery.ajax({type:'POST',dataType:'html',success:function(data, textStatus){jQuery('#tempHandig').html(oKlacht);},url:'/retourKlacht'});

if (oDoc.document) oDoc = oDoc.document;
oDoc.write("<head><title>SamsungMobile Shop</title>");
oDoc.write("</head><body onload='this.focus(); this.print();'>");
oDoc.write(oContentA + "" + oKlacht + oContentB);
oDoc.close();
}
}
catch(e){
self.print();
}
}
