var helpWindow = null; var submitcount=0; function adobeWarning() { return confirm('This will download a file to your computer that you can view or print at your convenience. Click OK to download the document.'); } function blockDoubleClick(x) { if (submitcount === 0) { submitcount++; return true; } else { if (x != 'silent') { alert("Your information is being sent. It may take a moment (or two). Thanks for your patience."); } return false; } } function checkSearchBox(x) { var searchValue = document.mainMenuForm.search.value; if (x === 0) { if (searchValue == 'Search') {document.mainMenuForm.search.value = '';} } else if (x == 1) { if (searchValue.length === 0) {document.mainMenuForm.search.value = 'Search';} } else { if (searchValue.length === 0 || searchValue == 'Search') { document.mainMenuForm.search.focus(); alert ('Please enter something for which to search.'); return false; //return false; } else { document.mainMenuForm.submit(); } } return true; } function resetClickBlock() { submitcount = 0; return true; } function gotoUrl(url) { if (url !== "") { // if (url.indexOf('rosariesAndKits') >= 0) { // customWindow=window.open('http://www.rosaryshop.com/rosariesAndKits.php/id/service@rosaryshop.com','CustomWindow','resizable,width=600,height=400,screenX=20,screenY=20,left=20,top=20,scrollbars,dependent'); // customWindow.focus(); // } else if (url.indexOf('express') >= 0) { // expressWindow=window.open("http://www.rosaryshop.com/expressOrder.php/","ExpressOrder","resizable,width=300,height=200,screenX=20,screenY=20,left=20,top=20,scrollbars,dependent"); // expressWindow.focus(); // } else if (url.indexOf('fx') >= 0) { // fxWindow=window.open("http://www.rosaryshop.com/fx.php/","ExpressOrder","resizable,width=300,height=200,screenX=20,screenY=20,left=20,top=20,scrollbars,dependent"); // fxWindow.focus(); // } else var finalURL; if (url.indexOf('http') >= 0) { finalURL = url; location = finalURL; } else { finalURL = 'http://www.rosaryshop.com'+url; location = finalURL; } } } function helpWindow(url) { if (!helpWindow || helpWindow.closed) { helpWindow = window.open(url,"helpWindow","width=200,height=400"); } else { helpWindow.focus(); } } function OpenCertDetails() { thewindow = window.open('https://www.thawte.com/cgi/server/certdetails.exe?code=USTHER230', 'anew', config='height=400,width=450,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,directories=no,status=yes'); } // // // AJAX javascript debugging based on routine from Jim Plush http://www.litfuel.net/plush/?postid=94 // Modified by SHM window.onerror = function(msg, err_url, line) { // create the post data string var POSTData = 'msg=' + msg + '&err_url=' + encodeURI(err_url) + '&line=' + line + '&href=' + encodeURI(window.location.href) + '&browser=' + navigator.userAgent; var s = new XMLHTTP("error_server.php?"); // var xmlDoc = s.call(POSTData, processReqChange); var xmlDoc = s.call(POSTData, function() {return true;}); }; function XMLHTTP(url) { this.url = url; this.headers = new Array(); this.async = true; this.method = "POST"; this.req = null; this.debug_flag = false; this.deb_str = ''; // debug string for application debugging return this; } XMLHTTP.prototype.debug = function(str) { if(this.debug_flag){ document.write( str + "
" ); } }; // xmlhttp wrapper method /** *@param string methodName this is the FSService method you want to call on the engine *@param mixed arguments passed as an array that contain the options you're passing to the methodName *@responseHandler string the name of the javascript function you want to handle the response back from the server *@useSOAP bool whether to use a SOAP request or to use regular POST/GET request */ XMLHTTP.prototype.call = function(arguments, responseHandler) { this.request = arguments; // moz XMLHTTPRequest object if (window.XMLHttpRequest) { this.req = new XMLHttpRequest(); this.deb_str += "Mozilla Version of XMLHTTPRequest\r\n"; } // IE/Windows ActiveX version else if (window.ActiveXObject) { this.req = new ActiveXObject("Microsoft.XMLHTTP"); this.deb_str += "Microsoft Version of XMLHTTPRequest\r\n"; } // set response handler this.req.onreadystatechange = responseHandler; // open connection this.req.open(this.method, this.url, this.async); // set headers if(this.headers.length > 0) { for(var i in this.headers) { this.req.setRequestHeader( i, this.headers[i]); } } this.req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); // send request if(this.method == 'POST') { this.req.send(arguments); } else { this.req.send(null); } if(this.async == false) { return this.req.responseXML; } return true; }; // DEBUG METHOD XMLHTTP.prototype.debugTransaction = function() { var req = document.getElementById("request"); if(req) { req.value = this.request; } var resp = document.getElementById("response"); if(resp) { resp.value = this.req.responseText; } var deb = document.getElementById("debug"); if(deb) { deb.value = this.deb_str; } }; // Custom Rosary Design Page Code // Except where noted otherwise, all code is the work product of The Rosary Shop and protected by copyright // I like the indexOf extension for arrays, but some browsers don't support it // From Mozilla if (!Array.prototype.indexOf) { Array.prototype.indexOf = function(elt /*, from*/) { var len = this.length; var from = Number(arguments[1]) || 0; from = (from < 0) ? Math.ceil(from) : Math.floor(from); if (from < 0) {from += len;} for (; from < len; from++) { if (from in this && this[from] === elt) {return from;} } return -1; }; } function activeRowIndexes() { var form = document.partsForm; var i; var filterText; var resultsArray = []; for (i=0; i= 0 && filterText.indexOf(construction) >= 0)) { resultsArray[resultsArray.length] = i; } } return resultsArray; } function addToBasket(x) { // Put up screen var bodyHeight = findPosY(document.getElementById('footerDiv')); document.getElementById('screen').style.height = bodyHeight + 'px'; document.getElementById('screen').style.visibility = 'visible'; // Set initial position and display the menu var e = document.getElementById('messageDiv'); e.style.display = 'block'; e.style.visibility = 'visible'; e.innerHTML = '

Reviewing the selections....<\/p>'; checkLocation('messageDiv'); // Check selected materials // Classes are OX,NS,SP ; GP ; GF,VM ; SS ; KT var metalNames = { OX_NS_SP : 'Silver Plated', GP : 'Gold Plated', GF_VM : 'Gold Filled / Vermeil', SS : 'Sterling Silver', KT : 'Solid Gold' }; var metalSelected = { OX_NS_SP : 0, GP : 0, GF_VM : 0, SS : 0, KT : 0 }; var itemMetal; var re = /(OX|SP|NS|GP|SS|GF|VM|KT)/; var match; var key; var pn; var form = document.partsForm; var rowIndexes = Array('connectors').concat(activeRowIndexes()); // For each selected row for (var i=0; i= 0) {metalSelected[key] = 1;} } } } var totalMetals = 0; var messageOut = ''; for (key in metalSelected) { if (metalSelected[key] == 1) { totalMetals ++; messageOut += '

  • ' + metalNames[key] + '<\/li>\n'; } } if (totalMetals > 1) { messageOut = '

    You have selected differing metal materials for your items. These include:<\/p>\n