/*@cc_on
  @if (@_jscript_version >= 5)
@*/
if(typeof ns_API=="undefined"){var ns_API={loadEvents:[],reservedLabels:/^\s*(ns\_.*|agent|availscreen|colordepth|cookie|corporate|day|full\_loading\_time|html\_loading\_time|httpreferer|innersize|ip|java|lang|mimetypes|name|newcookie|offset|or|outersize|p|pie|plugins|referrer|screen|site|\_t|time|type|url|ver)\s*$/i,regCounter:/^https?:\/\/([^\/]+)\/([^\/]+)\/([^\/]+)\/s\?([\w_\-\.\[\]\(\)\$\~\{\}\*\^\,]{1,200})/}}if(typeof ns_API.addEvent=="undefined"){ns_API.addEvent=(document.addEventListener)?(function(e,f,d){e.addEventListener(f,d,false)}):(document.attachEvent)?(function(e,f,d){e.attachEvent("on"+f,d)}):new Function}if(typeof ns_API.isIE=="undefined"){ns_API.isIE=
/*@cc_on!@*/
false}if(typeof ns_API.isIE7=="undefined"){ns_API.isIE7=(ns_API.isIE&&/MSIE\s*([7-9]|[1-9]\d+)/i.test(navigator.userAgent))?true:false}if(typeof ns_API.getJSPageURL=="undefined"){ns_API.getJSPageURL=function(){return(document.URL)?document.URL:document.location.domain+document.location.pathname+document.location.search}}if(typeof ns_API.onDocumentReady=="undefined"){ns_API.onDocumentReady=function(j){try{if(document.addEventListener&&!/webkit/i.test(navigator.userAgent)){document.addEventListener("DOMContentLoaded",j,false)}else{if(/msie/i.test(navigator.userAgent)){var h="__ie_onload_"+new Date().getTime();document.write('<script id="ns_api_defered'+h+'" defer="defer"><\/script>');var g=document.getElementById(h);g.onreadystatechange=function(){if(/complete/i.test(this.readyState)){j()}}}else{if(/webkit/i.test(navigator.userAgent)){var e=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(e);j()}},10)}else{throw 0}}}}catch(i){ns_API.addEvent(window,"load",j)}}}if(typeof ns_API.addLoadEvent=="undefined"){ns_API.addLoadEvent=function(b){ns_API.loadEvents.push(b);if(!ns_API.loadEventHandler){ns_API.loadEventHandler=ns_API.onDocumentReady(function(){for(var a=0,d;(d=ns_API.loadEvents[a]);a++){if(d instanceof Function){d()}}})}}}if(typeof ns_API.constructLabel=="undefined"){ns_API.constructLabel=function(b){return b.replace(/[^\-_\.a-zA-Z0-9]/g,"___")}}if(typeof ns_API.startTime=="undefined"){ns_API.startTime=(typeof ns_loadingtime1!="undefined"&&!isNaN(parseInt(ns_loadingtime1)))?ns_loadingtime1:ns_API.addLoadEvent(function(){ns_API.startTime=new Date().getTime()})}if(typeof ns_API.log=="undefined"){ns_API.log=function(h,j,k){var g=++ns_API.log.totalLogs+":"+new Date().getTime();var i=new Image();var l=function(){if(ns_API.log.timerItems[g]){window.clearTimeout(ns_API.log.timerItems[g]);delete ns_API.log.timerItems[g]}if(k&&k instanceof Function){k()}delete ns_API.log.logImages[g];i.onload=i.onerror=i.onabort=new Function};i.onload=i.onabort=i.onerror=l;ns_API.log.timerItems[g]=window.setTimeout(l,j);i.src=h};ns_API.log.logImages={};ns_API.log.timerItems={};ns_API.log.totalLogs=0;
/*@end
@*/
}
/*@cc_on
  @if (@_jscript_version >= 5)
@*/
ns_API.forms={DEBUG:false,isProtoTyped:false,NORMALNAMEPREFIX:"ns_fo_fn",NORMALVALUEPREFIX:"ns_fo_fv",HIDDENNAMEPREFIX:"ns_fo_hn",HIDDENVALUEPREFIX:"ns_fo_hv",PASSWORDNAMEPREFIX:"ns_fo_pn",PASSWORDVALUEPREFIX:"ns_fo_pv",RESERVEDPREFIX:"ns_fo_",instances:[],isRegistered:function(f){var g=false;for(var h=0,e;!g&&(_form=this.instances[h]);h++){if(f==e){g=true}}if(!g){this.instances.push(f)}return g},getInstanceByForm:function(f){if((typeof f).toLowerCase()=="object"){for(var d=0,e;(e=this.instances[d]);d++){if(e.form==f){return e}}}else{if((typeof f).toLowerCase()=="string"){for(var d=0,e;(e=this.instances[d]);d++){if(e.formName==f){return e}}}}},dispatchValidationError:function(m,h,n,k,l,j){var i=this.getInstanceByForm(m);if(i.hasValidationError){return}if(i instanceof ns_API.form){i.onError.apply(i,Array.prototype.slice.call(arguments,1))}},dispatchSubmitEvent:function(c){var d=this.getInstanceByForm(c);if(d instanceof ns_API.form){d.onSubmit.apply(d)}}};ns_API.forms.exception=function(){this.totalErrors=0;this.errorField=null;this.msg="";this.overview={}};var ns_p=ns_API.forms.exception.prototype;ns_p.append=function(e,g){var f=e.split(";");if(f.length<0){return}this.errorField=f[f.length-1];this.msg=g;for(var h=0,e;(field=f[h]);h++){field=(h+1)+"_"+field.toLowerCase();if(this.overview[field]){this.overview[field]++}else{this.overview[field]=1}}this.totalErrors++};ns_p.getOverview=function(){var d=[];for(var c in this.overview){d.push(c+":"+this.overview[c])}return d};ns_p.getLastErrorField=function(){return this.errorField};ns_p.getTotalErrors=function(){return this.totalErrors};ns_p.getLabels=function(c){var d=[];if(this.getOverview().join("|")!=""){d.push(ns_API.forms.RESERVEDPREFIX+"vfo="+this.getOverview().join("|"))}if(this.errorField){d.push(ns_API.forms.RESERVEDPREFIX+"vfl="+this.errorField.toLowerCase())}if(this.totalErrors>0){d.push(ns_API.forms.RESERVEDPREFIX+"vf="+this.totalErrors)}d.push(ns_API.forms.RESERVEDPREFIX+"vfe="+escape(this.msg.substring(0,255)));return d};ns_API.form=function(d,c){this.autoEvents=(c==null)?true:Boolean(c);this.MAXFIELDSIZE=255;this.version="1.2.5";this.formName=(typeof d=="string")?d:null;this.form=((typeof d=="object")&&/^form$/i.test(d.tagName))?d:null;this.url=null;this.sequence=1;this.id=null;this.isFormAbandoned=false;this.isFormActive=false;this.isFormSubmitted=false;this.hasValidationError=false;this.error=new ns_API.forms.exception();this.lastField=null;this.startTime=null;this.fields={SUBMIT:{NORMAL:"",HIDDEN:"",PASSWORD:""},SUBMITABANDON:{NORMAL:"",HIDDEN:"",PASSWORD:""},SUBMITVALFAIL:{NORMAL:"",HIDDEN:"",PASSWORD:""}};this.init()};ns_p=ns_API.form.prototype;ns_p.init=function(){var d=this;try{if(this.form==null){if(!this.formName){throw"Please secify the name of the form to be measured"}if(document.forms[this.formName]){this.form=document.forms[this.formName]}else{if(document.getElementById(this.formName)&&/^form$/i.test(document.getElementById(this.formName).tagName)){this.form=document.getElementById(this.formName)}else{throw"Form not found on page ["+this.formName+"]"}}}else{if(this.form.name!=""){this.formName=this.form.name}else{this.formName="unnamed"}}if(ns_API.forms.isRegistered(this)){throw"Form already registered by ns_API"}this.id=escape(this.formName)+"_"+new Date().getTime();this.addEvents();if(!ns_API.isIE&&typeof HTMLFormElement!="undefined"&&!ns_API.forms.isProtoTyped&&this.autoEvents){ns_API.forms.isProtoTyped=true;this.form.oldOnSubmit=this.form.onsubmit;HTMLFormElement.prototype.ns_submit=HTMLFormElement.prototype.submit;HTMLFormElement.prototype.submit=function(){if(((this.oldOnSubmit!=null)&&(this.oldOnSubmit()!=false))||(this.oldOnSubmit==null)){var a=ns_API.forms.getInstanceByForm(this);if(a){a.isFormSubmitted=true;a.onSubmit()}this.ns_submit()}else{return false}}}else{if(ns_API.isIE&&this.autoEvents){this.form.oldOnSubmit=this.form.onsubmit;this.form.onsubmit=function(){if(((this.oldOnSubmit!=null)&&(this.oldOnSubmit()!=false))||(this.oldOnSubmit==null)){var a=ns_API.forms.getInstanceByForm(this);if(a){a.isFormSubmitted=true;a.onSubmit()}}else{return false}}}}try{if(window.ns_pixelUrl){this.url=window.ns_pixelUrl.match(ns_API.regCounter)[0]}}catch(c){}}catch(c){this.throwException(c)}};ns_p.paramToFieldList=function(c,d){return(c)?/\s*\*\s*/.test(c)?(d)?"*":null:c.replace(/\s*([^;\s]+)\s*(;?)/g,"$1$2"):null};ns_p.log=function(o,k){try{if(!ns_API.forms.DEBUG&&!ns_API.regCounter.test(this.url)){throw"Please specify a valid sitestat url"}k.push("ns_jspageurl="+ns_API.getJSPageURL());var n=[];for(var p=0;p<k.length;p++){if((typeof k[p]=="object")&&(k[p].constructor.toString().match(/array/i)!=false)&&(k[p][0]=="checkbox")&&(typeof p=="number")){var l=k[p][1].split("=");if(n[l[0]]==null){n[l[0]]=l[1]}else{n[l[0]]+=","+l[1]}k.splice(p,1);p--}}for(var p in n){if(typeof n[p]=="string"){k.push(p+"="+n[p].substring(0,this.MAXFIELDSIZE))}}var i=false,e=(ns_API.isIE)?new Image():document.body.appendChild(document.createElement("img"));window.ns_forms_timer=function(a,b){return function(){b=true;if(window.ns_forms_timer_id){window.clearTimeout(window.ns_forms_timer_id)}a.onload=a.onerror=function(){return}}}(e,i);window.ns_forms_timer_id=window.setTimeout("window.ns_forms_timer()",5000);e.onload=e.onerror=window.ns_forms_timer;e.src=this.url+k.join("&");this.sequence++}catch(m){this.throwException(m)}};ns_p.addSubmitEvent=function(g,h,f){if(!this.form){return}var e=this;this.fields.SUBMIT.normal=this.paramToFieldList(g,true);this.fields.SUBMIT.hidden=this.paramToFieldList(h,true);this.fields.SUBMIT.password=this.paramToFieldList(f,true);if(this.autoEvents){ns_API.addEvent(this.form,"submit",function(){e.onSubmit.apply(e,arguments)})}};ns_p.addAbandonEvent=function(g,h,f){if(!this.form){return}var e=this;this.fields.SUBMITABANDON.normal=this.paramToFieldList(g);this.fields.SUBMITABANDON.hidden=this.paramToFieldList(h);this.fields.SUBMITABANDON.password=this.paramToFieldList(f);if(ns_API.isIE){ns_API.addEvent(window,"beforeunload",function(){e.onAbandon.apply(e,arguments)})}else{ns_API.addEvent(window,"unload",function(){e.onAbandon.apply(e,arguments)})}};ns_p.onError=function(h,f,i,j,g){this.error.append(h,f);this.fields.SUBMITVALFAIL.normal=this.paramToFieldList(i,true);this.fields.SUBMITVALFAIL.hidden=this.paramToFieldList(j);this.fields.SUBMITVALFAIL.password=this.paramToFieldList(g);this.hasValidationError=true;this.log("submitvalfail",this.getFormLabels("submitvalfail"))};ns_p.onSubmit=function(c){if(!this.isFormActive||this.hasValidationError||this.isFormAbandoned){return}this.isFormSubmitted=true;this.isFormActive=false;var d=this;if(ns_API.isIE||!this.autoEvents||window.opera){this.log("submit",this.getFormLabels("submit"))}else{ns_API.addEvent(window,"unload",function(){d.log.call(d,"submit",d.getFormLabels("submit"))})}};ns_p.onAbandon=function(){if(this.isFormSubmitted||!this.isFormActive||this.isFormAbandoned){return}this.isFormAbandoned=true;this.log("submitabandon",this.getFormLabels("submitabandon"))};ns_p.getFormLabels=function(G,A){if(!/^(submitabandon|submit|submitvalfail)$/i.test(G)){return}G=G.toLowerCase();if(this.lastField&&/option/i.test(this.lastField.tagName)){this.lastField=this.lastField.parentNode}var I=new Date().getTime(),i=["&type=hidden","ns_fo_ev="+G,ns_API.forms.RESERVEDPREFIX+"id="+this.id,ns_API.forms.RESERVEDPREFIX+"la="+escape((this.lastField&&this.lastField.name)?this.lastField.name.toLowerCase():""),ns_API.forms.RESERVEDPREFIX+"sq="+this.sequence,ns_API.forms.RESERVEDPREFIX+"t0="+((typeof ns_API.startTime=="number")?I-ns_API.startTime:null),ns_API.forms.RESERVEDPREFIX+"t1="+((this.startTime)?I-this.startTime:null)].concat((A&&A instanceof Array)?A:[]).concat(this.error.getLabels(G));this.writeDebugStatement("<b>event</b>&nbsp;[<font color='green'>"+G+"</font>]");this.writeDebugStatement("<b>default labels:</b><br><font color='steelblue'>"+i.join("<br>")+"</font>");var E=new RegExp(),B=this.fields[G.toUpperCase()],H="";var t=[],y=[],w=[];var u=[],C=[],x=[];for(var z=0,J,D,v,F;(J=this.form[z]);z++){if(!J.name||!J.type){continue}if(J.type=="radio"&&H.indexOf(J.name)>-1){continue}F=this[J.type.replace(/\-/g,"_")+"Value"];v=J.name.replace(/([\$\[\]])/g,"\\$1");E.compile(v+";?","i");if((J.type=="hidden"&&(!!B.hidden&&(/^(submit|submitvalfail)$/i.test(G)&&B.hidden=="*")||E.test(B.hidden)))||(J.type=="password"&&(!!B.password&&(/^(submit|submitvalfail)$/i.test(G)&&B.hidden=="*")||E.test(B.password)))||((/^(submit|submitvalfail)$/i.test(G)&&B.normal=="*")||E.test(B.normal))){if(F instanceof Function){D=F.call(this,J);this.writeDebugStatement("<font color='steelblue'>called getFormLabel:</font><b>"+J.name+"</b>:<i>"+J.type+"</i>&nbsp;(<font color='green'>"+D+"</font>)");if(D){switch(J.type){case"hidden":y[y.length]=D.substring(0,D.indexOf("="));C[C.length]=D.substring(D.indexOf("=")+1);continue;case"password":w[w.length]=D.substring(0,D.indexOf("="));x[x.length]=D.substring(D.indexOf("=")+1);continue;default:if(typeof D=="string"){t[t.length]=D.substring(0,D.indexOf("="));u[u.length]=D.substring(D.indexOf("=")+1);continue}else{if(typeof D=="object"){t[t.length]=D[1].substring(0,D[1].indexOf("="));u[u.length]=D[1].substring(D[1].indexOf("=")+1)}}}}if(J.type=="radio"){H+=J.name+";"}}}}i.push(ns_API.forms.NORMALNAMEPREFIX+"="+t.join(";"));i.push(ns_API.forms.NORMALVALUEPREFIX+"="+u.join(";"));i.push(ns_API.forms.PASSWORDNAMEPREFIX+"="+w.join(";"));i.push(ns_API.forms.PASSWORDVALUEPREFIX+"="+x.join(";"));i.push(ns_API.forms.HIDDENNAMEPREFIX+"="+y.join(";"));i.push(ns_API.forms.HIDDENVALUEPREFIX+"="+C.join(";"));return i};ns_p.throwException=function(b){if(ns_API.forms.DEBUG){alert("Form API\n"+(b.message||b))}};ns_p.addEvents=function(){var b=this;ns_API.addEvent(this.form,"keydown",function(a){a=a||window.event;if(a.ctrlKey||a.altKey||a.shiftKey){return}b.onUserEvent.call(b,a,a.srcElement||a.target)});ns_API.addEvent(this.form,"mousedown",function(a){a=a||window.event;b.onUserEvent.call(b,a,a.srcElement||a.target)})};ns_p.onUserEvent=function(c,d){if(!(d&&d.form&&d.form==this.form)){return}if(d.type!="submit"){this.lastField=d}this.isFormSubmitted=false;this.hasValidationError=false;this.isValidated=true;if(!/^(input|textarea|select|option)$/i.test(d.tagName)||this.isFormActive){return}this.onStart()};ns_p.onStart=function(b){this.isFormActive=true;this.startTime=new Date().getTime();this.writeDebugStatement("<font color='red'>start of form <i>"+this.formName+"</i>:</font> "+new Date(this.startTime).toGMTString())};ns_p.writeDebugStatement=function(c){if(!ns_API.forms.DEBUG){return}var d=(top.debugWindow)?top.debugWindow.document.getElementById("debug"):document.getElementById("debug");if(d){d.innerHTML=c+"<hr>"+d.innerHTML}};ns_p.getScriptVersion=function(){return this.version};ns_p.getURL=function(){return this.url};ns_p.setURL=function(b){this.url=b};ns_p.setMaxFieldSize=function(b){b=b||0;this.MAXFIELDSIZE=(!isNaN(parseInt(b))&&parseInt(b)>0)?b:this.MAXFIELDSIZE};ns_p.select_oneValue=function(b){return ns_API.constructLabel(b.name.toLowerCase())+"="+escape(b.options[b.selectedIndex].value.substring(0,this.MAXFIELDSIZE))};ns_p.select_multipleValue=function(g){var f=[];for(var h=0,e;(option=g.options[h]);h++){if(option.selected){f.push(ns_API.constructLabel(g.name.toLowerCase())+"="+escape(option.value.substring(0,this.MAXFIELDSIZE)))}}return f.join("&")};ns_p.textValue=function(b){return ns_API.constructLabel(b.name.toLowerCase())+"="+escape(b.value.substring(0,this.MAXFIELDSIZE))};ns_p.textareaValue=function(b){return this.textValue(b)};ns_p.radioValue=function(g){var h="";for(var e=0,f;(f=g.form[g.name][e]);e++){if(f.checked){h=f.value;break}}return ns_API.constructLabel(g.name.toLowerCase())+"="+escape(h.substring(0,this.MAXFIELDSIZE))};ns_p.checkboxValue=function(b){if(b.checked){return["checkbox",ns_API.constructLabel(b.name.toLowerCase())+"="+escape(b.value.substring(0,this.MAXFIELDSIZE))]}};ns_p.hiddenValue=function(b){return ns_API.constructLabel(b.name.toLowerCase())+"="+escape(b.value.substring(0,this.MAXFIELDSIZE))};ns_p.passwordValue=function(b){return ns_API.constructLabel(b.name.toLowerCase())+"="+((b.value=="")?"no":"yes")};
/*@else 
  var ns_API = {};
  ns_API.form = function() {};
  ns_API.form.prototype.addSubmitEvent  = function() {};
  ns_API.form.prototype.addAbandonEvent = function() {};
  ns_API.forms = function() {};
  ns_API.forms.prototype.dispatchValidationError = function() {};
  @end
@*/
