clearNode=function(A){if(A==null){return }if((A.nodeName.toLowerCase()=="input")||(A.nodeName.toLowerCase()=="textarea")){A.value="";return }while(A.hasChildNodes()){A.removeChild(A.firstChild)}};setNodeValue=function(A,B){if(typeof (A)=="undefined"){this.logger.log("Error setting node value.  Specified node does not exist.","error");return }if(A.textContent&&A.tagName.toLowerCase()!="div"){A.textContent=B}else{A.innerHTML=B}};getNodeValue=function(B){var A=null;if($(B).textContent){A=$(B).textContent}else{A=$(B).innerHTML}return A};moneyStrToFloat=function(A){A=String(A).replace(/\$/g,"").replace(/,/g,"");var B=parseFloat(A);if(isNaN(B)){return"0.00"}return B};roundToPenny=function(E){var B="";if(E<10){B+="0"}var C=E*100;C=Math.round(C);var D=B+C;var A=D.length;return D.substring(0,A-2)+"."+D.substring(A-2,A)};formatCurrency=function(C){var B=parseFloat(C);if(isNaN(B)){B=0}var A="";if(B<0){A="-"}B=Math.abs(B);B=parseInt((B+0.005)*100);B=B/100;str=new String(B);if(str.indexOf(".")<0){str+=".00"}if(str.indexOf(".")==(str.length-2)){str+="0"}str=A+"$"+addCommasToNumberString(str);return str};openExternal=function(C,B,D){var A=window.open(C,B,D)};GetFromQueryString=function(D){var B,G,A,C,F,E;F=location.href.substring(location.href.indexOf("?")+1);E=F.split("&");for(B=0;B<E.length;B++){G=E[B].indexOf("=");if(G==-1){continue}A=E[B].substring(0,G);C=E[B].substring(G+1);if(A==D){return unescape(C.replace(/\+/g," "))}}return false};GetValueFromUrl=function(E,A){var B,F,D,C;D=location.href.substring(location.href.indexOf(E+"/"));C=D.split("/");F=C[A];return F};Inspect=function(B){var A="";for(prop in B){A+=prop+": "+B[prop]+"\n"}return A};isZeroLen=function(A){return(String(A).length==0)};isNull=function(A){return(A==null)};isUndef=function(A){return(typeof (A)=="undefined")};checkEmpty=function(A){return((this.isZeroLen(A))&&(this.isNull(A))&&(this.isUndef(A)))};trim$=function(A){return String(A).replace("$","")};isEmpty=function(A){return(A.length==0)};IsAlphaNumeric=function(D){var C="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var A="";if(D.length>0){for(var B=0;B<D.length;B++){A=D.substr(B,1);if(C.indexOf(A)==-1){return false}}}return true};validateNull=function(A){if(A==null){A=""}return A};String.prototype.replaceAll=function(C,D){var A=this;var B=A.indexOf(C);while(B!=-1){A=A.replace(C,D);B=A.indexOf(C)}return(A)};isEmail=function(B){B=B.replace(/^\s+|\s+$/g,"");if(B.length<=0){return false}var E=B.match("^(.+)@(.+)$");if(E==null){return false}if(E[1]!=null){var D=/^\"?[\w-_\.]*\"?$/;if(E[1].match(D)==null){return false}}if(E[2]!=null){var C=/^[\w-\.]*\.[A-Za-z]{2,4}$/;if(E[2].match(C)==null){var A=/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;if(E[2].match(A)==null){return false}}return true}return false};startSpinner=function(E,F,D,C,H){if(F==null||F==""){F="1"}if(D==null||D==""){D="140px"}if(C==null||C==""){C="130px"}var B=document.createElement("div");B.id=E+"spin";B.className="spinner";B.style.marginLeft=D;var A=document.createElement("img");A.alt="Loading...";A.src=devPath+"/images/l"+F+".gif";B.appendChild(A);$(E).appendChild(B);if(H!=null){var G=document.createElement("div");G.id=E+"msg";G.className="loadmsg";setNodeValue(G,"Hang in there, it can take upto 15 seconds, We are collecting special pricing from ebay, amazon and other sellers.");$(E).appendChild(G)}return };stopSpinner=function(B){if($(B+"msg")!=null){var C=$(B+"msg");C.parentNode.removeChild(C)}if($(B+"spin")!=null||$(B+"spin")!="undefined"){var A=$(B+"spin");A.parentNode.removeChild(A);return }};insertError=function(C,D){var B=$(C);var A=$(C+"error");if(A!=null){A.parentNode.removeChild(A)}var E=document.createElement("span");E.id=C+"error";E.className="error-red";setNodeValue(E,D);B.appendChild(E)};removeError=function(B){var A=$(B+"error");if(A!=null){A.parentNode.removeChild(A)}};getWinWidth=function(){if(window.innerWidth){w=window.innerWidth;if(document.body.scrollHeight&&document.body.scrollHeight>=getWinHeight()){w-=16}return w}else{if(document.documentElement&&document.documentElement.clientWidth){return document.documentElement.clientWidth}else{if(document.body&&document.body.clientWidth){return document.body.clientWidth}else{if(document.body&&document.body.parentNode&&document.body.parentNode.clientWidth){return document.body.parentNode.clientWidth}}}}};getWinHeight=function(){if(window.innerHeight){return window.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){return document.documentElement.clientHeight}else{if(document.body&&document.body.clientHeight){return document.body.clientHeight}else{if(document.body&&document.body.parentNode&&document.body.parentNode.clientHeight){return document.body.parentNode.clientHeight}}}}};getWinLeft=function(){return typeof window.pageXOffset!="undefined"?window.pageXOffset:document.documentElement&&document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft?document.body.scrollLeft:0};getWinTop=function(){return typeof window.pageYOffset!="undefined"?window.pageYOffset:document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop?document.body.scrollTop:0};getWinRight=function(){return getWinLeft()+getWinWidth()};getWinBottom=function(){return getWinTop()+getWinHeight()};hidePanel=function(A){showWindowShade("applyWindowShade","none");toggleDisplayOff("panel")};hideUserPanel=function(A){showWindowShade("applyWindowShade","none");toggleDisplayOff("userpanel")};displayPanel=function(){el=$("panel");el.style.display="inline";winTop=getWinTop();el.style.top=winTop+105+"px";el.style.left="150px";el.style.visibility="visible"};displayUserPanel=function(){el=$("userpanel");el.style.display="inline";winTop=getWinTop();el.style.top=winTop+100+"px";el.style.left="250px";el.style.visibility="visible"};showWindowShade=function(C,B){el=$(C);if(!el||el.style.display==B){return }if(B=="block"){var A=document.body.scrollHeight;if(getWinHeight()>A){A=getWinHeight()}el.style.width="900px";el.style.height=A+"px"}el.style.display=B};toggleDisplay=function(A){el=$(A);if(!el){return }if(el.style.display=="block"){el.style.display="none"}else{el.style.display="block"}};toggleVisibility=function(A){el=$(A);if(!el){return }if(el.style.visibility=="visible"){el.style.visibility="hidden"}else{el.style.visibility="visible"}};toggleVisibilityOn=function(A){el=$(A);if(!el){return }el.style.visibility="visible"};toggleVisibilityOff=function(A){el=$(A);if(!el){return }el.style.visibility="hidden"};toggleDisplayOn=function(A){el=$(A);if(!el){return }el.style.display="block"};toggleDisplayOff=function(A){el=$(A);if(!el){return }el.style.display="none"};hidestatus=function(){window.status="";return true};function createCookie(C,D,E){if(E){var B=new Date();B.setTime(B.getTime()+(E*24*60*60*1000));var A="; expires="+B.toGMTString()}else{var A=""}document.cookie=C+"="+D+A+"; path=/"}function readCookie(B){var D=B+"=";var A=document.cookie.split(";");for(var C=0;C<A.length;C++){var E=A[C];while(E.charAt(0)==" "){E=E.substring(1,E.length)}if(E.indexOf(D)==0){return E.substring(D.length,E.length)}}return null}function eraseCookie(A){createCookie(A,"",-1)};