var FOOAJAX_ACTIONCODE_OK=0;var FOOAJAX_ACTIONCODE_ERROR=1;var FOOAJAX_RESPONSEODE_OK=0;var ajax_alertOnError=0;function getXmlHttpObj(){if(window.XMLHttpRequest){return new XMLHttpRequest()}if(window.ActiveXObject){return new ActiveXObject("Microsoft.XMLHTTP")}return null}function foo_ajaxParseResp(c){var b=false;if(b){alert("xmlHttp: "+c)}var a=new Object();if(browserType=="ie"){c.responseXML.loadXML(c.responseText)}if(b){alert("foo_ajaxParseResp():xmlHttp.responseXML: "+c.responseXML)}var d=c.responseXML.documentElement;if(b){alert("foo_ajaxParseResp(): status: "+c.status+", xml: "+c.responseXML+", txt: "+c.responseText)}a.actionerrorcode=parseOne(d,"actionerrorcode");a.responsecode=parseOne(d,"responsecode");a.data=parseOne(d,"data");a.message=unescape(parseOne(d,"message"));if(ajax_alertOnError==1){if(a.actionerrorcode==FOOAJAX_ACTIONCODE_ERROR){alert("Resp.actionerrorcode was FOOAJAX_ACTIONCODE_ERROR. Message: "+a.message)}}a.getActionErrorCode=resp_getActionErrorCodeImpl;a.getRespCode=resp_getRespCodeImpl;a.getMessage=resp_getMessageImpl;a.getData=resp_getDataImpl;a.toString=resp_toStringImpl;return a}function resp_getDataImpl(){return this["data"]}function resp_getActionErrorCodeImpl(){return this["actionerrorcode"]}function resp_getRespCodeImpl(){return this["responsecode"]}function resp_getMessageImpl(){return this["message"]}function resp_toStringImpl(){return"AjaxResp[ actionerrorcode: "+this["actionerrorcode"]+", responsecode: "+this["responsecode"]+", message: "+this["message"]+", data: "+this["data"]+" ]"}function parseOne(a,b){foos=a.getElementsByTagName(b);foo=foos[0];var c="";if(foo){if(foo.firstChild){c=foo.firstChild.nodeValue}}return c}function foo_ajaxSendAsyncPost(d,b,a){var c=getXmlHttpObj();c.onreadystatechange=function(){if(c.readyState==4){var e=foo_ajaxParseResp(c);a.call(this,e)}};c.open("POST",d,true);c.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");c.setRequestHeader("Content-length",b.length);c.setRequestHeader("Connection","close");c.send(b)}function foo_ajaxSendSyncPost(d,b){var c=getXmlHttpObj();c.open("POST",d,false);c.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");c.setRequestHeader("Content-length",b.length);c.setRequestHeader("Connection","close");c.send(b);var a=foo_ajaxParseResp(c);return a};var browserType;if(document.layers){browserType="nn4"}if(document.all!=null){browserType="ie"}if(window.navigator.userAgent.toLowerCase().match("gecko")){browserType="gecko"}var gfxDebugOn=true;var POSCODE_CENTER_X_Y=1;var hoverBrowserType=0;if(document.all){hoverBrowserType=2}else{if(document.getElementById){hoverBrowserType=3}}xMousePos=0;yMousePos=0;xMousePosMax=0;yMousePosMax=0;scrollY=0;var myWidth=0,myHeight=0;var mouseX1=0;var mouseY1=0;var xDiff=0;var yDiff=0;var dist=0;var gfxDbgDiv;function gfxDebug(d,c){if(gfxDebugOn){if(!gfxDbgDiv){gfxDbgDiv=document.getElementById("gfxDbgDiv")}if(gfxDbgDiv){if(d==1){gfxDbgDiv.innerHTML=gfxDbgDiv.innerHTML+"<br/>"+c}else{gfxDbgDiv.innerHTML=c}}}}var captCount=0;function captureMousePosition(d){gfxDebug(0,"");var c=getPosition(d);xMousePos=c.x;yMousePos=c.y;setWinSize();xDiff=Math.abs(xMousePos-mouseX1);yDiff=Math.abs(yMousePos-mouseY1);dist=Math.sqrt(((xDiff*xDiff)+(yDiff*yDiff)));gfxDebug(1,"captCount: "+captCount+++", curs.x: "+xMousePos+", curs.y: "+yMousePos)}function getDocHeight(){var b=document;return Math.max(Math.max(b.body.scrollHeight,b.documentElement.scrollHeight),Math.max(b.body.offsetHeight,b.documentElement.offsetHeight),Math.max(b.body.clientHeight,b.documentElement.clientHeight))}function getPosition(d){d=d||window.event;var c={x:0,y:0};if(d.pageX||d.pageY){c.x=d.pageX;c.y=d.pageY}else{c.x=d.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft;c.y=d.clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop}return c}function getDivCoords_byId(d){var c=document.getElementById(d);return getDivCoords(c)}function getDivCoords(d){var f=new Object();var e=findPos(d);f.x=e[0];f.y=e[1];f.w=d.offsetWidth;return f}function getDivSize(d){var c={w:0,h:0};c.w=d.offsetWidth;c.h=d.offsetHeight;return c}function setDivSize(f,d,e){f.style.width=(d+"px");f.style.height=(e+"px")}function setDivPosition(f,d,e){f.style.top=e;f.style.left=d}function findPos(f){var e=0;var d=0;if(f.offsetParent){do{e+=f.offsetLeft;d+=f.offsetTop}while(f=f.offsetParent)}return[e,d]}function setWinSize(){if(typeof(window.innerWidth)=="number"){myWidth=window.innerWidth;myHeight=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){myWidth=document.documentElement.clientWidth;myHeight=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){myWidth=document.body.clientWidth;myHeight=document.body.clientHeight}}}docH=getDocHeight();var b=document.body.scrollTop;if(b==0){if(window.pageYOffset){b=window.pageYOffset}else{b=(document.body.parentElement)?document.body.parentElement.scrollTop:0}}scrollY=b;if(hoverBrowserType==2){xMousePosMax=myWidth+document.documentElement.scrollLeft;yMousePosMax=myHeight+scrollY}else{xMousePosMax=window.innerWidth;yMousePosMax=window.innerHeight+scrollY}gfxDebug(1,"hoverBrowserType: "+hoverBrowserType+", scrollY: "+scrollY+",d: "+docH+", ScrollTop: "+b+", yMousePosMax: "+yMousePosMax)}function positionDiv(h,k){if(k==POSCODE_CENTER_X_Y){var l=getDivSize(h);var i=xMousePosMax/2-l.w/2;var g=yMousePosMax-myHeight;var j=g+((myHeight-l.h)/2);h.style.left=i+"px";h.style.top=j+"px"}}function hideLayer(b){document.poppedLayer=getLayer(b);if(document.poppedLayer==null){alert("hideLayer(): no layer with id '"+b+"'.");return}document.poppedLayer.style.display="none";document.poppedLayer.style.visibility="hidden"}function showLayer(b){showLayer(b,"inline")}function showLayer(d,c){if(c!="inline"&&c!="block"){c="inline"}document.poppedLayer=getLayer(d);if(document.poppedLayer==null){alert("showLayer(): no layer with id '"+d+"'.");return}document.poppedLayer.style.display=c;document.poppedLayer.style.visibility="visible"}function getLayer(b){if(browserType=="gecko"||browserType=="ie"){return document.getElementById(b)}else{if(document.layers){return document.layers[b]}else{return document.getElementById(b)}}return null}var popupWin;function openPopup(e,d,f){popupWin=open(e,"11","toolbar=no,directories=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width="+d+",height="+f+"");if(!popupWin.closed){popupWin.blur();popupWin.focus()}}function openProductPopup(b){openPopup(b,760,550)}function getRealTop(d){var f=d.offsetTop;var e=d.offsetParent;while(e!=null){f+=e.offsetTop;e=e.offsetParent}return f}function getRealLeft(d){var f=d.offsetLeft;var e=d.offsetParent;while(e!=null){f+=e.offsetLeft;e=e.offsetParent}return f}function getEle(b){return document.getElementById(b)}function setDivContent(divId,content){if(document.all){eval(divId+".innerHTML=content;")}else{if(document.getElementById){rng=document.createRange();eval("el = document.getElementById('"+divId+"');");rng.setStartBefore(el);htmlFrag=rng.createContextualFragment(content);while(el.hasChildNodes()){el.removeChild(el.lastChild)}el.appendChild(htmlFrag)}}}function setDivContentToDiv(d,c){d.innerHTML=c}function is_child_of(d,c){if(c!=null){while(c.parentNode){if((c=c.parentNode)==d){return true}}}return false}function mouseOutOnlyWhenParent(element,event,JavaScript_code){var current_mouse_target=null;if(event.toElement){current_mouse_target=event.toElement}else{if(event.relatedTarget){current_mouse_target=event.relatedTarget}}if(!is_child_of(element,current_mouse_target)&&element!=current_mouse_target){eval(JavaScript_code)}}function foo_gfx_autoFitWindowToContent(l){var j=l.document.body.offsetWidth;var h=l.document.body.offsetHeight;var g="";for(var i=0;i<l.document.body.childNodes.length;i++){var k=l.document.body.childNodes[i];g+="child "+i+": "+k.id}}function getWinWidth(){if(document.all){return(this.win.top.document.body.clientWidth+10)}else{if(document.getElementById){return window.top.outerWidth}else{return window.top.outerWidth-12}}}function getWinHeight(){if(document.all){return(this.win.top.document.body.clientHeight+29)}else{if(document.getElementById){return window.top.outerHeight}else{return window.top.outerHeight-31}}};function SetOpacity(a,b){a.style.filter="alpha(opacity="+b+")";a.style.MozOpacity=b/100;a.style.opacity=b/100}function ChangeOpacity(c,b,e,a,h){var g=document.getElementById(c);var f=g.style.opacity*100;var d=(new Date()).getTime();f=a+(h-a)*(d-e)/b;if(f<0){SetOpacity(g,0)}else{if(f>100){SetOpacity(g,100)}else{SetOpacity(g,f);g.timer=window.setTimeout("ChangeOpacity('"+c+"',"+b+","+e+","+a+","+h+")",1)}}}function FadeIn(a){var c=document.getElementById(a);if(c.timer){window.clearTimeout(c.timer)}var b=(new Date()).getTime();c.timer=window.setTimeout("ChangeOpacity('"+a+"',1000,"+b+",0,100)",1)}function FadeOut(a){var c=document.getElementById(a);if(c.timer){window.clearTimeout(c.timer)}var b=(new Date()).getTime();c.timer=window.setTimeout("ChangeOpacity('"+a+"',1000,"+b+",100,0)",1)}function FadeInImage(b,d,e){var c=document.getElementById(b);if(e){var a=document.getElementById(e);if(a){a.style.backgroundImage="url("+c.src+")";a.style.backgroundRepeat="no-repeat"}}SetOpacity(c,0);c.src=d;if(c.timer){window.clearTimeout(c.timer)}var f=(new Date()).getTime();c.timer=window.setTimeout("ChangeOpacity('"+b+"',1000,"+f+",0,100)",10)};if(!this.JSON){this.JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse: bad text: "+text)}}}());function foo_jsonParse(a){var b=jQuery.parseJSON(a);return b}function foo_jsonStringify(a){return JSON.stringify(a)};function randomString(){var d="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";var e=8;var c="";for(var b=0;b<e;b++){var a=Math.floor(Math.random()*d.length);c+=d.substring(a,a+1)}return c}String.prototype.reverse=function(){splitext=this.split("");revertext=splitext.reverse();reversed=revertext.join("");return reversed};String.prototype.startsWith=function(a){return(this.match("^"+a)==a)};String.prototype.endsWith=function(a){return(this.match(a+"$")==a)};function trim(a){return a.replace(/^\s+|\s+$/g,"")}function trimSentence(a,d){a=trim(a);var e=trimSePos(a,d);var b=a.substring(0,e);var c=b.charAt(b.length-1);if(c==" "){b=b.substring(0,b.length-1)}c=b.charAt(b.length-1);if(c==","){b=b.substring(0,b.length-1)}return b}function trimSePos(a,f){var c=trimSePosB(a,".",f);var b=trimSePosB(a,"!",f);if(c<0&&b<0){c=trimSePosB(a," ",f);b=trimSePosB(a,",",f)}var e=Math.abs(f-c);var d=Math.abs(f-b);if(e<d){return c}else{return b}}function trimSePosB(b,f,h){b=trim(b);var d=b.indexOf((f+" "),h);if(d<0){d=b.indexOf(f,h)}var a=b.reverse();var c=a.indexOf(f.reverse(),(a.length-h));if(c>-1){c=b.length-c}if(d<0&&c<0){return -1}if(d<0){d=1000000}if(c<0){c=1000000}var g=Math.abs(h-d);var e=Math.abs(h-c);if(g<e){return d+1}else{return c}}function URLDecode(a){return unescape(a)}function foo_deleteCookie(a){var b=new Date();b.setTime(b.getTime()-(1000*60*60*24));foo_setCookie(a,"",b)}function foo_setCookie(b,d,c){var a=b+"="+escape(d)+"; path=/"+((c==null)?"":"; expires="+c.toGMTString());document.cookie=a}function foo_getCookie(c){var a=document.cookie;var b=c+"=";if(a.length>0){begin=a.indexOf(b);if(begin!=-1){begin+=b.length;end=a.indexOf(";",begin);if(end==-1){end=a.length}return unescape(a.substring(begin,end))}}return null};
