// used on account.php for forgot password feature function forgot () { window.open('http://www.afcommerce.com/forgotpass.php','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=350,height=350,top=50,left=20'); } // used on product attributes to pop up window that have a description function showattrdescription (attr) { window.open('http://www.afcommerce.com/attribute_options.php?attrtempid=' + attr,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=550,height=420,top=40,left=50'); } // used on getproduct.php to pop up image window function enlarge (p, h, w) { window.open('http://www.afcommerce.com/displayimage.php?pid=' + p,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,top=1,left=50,height=' + h + ',width=' + w); } // used on getproduct.php to pop up video clip window function enlargevideo (path) { window.open(path,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,top=20,left=50,height=500,width=700'); } function passwordused() { window.open('http://www.afcommerce.com/passwordused.php','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=550,height=440,top=40,left=20'); } function validationcode() { window.open('http://www.afcommerce.com/validationcode.php','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=450,height=350,top=50,left=20'); } function currencyconverter () { window.open('http://www.afcommerce.com/currencyconverter.php','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,top=10,left=80,height=510,width=600'); } function verificationnumber() { window.open('http://www.afcommerce.com/verificationnumber.php','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=550,height=450,top=50,left=50'); } function freeonetimeinstall () { window.open('freeonetimeinstall.php','freeonetimeinstall','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=600,height=420,top=60,left=50'); } function onboardinginfo () { window.open('onboardinginfo.php','freeonetimeinstall','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=600,height=420,top=60,left=50'); } function channelpartner () { window.open('channelpartner.php','channelpartner','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=600,height=420,top=60,left=50'); } // leave this here to prevent errors (it's not a conflict of any kind) function updateproducttotal() { } function afcprofeatures () { window.open('cartfeaturesv3-pop.php','v3features','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=750,height=500,top=5,left=20'); } function afclicense() { window.open("http://afcommerce.com/afclicense.php",'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=500,height=500,top=50,left=20'); } function getposOffset(overlay, offsettype){ var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop; var parentEl=overlay.offsetParent; while (parentEl!=null){ totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop; parentEl=parentEl.offsetParent; } return totaloffset; } function getposOffset(overlay, offsettype){ var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop; var parentEl=overlay.offsetParent; while (parentEl!=null){ totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop; parentEl=parentEl.offsetParent; } return totaloffset; } function overlay(curobj, subobj){ if (document.getElementById){ var subobj=document.getElementById(subobj) subobj.style.left=getposOffset(curobj, "left")+"px" subobj.style.top=getposOffset(curobj, "top")+"px" subobj.style.display="block" return false } else return true } function overlayclose(subobj){ document.getElementById(subobj).style.display="none" } var slideSpeed = 30; // Higher value = faster var timer = 10; // Lower value = faster var objectIdToSlideDown = false; var activeId = false; var slideInProgress = false; function showHideContent(e,inputId) { if(slideInProgress)return; slideInProgress = true; if(!inputId)inputId = this.id; inputId = inputId + ''; var numericId = inputId.replace(/[^0-9]/g,''); var answerDiv = document.getElementById('a' + numericId); objectIdToSlideDown = false; if(!answerDiv.style.display || answerDiv.style.display=='none'){ if(activeId && activeId!=numericId){ objectIdToSlideDown = numericId; slideContent(activeId,(slideSpeed*-1)); }else{ answerDiv.style.display='block'; answerDiv.style.visibility = 'visible'; slideContent(numericId,slideSpeed); } }else{ slideContent(numericId,(slideSpeed*-1)); activeId = false; } } function slideContent(inputId,direction) { var obj =document.getElementById('a' + inputId); var contentObj = document.getElementById('ac' + inputId); height = obj.clientHeight; if(height==0)height = obj.offsetHeight; height = height + direction; rerunFunction = true; if(height>contentObj.offsetHeight){ height = contentObj.offsetHeight; rerunFunction = false; } if(height<=1){ height = 1; rerunFunction = false; } obj.style.height = height + 'px'; var topPos = height - contentObj.offsetHeight; if(topPos>0)topPos=0; contentObj.style.top = topPos + 'px'; if(rerunFunction){ setTimeout('slideContent(' + inputId + ',' + direction + ')',timer); }else{ if(height<=1){ obj.style.display='none'; if(objectIdToSlideDown && objectIdToSlideDown!=inputId){ document.getElementById('a' + objectIdToSlideDown).style.display='block'; document.getElementById('a' + objectIdToSlideDown).style.visibility='visible'; slideContent(objectIdToSlideDown,slideSpeed); }else{ slideInProgress = false; } }else{ activeId = inputId; slideInProgress = false; } } } function initShowHideDivs() { var divs = document.getElementsByTagName('DIV'); var divCounter = 1; for(var no=0;no