/** * @author daniel.smith */ // call back methods var customerTypeCallback = { success: function(o) { if(o.responseText !== undefined){ addNewOptions(o.argument.customerTypeSelectElm, o.responseXML); } }, failure: function(o) { //do nothing }, argument: { customerTypeSelectElm: "blank" } }; var prodCatCallback = { success: function(o) { if(o.responseText !== undefined){ addNewOptions(o.argument.prodCatSelectElm, o.responseXML); } }, failure: function(o) { //do nothing }, argument: { prodCatSelectElm: "blank" } }; var prodCallback = { success: function(o) { if(o.responseText !== undefined){ addNewOptions(o.argument.prodSelectElm, o.responseXML); } }, failure: function(o) { //do nothing }, argument: { prodSelectElm: "blank" } }; // end Callback methods function addNewOptions(selectElm, optionXml) { selectElm.options.length = 0; var opts = optionXml.getElementsByTagName('option'); for (var i=0;i 700 ) { var arw = $D.getElementsByClassName('pointer'); for(var n = 0; n < arw.length; n++) { $D.replaceClass(arw[n], 'pointer', 'pointer2'); } var newX = theX + theW - 340; var newY = theY + theH - 30; } else { var arw = $D.getElementsByClassName('pointer2'); for(var m = 0; m < arw.length; m++) { $D.replaceClass(arw[m], 'pointer2', 'pointer'); } var newX = theX + theW + 15; var newY = theY + theH - 30; } currentAttachment.style.position = 'absolute'; currentAttachment.style.top = newY + 'px'; currentAttachment.style.left = newX +'px'; if($D.hasClass(currentAttachment, 'hideAttachment')) { $D.replaceClass(currentAttachment, 'hideAttachment', 'showAttachment'); } } function closeAttachment(e) { var currentAttachment = $('attachmentBox0'); //close the element that was last opened if($D.hasClass(currentAttachment, 'showAttachment')) { $D.replaceClass(currentAttachment, 'showAttachment', 'hideAttachment'); } } function searchAnchorClick(e) { var txtBoxForSearch = $('prodNameTxt'); var searchForm = $('techSupportForm'); if (txtBoxForSearch.value.length) { searchForm.submit(); } else { attachmentsToggle('prodNameTxt'); } } function selectAnchorClick(e) { var productBox= $('prodNameTxt2'); var selectForm = $('techSupportForm2'); selectForm.submit(); } function initProdSearchEvents() { var searchAnchor = $('searchAnchor'); var selectAnchor = $('selectAnchor'); var closer = $('closeMe0'); $E.addListener(searchAnchor,"click", searchAnchorClick); $E.addListener(selectAnchor,"click", selectAnchorClick); $E.addListener(closer, "click", closeAttachment); } //run the init function YAHOO.util.Event.addListener(window, "load", initIndustryEvents); YAHOO.util.Event.addListener(window, "load", initCustomerTypeEvents); YAHOO.util.Event.addListener(window, "load", initProdCatEvents); YAHOO.util.Event.addListener(window, "load", initProdSearchEvents);