/*@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(b,a,c){b.addEventListener(a,c,false)}):(document.attachEvent)?(function(b,a,c){b.attachEvent("on"+a,c)}):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(a){try{if(document.addEventListener&&!/webkit/i.test(navigator.userAgent)){document.addEventListener("DOMContentLoaded",a,false)}else{if(/msie/i.test(navigator.userAgent)){var c="__ie_onload_"+new Date().getTime();document.write('<script id="ns_api_defered'+c+'" defer="defer"><\/script>');var d=document.getElementById(c);d.onreadystatechange=function(){if(/complete/i.test(this.readyState)){a()}}}else{if(/webkit/i.test(navigator.userAgent)){var f=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(f);a()}},10)}else{throw 0}}}}catch(b){ns_API.addEvent(window,"load",a)}}}if(typeof ns_API.addLoadEvent=="undefined"){ns_API.addLoadEvent=function(a){ns_API.loadEvents.push(a);if(!ns_API.loadEventHandler){ns_API.loadEventHandler=ns_API.onDocumentReady(function(){for(var b=0,c;(c=ns_API.loadEvents[b]);b++){if(c instanceof Function){c()}}})}}}if(typeof ns_API.constructLabel=="undefined"){ns_API.constructLabel=function(a){return a.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(e,c,b){var f=++ns_API.log.totalLogs+":"+new Date().getTime();var d=new Image();var a=function(){if(ns_API.log.timerItems[f]){window.clearTimeout(ns_API.log.timerItems[f]);delete ns_API.log.timerItems[f]}if(b&&b instanceof Function){b()}delete ns_API.log.logImages[f];d.onload=d.onerror=d.onabort=new Function};d.onload=d.onabort=d.onerror=a;ns_API.log.timerItems[f]=window.setTimeout(a,c);d.src=e};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(c){var b=false;for(var a=0,d;!b&&(_form=this.instances[a]);a++){if(c==d){b=true}}if(!b){this.instances.push(c)}return b},getInstanceByForm:function(a){if((typeof a).toLowerCase()=="object"){for(var c=0,b;(b=this.instances[c]);c++){if(b.form==a){return b}}}else{if((typeof a).toLowerCase()=="string"){for(var c=0,b;(b=this.instances[c]);c++){if(b.formName==a){return b}}}}},dispatchValidationError:function(a,f,g,c,b,d){var e=this.getInstanceByForm(a);if(e.hasValidationError){return}if(e instanceof ns_API.form){e.onError.apply(e,Array.prototype.slice.call(arguments,1))}},dispatchSubmitEvent:function(b){var a=this.getInstanceByForm(b);if(a instanceof ns_API.form){a.onSubmit.apply(a)}}};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(d,b){var c=d.split(";");if(c.length<0){return}this.errorField=c[c.length-1];this.msg=b;for(var a=0,d;(field=c[a]);a++){field=(a+1)+"_"+field.toLowerCase();if(this.overview[field]){this.overview[field]++}else{this.overview[field]=1}}this.totalErrors++};ns_p.getOverview=function(){var a=[];for(var b in this.overview){a.push(b+":"+this.overview[b])}return a};ns_p.getLastErrorField=function(){return this.errorField};ns_p.getTotalErrors=function(){return this.totalErrors};ns_p.getLabels=function(b){var a=[];if(this.getOverview().join("|")!=""){a.push(ns_API.forms.RESERVEDPREFIX+"vfo="+this.getOverview().join("|"))}if(this.errorField){a.push(ns_API.forms.RESERVEDPREFIX+"vfl="+this.errorField.toLowerCase())}if(this.totalErrors>0){a.push(ns_API.forms.RESERVEDPREFIX+"vf="+this.totalErrors)}a.push(ns_API.forms.RESERVEDPREFIX+"vfe="+escape(this.msg.substring(0,255)));return a};ns_API.form=function(a,b){this.autoEvents=(b==null)?true:Boolean(b);this.MAXFIELDSIZE=255;this.version="1.2.5";this.formName=(typeof a=="string")?a:null;this.form=((typeof a=="object")&&/^form$/i.test(a.tagName))?a: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 a=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 c=ns_API.forms.getInstanceByForm(this);if(c){c.isFormSubmitted=true;c.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 c=ns_API.forms.getInstanceByForm(this);if(c){c.isFormSubmitted=true;c.onSubmit()}}else{return false}}}}try{if(window.ns_pixelUrl){this.url=window.ns_pixelUrl.match(ns_API.regCounter)[0]}}catch(b){}}catch(b){this.throwException(b)}};ns_p.paramToFieldList=function(b,a){return(b)?/\s*\*\s*/.test(b)?(a)?"*":null:b.replace(/\s*([^;\s]+)\s*(;?)/g,"$1$2"):null};ns_p.log=function(h,c){try{if(!ns_API.forms.DEBUG&&!ns_API.regCounter.test(this.url)){throw"Please specify a valid sitestat url"}c.push("ns_jspageurl="+ns_API.getJSPageURL());var j=[];for(var g=0;g<c.length;g++){if((typeof c[g]=="object")&&(c[g].constructor.toString().match(/array/i)!=false)&&(c[g][0]=="checkbox")&&(typeof g=="number")){var b=c[g][1].split("=");if(j[b[0]]==null){j[b[0]]=b[1]}else{j[b[0]]+=","+b[1]}c.splice(g,1);g--}}for(var g in j){if(typeof j[g]=="string"){c.push(g+"="+j[g].substring(0,this.MAXFIELDSIZE))}}var d=false,f=(ns_API.isIE)?new Image():document.body.appendChild(document.createElement("img"));window.ns_forms_timer=function(i,e){return function(){e=true;if(window.ns_forms_timer_id){window.clearTimeout(window.ns_forms_timer_id)}i.onload=i.onerror=function(){return}}}(f,d);window.ns_forms_timer_id=window.setTimeout("window.ns_forms_timer()",5000);f.onload=f.onerror=window.ns_forms_timer;f.src=this.url+c.join("&");this.sequence++}catch(a){this.throwException(a)}};ns_p.addSubmitEvent=function(b,a,c){if(!this.form){return}var d=this;this.fields.SUBMIT.normal=this.paramToFieldList(b,true);this.fields.SUBMIT.hidden=this.paramToFieldList(a,true);this.fields.SUBMIT.password=this.paramToFieldList(c,true);if(this.autoEvents){ns_API.addEvent(this.form,"submit",function(){d.onSubmit.apply(d,arguments)})}};ns_p.addAbandonEvent=function(b,a,c){if(!this.form){return}var d=this;this.fields.SUBMITABANDON.normal=this.paramToFieldList(b);this.fields.SUBMITABANDON.hidden=this.paramToFieldList(a);this.fields.SUBMITABANDON.password=this.paramToFieldList(c);if(ns_API.isIE){ns_API.addEvent(window,"beforeunload",function(){d.onAbandon.apply(d,arguments)})}else{ns_API.addEvent(window,"unload",function(){d.onAbandon.apply(d,arguments)})}};ns_p.onError=function(c,e,b,a,d){this.error.append(c,e);this.fields.SUBMITVALFAIL.normal=this.paramToFieldList(b,true);this.fields.SUBMITVALFAIL.hidden=this.paramToFieldList(a);this.fields.SUBMITVALFAIL.password=this.paramToFieldList(d);this.hasValidationError=true;this.log("submitvalfail",this.getFormLabels("submitvalfail"))};ns_p.onSubmit=function(b){if(!this.isFormActive||this.hasValidationError||this.isFormAbandoned){return}this.isFormSubmitted=true;this.isFormActive=false;var a=this;if(ns_API.isIE||!this.autoEvents||window.opera){this.log("submit",this.getFormLabels("submit"))}else{ns_API.addEvent(window,"unload",function(){a.log.call(a,"submit",a.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(h,r){if(!/^(submitabandon|submit|submitvalfail)$/i.test(h)){return}h=h.toLowerCase();if(this.lastField&&/option/i.test(this.lastField.tagName)){this.lastField=this.lastField.parentNode}var d=new Date().getTime(),s=["&type=hidden","ns_fo_ev="+h,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")?d-ns_API.startTime:null),ns_API.forms.RESERVEDPREFIX+"t1="+((this.startTime)?d-this.startTime:null)].concat((r&&r instanceof Array)?r:[]).concat(this.error.getLabels(h));this.writeDebugStatement("<b>event</b>&nbsp;[<font color='green'>"+h+"</font>]");this.writeDebugStatement("<b>default labels:</b><br><font color='steelblue'>"+s.join("<br>")+"</font>");var m=new RegExp(),q=this.fields[h.toUpperCase()],f="";var n=[],c=[],g=[];var l=[],p=[],e=[];for(var a=0,b,o,j,k;(b=this.form[a]);a++){if(!b.name||!b.type){continue}if(b.type=="radio"&&f.indexOf(b.name)>-1){continue}k=this[b.type.replace(/\-/g,"_")+"Value"];j=b.name.replace(/([\$\[\]])/g,"\\$1");m.compile(j+";?","i");if((b.type=="hidden"&&(!!q.hidden&&(/^(submit|submitvalfail)$/i.test(h)&&q.hidden=="*")||m.test(q.hidden)))||(b.type=="password"&&(!!q.password&&(/^(submit|submitvalfail)$/i.test(h)&&q.hidden=="*")||m.test(q.password)))||((/^(submit|submitvalfail)$/i.test(h)&&q.normal=="*")||m.test(q.normal))){if(k instanceof Function){o=k.call(this,b);this.writeDebugStatement("<font color='steelblue'>called getFormLabel:</font><b>"+b.name+"</b>:<i>"+b.type+"</i>&nbsp;(<font color='green'>"+o+"</font>)");if(o){switch(b.type){case"hidden":c[c.length]=o.substring(0,o.indexOf("="));p[p.length]=o.substring(o.indexOf("=")+1);continue;case"password":g[g.length]=o.substring(0,o.indexOf("="));e[e.length]=o.substring(o.indexOf("=")+1);continue;default:if(typeof o=="string"){n[n.length]=o.substring(0,o.indexOf("="));l[l.length]=o.substring(o.indexOf("=")+1);continue}else{if(typeof o=="object"){n[n.length]=o[1].substring(0,o[1].indexOf("="));l[l.length]=o[1].substring(o[1].indexOf("=")+1)}}}}if(b.type=="radio"){f+=b.name+";"}}}}s.push(ns_API.forms.NORMALNAMEPREFIX+"="+n.join(";"));s.push(ns_API.forms.NORMALVALUEPREFIX+"="+l.join(";"));s.push(ns_API.forms.PASSWORDNAMEPREFIX+"="+g.join(";"));s.push(ns_API.forms.PASSWORDVALUEPREFIX+"="+e.join(";"));s.push(ns_API.forms.HIDDENNAMEPREFIX+"="+c.join(";"));s.push(ns_API.forms.HIDDENVALUEPREFIX+"="+p.join(";"));return s};ns_p.throwException=function(a){if(ns_API.forms.DEBUG){alert("Form API\n"+(a.message||a))}};ns_p.addEvents=function(){var a=this;ns_API.addEvent(this.form,"keydown",function(b){b=b||window.event;if(b.ctrlKey||b.altKey||b.shiftKey){return}a.onUserEvent.call(a,b,b.srcElement||b.target)});ns_API.addEvent(this.form,"mousedown",function(b){b=b||window.event;a.onUserEvent.call(a,b,b.srcElement||b.target)})};ns_p.onUserEvent=function(b,a){if(!(a&&a.form&&a.form==this.form)){return}if(a.type!="submit"){this.lastField=a}this.isFormSubmitted=false;this.hasValidationError=false;this.isValidated=true;if(!/^(input|textarea|select|option)$/i.test(a.tagName)||this.isFormActive){return}this.onStart()};ns_p.onStart=function(a){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(b){if(!ns_API.forms.DEBUG){return}var a=(top.debugWindow)?top.debugWindow.document.getElementById("debug"):document.getElementById("debug");if(a){a.innerHTML=b+"<hr>"+a.innerHTML}};ns_p.getScriptVersion=function(){return this.version};ns_p.getURL=function(){return this.url};ns_p.setURL=function(a){this.url=a};ns_p.setMaxFieldSize=function(a){a=a||0;this.MAXFIELDSIZE=(!isNaN(parseInt(a))&&parseInt(a)>0)?a:this.MAXFIELDSIZE};ns_p.select_oneValue=function(a){return ns_API.constructLabel(a.name.toLowerCase())+"="+escape(a.options[a.selectedIndex].value.substring(0,this.MAXFIELDSIZE))};ns_p.select_multipleValue=function(b){var c=[];for(var a=0,d;(option=b.options[a]);a++){if(option.selected){c.push(ns_API.constructLabel(b.name.toLowerCase())+"="+escape(option.value.substring(0,this.MAXFIELDSIZE)))}}return c.join("&")};ns_p.textValue=function(a){return ns_API.constructLabel(a.name.toLowerCase())+"="+escape(a.value.substring(0,this.MAXFIELDSIZE))};ns_p.textareaValue=function(a){return this.textValue(a)};ns_p.radioValue=function(b){var a="";for(var d=0,c;(c=b.form[b.name][d]);d++){if(c.checked){a=c.value;break}}return ns_API.constructLabel(b.name.toLowerCase())+"="+escape(a.substring(0,this.MAXFIELDSIZE))};ns_p.checkboxValue=function(a){if(a.checked){return["checkbox",ns_API.constructLabel(a.name.toLowerCase())+"="+escape(a.value.substring(0,this.MAXFIELDSIZE))]}};ns_p.hiddenValue=function(a){return ns_API.constructLabel(a.name.toLowerCase())+"="+escape(a.value.substring(0,this.MAXFIELDSIZE))};ns_p.passwordValue=function(a){return ns_API.constructLabel(a.name.toLowerCase())+"="+((a.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
@*/

