// Copyright (c) 1999-2008 Nedstat B.V.
// All rights reserved.
// By using this software, you are agreeing to be bound by the
// terms of this license: http://www.nedstat.com/terms.html

// Package SBS-20081209.01

// sitestat, enhanced version
// source: Nedstat Code document
function sitestat(ns_l){// FromUrl v1.5 Copyright (c) 2001-2008 Nedstat B.V. All rights reserved.
var ns_type=''          // leave empty for normal/ppc measurement, fill in for clickin, clickout or pdf
var r=''                // yes=only parse url when there is a real document.referrer,
                        // no=only parse url when there is no real document.referrer, empty=always parse url  
var t='?'               // tag in url where parameters follow; default '?' could be replaced by "#"

//Shownieuws tmp workaround
if(ns_l.match("sbs/shownieuws")){
	ns_l = ns_l.replace("sbs/shownieuws/s?shownieuws", "sbs/sbs6/s?programmas.shownieuws") + "&amp;sbs_prog=shownieuws&ns_webdir=shownieuws";
}

var p=new Array();var w='';var l='';var d=document;var n=navigator;var ns_0=''
;if(top!=self){if('\u0041'=='A'){var u=n.userAgent;if(u.indexOf('Safari')==-1)
{var b=u.indexOf('Opera');if(b==-1||(u.charAt(b+6)+0)>5){b=u.indexOf('Mozilla'
);var xb=b!=-1?u.charAt(b+8)>4:1;if(u.indexOf('compatible')!=-1||xb){var c=
'try{ns_0=top.document.referrer}catch(e){}';eval(c);c=
'try{l=top.document.location.href}catch(e){}';eval(c);}}}}}else{ns_0=
d.referrer;l=d.location.href;}if(ns_0.lastIndexOf('/')==ns_0.length-1){ns_0=
ns_0.substring(ns_0.lastIndexOf('/'),0);}var f=ns_l.indexOf('?');if(f!=-1){
var q=ns_l.substring(f+1);ns_l=ns_l.substring(0,f);if(q){var m=q.indexOf('&');
w=q.substring(0,m==-1?q.length:m);if(w.indexOf('=')!=-1){w='';}if(w){q=
q.substring(m==-1?q.length:m+1);q+=(q?'&':'')+'ns_name='+w;}if(ns_0.length>0){
q+=(q?'&':'')+'ns_referrer='+escape(ns_0);}var s=0;var e=0;while(q.length){e=
q.indexOf('&');if(e==-1){e=q.length;}var o=q.substring(s,e);if(o.substring(0,4
)=='amp;'){o=o.substring(4);}if(o)p[p.length]=o;q=q.substring(e+1);}}}var a=
l.indexOf(t);a=a==-1?0:l.substring(a+1);var j;if(r=='yes')j=ns_0.length;else
if(r=='no')j=!ns_0.length;else if(r=='')j=1;if(a&&j){while(a.length){var e=
a.indexOf('&');if(e==-1){e=a.length;}var k=a.substring(0,a.substring(0,e)
.indexOf('='));var v=a.substring(a.substring(0,e).indexOf('=')+1,e);if(
k.substring(0,4)=='amp;'){k=k.substring(4);}while(v.substring(0,1)=='='){v=
v.substring(1);}if(k=='ns_name'){w=v;}else if(k=='ns_or'){var g='ns_referrer='
;for(var z=0;z<p.length;z++){if(p[z].substring(0,g.length)==g){p[z]=
'ns_referrer='+v;}}}else{if(k.substring(0,3)=='ns_'&&v&&k){var h=0;for(var x=0
;x<p.length;x++){if(p[x].substring(0,p[x].indexOf('='))==k){p[x]=k+"="+v;h=1}}
if(!h){p[p.length]=k+"="+v;}}}a=a.substring(e+1);}}if(!w){return;}var s='';
var y='';for(var i=0;i<p.length;i++)if(p[i].substring(0,8)!='ns_name='){if(p[i
].substring(0,12)!='ns_referrer='){s+='&'+p[i];}else{y='&'+p[i];}}s+=ns_type?
'&ns_type='+ns_type+'&ns_action=view':'';ns_pixelUrl=ns_l+'?'+w+"&ns__t="+(
new Date()).getTime();ns_l=ns_pixelUrl+s+y;if(d.images){ns_1=new Image();
ns_1.src=ns_l;}else{d.write('<img src='+ns_l+' width="1" height="1">');}}

