function getNextProd(pn, direction) { var xhr; try { xhr = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xhr = new ActiveXObject('Microsoft.XMLHTTP'); } catch (e2) { try { xhr = new XMLHttpRequest(); } catch (e3) { xhr = false; } } } xhr.onreadystatechange = function() { if(xhr.readyState == 4) { if(xhr.status == 200) { var myXML = xhr.responseText; document.getElementById('ajaxLoad').src = '/images/spacer.gif' var in_url = "/t-shirts/inc/in.asp?p=" + myXML; in_url = in_url + "&image1=" + document.frmCustomize.image_id.value in_url = in_url + "&image2=" + document.frmCustomize.new_image_id.value in_url = in_url + "&text=" + document.frmCustomize.custom_text.value in_url = in_url + "&slider=" + document.frmCustomize.sliderValue.value in_url = in_url + "&color=" + document.frmCustomize.colorHex.value in_url = in_url + "&font=" + document.frmCustomize.fontName.value in_url = in_url + "&position=" + document.frmCustomize.text_position.value window.location.href=in_url; } } }; document.getElementById('ajaxLoad').src = '/images/ajaxLoad.gif'; var url="/t-shirts/inc/section.asp" url=url+"?dir=" + direction +"&p=" + pn +"&nocache="+Math.floor(Math.random()*9999) xhr.open('GET', url, true); xhr.send(null); }