var Event={onload:[],loaded:function(){if(arguments.callee.done){return }arguments.callee.done=true;for(i=0;i<Event.onload.length;i++){Event.onload[i]()}},pageLoad:function(A){var B=window.onload;if(typeof window.onload!="function"){window.onload=A}else{window.onload=function(){B();A()}}},domLoad:function(fireThis){this.onload.push(fireThis);if(document.addEventListener){document.addEventListener("DOMContentLoaded",Event.loaded,null)}if(/KHTML|WebKit/i.test(navigator.userAgent)){var _timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(_timer);delete _timer;Event.loaded()}},10);
/*@cc_on @*/
/*@if (@_win32)
		var proto = "src='javascript:void(0)'";
		if (location.protocol == "https:") proto = "src=//0";
		document.write("<scr"+"ipt id=__ie_onload defer " + proto + "><\/scr"+"ipt>");
		var script = document.getElementById("__ie_onload");
		script.onreadystatechange = function() {
		    if (this.readyState == "complete") {
		        Event.loaded();
		    }
		};
		/*@end @*/
}this.pageLoad(Event.loaded)},add:function(C,B,A){if(C.attachEvent){C["e"+B+A]=A;C[B+A]=function(){C["e"+B+A](window.event)};C.attachEvent("on"+B,C[B+A])}else{C.addEventListener(B,A,false)}},remove:function(C,B,A){if(C.detachEvent){C.detachEvent("on"+B,C[B+A]);C[B+A]=null}else{C.removeEventListener(B,A,false)}}};function flickerFix(){try{document.execCommand("BackgroundImageCache",false,true)}catch(A){}}function emptyElement(A){while(A.firstChild){A.removeChild(A.firstChild)}}function insertAfter(C,A){var B=A.parentNode;B.insertBefore(C,A.nextSibling)}var Validators={initFix:function(B,A){B=document.getElementById(B);Event.add(B,"click",function(){Validators.renderFix(A)})},renderFix:function(C){var C=document.getElementById(C);var A=C.getElementsByTagName("span");for(var B=0,D=A.length;B<D;B++){if(A[B].className=="error"&&A[B].style.display=="inline"){A[B].style.display="block"}}},insertEvent:function(A){var A=document.getElementById(A);if(typeof (Page_ClientValidate)=="function"){if(Page_IsValid){alert("its valid");var B=A.onclick;A.onclick=function(){A.disabled=true;B}}}}};var Position={getElement:function(A){if(typeof (A)=="string"){return document.getElementById(A)}else{if(typeof (A)=="object"){return A}else{return null}}},getLeft:function(B){B=this.getElement(B);var A=0;if(B.offsetParent){while(B.offsetParent){A+=B.offsetLeft;B=B.offsetParent}}else{if(B.x){A+=B.x}}return A},getTop:function(B){B=this.getElement(B);var A=0;if(B.offsetParent){while(B.offsetParent){A+=B.offsetTop;B=B.offsetParent}}else{if(B.y){A+=B.y}}return A},anchor:function(D,B,A){D=this.getElement(D);B=this.getElement(B);var C=this.getTop(B);var E=this.getLeft(B);if(D&&B){D.style.top=(A.offsetY)?A.offsetY+C+"px":C+"px";D.style.left=(A.offsetX)?A.offsetX+E+"px":E+"px";D.style.position="absolute"}},position:function(B,A){if(B){if(A.top){B.style.top=(A.offsetY)?A.offsetY+A.top+"px":A.top+"px"}if(A.right){B.style.right=(A.offsetX)?A.offsetX+A.right+"px":A.right+"px"}if(A.bottom){B.style.bottom=(A.offsetY)?A.offsetY+A.bottom+"px":A.bottom+"px"}if(A.left){B.style.left=(A.offsetX)?A.offsetX+A.left+"px":A.left+"px"}if(A.position){B.style.position=A.position}}}};var UrlUtils={qs:function(C){var A=location.href;if(A.indexOf("?")!=-1){var H=A.substring(A.indexOf("?")+1);var B=H.split("&");var F=[],J,I,D;for(var E=0,G=B.length;E<G;E++){D=B[E].split("=");if(C&&C==D[0]){return D[1].toString()}F[D[0]]=D[1]}if(F.length>0){return F}else{return null}}},protocol:function(){var A=location.href;return A.substring(0,A.indexOf("://"))},absoluteWebPath:function(A){var B=Config.absoluteHttpPath;if(this.protocol().toLowerCase()=="https"){B=Config.absoluteHttpsPath}return(A)?B+A:B},newURL:function(C,F,B){var E=C;if(F&&B){var A="";for(var D=0,G=F.length;D<G;D++){A+="&"+encodeURIComponent(F[D])+"="+encodeURIComponent(B[D])}A="?"+A.substring(1,A.length)}return E+A},redirect:function(A){self.location.href=A;return false},replaceValue:function(B,E,D){if(B.indexOf(E)>0){var C=B.substring(0,B.indexOf(E)+E.length+1);var A=B.substring(B.indexOf(E)+E.length+1);if(A.indexOf("&")>0){A=A.substring(A.indexOf("&"));return C+encodeURIComponent(D)+A}else{return C+encodeURIComponent(D)}}else{return null}}};var ProductImagery={list:null,data:"",count:0,init:function(){this.list=document.getElementById("alt-images");if(!this.list){return }var items=this.list.getElementsByTagName("li");var link,img;this.count=items.length;if(this.count>0){for(var i=0;i<this.count;i++){link=items[i].getElementsByTagName("a")[0];img=items[i].getElementsByTagName("img")[0];this.data+='"i'+(i+1)+'": {';this.data+='"href": "'+link.href+'",';this.data+='"title": "'+img.alt+'"';this.data+="}";if(i+1<this.count){this.data+=","}}this.data=eval("({"+this.data+"})")}},get:function(n){if(n<=this.count){return eval("this.data.i"+n)}else{return null}}};var PopUp={topPos:0,leftPos:0,height:400,width:600,settings:null,win:null,winName:"pop",getURL:function(A){if(typeof (A)=="object"){return A.href}else{return A}},win:null,newWindow:function(B,A){return this.openWindow(B,{popup:"window"})},newPopUp:function(B,A){if(A){A.popup="popup"}else{A={popup:"popup"}}return this.openWindow(B,A)},openWindow:function(C,A){if(A){this.height=(A.height)?A.height:this.height;this.width=(A.width)?A.width:this.width}this.leftPos=(screen.width)?(screen.width-this.width)/2:0;this.topPos=(screen.height)?(screen.height-this.height)/2:0;this.settings=(A&&A.popup=="popup")?"height="+this.height+",width="+this.width+",top="+this.topPos+",left="+this.leftPos+",scrollbars=yes,noresize":"";var B=this.getURL(C);this.win=window.open(B,this.winName,this.settings);this.win.focus();return false},hookup:function(D,C){var A=document.getElementsByTagName("a");for(var B=0,E=A.length;B<E;B++){if(A[B].getAttribute("rel")==D){A[B].onclick=C}}}};var Validators={findSubmit:function(C){var B=document.getElementById("content");var D=B.getElementsByTagName("input");for(var A=0,E=D.length;A<E;A++){if(D[A].className=="submit"){this.initFix(D[A].id,C);break}}},initFix:function(B,A){B=document.getElementById(B);if(B){Event.add(B,"click",function(){Validators.renderFix(A)})}},renderFix:function(C){var C=document.getElementById((C)?C:"content");var A=C.getElementsByTagName("span");for(var B=0,D=A.length;B<D;B++){if(A[B].className=="error"&&A[B].style.display=="inline"){A[B].style.display="block"}}}};var FormUtils={preselectDropDown:function(C,A){for(var B=0,D=C.options.length;B<D;B++){if(C.options[B].value==A){C.options[B].selected=true;break}}},assignButton:function(E,C,B){var D;if(window.event){D=E.keyCode}else{if(E.which){D=E.which}}if(D==13){var A=document.getElementById(B);if(A){A.focus();return false}}return true},queryString:"",addQueryString:function(C,A){var B=(this.queryString.length>0)?"&":"";this.queryString+=B+encodeURIComponent(C)+"="+encodeURIComponent(A)},getOption:function(E,B,A){var G=(!B||B=="document")?document:document.getElementById(B);var C=G.getElementsByTagName("input");for(var D=0,F=C.length;D<F;D++){if(C[D].name&&C[D].name==E){return this.getValue(C[D].id,B,A)}}},collect:function(G,A){this.queryString="";var A;if(typeof (G)=="object"){A=(!A||A=="document")?document:document.getElementById(A);for(var C=0,H=G.length;C<H;C++){var D=document.getElementById(G[C]);if(D){this.getValue(D,A)}}}else{A=document.getElementById(G);var E=A.getElementsByTagName("input");var B=A.getElementsByTagName("select");var F=A.getElementsByTagName("textarea");for(var C=0,H=E.length;C<H;C++){this.getValue(E[C],A,true)}for(var C=0,H=B.length;C<H;C++){this.getValue(B[C],A,true)}for(var C=0,H=F.length;C<H;C++){this.getValue(F[C],A,true)}}return this.queryString},getValue:function(F,B,A){F=(typeof (F)=="string")?document.getElementById(F):F;B=(!B||B=="document")?document:document.getElementById(B);var H=F.id,C=null;switch(F.nodeName.toLowerCase()){case"input":switch(F.getAttribute("type").toLowerCase()){case"text":C=F.value;break;case"checkbox":if(F.checked){C=F.value}break;case"radio":H=F.name;var E=B.getElementsByTagName("input");for(var D=0,G=E.length;D<G;D++){if(E[D].name==F.name&&E[D].checked){C=E[D].value;break}}break;case"password":C=F.value;break;case"hidden":C=F.value;break}break;case"select":if(F.multiple){l=[];for(var D=0,G=F.length;D<G;D++){if(F.options[D].selected){l.push(F.options[D].value)}}C=l.join("|")}else{C=F.value}break;case"textarea":C=F.value;break}if(H!=null&&H!=""&&C!=null&&C!=""){if(A){this.addQueryString(H,C)}else{return C}}}};var Cookie={maxLength:3000,escape:true,splitter:"||",get:function(B,A){this.escape=(A)?false:true;return this.getValues(B+"_0",true)},getValues:function(A,C){var B=this.getValue(A);if(B){var D=this.splitter.length;var E=B.indexOf(this.splitter);if(E>0){return B.substr(0,E-1)+this.getValues(B.substr(E+D),true)}else{return B}}},getValue:function(D){var B=D+"=";var F=B.length;var A=document.cookie.length;var E=0;while(E<A){var C=E+F;if(document.cookie.substring(E,C)==B){return this.getOffset(C)}E=document.cookie.indexOf(" ",E)+1;if(E==0){break}}return null},getOffset:function(B){var A=document.cookie.indexOf(";",B);if(A==-1){A=document.cookie.length}if(this.escape){return unescape(document.cookie.substring(B,A))}else{return document.cookie.substring(B,A)}},set:function(A,E){var C=[];for(var B=0,D=E.length;B<D;B+=this.maxLength){if((B+this.maxLength)>D){C.push(E.substr(B))}else{C.push(E.substr(B,this.maxLength+1))}}var F;for(var B=0,D=C.length;B<D;B++){F=(B+1!=D)?this.splitter+A+"_"+(B+1):"";this.setValue(A+"_"+B,C[B]+F)}},setValue:function(A,D){var C=new Date();C.setTime(C.getTime()+2000*24*60*60*1000);var B="; expires="+C.toGMTString();var E="; path=/";document.cookie=A+"="+escape(D)+B+E},kill:function(A){var B="; expires=Thu, 01-Jan-1970 00:00:01 GMT";var C="; path=/";document.cookie=A+"="+B+C}};var AjaxUtils={busy:{defaultId:"ajax-load",init:function(A){var B=document.createElement("div");B.className="ajax-load";B.id=(A)?A:AjaxUtils.busy.defaultId;return B},kill:function(A){A=(A)?A:AjaxUtils.busy.defaultId;var B=document.getElementById(A);if(B){B.parentNode.removeChild(B)}},button:function(A){if(/-o.gif/.test(A.src)){A.src=A.src.replace("-o.gif",".gif")}else{A.src=A.src.replace(".gif","-o.gif")}}},freeze:function(){if(document.body.onclick&&typeof (document.body.onclick)==="function"){document.body.onclick=""}else{document.body.onclick=function(){return false}}},unfreeze:function(){this.freeze()},access:{preferences:null,readerCheck:null,readerElem:null,init:function(){this.getPreferences();this.readerElem=document.getElementById("txtAjaxPrefReader");if(this.preferences){this.readerElem.checked=this.preferences.assisted}},reader:function(A){this.getPreferences();if(this.preferences){Debug.w("Ajax preferences are set");this.readerCheck=this.preferences.assisted;Debug.p("Reader enabled",this.preferences.assisted);this.readerElem.checked=this.preferences.assisted}else{Debug.w("Ajax preferences are not set - using form");this.readerCheck=(this.readerElem&&this.readerElem.checked)?true:false}if(this.readerCheck){alert("Update - "+A)}},setPreferences:function(B,A){Cookie.setValue("preferences","{'"+B+"' : "+A.checked+"}");if(B==="assisted"){this.readerCheck=new Boolean(A.checked)}},getPreferences:function(){this.preferences=Cookie.getValue("preferences");Debug.p("Ajax cookie",this.preferences);this.preferences=Cookie.toJson(this.preferences)},killPreferences:function(){Cookie.kill("preferences")},debugPreferences:function(){this.getPreferences()}}};function Ajax(B,C,A){if(B){this.set(B,C,A)}}Ajax.prototype.set=function(C,E,B){if(!document.getElementById){return }this.debug=false;this.param="";this.method="GET";this.req=null;this.timeoutDuration=1000000;this.timeCount=false;this.timeExpired=false;this.response=null;this.url="";if(typeof (B)=="object"){this.output=B}else{this.output=(document.getElementById(B))?document.getElementById(B):document.body}if(typeof (C)=="object"){if(C.href){this.url=C.href;this.form=false}else{this.form=true}}else{if(typeof (C)=="string"){this.url=C}}this.url=this.url.replace(/:80|:443/,"");if(this.url.indexOf("?")!=-1){var D=this.url.indexOf("?")+1;var A=this.url.substr(D);this.url=this.url.substr(0,D);this.addParam(A)}this.addParam(E);Debug.write("Ajax setup")};Ajax.prototype.get=function(){Debug.write("Get Ajax response");var A=this;this.req=this.getXHR();if(!this.req){return this.fail()}if(this.debug){alert("urlparam = "+this.addUrlParam(this.url,this.param))}Debug.write("URL + Param = "+this.addUrlParam(this.url,this.param));this.req.open(this.method,this.addUrlParam(this.url,this.param),true);this.req.setRequestHeader("If-Modified-Since","Wed, 02 Nov 2006 00:00:00 GMT");this.req.setRequestHeader("Connection","close");this.req.onreadystatechange=function(){var B=A;Debug.p("Ajax ready state",B.req.readyState);if(B.req.readyState==2){B.timeCount=window.setTimeout(function(){Debug.p("Ajax ready state (timeout)",B.req.readyState);if(B.req.readyState==2){Debug.p("Ajax ready state (time expired)",B.req.readyState);B.timeExpired=true;B.req.abort();B.timeout()}},B.timeoutDuration)}if(B.req.readyState==4&&!B.timeExpired){Debug.p("Ajax loaded",B.req.readyState);window.clearTimeout(B.timeCount);Debug.write("Ajax page status = "+B.req.status);if(/200|304/.test(B.req.status)){B.response=B.req.responseText;B.complete()}else{B.fail()}}};Debug.write("Ajax URL = "+this.url);Debug.write("Ajax querystring = "+this.param);if(this.method=="POST"){this.req.send(this.param)}else{this.req.send(null)}this.busy()};Ajax.prototype.getXHR=function(){Debug.write("Get XHR");try{return new XMLHttpRequest()}catch(A){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(A){return null}}};Ajax.prototype.setParam=function(A){this.param=null;this.addParam(A)};Ajax.prototype.addParam=function(C,B){if(C==null||C==""){return }if(typeof (C)=="object"){for(var A in C){this.param+="&"+encodeURIComponent(A)+"="+encodeURIComponent(C[A])}}else{if(typeof (C)=="string"){if(B){this.param+="&"+encodeURIComponent(C)+"="+encodeURIComponent(B)}else{this.param+="&"+C}}}};Ajax.prototype.removeParam=function(D){var B=new RegExp(D);var C=this.param.split("&");var F="";for(var A=0,E=C.length;A<E;A++){if(!B.test(C[A])){F+="&"+C[A]}}this.param=F.substr(1)};Ajax.prototype.addUrlParam=function(A,B){if(A.indexOf("?")==-1){if(B.charAt(0)=="&"){B=B.substring(1)}return A+"?"+B}else{if(B.charAt(0)=="&"){B=B.substring(1)}return A+B}};Ajax.prototype.toJson=function(s){if(!s){s=this.response}return eval("("+s+")")};Ajax.prototype.complete=function(){Debug.write("Ajax complete");var A=document.createTextNode(this.req.responseText);this.output.appendChild(A)};Ajax.prototype.busy=function(){Debug.write("Ajax busy");if(Config.debug){var A=document.createTextNode("Busy");this.output.appendChild(A)}};Ajax.prototype.fail=Config.ajaxFail;Ajax.prototype.timeout=function(){Debug.write("Ajax timeout");if(Config.debug){var A=document.createTextNode("Timeout");this.output.appendChild(A)}this.fallback()};Ajax.prototype.fallback=function(){Debug.write("Ajax fallback");if(Config.debug){var A=document.createTextNode("Fallback");this.output.appendChild(A)}if(this.form){document.form[0].submit()}else{window.location=this.url}};var Debug={release:!Config.debug,showAlert:false,console:null,lineCount:1,init:function(){this.console=document.getElementById("console");if(!this.console){var B=document.createElement("div");B.id="debug";this.console=document.createElement("div");this.console.id="console";var C=document.createElement("p");C.id="debug-toggle";var A=document.createElement("a");A.innerHTML="Debug - Close";A.href="#";A.onclick=function(){return Debug.toggle(this)};C.appendChild(A);B.appendChild(C);B.appendChild(this.console);document.body.appendChild(B)}},w:function(B,A){this.write(B,A)},writeLine:function(C,D){if(this.release){return }this.console=document.getElementById("console");if(!this.console){this.init()}var D="";if(tabCount){D=" tab-"+tabCount}var A=document.createElement("p");A.className=(this.lineCount%2)?"alternate"+D:""+D;var B=document.createTextNode(C);A.appendChild(B);if(this.console.firstChild){this.console.insertBefore(A,this.console.firstChild)}else{this.console.appendChild(A)}this.lineCount++},write:function(D,C){if(this.release){return }this.console=document.getElementById("console");if(!this.console){this.init()}var E="";if(C){E=" tab-"+C}var A=document.createElement("p");A.className=(this.lineCount%2)?"alternate"+E:""+E;var B=document.createTextNode(D);A.appendChild(B);if(this.console.firstChild){this.console.insertBefore(A,this.console.firstChild)}else{this.console.appendChild(A)}this.lineCount++},alert:function(A){if(!this.release&&this.showAlert){alert(A)}},p:function(G,E,D){if(this.release){return }this.console=document.getElementById("console");if(!this.console){this.init()}var F="";if(D){F=" tab-"+D}var A=document.createElement("p");A.className=(this.lineCount%2)?"alternate"+F:""+F;var H=document.createElement("strong");var C=document.createTextNode(G+" - ");H.appendChild(C);A.appendChild(H);var B=document.createTextNode(E);A.appendChild(B);if(this.console.firstChild){this.console.insertBefore(A,this.console.firstChild)}else{this.console.appendChild(A)}this.lineCount++},a:function(A){var C;for(var B=0,D=A.length;B<D;B++){C+=A[B]+", "}this.p("Array",C)},ex:function(C,B){if(this.release){return }this.console=document.getElementById("console");if(!this.console){this.init()}var D="";if(B){D=" tab-"+B}var A=document.createElement("p");A.className=(this.lineCount%2)?"alternate"+D:""+D;A.innerHTML=C;if(this.console.firstChild){this.console.insertBefore(A,this.console.firstChild)}else{this.console.appendChild(A)}this.lineCount++},toggle:function(A){if(this.console.style.display=="none"){this.console.style.display="block";A.innerHTML="Debug - Close"}else{this.console.style.display="none";A.innerHTML="Debug - Open"}return false}};window.onerror=function(B,A,C){if(!Debug.release){Debug.ex("Exception error:"+B+" <br />File: "+A+" <br />Line: "+C);return true}else{return false}};