// technical info
// source: sitestat.js
var ns_scriptversion="132";// 2004-05-24
function ns_14(){var ns_02 = navigator.appVersion;var ns_00 = parseInt(ns_02.substring(ns_02.indexOf("MSIE")+5, ns_02.indexOf("MSIE")+6));if (ns_00 > 0) ns_02 = 0;else ns_02 = parseInt(ns_02);return ns_02;}function ns_22(){var ns_02 = navigator.appVersion;var ns_01 = parseInt(ns_02.substring(ns_02.indexOf("MSIE")+5, ns_02.indexOf("MSIE")+6));if(ns_01>0) ns_02=ns_01;else ns_02=0;return ns_02;}function ns_pluginNetscape(){var ns_pluglength = navigator.plugins.length;var ns_08 = "";if(ns_pluglength>0){ns_08 = "&ns_java="+navigator.javaEnabled()+"&ns_plugins=";for(ns_24 = 0 ; ns_24 < ns_pluglength ; ns_24++){var ns_29 = false;for(ns_23 = 0 ; ns_23 < ns_24 ; ns_23++)ns_29 = (navigator.plugins[ns_24].description == navigator.plugins[ns_23].description);if(!ns_29)ns_08 += escape(navigator.plugins[ns_24].description +"|");}}return ns_08;}function ns_10(){var ns_15 = navigator.mimeTypes;var ns_17 = ns_15.length;if(ns_17>0){ns_08 = "&ns_mimetypes=";for(ns_24=0;ns_24<ns_17;ns_24++){ns_29 = false;for(ns_23=0;ns_23<ns_24;ns_23++)if(ns_15[ns_24].enabledPlugin == ns_15[ns_23].enabledPlugin)ns_29 = true;if(!ns_29)ns_08 += escape(ns_15[ns_24].description + "|")}}return ns_08;}function ns_12(){if(!document.body){document.write('<body>');}var ns_33=document.body;var ns_13 = 0;var ns_34 = 1;ns_11=new Array("47F67D00-9E55-11D1-BAEF-00C04FC2D130","7790769C-0471-11D2-AF11-00C04FA35D02","283807B5-2C60-11D0-A31D-00AA00B92C03","9381D8F2-0288-11D0-9501-00AA00B911A5","5A8D6EE0-3E18-11D0-821E-444553540000","630B1DA0-B465-11D1-9948-00C04F98BBC9","45EA75A0-A269-11D1-B5BF-0000F8051515","76C19B50-F0C8-11CF-87CC-0020AFEECF20","D27CDB6E-AE6D-11CF-96B8-444553540000","2A202491-F00D-11CF-87CC-0020AFEECF20","08B0E5C0-4FCB-11CF-AAA5-00401C608500","3AF36230-A269-11D1-B5BF-0000F8051515","3BF42070-B3B1-11D1-B5C5-0000F8051515","90A7533D-88FE-11D0-9DBE-0000C0411FC3","10072CEC-8CC1-11D1-986E-00A0C955B42F","4F645220-306D-11D2-995D-00C04F98BBC9","1CDEE860-E95B-11CF-B1B0-00AA00BBAD66","73FA19D0-2D75-11D2-995D-00C04F98BBC9","23064720-C4F8-11D1-994D-00C04F98BBC9","22D6F312-B0F6-11D0-94AB-0080C74C7E95","CA8A9784-280D-11CF-A24D-444553540000","CA8A9780-280D-11CF-A24D-444553540000","B801CA65-A1FC-11D0-85AD-444553540000");ns_33.addBehavior("#default#clientcaps");for(var ns_18=0;ns_18<ns_11.length;ns_18++)
{if(ns_11[ns_18])if(ns_33.isComponentInstalled("{"+ns_11[ns_18]+"}","ComponentID"))ns_13|=ns_34;ns_34*=2;}return ns_13;}function ns_26(ns_l7){var ns_31 = "";for(var i = 0; i < ns_l7.elements.length ; i++){var ns_28 = ns_l7.elements[i];if(ns_28.name){if(ns_28.type == "select-multiple") {for(var j = 0 ; j < ns_28.options.length ; j++)if(ns_28.options[j].selected)ns_31 += ns_28.name+";";}else if(ns_28.type == "select-one") {ns_31 += ns_28.name+";";}else if(ns_28.type == "checkbox" || ns_28.type == "radio") {if(ns_28.checked)ns_31 += ns_28.name+";";}else ns_31  += ns_28.name+";";}}return ns_31.substring(0,ns_31.lastIndexOf(";"));}function sitestatForm(ns_30, ns_pixelUrl, ns_03){if (ns_03 == null)ns_03 = ns_26(ns_30);if(ns_14() >=4 || ns_22() >= 4){var ns_07 = ns_03.split(";");ns_07_length = ns_07.length;ns_pixelUrl += '&ns_type=submit&ns__t=' + parseInt((new Date()).getTime());for(var ns_24=0;ns_24<ns_30.elements.length;ns_24++){var ns_32 = ns_30.elements[ns_24];var ns_04;ns_16 = false;if(ns_03){for(ns_t = 0; ns_t < ns_07_length; ns_t++)if(ns_32.name == ns_07[ns_t])ns_16 = true;}else{if(ns_32.name)ns_16 = true;}if(ns_16){if(ns_32.type == 'select-multiple'){for(var ns_j=0;ns_j<ns_32.options.length;ns_j++)if(ns_32.options[ns_j].selected)ns_pixelUrl = ns_pixelUrl + "&ns_f_" + escape(ns_32.name) + "=" + escape(ns_32.options[ns_j].value);}else{if(ns_32.type == 'select-one')ns_04 = ns_32.options[ns_32.selectedIndex].value;else{if(ns_32.type == 'checkbox' || ns_32.type == 'radio')if(!ns_32.checked)continue;ns_04 = ns_32.value;}ns_pixelUrl = ns_pixelUrl + "&ns_f_" + escape(ns_32.name) + "=" + escape(ns_04);}}}ns_30.onsubmit = null;var ns_21 = new Image();ns_21.ns_30 = ns_30;ns_21.onload = ns_1O;ns_21.onerror = ns_1O;ns_21.onabort = ns_1O;document.sitestatForm = ns_30;ns_21.timerID = setTimeout(ns_19, 5000);ns_21.src = ns_pixelUrl;}}function ns_1O(){this.onload = null;this.onerror = null;this.onabort = null;clearTimeout(this.timerID);this.ns_30.submit();}function ns_19(){var ns_30 = document.sitestatForm;ns_30.onload = null;ns_30.onerror = null;ns_30.onabort = null;ns_30.submit();}function ns_25()
{ns_pixelUrl+="&ns_type=hidden&ns_ver="+ns_scriptversion;if(ns_14() >=3) {ns_pixelUrl+=ns_pluginNetscape();ns_pixelUrl+=ns_10();}if(ns_14() >=4 || ns_22() >= 4){var ns_screen=screen;if(parent.innerWidth) {ns_pixelUrl+= "&ns_innersize="+parent.innerWidth+"x"+parent.innerHeight+ "&ns_offset="+parent.pageXOffset+"x"+parent.pageYOffset;}ns_pixelUrl +=  "&ns_availscreen="+ns_screen.availWidth+"x"+ns_screen.availHeight;if(ns_screen)ns_pixelUrl += "&ns_screen="+ns_screen.width+"x"+ns_screen.height+"&ns_colordepth="+ns_screen.colorDepth;}if(document.images)	{ns_pixel= new Image();ns_pixel.src=ns_pixelUrl;}}function ns_09(){if(typeof (ns_loadingtime2) != "undefined"){var ns_html_loading_time=(ns_loadingtime2 - ns_loadingtime1)/1000;var ns_full_loading_time=((new Date()).getTime() - ns_loadingtime1)/1000;ns_pixelUrl += "&ns_html_loading_time="+ns_html_loading_time+"&ns_full_loading_time="+ns_full_loading_time;ns_25();}if (typeof (ns_05)!="undefined")ns_06();}document.cookie = "ns_cookietest=true";if(document.cookie.indexOf("ns_cookietest",0)>=0){if(document.cookie.indexOf("ns_session",0)<0){document.cookie = "ns_session=true";if (typeof(ns_pixelUrl) != "undefined" ) {if (ns_22() >= 5 && navigator.appVersion.indexOf("Mac")<0) {ns_pixelUrl+="&ns_p="+ns_12();}if (typeof (ns_loadingtime1) == "undefined" || ns_22() < 4)ns_25();else {if (document.body.onload) {ns_05 = 1;ns_06 = document.body.onload;}document.body.onload = ns_09;}}}}

// forms
// source: sitestatforms.js
window.onerror=function(){
return true;};if(typeof ns_API=="undefined")var ns_API={loadEvents:[],reservedLabels:new RegExp(/^\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:new RegExp(/(?:https?):\/\/([^\/]+)\/([^\/]+)\/([^\/]+)\/s\?([\w_\-\.\[\]\(\)\$\~\{\}\*\^\,]{1,200})/)};if(typeof ns_API.addEvent=="undefined")ns_API.addEvent=(document.addEventListener)?(function(element,type,handler){element.addEventListener(type,handler,false)}):(document.attachEvent)?(function(element,type,handler){element.attachEvent("on"+type,handler)}):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(func){try{if(/webkit/i.test(navigator.userAgent)){var _timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(_timer);func();}},10);}else if(ns_API.isIE){var id="__ie_onload_"+new Date().getTime();document.write("<script id="+id+" defer src=javascript:void(0)><\/script>");var script=document.getElementById(id);script.onreadystatechange=function(){if(/complete/i.test(this.readyState)){func();this.parentNode.removeChild(this);}}}else if(document.addEventListener){document.addEventListener("DOMContentLoaded",func,false);}else{ns_API.addEvent(window,"load",func);}}catch(e){ns_API.addEvent(window,"load",func);}};if(typeof ns_API.addLoadEvent=="undefined"){ns_API.addLoadEvent=function(func){ns_API.loadEvents.push(func);};ns_API.onDocumentReady(function(){for(var i=0,loadEvent;(loadEvent=ns_API.loadEvents[i]);i++)if(loadEvent instanceof Function)loadEvent()});}if(typeof ns_API.constructLabel=="undefined")ns_API.constructLabel=function(label){
return label.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(url,timeout,callBack){var key=++ns_API.log.totalLogs+":"+new Date().getTime();var image=new Image();var handler=function(){if(ns_API.log.timerItems[key]){window.clearTimeout(ns_API.log.timerItems[key]);delete ns_API.log.timerItems[key];}if(callBack&&callBack instanceof Function){callBack();}delete ns_API.log.logImages[key];image.onload=image.onerror=image.onabort=new Function;};image.onload=image.onabort=image.onerror=handler;ns_API.log.timerItems[key]=window.setTimeout(handler,timeout);image.src=url;};ns_API.log.logImages={};ns_API.log.timerItems={};ns_API.log.totalLogs=0;}ns_API.forms={DEBUG:false,isProtoTyped:false,NORMALPREFIX:"ns_f_",HIDDENPREFIX:"ns_h_",PASSWORDPREFIX:"ns_h_",RESERVEDPREFIX:"ns_fo_",instances:[],isRegistered:function(instance){var registered=false;for(var i=0,_instance;!registered&&(_form=this.instances[i]);i++)if(instance==_instance)registered=true;if(!registered)this.instances.push(instance);
return registered;},getInstanceByForm:function(form){for(var i=0,instance;(instance=this.instances[i]);i++)if(instance.form==form)
return instance;},dispatchValidationError:function(form,fields,message,normal,hidden,passwords){var instance=this.getInstanceByForm(form);if(instance instanceof ns_API.form)instance.onError.apply(instance,Array.prototype.slice.call(arguments,1));}};ns_API.forms.exception=function(){this.totalErrors=0;this.errorField=null;this.msg="";this.overview={}};ns_API.forms.exception.prototype.append=function(fields,message){var arr=fields.split(";");if(arr.length<0)
return;this.errorField=arr[arr.length-1];this.msg=message;for(var i=0,fields;(field=arr[i]);i++){field=(i+1)+"_"+field.toLowerCase();if(this.overview[field])this.overview[field]++;else this.overview[field]=1;}this.totalErrors++;};ns_API.forms.exception.prototype.getOverview=function(){var arr=[];for(var field in this.overview)arr.push(field+":"+this.overview[field]);
return arr;};ns_API.forms.exception.prototype.getLastErrorField=function(){
return this.errorField;};ns_API.forms.exception.prototype.getTotalErrors=function(){
return this.totalErrors;};ns_API.forms.exception.prototype.getLabels=function(type){var arr=[];if(this.getOverview().join("|")!="")arr.push(ns_API.forms.RESERVEDPREFIX+"vfo="+this.getOverview().join("|"));if(this.errorField)arr.push(ns_API.forms.RESERVEDPREFIX+"vfl="+this.errorField.toLowerCase());if(this.totalErrors>0)arr.push(ns_API.forms.RESERVEDPREFIX+"vf="+this.totalErrors);arr.push(ns_API.forms.RESERVEDPREFIX+"vfe="+escape(this.msg.substring(0,255)));
return arr;};ns_API.form=function(formName){this.MAXFIELDSIZE=255;this.version="1.0.0";this.formName=formName;this.form=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_API.form.prototype.init=function(){var scope=this;try{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+"]";if(ns_API.forms.isRegistered(this))throw "Form already registered by ns_API";this.id=escape(this.formName)+"_"+new Date().getTime();this.addEvents();if(typeof HTMLFormElement!="undefined"&&!ns_API.forms.isProtoTyped){ns_API.forms.isProtoTyped=true;HTMLFormElement.prototype.ns_submit=HTMLFormElement.prototype.submit;HTMLFormElement.prototype.submit=function(){var instance=ns_API.forms.getInstanceByForm(this);if(instance){instance.isFormSubmitted=true;instance.onSubmit();}this.ns_submit();}}else if(ns_API.isIE){var func=this.form.submit;this.form.onsubmit=function(){var instance=ns_API.forms.getInstanceByForm(this);if(instance){instance.isFormSubmitted=true;instance.onSubmit();}func();}}try{this.url=window.ns_pixelUrl.match(ns_API.regCounter)[0];}catch(e){}}catch(e){this.throwException(e)}};ns_API.form.prototype.paramToFieldList=function(param,hasWildCard){
return(param)?/\s*\*\s*/.test(param)?(hasWildCard)?"*":null:param.replace(/\s*([^;\s]+)\s*(;?)/g,"$1$2"):null;};ns_API.form.prototype.log=function(event,labels){try{if(!ns_API.forms.DEBUG&&!ns_API.regCounter.test(this.url))throw "Please specify a valid sitestat url";labels.push("ns_jspageurl="+ns_API.getJSPageURL());var loaded=false,px=(ns_API.isIE)?new Image():document.body.appendChild(document.createElement("img"));window.ns_forms_timer=function(px,loaded){
return function(){loaded=true;if(window.ns_forms_timer_id)window.clearTimeout(window.ns_forms_timer_id);px.onload=px.onerror=function(){
return;}}}(px,loaded);window.ns_forms_timer_id=window.setTimeout('window.ns_forms_timer()',5000);px.onload=px.onerror=window.ns_forms_timer;px.src=this.url+labels.join("&");}catch(e){alert(e);this.throwException(e);}};ns_API.form.prototype.addSubmitEvent=function(normal,hidden,password){if(!this.form)
return;var scope=this;this.fields.SUBMIT.normal=this.paramToFieldList(normal,true);this.fields.SUBMIT.hidden=this.paramToFieldList(hidden,true);this.fields.SUBMIT.password=this.paramToFieldList(password,true);ns_API.addEvent(this.form,"submit",function(){scope.onSubmit.apply(scope,arguments)});};ns_API.form.prototype.addAbandonEvent=function(normal,hidden,password){if(!this.form)
return;var scope=this;this.fields.SUBMITABANDON.normal=this.paramToFieldList(normal);this.fields.SUBMITABANDON.hidden=this.paramToFieldList(hidden);this.fields.SUBMITABANDON.password=this.paramToFieldList(password);if(ns_API.isIE){ns_API.addEvent(window,"beforeunload",function(){scope.onAbandon.apply(scope,arguments)});}else{ns_API.addEvent(window,"unload",function(){scope.onAbandon.apply(scope,arguments)});}};ns_API.form.prototype.onError=function(field,message,normal,hidden,password){this.error.append(field,message);this.fields.SUBMITVALFAIL.normal=this.paramToFieldList(normal,true);this.fields.SUBMITVALFAIL.hidden=this.paramToFieldList(hidden);this.fields.SUBMITVALFAIL.password=this.paramToFieldList(password);this.hasValidationError=true;this.log("submitvalfail",this.getFormLabels("submitvalfail"));};ns_API.form.prototype.onSubmit=function(event){if(!this.isFormActive||this.hasValidationError||this.isFormAbandoned)
return;this.isFormSubmitted=true;this.isFormActive=false;var scope=this;if(ns_API.isIE)this.log("submit",this.getFormLabels("submit"));else ns_API.addEvent(window,"unload",function(){scope.log.call(scope,"submit",scope.getFormLabels("submit"))});this.sequence++;};ns_API.form.prototype.onAbandon=function(){if(this.isFormSubmitted||!this.isFormActive||this.isFormAbandoned)
return;this.isFormAbandoned=true;this.log("submitabandon",this.getFormLabels("submitabandon"));};ns_API.form.prototype.getFormLabels=function(type,a_labels){if(!/^(submitabandon|submit|submitvalfail)$/i.test(type))
return;type=type.toLowerCase();if(this.lastField&&/option/i.test(this.lastField.tagName))this.lastField=this.lastField.parentNode;var labels=["&type=hidden","ns_fo_ev="+type,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")?new Date().getTime()-ns_API.startTime:null),ns_API.forms.RESERVEDPREFIX+"t1="+((this.startTime)?new Date().getTime()-this.startTime:null)].concat((a_labels&&a_labels instanceof Array)?a_labels:[]).concat(this.error.getLabels(type));this.writeDebugStatement("<b>event</b>&nbsp;[<font color='green'>"+type+"</font>]");this.writeDebugStatement("<b>default labels:</b><br><font color='steelblue'>"+labels.join("<br>")+"</font>");var regExp=new RegExp(),fields=this.fields[type.toUpperCase()],radios="";for(var i=0,field,label,escapedFieldName,func;(field=this.form[i]);i++){if(!field.name||!field.type)continue;if(field.type=="radio"&&radios.indexOf(field.name)>-1)continue;func=this[field.type.replace(/\-/g,"_")+"Value"];escapedFieldName=field.name.replace(/([\$\[\]])/g,"\\$1");regExp.compile(escapedFieldName+";?","i");if((field.type=="hidden"&&(!!fields.hidden&&(/^(submit|submitvalfail)$/i.test(type)&&fields["hidden"]=='*')||regExp.test(fields["hidden"])))||(field.type=="password"&&(!!fields.password&&(/^(submit|submitvalfail)$/i.test(type)&&fields["hidden"]=='*')||regExp.test(fields["password"])))||((/^(submit|submitvalfail)$/i.test(type)&&fields["normal"]=='*')||regExp.test(fields["normal"]))){if(func instanceof Function){label=func.call(this,field);this.writeDebugStatement("<font color='steelblue'>called getFormLabel:</font><b>"+field.name+"</b>:<i>"+field.type+"</i>&nbsp;(<font color='green'>"+label+"</font>)");if(label)labels.push(label);if(field.type=="radio")radios+=field.name+";";}}}
return labels;};ns_API.form.prototype.throwException=function(e){if(ns_API.forms.DEBUG)alert("Form API\n"+(e.message||e));};ns_API.form.prototype.addEvents=function(){var scope=this;ns_API.addEvent(this.form,"keyup",function(event){event=event||window.event;if(event.ctrlKey||event.altKey||event.shiftKey)
return;scope.onUserEvent.call(scope,event,event.srcElement||event.target)});ns_API.addEvent(this.form,"mouseup",function(event){event=event||window.event;scope.onUserEvent.call(scope,event,event.srcElement||event.target)});};ns_API.form.prototype.onUserEvent=function(event,element){if(!(element&&element.form&&element.form==this.form))
return;if(element.type!="submit")this.lastField=element;this.isFormSubmitted=false;this.hasValidationError=false;this.isValidated=true;if(!/^(input|textarea|select|option)$/i.test(element.tagName)||this.isFormActive)
return;this.onStart();};ns_API.form.prototype.onStart=function(element){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_API.form.prototype.writeDebugStatement=function(text){if(!ns_API.forms.DEBUG)
return;var element=(top.debugWindow)?top.debugWindow.document.getElementById("debug"):document.getElementById("debug");if(element)element.innerHTML=text+"<hr>"+element.innerHTML;};ns_API.form.prototype.getScriptVersion=function(){
return this.version};ns_API.form.prototype.getURL=function(){
return this.url;};ns_API.form.prototype.setURL=function(_url){this.url=_url;};ns_API.form.prototype.setMaxFieldSize=function(size){size=size||0;this.MAXFIELDSIZE=(!isNaN(parseInt(size))&&parseInt(size)>0)?size:this.MAXFIELDSIZE;};ns_API.form.prototype.select_oneValue=function(field){
return ns_API.forms.NORMALPREFIX+ns_API.constructLabel(field.name.toLowerCase())+"="+escape(field.options[field.selectedIndex].value.substring(0,this.MAXFIELDSIZE));};ns_API.form.prototype.select_multipleValue=function(field){var arr=[];for(var i=0,options;(option=field.options[i]);i++)if(option.selected)arr.push(ns_API.forms.NORMALPREFIX+ns_API.constructLabel(field.name.toLowerCase())+"="+escape(option.value.substring(0,this.MAXFIELDSIZE)));
return arr.join("&");};ns_API.form.prototype.textValue=function(field){
return ns_API.forms.NORMALPREFIX+ns_API.constructLabel(field.name.toLowerCase())+"="+escape(field.value.substring(0,this.MAXFIELDSIZE));};ns_API.form.prototype.textareaValue=function(field){
return this.textValue(field);};ns_API.form.prototype.radioValue=function(field){var value="";for(var i=0,radio;(radio=field.form[field.name][i]);i++){if(radio.checked){value=radio.value;break;}}
return ns_API.forms.NORMALPREFIX+ns_API.constructLabel(field.name.toLowerCase())+"="+escape(value.substring(0,this.MAXFIELDSIZE));};ns_API.form.prototype.checkboxValue=function(field){
return ns_API.forms.NORMALPREFIX+ns_API.constructLabel(field.name.toLowerCase())+"="+((field.checked)?"checked":"unchecked");};ns_API.form.prototype.hiddenValue=function(field){
return ns_API.forms.HIDDENPREFIX+ns_API.constructLabel(field.name.toLowerCase())+"="+escape(field.value.substring(0,this.MAXFIELDSIZE));};ns_API.form.prototype.passwordValue=function(field){
return ns_API.forms.PASSWORDPREFIX+ns_API.constructLabel(field.name.toLowerCase())+"="+((field.value=="")?"no":"yes");};

// Sitestat OnClick v1.0, Copyright (c) 2001-2007
// source: Sitestat Implementation Notes + google search
function ns_onclick (a, url, name, type, winopt){
var ns_l="http://nl.sitestat.com/sbs/sbs6/s?";
ns_l+=name;ns_l+='&ns_type='+type+'&ns_action=view';
ns_l+='&ns__t='+(new Date()).getTime();if(!url)url=a.href;
var ns_0=document.referrer;if(ns_0.lastIndexOf('/')==ns_0.length-1)
ns_0=ns_0.substring(ns_0.lastIndexOf('/'),0);
if (ns_0.length>0)ns_l+='&amp;ns_referrer='+escape(ns_0);
winopt=winopt||"";var
target=(a&&a.target&&a.target!="")?(a.target.substring(0,1)=="_")?a.target.substring(1):a.target:"self";
var ns_i=new Image();if(target&&url){if(window[target]){window.ns_softclick_timer=function(target,url)
{return function(){ns_i.onload=ns_i.onerror=function(){return;};
window[((window[target])?target:"self")].location.href=url;}}(target,url);
window.setTimeout('ns_softclick_timer()',5000);ns_i.onload=ns_i.onerror=window.ns_softclick_timer;}else{
window.open(url,target,winopt);}}ns_i.src=ns_l;return false;}