/* 
 * Het eerste deel van dit script valt onder de licentie van JQUERY 
 *    jQuery 1.2.1 - New Wave Javascript 
 *    Copyright (c) 2007 John Resig (jquery.com) 
 *    Dual licensed under the MIT (MIT-LICENSE.txt) 
 *    and GPL (GPL-LICENSE.txt) licenses. 
 * Het tweede deel onder de Copyright (c) 2007 van inovia 
 *    dit script is intellectueel eigendom van inovia webdevelopment services 
 *    het is niet toegestaan dit script te kopieren of ideeen ervan te gebruiken 
 *    zonder schriftelijke toestemming van inovia. 
 *    meer informatie: www.inovia.nl 
*/ 
 
/* *************** EERSTE DEEL ****************** */ 
(function(){var L=this,G,Y=L.jQuery,P=L.$,O=L.jQuery=L.$=function(e,f){return new O.fn.init(e,f)},d=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,F=/^.[^:#\[\.,]*$/;O.fn=O.prototype={init:function(e,h){e=e||document;if(e.nodeType){this[0]=e;this.length=1;this.context=e;return this}if(typeof e==="string"){var g=d.exec(e);if(g&&(g[1]||!h)){if(g[1]){e=O.clean([g[1]],h)}else{var i=document.getElementById(g[3]);if(i&&i.id!=g[3]){return O().find(e)}var f=O(i||[]);f.context=document;f.selector=e;return f}}else{return O(h).find(e)}}else{if(O.isFunction(e)){return O(document).ready(e)}}if(e.selector&&e.context){this.selector=e.selector;this.context=e.context}return this.setArray(O.isArray(e)?e:O.makeArray(e))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(e){return e===G?Array.prototype.slice.call(this):this[e]},pushStack:function(f,h,e){var g=O(f);g.prevObject=this;g.context=this.context;if(h==="find"){g.selector=this.selector+(this.selector?" ":"")+e}else{if(h){g.selector=this.selector+"."+h+"("+e+")"}}return g},setArray:function(e){this.length=0;Array.prototype.push.apply(this,e);return this},each:function(f,e){return O.each(this,f,e)},index:function(e){return O.inArray(e&&e.jquery?e[0]:e,this)},attr:function(f,h,g){var e=f;if(typeof f==="string"){if(h===G){return this[0]&&O[g||"attr"](this[0],f)}else{e={};e[f]=h}}return this.each(function(j){for(f in e){O.attr(g?this.style:this,f,O.prop(this,e[f],g,j,f))}})},css:function(e,f){if((e=="width"||e=="height")&&parseFloat(f)<0){f=G}return this.attr(e,f,"curCSS")},text:function(f){if(typeof f!=="object"&&f!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(f))}var e="";O.each(f||this,function(){O.each(this.childNodes,function(){if(this.nodeType!=8){e+=this.nodeType!=1?this.nodeValue:O.fn.text([this])}})});return e},wrapAll:function(e){if(this[0]){var f=O(e,this[0].ownerDocument).clone();if(this[0].parentNode){f.insertBefore(this[0])}f.map(function(){var g=this;while(g.firstChild){g=g.firstChild}return g}).append(this)}return this},wrapInner:function(e){return this.each(function(){O(this).contents().wrapAll(e)})},wrap:function(e){return this.each(function(){O(this).wrapAll(e)})},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType==1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType==1){this.insertBefore(e,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(e){this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,false,function(e){this.parentNode.insertBefore(e,this.nextSibling)})},end:function(){return this.prevObject||O([])},push:[].push,sort:[].sort,splice:[].splice,find:function(e){if(this.length===1){var f=this.pushStack([],"find",e);f.length=0;O.find(e,this[0],f);return f}else{return this.pushStack(O.unique(O.map(this,function(g){return O.find(e,g)})),"find",e)}},clone:function(g){var e=this.map(function(){if(!O.support.noCloneEvent&&!O.isXMLDoc(this)){var i=this.outerHTML;if(!i){var j=this.ownerDocument.createElement("div");j.appendChild(this.cloneNode(true));i=j.innerHTML}return O.clean([i.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(g===true){var h=this.find("*").andSelf(),f=0;e.find("*").andSelf().each(function(){if(this.nodeName!==h[f].nodeName){return }var i=O.data(h[f],"events");for(var k in i){for(var j in i[k]){O.event.add(this,k,i[k][j],i[k][j].data)}}f++})}return e},filter:function(e){return this.pushStack(O.isFunction(e)&&O.grep(this,function(g,f){return e.call(g,f)})||O.multiFilter(e,O.grep(this,function(f){return f.nodeType===1})),"filter",e)},closest:function(e){var g=O.expr.match.POS.test(e)?O(e):null,f=0;return this.map(function(){var h=this;while(h&&h.ownerDocument){if(g?g.index(h)>-1:O(h).is(e)){O.data(h,"closest",f);return h}h=h.parentNode;f++}})},not:function(e){if(typeof e==="string"){if(F.test(e)){return this.pushStack(O.multiFilter(e,this,true),"not",e)}else{e=O.multiFilter(e,this)}}var f=e.length&&e[e.length-1]!==G&&!e.nodeType;return this.filter(function(){return f?O.inArray(this,e)<0:this!=e})},add:function(e){return this.pushStack(O.unique(O.merge(this.get(),typeof e==="string"?O(e):O.makeArray(e))))},is:function(e){return !!e&&O.multiFilter(e,this).length>0},hasClass:function(e){return !!e&&this.is("."+e)},val:function(l){if(l===G){var e=this[0];if(e){if(O.nodeName(e,"option")){return(e.attributes.value||{}).specified?e.value:e.text}if(O.nodeName(e,"select")){var j=e.selectedIndex,m=[],n=e.options,h=e.type=="select-one";if(j<0){return null}for(var f=h?j:0,k=h?j+1:n.length;f<k;f++){var g=n[f];if(g.selected){l=O(g).val();if(h){return l}m.push(l)}}return m}return(e.value||"").replace(/\r/g,"")}return G}if(typeof l==="number"){l+=""}return this.each(function(){if(this.nodeType!=1){return }if(O.isArray(l)&&/radio|checkbox/.test(this.type)){this.checked=(O.inArray(this.value,l)>=0||O.inArray(this.name,l)>=0)}else{if(O.nodeName(this,"select")){var i=O.makeArray(l);O("option",this).each(function(){this.selected=(O.inArray(this.value,i)>=0||O.inArray(this.text,i)>=0)});if(!i.length){this.selectedIndex=-1}}else{this.value=l}}})},html:function(e){return e===G?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(e)},replaceWith:function(e){return this.after(e).remove()},eq:function(e){return this.slice(e,+e+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(e){return this.pushStack(O.map(this,function(g,f){return e.call(g,f,g)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(k,o,n){if(this[0]){var j=(this[0].ownerDocument||this[0]).createDocumentFragment(),f=O.clean(k,(this[0].ownerDocument||this[0]),j),h=j.firstChild;if(h){for(var g=0,e=this.length;g<e;g++){n.call(m(this[g],h),this.length>1||g>0?j.cloneNode(true):j)}}if(f){O.each(f,Z)}}return this;function m(i,l){return o&&O.nodeName(i,"table")&&O.nodeName(l,"tr")?(i.getElementsByTagName("tbody")[0]||i.appendChild(i.ownerDocument.createElement("tbody"))):i}}};O.fn.init.prototype=O.fn;function Z(e,f){if(f.src){O.ajax({url:f.src,async:false,dataType:"script"})}else{O.globalEval(f.text||f.textContent||f.innerHTML||"")}if(f.parentNode){f.parentNode.removeChild(f)}}function E(){return +new Date}O.extend=O.fn.extend=function(){var k=arguments[0]||{},h=1,j=arguments.length,e=false,g;if(typeof k==="boolean"){e=k;k=arguments[1]||{};h=2}if(typeof k!=="object"&&!O.isFunction(k)){k={}}if(j==h){k=this;--h}for(;h<j;h++){if((g=arguments[h])!=null){for(var f in g){var l=k[f],m=g[f];if(k===m){continue}if(e&&m&&typeof m==="object"&&!m.nodeType){k[f]=O.extend(e,l||(m.length!=null?[]:{}),m)}else{if(m!==G){k[f]=m}}}}}return k};var B=/z-?index|font-?weight|opacity|zoom|line-?height/i,Q=document.defaultView||{},S=Object.prototype.toString;O.extend({noConflict:function(e){L.$=P;if(e){L.jQuery=Y}return O},isFunction:function(e){return S.call(e)==="[object Function]"},isArray:function(e){return S.call(e)==="[object Array]"},isXMLDoc:function(e){return e.nodeType===9&&e.documentElement.nodeName!=="HTML"||!!e.ownerDocument&&O.isXMLDoc(e.ownerDocument)},globalEval:function(g){if(g&&/\S/.test(g)){var f=document.getElementsByTagName("head")[0]||document.documentElement,e=document.createElement("script");e.type="text/javascript";if(O.support.scriptEval){e.appendChild(document.createTextNode(g))}else{e.text=g}f.insertBefore(e,f.firstChild);f.removeChild(e)}},nodeName:function(f,e){return f.nodeName&&f.nodeName.toUpperCase()==e.toUpperCase()},each:function(g,l,f){var e,h=0,j=g.length;if(f){if(j===G){for(e in g){if(l.apply(g[e],f)===false){break}}}else{for(;h<j;){if(l.apply(g[h++],f)===false){break}}}}else{if(j===G){for(e in g){if(l.call(g[e],e,g[e])===false){break}}}else{for(var k=g[0];h<j&&l.call(k,h,k)!==false;k=g[++h]){}}}return g},prop:function(h,j,g,f,e){if(O.isFunction(j)){j=j.call(h,f)}return typeof j==="number"&&g=="curCSS"&&!B.test(e)?j+"px":j},className:{add:function(e,f){O.each((f||"").split(/\s+/),function(g,h){if(e.nodeType==1&&!O.className.has(e.className,h)){e.className+=(e.className?" ":"")+h}})},remove:function(e,f){if(e.nodeType==1){e.className=f!==G?O.grep(e.className.split(/\s+/),function(g){return !O.className.has(f,g)}).join(" "):""}},has:function(f,e){return f&&O.inArray(e,(f.className||f).toString().split(/\s+/))>-1}},swap:function(h,g,i){var e={};for(var f in g){e[f]=h.style[f];h.style[f]=g[f]}i.call(h);for(var f in g){h.style[f]=e[f]}},css:function(h,f,j,e){if(f=="width"||f=="height"){var l,g={position:"absolute",visibility:"hidden",display:"block"},k=f=="width"?["Left","Right"]:["Top","Bottom"];function i(){l=f=="width"?h.offsetWidth:h.offsetHeight;if(e==="border"){return }O.each(k,function(){if(!e){l-=parseFloat(O.curCSS(h,"padding"+this,true))||0}if(e==="margin"){l+=parseFloat(O.curCSS(h,"margin"+this,true))||0}else{l-=parseFloat(O.curCSS(h,"border"+this+"Width",true))||0}})}if(h.offsetWidth!==0){i()}else{O.swap(h,g,i)}return Math.max(0,Math.round(l))}return O.curCSS(h,f,j)},curCSS:function(i,f,g){var l,e=i.style;if(f=="opacity"&&!O.support.opacity){l=O.attr(e,"opacity");return l==""?"1":l}if(f.match(/float/i)){f=W}if(!g&&e&&e[f]){l=e[f]}else{if(Q.getComputedStyle){if(f.match(/float/i)){f="float"}f=f.replace(/([A-Z])/g,"-$1").toLowerCase();var m=Q.getComputedStyle(i,null);if(m){l=m.getPropertyValue(f)}if(f=="opacity"&&l==""){l="1"}}else{if(i.currentStyle){var j=f.replace(/\-(\w)/g,function(n,o){return o.toUpperCase()});l=i.currentStyle[f]||i.currentStyle[j];if(!/^\d+(px)?$/i.test(l)&&/^\d/.test(l)){var h=e.left,k=i.runtimeStyle.left;i.runtimeStyle.left=i.currentStyle.left;e.left=l||0;l=e.pixelLeft+"px";e.left=h;i.runtimeStyle.left=k}}}}return l},clean:function(f,l,j){l=l||document;if(typeof l.createElement==="undefined"){l=l.ownerDocument||l[0]&&l[0].ownerDocument||document}if(!j&&f.length===1&&typeof f[0]==="string"){var h=/^<(\w+)\s*\/?>$/.exec(f[0]);if(h){return[l.createElement(h[1])]}}var g=[],e=[],m=l.createElement("div");O.each(f,function(q,t){if(typeof t==="number"){t+=""}if(!t){return }if(typeof t==="string"){t=t.replace(/(<(\w+)[^>]*?)\/>/g,function(u,v,i){return i.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?u:v+"></"+i+">"});var p=t.replace(/^\s+/,"").substring(0,10).toLowerCase();var r=!p.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!p.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||p.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!p.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!p.indexOf("<td")||!p.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!p.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!O.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];m.innerHTML=r[1]+t+r[2];while(r[0]--){m=m.lastChild}if(!O.support.tbody){var s=/<tbody/i.test(t),o=!p.indexOf("<table")&&!s?m.firstChild&&m.firstChild.childNodes:r[1]=="<table>"&&!s?m.childNodes:[];for(var n=o.length-1;n>=0;--n){if(O.nodeName(o[n],"tbody")&&!o[n].childNodes.length){o[n].parentNode.removeChild(o[n])}}}if(!O.support.leadingWhitespace&&/^\s/.test(t)){m.insertBefore(l.createTextNode(t.match(/^\s*/)[0]),m.firstChild)}t=O.makeArray(m.childNodes)}if(t.nodeType){g.push(t)}else{g=O.merge(g,t)}});if(j){for(var k=0;g[k];k++){if(O.nodeName(g[k],"script")&&(!g[k].type||g[k].type.toLowerCase()==="text/javascript")){e.push(g[k].parentNode?g[k].parentNode.removeChild(g[k]):g[k])}else{if(g[k].nodeType===1){g.splice.apply(g,[k+1,0].concat(O.makeArray(g[k].getElementsByTagName("script"))))}j.appendChild(g[k])}}return e}return g},attr:function(j,g,k){if(!j||j.nodeType==3||j.nodeType==8){return G}var h=!O.isXMLDoc(j),l=k!==G;g=h&&O.props[g]||g;if(j.tagName){var f=/href|src|style/.test(g);if(g=="selected"&&j.parentNode){j.parentNode.selectedIndex}if(g in j&&h&&!f){if(l){if(g=="type"&&O.nodeName(j,"input")&&j.parentNode){throw"type property can't be changed"}j[g]=k}if(O.nodeName(j,"form")&&j.getAttributeNode(g)){return j.getAttributeNode(g).nodeValue}if(g=="tabIndex"){var i=j.getAttributeNode("tabIndex");return i&&i.specified?i.value:j.nodeName.match(/(button|input|object|select|textarea)/i)?0:j.nodeName.match(/^(a|area)$/i)&&j.href?0:G}return j[g]}if(!O.support.style&&h&&g=="style"){return O.attr(j.style,"cssText",k)}if(l){j.setAttribute(g,""+k)}var e=!O.support.hrefNormalized&&h&&f?j.getAttribute(g,2):j.getAttribute(g);return e===null?G:e}if(!O.support.opacity&&g=="opacity"){if(l){j.zoom=1;j.filter=(j.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(k)+""=="NaN"?"":"alpha(opacity="+k*100+")")}return j.filter&&j.filter.indexOf("opacity=")>=0?(parseFloat(j.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}g=g.replace(/-([a-z])/ig,function(m,n){return n.toUpperCase()});if(l){j[g]=k}return j[g]},trim:function(e){return(e||"").replace(/^\s+|\s+$/g,"")},makeArray:function(g){var e=[];if(g!=null){var f=g.length;if(f==null||typeof g==="string"||O.isFunction(g)||g.setInterval){e[0]=g}else{while(f){e[--f]=g[f]}}}return e},inArray:function(g,h){for(var e=0,f=h.length;e<f;e++){if(h[e]===g){return e}}return -1},merge:function(h,e){var f=0,g,j=h.length;if(!O.support.getAll){while((g=e[f++])!=null){if(g.nodeType!=8){h[j++]=g}}}else{while((g=e[f++])!=null){h[j++]=g}}return h},unique:function(m){var g=[],f={};try{for(var h=0,j=m.length;h<j;h++){var l=O.data(m[h]);if(!f[l]){f[l]=true;g.push(m[h])}}}catch(k){g=m}return g},grep:function(f,k,e){var g=[];for(var h=0,j=f.length;h<j;h++){if(!e!=!k(f[h],h)){g.push(f[h])}}return g},map:function(e,k){var f=[];for(var g=0,h=e.length;g<h;g++){var j=k(e[g],g);if(j!=null){f[f.length]=j}}return f.concat.apply([],f)}});var c=navigator.userAgent.toLowerCase();O.browser={version:(c.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(c),opera:/opera/.test(c),msie:/msie/.test(c)&&!/opera/.test(c),mozilla:/mozilla/.test(c)&&!/(compatible|webkit)/.test(c)};O.each({parent:function(e){return e.parentNode},parents:function(e){return O.dir(e,"parentNode")},next:function(e){return O.nth(e,2,"nextSibling")},prev:function(e){return O.nth(e,2,"previousSibling")},nextAll:function(e){return O.dir(e,"nextSibling")},prevAll:function(e){return O.dir(e,"previousSibling")},siblings:function(e){return O.sibling(e.parentNode.firstChild,e)},children:function(e){return O.sibling(e.firstChild)},contents:function(e){return O.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:O.makeArray(e.childNodes)}},function(e,f){O.fn[e]=function(g){var h=O.map(this,f);if(g&&typeof g=="string"){h=O.multiFilter(g,h)}return this.pushStack(O.unique(h),e,g)}});O.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,f){O.fn[e]=function(g){var k=[],n=O(g);for(var m=0,h=n.length;m<h;m++){var j=(m>0?this.clone(true):this).get();O.fn[f].apply(O(n[m]),j);k=k.concat(j)}return this.pushStack(k,e,g)}});O.each({removeAttr:function(e){O.attr(this,e,"");if(this.nodeType==1){this.removeAttribute(e)}},addClass:function(e){O.className.add(this,e)},removeClass:function(e){O.className.remove(this,e)},toggleClass:function(f,e){if(typeof e!=="boolean"){e=!O.className.has(this,f)}O.className[e?"add":"remove"](this,f)},remove:function(e){if(!e||O.filter(e,[this]).length){O("*",this).add([this]).each(function(){O.event.remove(this);O.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){O(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(e,f){O.fn[e]=function(){return this.each(f,arguments)}});function J(e,f){return e[0]&&parseInt(O.curCSS(e[0],f,true),10)||0}var H="jQuery"+E(),V=0,a={};O.extend({cache:{},data:function(f,e,g){f=f==L?a:f;var h=f[H];if(!h){h=f[H]=++V}if(e&&!O.cache[h]){O.cache[h]={}}if(g!==G){O.cache[h][e]=g}return e?O.cache[h][e]:h},removeData:function(g,f){g=g==L?a:g;var i=g[H];if(f){if(O.cache[i]){delete O.cache[i][f];f="";for(f in O.cache[i]){break}if(!f){O.removeData(g)}}}else{try{delete g[H]}catch(h){if(g.removeAttribute){g.removeAttribute(H)}}delete O.cache[i]}},queue:function(f,e,h){if(f){e=(e||"fx")+"queue";var g=O.data(f,e);if(!g||O.isArray(h)){g=O.data(f,e,O.makeArray(h))}else{if(h){g.push(h)}}}return g},dequeue:function(h,g){var e=O.queue(h,g),f=e.shift();if(!g||g==="fx"){f=e[0]}if(f!==G){f.call(h)}}});O.fn.extend({data:function(e,g){var h=e.split(".");h[1]=h[1]?"."+h[1]:"";if(g===G){var f=this.triggerHandler("getData"+h[1]+"!",[h[0]]);if(f===G&&this.length){f=O.data(this[0],e)}return f===G&&h[1]?this.data(h[0]):f}else{return this.trigger("setData"+h[1]+"!",[h[0],g]).each(function(){O.data(this,e,g)})}},removeData:function(e){return this.each(function(){O.removeData(this,e)})},queue:function(e,f){if(typeof e!=="string"){f=e;e="fx"}if(f===G){return O.queue(this[0],e)}return this.each(function(){var g=O.queue(this,e,f);if(e=="fx"&&g.length==1){g[0].call(this)}})},dequeue:function(e){return this.each(function(){O.dequeue(this,e)})}});(function(){var s=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,m=0,i=Object.prototype.toString;var g=function(y,u,AB,AC){AB=AB||[];u=u||document;if(u.nodeType!==1&&u.nodeType!==9){return[]}if(!y||typeof y!=="string"){return AB}var z=[],w,AF,AI,e,AD,v,x=true;s.lastIndex=0;while((w=s.exec(y))!==null){z.push(w[1]);if(w[2]){v=RegExp.rightContext;break}}if(z.length>1&&n.exec(y)){if(z.length===2&&j.relative[z[0]]){AF=k(z[0]+z[1],u)}else{AF=j.relative[z[0]]?[u]:g(z.shift(),u);while(z.length){y=z.shift();if(j.relative[y]){y+=z.shift()}AF=k(y,AF)}}}else{var AE=AC?{expr:z.pop(),set:f(AC)}:g.find(z.pop(),z.length===1&&u.parentNode?u.parentNode:u,r(u));AF=g.filter(AE.expr,AE.set);if(z.length>0){AI=f(AF)}else{x=false}while(z.length){var AH=z.pop(),AG=AH;if(!j.relative[AH]){AH=""}else{AG=z.pop()}if(AG==null){AG=u}j.relative[AH](AI,AG,r(u))}}if(!AI){AI=AF}if(!AI){throw"Syntax error, unrecognized expression: "+(AH||y)}if(i.call(AI)==="[object Array]"){if(!x){AB.push.apply(AB,AI)}else{if(u.nodeType===1){for(var AA=0;AI[AA]!=null;AA++){if(AI[AA]&&(AI[AA]===true||AI[AA].nodeType===1&&l(u,AI[AA]))){AB.push(AF[AA])}}}else{for(var AA=0;AI[AA]!=null;AA++){if(AI[AA]&&AI[AA].nodeType===1){AB.push(AF[AA])}}}}}else{f(AI,AB)}if(v){g(v,u,AB,AC);if(h){hasDuplicate=false;AB.sort(h);if(hasDuplicate){for(var AA=1;AA<AB.length;AA++){if(AB[AA]===AB[AA-1]){AB.splice(AA--,1)}}}}}return AB};g.matches=function(e,u){return g(e,null,null,u)};g.find=function(AA,e,AB){var z,x;if(!AA){return[]}for(var w=0,v=j.order.length;w<v;w++){var y=j.order[w],x;if((x=j.match[y].exec(AA))){var u=RegExp.leftContext;if(u.substr(u.length-1)!=="\\"){x[1]=(x[1]||"").replace(/\\/g,"");z=j.find[y](x,e,AB);if(z!=null){AA=AA.replace(j.match[y],"");break}}}}if(!z){z=e.getElementsByTagName("*")}return{set:z,expr:AA}};g.filter=function(AD,AC,AG,w){var v=AD,AI=[],AA=AC,y,e,z=AC&&AC[0]&&r(AC[0]);while(AD&&AC.length){for(var AB in j.filter){if((y=j.match[AB].exec(AD))!=null){var u=j.filter[AB],AH,AF;e=false;if(AA==AI){AI=[]}if(j.preFilter[AB]){y=j.preFilter[AB](y,AA,AG,AI,w,z);if(!y){e=AH=true}else{if(y===true){continue}}}if(y){for(var x=0;(AF=AA[x])!=null;x++){if(AF){AH=u(AF,y,x,AA);var AE=w^!!AH;if(AG&&AH!=null){if(AE){e=true}else{AA[x]=false}}else{if(AE){AI.push(AF);e=true}}}}}if(AH!==G){if(!AG){AA=AI}AD=AD.replace(j.match[AB],"");if(!e){return[]}break}}}if(AD==v){if(e==null){throw"Syntax error, unrecognized expression: "+AD}else{break}}v=AD}return AA};var j=g.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")}},relative:{"+":function(AA,e,z){var x=typeof e==="string",AB=x&&!/\W/.test(e),y=x&&!AB;if(AB&&!z){e=e.toUpperCase()}for(var w=0,v=AA.length,u;w<v;w++){if((u=AA[w])){while((u=u.previousSibling)&&u.nodeType!==1){}AA[w]=y||u&&u.nodeName===e?u||false:u===e}}if(y){g.filter(e,AA,true)}},">":function(z,u,AA){var x=typeof u==="string";if(x&&!/\W/.test(u)){u=AA?u:u.toUpperCase();for(var v=0,e=z.length;v<e;v++){var y=z[v];if(y){var w=y.parentNode;z[v]=w.nodeName===u?w:false}}}else{for(var v=0,e=z.length;v<e;v++){var y=z[v];if(y){z[v]=x?y.parentNode:y.parentNode===u}}if(x){g.filter(u,z,true)}}},"":function(w,u,y){var v=m++,e=t;if(!u.match(/\W/)){var x=u=y?u:u.toUpperCase();e=q}e("parentNode",u,v,w,x,y)},"~":function(w,u,y){var v=m++,e=t;if(typeof u==="string"&&!u.match(/\W/)){var x=u=y?u:u.toUpperCase();e=q}e("previousSibling",u,v,w,x,y)}},find:{ID:function(u,v,w){if(typeof v.getElementById!=="undefined"&&!w){var e=v.getElementById(u[1]);return e?[e]:[]}},NAME:function(v,y,z){if(typeof y.getElementsByName!=="undefined"){var u=[],x=y.getElementsByName(v[1]);for(var w=0,e=x.length;w<e;w++){if(x[w].getAttribute("name")===v[1]){u.push(x[w])}}return u.length===0?null:u}},TAG:function(e,u){return u.getElementsByTagName(e[1])}},preFilter:{CLASS:function(w,u,v,e,z,AA){w=" "+w[1].replace(/\\/g,"")+" ";if(AA){return w}for(var x=0,y;(y=u[x])!=null;x++){if(y){if(z^(y.className&&(" "+y.className+" ").indexOf(w)>=0)){if(!v){e.push(y)}}else{if(v){u[x]=false}}}}return false},ID:function(e){return e[1].replace(/\\/g,"")},TAG:function(u,e){for(var v=0;e[v]===false;v++){}return e[v]&&r(e[v])?u[1]:u[1].toUpperCase()},CHILD:function(e){if(e[1]=="nth"){var u=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(e[2]=="even"&&"2n"||e[2]=="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(u[1]+(u[2]||1))-0;e[3]=u[3]-0}e[0]=m++;return e},ATTR:function(x,u,v,e,y,z){var w=x[1].replace(/\\/g,"");if(!z&&j.attrMap[w]){x[1]=j.attrMap[w]}if(x[2]==="~="){x[4]=" "+x[4]+" "}return x},PSEUDO:function(x,u,v,e,y){if(x[1]==="not"){if(x[3].match(s).length>1||/^\w/.test(x[3])){x[3]=g(x[3],null,null,u)}else{var w=g.filter(x[3],u,v,true^y);if(!v){e.push.apply(e,w)}return false}}else{if(j.match.POS.test(x[0])||j.match.CHILD.test(x[0])){return true}}return x},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){e.parentNode.selectedIndex;return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(v,u,e){return !!g(e[3],v).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){return"text"===e.type},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toUpperCase()==="BUTTON"},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)}},setFilters:{first:function(u,e){return e===0},last:function(v,u,e,w){return u===w.length-1},even:function(u,e){return e%2===0},odd:function(u,e){return e%2===1},lt:function(v,u,e){return u<e[3]-0},gt:function(v,u,e){return u>e[3]-0},nth:function(v,u,e){return e[3]-0==u},eq:function(v,u,e){return e[3]-0==u}},filter:{PSEUDO:function(z,v,w,AA){var u=v[1],x=j.filters[u];if(x){return x(z,w,v,AA)}else{if(u==="contains"){return(z.textContent||z.innerText||"").indexOf(v[3])>=0}else{if(u==="not"){var y=v[3];for(var w=0,e=y.length;w<e;w++){if(y[w]===z){return false}}return true}}}},CHILD:function(e,w){var z=w[1],u=e;switch(z){case"only":case"first":while(u=u.previousSibling){if(u.nodeType===1){return false}}if(z=="first"){return true}u=e;case"last":while(u=u.nextSibling){if(u.nodeType===1){return false}}return true;case"nth":var v=w[2],AC=w[3];if(v==1&&AC==0){return true}var y=w[0],AB=e.parentNode;if(AB&&(AB.sizcache!==y||!e.nodeIndex)){var x=0;for(u=AB.firstChild;u;u=u.nextSibling){if(u.nodeType===1){u.nodeIndex=++x}}AB.sizcache=y}var AA=e.nodeIndex-AC;if(v==0){return AA==0}else{return(AA%v==0&&AA/v>=0)}}},ID:function(u,e){return u.nodeType===1&&u.getAttribute("id")===e},TAG:function(u,e){return(e==="*"&&u.nodeType===1)||u.nodeName===e},CLASS:function(u,e){return(" "+(u.className||u.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(y,w){var v=w[1],e=j.attrHandle[v]?j.attrHandle[v](y):y[v]!=null?y[v]:y.getAttribute(v),z=e+"",x=w[2],u=w[4];return e==null?x==="!=":x==="="?z===u:x==="*="?z.indexOf(u)>=0:x==="~="?(" "+z+" ").indexOf(u)>=0:!u?z&&e!==false:x==="!="?z!=u:x==="^="?z.indexOf(u)===0:x==="$="?z.substr(z.length-u.length)===u:x==="|="?z===u||z.substr(0,u.length+1)===u+"-":false},POS:function(x,u,v,y){var e=u[2],w=j.setFilters[e];if(w){return w(x,v,u,y)}}}};var n=j.match.POS;for(var p in j.match){j.match[p]=RegExp(j.match[p].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var f=function(u,e){u=Array.prototype.slice.call(u);if(e){e.push.apply(e,u);return e}return u};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(o){f=function(x,w){var u=w||[];if(i.call(x)==="[object Array]"){Array.prototype.push.apply(u,x)}else{if(typeof x.length==="number"){for(var v=0,e=x.length;v<e;v++){u.push(x[v])}}else{for(var v=0;x[v];v++){u.push(x[v])}}}return u}}var h;if(document.documentElement.compareDocumentPosition){h=function(u,e){var v=u.compareDocumentPosition(e)&4?-1:u===e?0:1;if(v===0){hasDuplicate=true}return v}}else{if("sourceIndex" in document.documentElement){h=function(u,e){var v=u.sourceIndex-e.sourceIndex;if(v===0){hasDuplicate=true}return v}}else{if(document.createRange){h=function(w,u){var v=w.ownerDocument.createRange(),e=u.ownerDocument.createRange();v.selectNode(w);v.collapse(true);e.selectNode(u);e.collapse(true);var x=v.compareBoundaryPoints(Range.START_TO_END,e);if(x===0){hasDuplicate=true}return x}}}}(function(){var u=document.createElement("form"),v="script"+(new Date).getTime();u.innerHTML="<input name='"+v+"'/>";var e=document.documentElement;e.insertBefore(u,e.firstChild);if(!!document.getElementById(v)){j.find.ID=function(x,y,z){if(typeof y.getElementById!=="undefined"&&!z){var w=y.getElementById(x[1]);return w?w.id===x[1]||typeof w.getAttributeNode!=="undefined"&&w.getAttributeNode("id").nodeValue===x[1]?[w]:G:[]}};j.filter.ID=function(y,w){var x=typeof y.getAttributeNode!=="undefined"&&y.getAttributeNode("id");return y.nodeType===1&&x&&x.nodeValue===w}}e.removeChild(u)})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){j.find.TAG=function(u,y){var x=y.getElementsByTagName(u[1]);if(u[1]==="*"){var w=[];for(var v=0;x[v];v++){if(x[v].nodeType===1){w.push(x[v])}}x=w}return x}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){j.attrHandle.href=function(u){return u.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var e=g,u=document.createElement("div");u.innerHTML="<p class='TEST'></p>";if(u.querySelectorAll&&u.querySelectorAll(".TEST").length===0){return }g=function(y,x,v,w){x=x||document;if(!w&&x.nodeType===9&&!r(x)){try{return f(x.querySelectorAll(y),v)}catch(z){}}return e(y,x,v,w)};g.find=e.find;g.filter=e.filter;g.selectors=e.selectors;g.matches=e.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var e=document.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(e.getElementsByClassName("e").length===0){return }e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return }j.order.splice(1,0,"CLASS");j.find.CLASS=function(u,v,w){if(typeof v.getElementsByClassName!=="undefined"&&!w){return v.getElementsByClassName(u[1])}}})()}function q(u,z,y,AD,AA,AC){var AB=u=="previousSibling"&&!AC;for(var w=0,v=AD.length;w<v;w++){var e=AD[w];if(e){if(AB&&e.nodeType===1){e.sizcache=y;e.sizset=w}e=e[u];var x=false;while(e){if(e.sizcache===y){x=AD[e.sizset];break}if(e.nodeType===1&&!AC){e.sizcache=y;e.sizset=w}if(e.nodeName===z){x=e;break}e=e[u]}AD[w]=x}}}function t(u,z,y,AD,AA,AC){var AB=u=="previousSibling"&&!AC;for(var w=0,v=AD.length;w<v;w++){var e=AD[w];if(e){if(AB&&e.nodeType===1){e.sizcache=y;e.sizset=w}e=e[u];var x=false;while(e){if(e.sizcache===y){x=AD[e.sizset];break}if(e.nodeType===1){if(!AC){e.sizcache=y;e.sizset=w}if(typeof z!=="string"){if(e===z){x=true;break}}else{if(g.filter(z,[e]).length>0){x=e;break}}}e=e[u]}AD[w]=x}}}var l=document.compareDocumentPosition?function(u,e){return u.compareDocumentPosition(e)&16}:function(u,e){return u!==e&&(u.contains?u.contains(e):true)};var r=function(e){return e.nodeType===9&&e.documentElement.nodeName!=="HTML"||!!e.ownerDocument&&r(e.ownerDocument)};var k=function(e,AA){var w=[],x="",y,v=AA.nodeType?[AA]:AA;while((y=j.match.PSEUDO.exec(e))){x+=y[0];e=e.replace(j.match.PSEUDO,"")}e=j.relative[e]?e+"*":e;for(var z=0,u=v.length;z<u;z++){g(e,v[z],w)}return g.filter(x,w)};O.find=g;O.filter=g.filter;O.expr=g.selectors;O.expr[":"]=O.expr.filters;g.selectors.filters.hidden=function(e){return e.offsetWidth===0||e.offsetHeight===0};g.selectors.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0};g.selectors.filters.animated=function(e){return O.grep(O.timers,function(u){return e===u.elem}).length};O.multiFilter=function(v,e,u){if(u){v=":not("+v+")"}return g.matches(v,e)};O.dir=function(v,u){var e=[],w=v[u];while(w&&w!=document){if(w.nodeType==1){e.push(w)}w=w[u]}return e};O.nth=function(x,e,v,w){e=e||1;var u=0;for(;x;x=x[v]){if(x.nodeType==1&&++u==e){break}}return x};O.sibling=function(v,u){var e=[];for(;v;v=v.nextSibling){if(v.nodeType==1&&v!=u){e.push(v)}}return e};return ;L.Sizzle=g})();O.event={add:function(i,f,h,k){if(i.nodeType==3||i.nodeType==8){return }if(i.setInterval&&i!=L){i=L}if(!h.guid){h.guid=this.guid++}if(k!==G){var g=h;h=this.proxy(g);h.data=k}var e=O.data(i,"events")||O.data(i,"events",{}),j=O.data(i,"handle")||O.data(i,"handle",function(){return typeof O!=="undefined"&&!O.event.triggered?O.event.handle.apply(arguments.callee.elem,arguments):G});j.elem=i;O.each(f.split(/\s+/),function(m,n){var o=n.split(".");n=o.shift();h.type=o.slice().sort().join(".");var l=e[n];if(O.event.specialAll[n]){O.event.specialAll[n].setup.call(i,k,o)}if(!l){l=e[n]={};if(!O.event.special[n]||O.event.special[n].setup.call(i,k,o)===false){if(i.addEventListener){i.addEventListener(n,j,false)}else{if(i.attachEvent){i.attachEvent("on"+n,j)}}}}l[h.guid]=h;O.event.global[n]=true});i=null},guid:1,global:{},remove:function(k,h,j){if(k.nodeType==3||k.nodeType==8){return }var g=O.data(k,"events"),f,e;if(g){if(h===G||(typeof h==="string"&&h.charAt(0)==".")){for(var i in g){this.remove(k,i+(h||""))}}else{if(h.type){j=h.handler;h=h.type}O.each(h.split(/\s+/),function(m,o){var q=o.split(".");o=q.shift();var n=RegExp("(^|\\.)"+q.slice().sort().join(".*\\.")+"(\\.|$)");if(g[o]){if(j){delete g[o][j.guid]}else{for(var p in g[o]){if(n.test(g[o][p].type)){delete g[o][p]}}}if(O.event.specialAll[o]){O.event.specialAll[o].teardown.call(k,q)}for(f in g[o]){break}if(!f){if(!O.event.special[o]||O.event.special[o].teardown.call(k,q)===false){if(k.removeEventListener){k.removeEventListener(o,O.data(k,"handle"),false)}else{if(k.detachEvent){k.detachEvent("on"+o,O.data(k,"handle"))}}}f=null;delete g[o]}}})}for(f in g){break}if(!f){var l=O.data(k,"handle");if(l){l.elem=null}O.removeData(k,"events");O.removeData(k,"handle")}}},trigger:function(j,l,i,f){var h=j.type||j;if(!f){j=typeof j==="object"?j[H]?j:O.extend(O.Event(h),j):O.Event(h);if(h.indexOf("!")>=0){j.type=h=h.slice(0,-1);j.exclusive=true}if(!i){j.stopPropagation();if(this.global[h]){O.each(O.cache,function(){if(this.events&&this.events[h]){O.event.trigger(j,l,this.handle.elem)}})}}if(!i||i.nodeType==3||i.nodeType==8){return G}j.result=G;j.target=i;l=O.makeArray(l);l.unshift(j)}j.currentTarget=i;var k=O.data(i,"handle");if(k){k.apply(i,l)}if((!i[h]||(O.nodeName(i,"a")&&h=="click"))&&i["on"+h]&&i["on"+h].apply(i,l)===false){j.result=false}if(!f&&i[h]&&!j.isDefaultPrevented()&&!(O.nodeName(i,"a")&&h=="click")){this.triggered=true;try{i[h]()}catch(m){}}this.triggered=false;if(!j.isPropagationStopped()){var g=i.parentNode||i.ownerDocument;if(g){O.event.trigger(j,l,g,true)}}},handle:function(l){var k,e;l=arguments[0]=O.event.fix(l||L.event);l.currentTarget=this;var m=l.type.split(".");l.type=m.shift();k=!m.length&&!l.exclusive;var i=RegExp("(^|\\.)"+m.slice().sort().join(".*\\.")+"(\\.|$)");e=(O.data(this,"events")||{})[l.type];for(var g in e){var h=e[g];if(k||i.test(h.type)){l.handler=h;l.data=h.data;var f=h.apply(this,arguments);if(f!==G){l.result=f;if(f===false){l.preventDefault();l.stopPropagation()}}if(l.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(h){if(h[H]){return h}var f=h;h=O.Event(f);for(var g=this.props.length,k;g;){k=this.props[--g];h[k]=f[k]}if(!h.target){h.target=h.srcElement||document}if(h.target.nodeType==3){h.target=h.target.parentNode}if(!h.relatedTarget&&h.fromElement){h.relatedTarget=h.fromElement==h.target?h.toElement:h.fromElement}if(h.pageX==null&&h.clientX!=null){var j=document.documentElement,e=document.body;h.pageX=h.clientX+(j&&j.scrollLeft||e&&e.scrollLeft||0)-(j.clientLeft||0);h.pageY=h.clientY+(j&&j.scrollTop||e&&e.scrollTop||0)-(j.clientTop||0)}if(!h.which&&((h.charCode||h.charCode===0)?h.charCode:h.keyCode)){h.which=h.charCode||h.keyCode}if(!h.metaKey&&h.ctrlKey){h.metaKey=h.ctrlKey}if(!h.which&&h.button){h.which=(h.button&1?1:(h.button&2?3:(h.button&4?2:0)))}return h},proxy:function(f,e){e=e||function(){return f.apply(this,arguments)};e.guid=f.guid=f.guid||e.guid||this.guid++;return e},special:{ready:{setup:b,teardown:function(){}}},specialAll:{live:{setup:function(e,f){O.event.add(this,f[0],C)},teardown:function(g){if(g.length){var e=0,f=RegExp("(^|\\.)"+g[0]+"(\\.|$)");O.each((O.data(this,"events").live||{}),function(){if(f.test(this.type)){e++}});if(e<1){O.event.remove(this,g[0],C)}}}}}};O.Event=function(e){if(!this.preventDefault){return new O.Event(e)}if(e&&e.type){this.originalEvent=e;this.type=e.type}else{this.type=e}this.timeStamp=E();this[H]=true};function K(){return false}function U(){return true}O.Event.prototype={preventDefault:function(){this.isDefaultPrevented=U;var f=this.originalEvent;if(!f){return }if(f.preventDefault){f.preventDefault()}f.returnValue=false},stopPropagation:function(){this.isPropagationStopped=U;var f=this.originalEvent;if(!f){return }if(f.stopPropagation){f.stopPropagation()}f.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=U;this.stopPropagation()},isDefaultPrevented:K,isPropagationStopped:K,isImmediatePropagationStopped:K};var A=function(g){var f=g.relatedTarget;while(f&&f!=this){try{f=f.parentNode}catch(h){f=this}}if(f!=this){g.type=g.data;O.event.handle.apply(this,arguments)}};O.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(f,e){O.event.special[e]={setup:function(){O.event.add(this,f,A,e)},teardown:function(){O.event.remove(this,f,A)}}});O.fn.extend({bind:function(f,g,e){return f=="unload"?this.one(f,g,e):this.each(function(){O.event.add(this,f,e||g,e&&g)})},one:function(g,h,f){var e=O.event.proxy(f||h,function(i){O(this).unbind(i,e);return(f||h).apply(this,arguments)});return this.each(function(){O.event.add(this,g,e,f&&h)})},unbind:function(f,e){return this.each(function(){O.event.remove(this,f,e)})},trigger:function(e,f){return this.each(function(){O.event.trigger(e,f,this)})},triggerHandler:function(e,g){if(this[0]){var f=O.Event(e);f.preventDefault();f.stopPropagation();O.event.trigger(f,g,this[0]);return f.result}},toggle:function(g){var e=arguments,f=1;while(f<e.length){O.event.proxy(g,e[f++])}return this.click(O.event.proxy(g,function(h){this.lastToggle=(this.lastToggle||0)%f;h.preventDefault();return e[this.lastToggle++].apply(this,arguments)||false}))},hover:function(e,f){return this.mouseenter(e).mouseleave(f)},ready:function(e){b();if(O.isReady){e.call(document,O)}else{O.readyList.push(e)}return this},live:function(g,f){var e=O.event.proxy(f);e.guid+=this.selector+g;O(document).bind(I(g,this.selector),this.selector,e);return this},die:function(f,e){O(document).unbind(I(f,this.selector),e?{guid:e.guid+this.selector+f}:null);return this}});function C(h){var e=RegExp("(^|\\.)"+h.type+"(\\.|$)"),g=true,f=[];O.each(O.data(this,"events").live||[],function(j,k){if(e.test(k.type)){var l=O(h.target).closest(k.data)[0];if(l){f.push({elem:l,fn:k})}}});f.sort(function(j,i){return O.data(j.elem,"closest")-O.data(i.elem,"closest")});O.each(f,function(){if(this.fn.call(this.elem,h,this.fn.data)===false){return(g=false)}});return g}function I(f,e){return["live",f,e.replace(/\./g,"`").replace(/ /g,"|")].join(".")}O.extend({isReady:false,readyList:[],ready:function(){if(!O.isReady){O.isReady=true;if(O.readyList){O.each(O.readyList,function(){this.call(document,O)});O.readyList=null}O(document).triggerHandler("ready")}}});var X=false;function b(){if(X){return }X=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);O.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);O.ready()}});if(document.documentElement.doScroll&&L==L.top){(function(){if(O.isReady){return }try{document.documentElement.doScroll("left")}catch(e){setTimeout(arguments.callee,0);return }O.ready()})()}}}O.event.add(L,"load",O.ready)}O.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(f,e){O.fn[e]=function(g){return g?this.bind(e,g):this.trigger(e)}});O(L).bind("unload",function(){for(var e in O.cache){if(e!=1&&O.cache[e].handle){O.event.remove(O.cache[e].handle.elem)}}});(function(){O.support={};var g=document.documentElement,h=document.createElement("script"),l=document.createElement("div"),k="script"+(new Date).getTime();l.style.display="none";l.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var i=l.getElementsByTagName("*"),f=l.getElementsByTagName("a")[0];if(!i||!i.length||!f){return }O.support={leadingWhitespace:l.firstChild.nodeType==3,tbody:!l.getElementsByTagName("tbody").length,objectAll:!!l.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!l.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:f.style.opacity==="0.5",cssFloat:!!f.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};h.type="text/javascript";try{h.appendChild(document.createTextNode("window."+k+"=1;"))}catch(j){}g.insertBefore(h,g.firstChild);if(L[k]){O.support.scriptEval=true;delete L[k]}g.removeChild(h);if(l.attachEvent&&l.fireEvent){l.attachEvent("onclick",function(){O.support.noCloneEvent=false;l.detachEvent("onclick",arguments.callee)});l.cloneNode(true).fireEvent("onclick")}O(function(){var e=document.createElement("div");e.style.width=e.style.paddingLeft="1px";document.body.appendChild(e);O.boxModel=O.support.boxModel=e.offsetWidth===2;document.body.removeChild(e).style.display="none"})})();var W=O.support.cssFloat?"cssFloat":"styleFloat";O.props={"for":"htmlFor","class":"className","float":W,cssFloat:W,styleFloat:W,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};O.fn.extend({_load:O.fn.load,load:function(g,j,k){if(typeof g!=="string"){return this._load(g)}var i=g.indexOf(" ");if(i>=0){var e=g.slice(i,g.length);g=g.slice(0,i)}var h="GET";if(j){if(O.isFunction(j)){k=j;j=null}else{if(typeof j==="object"){j=O.param(j);h="POST"}}}var f=this;O.ajax({url:g,type:h,dataType:"html",data:j,complete:function(m,l){if(l=="success"||l=="notmodified"){f.html(e?O("<div/>").append(m.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(e):m.responseText)}if(k){f.each(k,[m.responseText,l,m])}}});return this},serialize:function(){return O.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?O.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(e,f){var g=O(this).val();return g==null?null:O.isArray(g)?O.map(g,function(j,h){return{name:f.name,value:j}}):{name:f.name,value:g}}).get()}});O.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(e,f){O.fn[f]=function(g){return this.bind(f,g)}});var R=E();O.extend({get:function(e,g,h,f){if(O.isFunction(g)){h=g;g=null}return O.ajax({type:"GET",url:e,data:g,success:h,dataType:f})},getScript:function(e,f){return O.get(e,null,f,"script")},getJSON:function(e,f,g){return O.get(e,f,g,"json")},post:function(e,g,h,f){if(O.isFunction(g)){h=g;g={}}return O.ajax({type:"POST",url:e,data:g,success:h,dataType:f})},ajaxSetup:function(e){O.extend(O.ajaxSettings,e)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return L.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(n){n=O.extend(true,n,O.extend(true,{},O.ajaxSettings,n));var y,g=/=\?(&|$)/g,t,x,h=n.type.toUpperCase();if(n.data&&n.processData&&typeof n.data!=="string"){n.data=O.param(n.data)}if(n.dataType=="jsonp"){if(h=="GET"){if(!n.url.match(g)){n.url+=(n.url.match(/\?/)?"&":"?")+(n.jsonp||"callback")+"=?"}}else{if(!n.data||!n.data.match(g)){n.data=(n.data?n.data+"&":"")+(n.jsonp||"callback")+"=?"}}n.dataType="json"}if(n.dataType=="json"&&(n.data&&n.data.match(g)||n.url.match(g))){y="jsonp"+R++;if(n.data){n.data=(n.data+"").replace(g,"="+y+"$1")}n.url=n.url.replace(g,"="+y+"$1");n.dataType="script";L[y]=function(s){x=s;j();m();L[y]=G;try{delete L[y]}catch(z){}if(i){i.removeChild(v)}}}if(n.dataType=="script"&&n.cache==null){n.cache=false}if(n.cache===false&&h=="GET"){var f=E();var w=n.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+f+"$2");n.url=w+((w==n.url)?(n.url.match(/\?/)?"&":"?")+"_="+f:"")}if(n.data&&h=="GET"){n.url+=(n.url.match(/\?/)?"&":"?")+n.data;n.data=null}if(n.global&&!O.active++){O.event.trigger("ajaxStart")}var r=/^(\w+:)?\/\/([^\/?#]+)/.exec(n.url);if(n.dataType=="script"&&h=="GET"&&r&&(r[1]&&r[1]!=location.protocol||r[2]!=location.host)){var i=document.getElementsByTagName("head")[0];var v=document.createElement("script");v.src=n.url;if(n.scriptCharset){v.charset=n.scriptCharset}if(!y){var p=false;v.onload=v.onreadystatechange=function(){if(!p&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){p=true;j();m();v.onload=v.onreadystatechange=null;i.removeChild(v)}}}i.appendChild(v);return G}var l=false;var k=n.xhr();if(n.username){k.open(h,n.url,n.async,n.username,n.password)}else{k.open(h,n.url,n.async)}try{if(n.data){k.setRequestHeader("Content-Type",n.contentType)}if(n.ifModified){k.setRequestHeader("If-Modified-Since",O.lastModified[n.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}k.setRequestHeader("X-Requested-With","XMLHttpRequest");k.setRequestHeader("Accept",n.dataType&&n.accepts[n.dataType]?n.accepts[n.dataType]+", */*":n.accepts._default)}catch(u){}if(n.beforeSend&&n.beforeSend(k,n)===false){if(n.global&&!--O.active){O.event.trigger("ajaxStop")}k.abort();return false}if(n.global){O.event.trigger("ajaxSend",[k,n])}var o=function(s){if(k.readyState==0){if(q){clearInterval(q);q=null;if(n.global&&!--O.active){O.event.trigger("ajaxStop")}}}else{if(!l&&k&&(k.readyState==4||s=="timeout")){l=true;if(q){clearInterval(q);q=null}t=s=="timeout"?"timeout":!O.httpSuccess(k)?"error":n.ifModified&&O.httpNotModified(k,n.url)?"notmodified":"success";if(t=="success"){try{x=O.httpData(k,n.dataType,n)}catch(AA){t="parsererror"}}if(t=="success"){var z;try{z=k.getResponseHeader("Last-Modified")}catch(AA){}if(n.ifModified&&z){O.lastModified[n.url]=z}if(!y){j()}}else{O.handleError(n,k,t)}m();if(s){k.abort()}if(n.async){k=null}}}};if(n.async){var q=setInterval(o,13);if(n.timeout>0){setTimeout(function(){if(k&&!l){o("timeout")}},n.timeout)}}try{k.send(n.data)}catch(u){O.handleError(n,k,null,u)}if(!n.async){o()}function j(){if(n.success){n.success(x,t)}if(n.global){O.event.trigger("ajaxSuccess",[k,n])}}function m(){if(n.complete){n.complete(k,t)}if(n.global){O.event.trigger("ajaxComplete",[k,n])}if(n.global&&!--O.active){O.event.trigger("ajaxStop")}}return k},handleError:function(g,i,f,h){if(g.error){g.error(i,f,h)}if(g.global){O.event.trigger("ajaxError",[i,g,h])}},active:0,httpSuccess:function(g){try{return !g.status&&location.protocol=="file:"||(g.status>=200&&g.status<300)||g.status==304||g.status==1223}catch(f){}return false},httpNotModified:function(h,f){try{var i=h.getResponseHeader("Last-Modified");return h.status==304||i==O.lastModified[f]}catch(g){}return false},httpData:function(j,h,g){var f=j.getResponseHeader("content-type"),e=h=="xml"||!h&&f&&f.indexOf("xml")>=0,i=e?j.responseXML:j.responseText;if(e&&i.documentElement.tagName=="parsererror"){throw"parsererror"}if(g&&g.dataFilter){i=g.dataFilter(i,h)}if(typeof i==="string"){if(h=="script"){O.globalEval(i)}if(h=="json"){i=L["eval"]("("+i+")")}}return i},param:function(e){var g=[];function h(i,j){g[g.length]=encodeURIComponent(i)+"="+encodeURIComponent(j)}if(O.isArray(e)||e.jquery){O.each(e,function(){h(this.name,this.value)})}else{for(var f in e){if(O.isArray(e[f])){O.each(e[f],function(){h(f,this)})}else{h(f,O.isFunction(e[f])?e[f]():e[f])}}}return g.join("&").replace(/%20/g,"+")}});var M={},N,D=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function T(f,e){var g={};O.each(D.concat.apply([],D.slice(0,e)),function(){g[this]=f});return g}O.fn.extend({show:function(k,n){if(k){return this.animate(T("show",3),k,n)}else{for(var h=0,f=this.length;h<f;h++){var e=O.data(this[h],"olddisplay");this[h].style.display=e||"";if(O.css(this[h],"display")==="none"){var g=this[h].tagName,m;if(M[g]){m=M[g]}else{var j=O("<"+g+" />").appendTo("body");m=j.css("display");if(m==="none"){m="block"}j.remove();M[g]=m}O.data(this[h],"olddisplay",m)}}for(var h=0,f=this.length;h<f;h++){this[h].style.display=O.data(this[h],"olddisplay")||""}return this}},hide:function(h,j){if(h){return this.animate(T("hide",3),h,j)}else{for(var g=0,f=this.length;g<f;g++){var e=O.data(this[g],"olddisplay");if(!e&&e!=="none"){O.data(this[g],"olddisplay",O.css(this[g],"display"))}}for(var g=0,f=this.length;g<f;g++){this[g].style.display="none"}return this}},_toggle:O.fn.toggle,toggle:function(g,f){var e=typeof g==="boolean";return O.isFunction(g)&&O.isFunction(f)?this._toggle.apply(this,arguments):g==null||e?this.each(function(){var h=e?g:O(this).is(":hidden");O(this)[h?"show":"hide"]()}):this.animate(T("toggle",3),g,f)},fadeTo:function(e,g,f){return this.animate({opacity:g},e,f)},animate:function(i,f,h,g){var e=O.speed(f,h,g);return this[e.queue===false?"each":"queue"](function(){var k=O.extend({},e),m,l=this.nodeType==1&&O(this).is(":hidden"),j=this;for(m in i){if(i[m]=="hide"&&l||i[m]=="show"&&!l){return k.complete.call(this)}if((m=="height"||m=="width")&&this.style){k.display=O.css(this,"display");k.overflow=this.style.overflow}}if(k.overflow!=null){this.style.overflow="hidden"}k.curAnim=O.extend({},i);O.each(i,function(o,s){var r=new O.fx(j,k,o);if(/toggle|show|hide/.test(s)){r[s=="toggle"?l?"show":"hide":s](i)}else{var q=s.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),t=r.cur(true)||0;if(q){var n=parseFloat(q[2]),p=q[3]||"px";if(p!="px"){j.style[o]=(n||1)+p;t=((n||1)/r.cur(true))*t;j.style[o]=t+p}if(q[1]){n=((q[1]=="-="?-1:1)*n)+t}r.custom(t,n,p)}else{r.custom(t,s,"")}}});return true})},stop:function(f,e){var g=O.timers;if(f){this.queue([])}this.each(function(){for(var h=g.length-1;h>=0;h--){if(g[h].elem==this){if(e){g[h](true)}g.splice(h,1)}}});if(!e){this.dequeue()}return this}});O.each({slideDown:T("show",1),slideUp:T("hide",1),slideToggle:T("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(e,f){O.fn[e]=function(g,h){return this.animate(f,g,h)}});O.extend({speed:function(g,h,f){var e=typeof g==="object"?g:{complete:f||!f&&h||O.isFunction(g)&&g,duration:g,easing:f&&h||h&&!O.isFunction(h)&&h};e.duration=O.fx.off?0:typeof e.duration==="number"?e.duration:O.fx.speeds[e.duration]||O.fx.speeds._default;e.old=e.complete;e.complete=function(){if(e.queue!==false){O(this).dequeue()}if(O.isFunction(e.old)){e.old.call(this)}};return e},easing:{linear:function(g,h,e,f){return e+f*g},swing:function(g,h,e,f){return((-Math.cos(g*Math.PI)/2)+0.5)*f+e}},timers:[],fx:function(f,e,g){this.options=e;this.elem=f;this.prop=g;if(!e.orig){e.orig={}}}});O.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(O.fx.step[this.prop]||O.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(f){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var e=parseFloat(O.css(this.elem,this.prop,f));return e&&e>-10000?e:parseFloat(O.curCSS(this.elem,this.prop))||0},custom:function(i,h,g){this.startTime=E();this.start=i;this.end=h;this.unit=g||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;function f(j){return e.step(j)}f.elem=this.elem;if(f()&&O.timers.push(f)&&!N){N=setInterval(function(){var k=O.timers;for(var j=0;j<k.length;j++){if(!k[j]()){k.splice(j--,1)}}if(!k.length){clearInterval(N);N=G}},13)}},show:function(){this.options.orig[this.prop]=O.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());O(this.elem).show()},hide:function(){this.options.orig[this.prop]=O.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(h){var g=E();if(h||g>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var e=true;for(var f in this.options.curAnim){if(this.options.curAnim[f]!==true){e=false}}if(e){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(O.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){O(this.elem).hide()}if(this.options.hide||this.options.show){for(var j in this.options.curAnim){O.attr(this.elem.style,j,this.options.orig[j])}}this.options.complete.call(this.elem)}return false}else{var k=g-this.startTime;this.state=k/this.options.duration;this.pos=O.easing[this.options.easing||(O.easing.swing?"swing":"linear")](this.state,k,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};O.extend(O.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(e){O.attr(e.elem.style,"opacity",e.now)},_default:function(e){if(e.elem.style&&e.elem.style[e.prop]!=null){e.elem.style[e.prop]=e.now+e.unit}else{e.elem[e.prop]=e.now}}}});if(document.documentElement["getBoundingClientRect"]){O.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return O.offset.bodyOffset(this[0])}var g=this[0].getBoundingClientRect(),j=this[0].ownerDocument,f=j.body,e=j.documentElement,l=e.clientTop||f.clientTop||0,k=e.clientLeft||f.clientLeft||0,i=g.top+(self.pageYOffset||O.boxModel&&e.scrollTop||f.scrollTop)-l,h=g.left+(self.pageXOffset||O.boxModel&&e.scrollLeft||f.scrollLeft)-k;return{top:i,left:h}}}else{O.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return O.offset.bodyOffset(this[0])}O.offset.initialized||O.offset.initialize();var j=this[0],g=j.offsetParent,f=j,o=j.ownerDocument,m,h=o.documentElement,k=o.body,l=o.defaultView,e=l.getComputedStyle(j,null),n=j.offsetTop,i=j.offsetLeft;while((j=j.parentNode)&&j!==k&&j!==h){m=l.getComputedStyle(j,null);n-=j.scrollTop,i-=j.scrollLeft;if(j===g){n+=j.offsetTop,i+=j.offsetLeft;if(O.offset.doesNotAddBorder&&!(O.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(j.tagName))){n+=parseInt(m.borderTopWidth,10)||0,i+=parseInt(m.borderLeftWidth,10)||0}f=g,g=j.offsetParent}if(O.offset.subtractsBorderForOverflowNotVisible&&m.overflow!=="visible"){n+=parseInt(m.borderTopWidth,10)||0,i+=parseInt(m.borderLeftWidth,10)||0}e=m}if(e.position==="relative"||e.position==="static"){n+=k.offsetTop,i+=k.offsetLeft}if(e.position==="fixed"){n+=Math.max(h.scrollTop,k.scrollTop),i+=Math.max(h.scrollLeft,k.scrollLeft)}return{top:n,left:i}}}O.offset={initialize:function(){if(this.initialized){return }var l=document.body,f=document.createElement("div"),h,g,n,i,m,e,j=l.style.marginTop,k='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';m={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(e in m){f.style[e]=m[e]}f.innerHTML=k;l.insertBefore(f,l.firstChild);h=f.firstChild,g=h.firstChild,i=h.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(g.offsetTop!==5);this.doesAddBorderForTableAndCells=(i.offsetTop===5);h.style.overflow="hidden",h.style.position="relative";this.subtractsBorderForOverflowNotVisible=(g.offsetTop===-5);l.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(l.offsetTop===0);l.style.marginTop=j;l.removeChild(f);this.initialized=true},bodyOffset:function(e){O.offset.initialized||O.offset.initialize();var g=e.offsetTop,f=e.offsetLeft;if(O.offset.doesNotIncludeMarginInBodyOffset){g+=parseInt(O.curCSS(e,"marginTop",true),10)||0,f+=parseInt(O.curCSS(e,"marginLeft",true),10)||0}return{top:g,left:f}}};O.fn.extend({position:function(){var i=0,h=0,f;if(this[0]){var g=this.offsetParent(),j=this.offset(),e=/^body|html$/i.test(g[0].tagName)?{top:0,left:0}:g.offset();j.top-=J(this,"marginTop");j.left-=J(this,"marginLeft");e.top+=J(g,"borderTopWidth");e.left+=J(g,"borderLeftWidth");f={top:j.top-e.top,left:j.left-e.left}}return f},offsetParent:function(){var e=this[0].offsetParent||document.body;while(e&&(!/^body|html$/i.test(e.tagName)&&O.css(e,"position")=="static")){e=e.offsetParent}return O(e)}});O.each(["Left","Top"],function(f,e){var g="scroll"+e;O.fn[g]=function(h){if(!this[0]){return null}return h!==G?this.each(function(){this==L||this==document?L.scrollTo(!f?h:O(L).scrollLeft(),f?h:O(L).scrollTop()):this[g]=h}):this[0]==L||this[0]==document?self[f?"pageYOffset":"pageXOffset"]||O.boxModel&&document.documentElement[g]||document.body[g]:this[0][g]}});O.each(["Height","Width"],function(j,g){var e=j?"Left":"Top",h=j?"Right":"Bottom",f=g.toLowerCase();O.fn["inner"+g]=function(){return this[0]?O.css(this[0],f,false,"padding"):null};O.fn["outer"+g]=function(i){return this[0]?O.css(this[0],f,false,i?"margin":"border"):null};var k=g.toLowerCase();O.fn[k]=function(i){return this[0]==L?document.compatMode=="CSS1Compat"&&document.documentElement["client"+g]||document.body["client"+g]:this[0]==document?Math.max(document.documentElement["client"+g],document.body["scroll"+g],document.documentElement["scroll"+g],document.body["offset"+g],document.documentElement["offset"+g]):i===G?(this.length?O.css(this[0],k):null):this.css(k,typeof i==="string"?i:i+"px")}})})();jQuery.easing["jswing"]=jQuery.easing["swing"];jQuery.extend(jQuery.easing,{easeInOutQuad:function(B,C,A,E,D){if((C/=D/2)<1){return E/2*C*C+A}return -E/2*((--C)*(C-2)-1)+A},easeInOutCirc:function(B,C,A,E,D){if((C/=D/2)<1){return -E/2*(Math.sqrt(1-C*C)-1)+A}return E/2*(Math.sqrt(1-(C-=2)*C)+1)+A}});(function(G){var A=G.fn.height,E=G.fn.width;G.fn.extend({height:function(){if(!this[0]){D()}if(this[0]==window){if(G.browser.opera||(G.browser.safari&&parseInt(G.browser.version)>520)){return self.innerHeight-((G(document).height()>self.innerHeight)?B():0)}else{if(G.browser.safari){return self.innerHeight}else{return G.boxModel&&document.documentElement.clientHeight||document.body.clientHeight}}}if(this[0]==document){return Math.max((G.boxModel&&document.documentElement.scrollHeight||document.body.scrollHeight),document.body.offsetHeight)}return A.apply(this,arguments)},width:function(){if(!this[0]){D()}if(this[0]==window){if(G.browser.opera||(G.browser.safari&&parseInt(G.browser.version)>520)){return self.innerWidth-((G(document).width()>self.innerWidth)?B():0)}else{if(G.browser.safari){return self.innerWidth}else{return G.boxModel&&document.documentElement.clientWidth||document.body.clientWidth}}}if(this[0]==document){if(G.browser.mozilla){var J=self.pageXOffset;self.scrollTo(99999999,self.pageYOffset);var I=self.pageXOffset;self.scrollTo(J,self.pageYOffset);return document.body.offsetWidth+I}else{return Math.max(((G.boxModel&&!G.browser.safari)&&document.documentElement.scrollWidth||document.body.scrollWidth),document.body.offsetWidth)}}return E.apply(this,arguments)},innerHeight:function(){if(!this[0]){D()}return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight-C(this,"borderTopWidth")-C(this,"borderBottomWidth"):this.height()+C(this,"paddingTop")+C(this,"paddingBottom")},innerWidth:function(){if(!this[0]){D()}return this[0]==window||this[0]==document?this.width():this.is(":visible")?this[0].offsetWidth-C(this,"borderLeftWidth")-C(this,"borderRightWidth"):this.width()+C(this,"paddingLeft")+C(this,"paddingRight")},outerHeight:function(I){if(!this[0]){D()}I=G.extend({margin:false},I||{});return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight+(I.margin?(C(this,"marginTop")+C(this,"marginBottom")):0):this.height()+C(this,"borderTopWidth")+C(this,"borderBottomWidth")+C(this,"paddingTop")+C(this,"paddingBottom")+(I.margin?(C(this,"marginTop")+C(this,"marginBottom")):0)},outerWidth:function(I){if(!this[0]){D()}I=G.extend({margin:false},I||{});return this[0]==window||this[0]==document?this.width():this.is(":visible")?this[0].offsetWidth+(I.margin?(C(this,"marginLeft")+C(this,"marginRight")):0):this.width()+C(this,"borderLeftWidth")+C(this,"borderRightWidth")+C(this,"paddingLeft")+C(this,"paddingRight")+(I.margin?(C(this,"marginLeft")+C(this,"marginRight")):0)},scrollLeft:function(I){if(!this[0]){D()}if(I!=undefined){return this.each(function(){if(this==window||this==document){window.scrollTo(I,G(window).scrollTop())}else{this.scrollLeft=I}})}if(this[0]==window||this[0]==document){return self.pageXOffset||G.boxModel&&document.documentElement.scrollLeft||document.body.scrollLeft}return this[0].scrollLeft},scrollTop:function(I){if(!this[0]){D()}if(I!=undefined){return this.each(function(){if(this==window||this==document){window.scrollTo(G(window).scrollLeft(),I)}else{this.scrollTop=I}})}if(this[0]==window||this[0]==document){return self.pageYOffset||G.boxModel&&document.documentElement.scrollTop||document.body.scrollTop}return this[0].scrollTop},position:function(I){return this.offset({margin:false,scroll:false,relativeTo:this.offsetParent()},I)},offset:function(J,P){if(!this[0]){D()}var O=0,N=0,X=0,S=0,Y=this[0],M=this[0],L,I,W=G.css(Y,"position"),V=G.browser.mozilla,Q=G.browser.msie,U=G.browser.opera,a=G.browser.safari,K=G.browser.safari&&parseInt(G.browser.version)>520,R=false,T=false,J=G.extend({margin:true,border:false,padding:false,scroll:true,lite:false,relativeTo:document.body},J||{});if(J.lite){return this.offsetLite(J,P)}if(J.relativeTo.jquery){J.relativeTo=J.relativeTo[0]}if(Y.tagName=="BODY"){O=Y.offsetLeft;N=Y.offsetTop;if(V){O+=C(Y,"marginLeft")+(C(Y,"borderLeftWidth")*2);N+=C(Y,"marginTop")+(C(Y,"borderTopWidth")*2)}else{if(U){O+=C(Y,"marginLeft");N+=C(Y,"marginTop")}else{if((Q&&jQuery.boxModel)){O+=C(Y,"borderLeftWidth");N+=C(Y,"borderTopWidth")}else{if(K){O+=C(Y,"marginLeft")+C(Y,"borderLeftWidth");N+=C(Y,"marginTop")+C(Y,"borderTopWidth")}}}}}else{do{I=G.css(M,"position");O+=M.offsetLeft;N+=M.offsetTop;if((V&&!M.tagName.match(/^t[d|h]$/i))||Q||K){O+=C(M,"borderLeftWidth");N+=C(M,"borderTopWidth");if(V&&I=="absolute"){R=true}if(Q&&I=="relative"){T=true}}L=M.offsetParent||document.body;if(J.scroll||V){do{if(J.scroll){X+=M.scrollLeft;S+=M.scrollTop}if(U&&(G.css(M,"display")||"").match(/table-row|inline/)){X=X-((M.scrollLeft==M.offsetLeft)?M.scrollLeft:0);S=S-((M.scrollTop==M.offsetTop)?M.scrollTop:0)}if(V&&M!=Y&&G.css(M,"overflow")!="visible"){O+=C(M,"borderLeftWidth");N+=C(M,"borderTopWidth")}M=M.parentNode}while(M!=L)}M=L;if(M==J.relativeTo&&!(M.tagName=="BODY"||M.tagName=="HTML")){if(V&&M!=Y&&G.css(M,"overflow")!="visible"){O+=C(M,"borderLeftWidth");N+=C(M,"borderTopWidth")}if(((a&&!K)||U)&&I!="static"){O-=C(L,"borderLeftWidth");N-=C(L,"borderTopWidth")}break}if(M.tagName=="BODY"||M.tagName=="HTML"){if(((a&&!K)||(Q&&G.boxModel))&&W!="absolute"&&W!="fixed"){O+=C(M,"marginLeft");N+=C(M,"marginTop")}if(K||(V&&!R&&W!="fixed")||(Q&&W=="static"&&!T)){O+=C(M,"borderLeftWidth");N+=C(M,"borderTopWidth")}break}}while(M)}var Z=H(Y,J,O,N,X,S);if(P){G.extend(P,Z);return this}else{return Z}},offsetLite:function(Q,L){if(!this[0]){D()}var N=0,M=0,K=0,P=0,O=this[0],J,Q=G.extend({margin:true,border:false,padding:false,scroll:true,relativeTo:document.body},Q||{});if(Q.relativeTo.jquery){Q.relativeTo=Q.relativeTo[0]}do{N+=O.offsetLeft;M+=O.offsetTop;J=O.offsetParent||document.body;if(Q.scroll){do{K+=O.scrollLeft;P+=O.scrollTop;O=O.parentNode}while(O!=J)}O=J}while(O&&O.tagName!="BODY"&&O.tagName!="HTML"&&O!=Q.relativeTo);var I=H(this[0],Q,N,M,K,P);if(L){G.extend(L,I);return this}else{return I}},offsetParent:function(){if(!this[0]){D()}var I=this[0].offsetParent;while(I&&(I.tagName!="BODY"&&G.css(I,"position")=="static")){I=I.offsetParent}return G(I)}});var D=function(){throw"Dimensions: jQuery collection is empty"};var C=function(I,J){return parseInt(G.css(I.jquery?I[0]:I,J))||0};var H=function(M,L,J,N,I,K){if(!L.margin){J-=C(M,"marginLeft");N-=C(M,"marginTop")}if(L.border&&((G.browser.safari&&parseInt(G.browser.version)<520)||G.browser.opera)){J+=C(M,"borderLeftWidth");N+=C(M,"borderTopWidth")}else{if(!L.border&&!((G.browser.safari&&parseInt(G.browser.version)<520)||G.browser.opera)){J-=C(M,"borderLeftWidth");N-=C(M,"borderTopWidth")}}if(L.padding){J+=C(M,"paddingLeft");N+=C(M,"paddingTop")}if(L.scroll&&(!G.browser.opera||M.offsetLeft!=M.scrollLeft&&M.offsetTop!=M.scrollLeft)){I-=M.scrollLeft;K-=M.scrollTop}return L.scroll?{top:N-K,left:J-I,scrollTop:K,scrollLeft:I}:{top:N,left:J}};var F=0;var B=function(){if(!F){var I=G("<div>").css({width:100,height:100,overflow:"auto",position:"absolute",top:-1000,left:-1000}).appendTo("body");F=100-I.append("<div>").find("div").css({width:"100%",height:200}).width();I.remove()}return F}})(jQuery);(function(F){F.fn.fixPNG=function(){return this.each(function(){var J=F(this).css("backgroundImage");if(J.match(/^url\(["']?(.*\.png)["']?\)$/i)){J=RegExp.$1;F(this).css({"backgroundImage":"none","filter":"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod="+(F(this).css("backgroundRepeat")=="no-repeat"?"crop":"scale")+", src='"+J+"')"}).each(function(){var K=F(this).css("position");if(K!="absolute"&&K!="relative"){F(this).css("position","relative")}})}})};var D,A,G=false,C=new Image,H,I=1,E=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i;var B=(F.browser.msie&&parseInt(F.browser.version.substr(0,1))<8);F.fn.fancybox=function(K){K=F.extend({},F.fn.fancybox.defaults,K);var S=this;function N(){D=this;A=K;L();return false}function L(){if(G){return }if(F.isFunction(A.callbackOnStart)){A.callbackOnStart()}A.itemArray=[];A.itemCurrent=0;if(K.itemArray.length>0){A.itemArray=K.itemArray}else{var U={};if(!D.rel||D.rel==""){var U={href:D.href,title:D.title};if(F(D).children("img:first").length){U.orig=F(D).children("img:first")}A.itemArray.push(U)}else{var V=F(S).filter("a[rel="+D.rel+"]");var U={};for(var T=0;T<V.length;T++){U={href:V[T].href,title:V[T].title};if(F(V[T]).children("img:first").length){U.orig=F(V[T]).children("img:first")}A.itemArray.push(U)}while(A.itemArray[A.itemCurrent].href!=D.href){A.itemCurrent++}}}if(A.overlayShow){if(B){F("embed, object, select").css("visibility","hidden")}F("#fancy_overlay").css("opacity",A.overlayOpacity).show()}O()}function O(){F("#fancy_right, #fancy_left, #fancy_close, #fancy_title").hide();var T=A.itemArray[A.itemCurrent].href;if(T.match(/#/)){var U=window.location.href.split("#")[0];U=T.replace(U,"");U=U.substr(U.indexOf("#"));M('<div id="fancy_div">'+F(U).html()+"</div>",A.frameWidth,A.frameHeight)}else{if(T.match(E)){C=new Image;C.src=T;if(C.complete){R()}else{F.fn.fancybox.showLoading();F(C).unbind().bind("load",function(){F(".fancy_loading").hide();R()})}}else{if(T.match("iframe")||D.className.indexOf("iframe")>=0){M('<iframe id="fancy_frame" onload="$.fn.fancybox.showIframe()" name="fancy_iframe'+Math.round(Math.random()*1000)+'" frameborder="0" hspace="0" src="'+T+'"></iframe>',A.frameWidth,A.frameHeight)}else{F.get(T,function(V){M('<div id="fancy_ajax">'+V+"</div>",A.frameWidth,A.frameHeight)})}}}}function R(){if(A.imageScale){var U=F.fn.fancybox.getViewport();var W=Math.min(Math.min(U[0]-36,C.width)/C.width,Math.min(U[1]-60,C.height)/C.height);var V=Math.round(W*C.width);var T=Math.round(W*C.height)}else{var V=C.width;var T=C.height}M('<img alt="" id="fancy_img" src="'+C.src+'" />',V,T)}function P(){if((A.itemArray.length-1)>A.itemCurrent){var T=A.itemArray[A.itemCurrent+1].href;if(T.match(E)){objNext=new Image();objNext.src=T}}if(A.itemCurrent>0){var T=A.itemArray[A.itemCurrent-1].href;if(T.match(E)){objNext=new Image();objNext.src=T}}}function M(Y,U,a){G=true;var W=A.padding;if(B){F("#fancy_content")[0].style.removeExpression("height");F("#fancy_content")[0].style.removeExpression("width")}if(W>0){U+=W*2;a+=W*2;F("#fancy_content").css({"top":W+"px","right":W+"px","bottom":W+"px","left":W+"px","width":"auto","height":"auto"});if(B){F("#fancy_content")[0].style.setExpression("height","(this.parentNode.clientHeight - 20)");F("#fancy_content")[0].style.setExpression("width","(this.parentNode.clientWidth - 20)")}}else{F("#fancy_content").css({"top":0,"right":0,"bottom":0,"left":0,"width":"100%","height":"100%"})}if(F("#fancy_outer").is(":visible")&&U==F("#fancy_outer").width()&&a==F("#fancy_outer").height()){F("#fancy_content").fadeOut("fast",function(){F("#fancy_content").empty().append(F(Y)).fadeIn("normal",function(){J()})});return }var Z=F.fn.fancybox.getViewport();var V=(U+36)>Z[0]?Z[2]:(Z[2]+Math.round((Z[0]-U-36)/2));var c=(a+50)>Z[1]?Z[3]:(Z[3]+Math.round((Z[1]-a-50)/2));var b={"left":V,"top":c,"width":U+"px","height":a+"px"};if(F("#fancy_outer").is(":visible")){F("#fancy_content").fadeOut("normal",function(){F("#fancy_content").empty();F("#fancy_outer").animate(b,A.zoomSpeedChange,A.easingChange,function(){F("#fancy_content").append(F(Y)).fadeIn("normal",function(){J()})})})}else{if(A.zoomSpeedIn>0&&A.itemArray[A.itemCurrent].orig!==undefined){F("#fancy_content").empty().append(F(Y));var X=A.itemArray[A.itemCurrent].orig;var T=F.fn.fancybox.getPosition(X);F("#fancy_outer").css({"left":(T.left-18)+"px","top":(T.top-18)+"px","width":F(X).width(),"height":F(X).height()});if(A.zoomOpacity){b.opacity="show"}F("#fancy_outer").animate(b,A.zoomSpeedIn,A.easingIn,function(){J()})}else{F("#fancy_content").hide().empty().append(F(Y)).show();F("#fancy_outer").css(b).fadeIn("normal",function(){J()})}}}function Q(){if(A.itemCurrent!=0){F("#fancy_left, #fancy_left_ico").unbind().bind("click",function(T){T.stopPropagation();A.itemCurrent--;O();return false});F("#fancy_left").show()}if(A.itemCurrent!=(A.itemArray.length-1)){F("#fancy_right, #fancy_right_ico").unbind().bind("click",function(T){T.stopPropagation();A.itemCurrent++;O();return false});F("#fancy_right").show()}}function J(){Q();P();F(document).keydown(function(T){if(T.keyCode==27){F.fn.fancybox.close();F(document).unbind("keydown")}else{if(T.keyCode==37&&A.itemCurrent!=0){A.itemCurrent--;O();F(document).unbind("keydown")}else{if(T.keyCode==39&&A.itemCurrent!=(A.itemArray.length-1)){A.itemCurrent++;O();F(document).unbind("keydown")}}}});if(A.centerOnScroll){F(window).bind("resize scroll",F.fn.fancybox.scrollBox)}else{F("div#fancy_outer").css("position","absolute")}if(A.hideOnContentClick){F("#fancy_wrap").click(F.fn.fancybox.close)}F("#fancy_overlay, #fancy_close").bind("click",F.fn.fancybox.close);F("#fancy_close").show();if(A.itemArray[A.itemCurrent].title!==undefined&&A.itemArray[A.itemCurrent].title.length>0){F("#fancy_title div").html(A.itemArray[A.itemCurrent].title);F("#fancy_title").show()}if(A.overlayShow&&B){F("embed, object, select",F("#fancy_content")).css("visibility","visible")}if(F.isFunction(A.callbackOnShow)){A.callbackOnShow()}G=false}return this.unbind("click").click(N)};F.fn.fancybox.scrollBox=function(){var J=F.fn.fancybox.getViewport();F("#fancy_outer").css("left",((F("#fancy_outer").width()+36)>J[0]?J[2]:J[2]+Math.round((J[0]-F("#fancy_outer").width()-36)/2)));F("#fancy_outer").css("top",((F("#fancy_outer").height()+50)>J[1]?J[3]:J[3]+Math.round((J[1]-F("#fancy_outer").height()-50)/2)))};F.fn.fancybox.getNumeric=function(J,K){return parseInt(F.curCSS(J.jquery?J[0]:J,K,true))||0};F.fn.fancybox.getPosition=function(J){var K=J.offset();K.top+=F.fn.fancybox.getNumeric(J,"paddingTop");K.top+=F.fn.fancybox.getNumeric(J,"borderTopWidth");K.left+=F.fn.fancybox.getNumeric(J,"paddingLeft");K.left+=F.fn.fancybox.getNumeric(J,"borderLeftWidth");return K};F.fn.fancybox.showIframe=function(){F(".fancy_loading").hide();F("#fancy_frame").show()};F.fn.fancybox.getViewport=function(){return[F(window).width(),F(window).height(),F(document).scrollLeft(),F(document).scrollTop()]};F.fn.fancybox.animateLoading=function(){if(!F("#fancy_loading").is(":visible")){clearInterval(H);return }F("#fancy_loading > div").css("top",(I*-40)+"px");I=(I+1)%12};F.fn.fancybox.showLoading=function(){clearInterval(H);var J=F.fn.fancybox.getViewport();F("#fancy_loading").css({"left":((J[0]-40)/2+J[2]),"top":((J[1]-40)/2+J[3])}).show();F("#fancy_loading").bind("click",F.fn.fancybox.close);H=setInterval(F.fn.fancybox.animateLoading,66)};F.fn.fancybox.close=function(){G=true;F(C).unbind();F("#fancy_overlay, #fancy_close").unbind();if(A.hideOnContentClick){F("#fancy_wrap").unbind()}F("#fancy_close, .fancy_loading, #fancy_left, #fancy_right, #fancy_title").hide();if(A.centerOnScroll){F(window).unbind("resize scroll")}__cleanup=function(){F("#fancy_overlay, #fancy_outer").hide();if(A.centerOnScroll){F(window).unbind("resize scroll")}if(B){F("embed, object, select").css("visibility","visible")}if(F.isFunction(A.callbackOnClose)){A.callbackOnClose()}G=false};if(F("#fancy_outer").is(":visible")!==false){if(A.zoomSpeedOut>0&&A.itemArray[A.itemCurrent].orig!==undefined){var K=A.itemArray[A.itemCurrent].orig;var J=F.fn.fancybox.getPosition(K);var L={"left":(J.left-18)+"px","top":(J.top-18)+"px","width":F(K).width(),"height":F(K).height()};if(A.zoomOpacity){L.opacity="hide"}F("#fancy_outer").stop(false,true).animate(L,A.zoomSpeedOut,A.easingOut,__cleanup)}else{F("#fancy_outer").stop(false,true).fadeOut("fast",__cleanup)}}else{__cleanup()}return false};F.fn.fancybox.build=function(){var J="";J+='<div id="fancy_overlay"></div>';J+='<div id="fancy_wrap">';J+='<div class="fancy_loading" id="fancy_loading"><div></div></div>';J+='<div id="fancy_outer">';J+='<div id="fancy_inner">';J+='<div id="fancy_close"></div>';J+='<div id="fancy_bg"><div class="fancy_bg fancy_bg_n"></div><div class="fancy_bg fancy_bg_ne"></div><div class="fancy_bg fancy_bg_e"></div><div class="fancy_bg fancy_bg_se"></div><div class="fancy_bg fancy_bg_s"></div><div class="fancy_bg fancy_bg_sw"></div><div class="fancy_bg fancy_bg_w"></div><div class="fancy_bg fancy_bg_nw"></div></div>';J+='<a href="javascript:;" id="fancy_left"><span class="fancy_ico" id="fancy_left_ico"></span></a><a href="javascript:;" id="fancy_right"><span class="fancy_ico" id="fancy_right_ico"></span></a>';J+='<div id="fancy_content"></div>';J+='<div id="fancy_title"></div>';J+="</div>";J+="</div>";J+="</div>";F(J).appendTo("body");F('<table cellspacing="0" cellpadding="0" border="0"><tr><td class="fancy_title" id="fancy_title_left"></td><td class="fancy_title" id="fancy_title_main"><div></div></td><td class="fancy_title" id="fancy_title_right"></td></tr></table>').appendTo("#fancy_title");if(B){F("#fancy_inner").prepend('<iframe class="fancy_bigIframe" scrolling="no" frameborder="0"></iframe>');F("#fancy_close, .fancy_bg, .fancy_title, .fancy_ico").fixPNG()}};F.fn.fancybox.defaults={padding:10,imageScale:true,zoomOpacity:false,zoomSpeedIn:0,zoomSpeedOut:0,zoomSpeedChange:300,easingIn:"swing",easingOut:"swing",easingChange:"swing",frameWidth:425,frameHeight:355,overlayShow:true,overlayOpacity:0.3,hideOnContentClick:true,centerOnScroll:true,itemArray:[],callbackOnStart:null,callbackOnShow:null,callbackOnClose:null};F(document).ready(function(){F.fn.fancybox.build()})})(jQuery);function ExtInfoWindow(A,B,C,D){this.html_=C;this.marker_=A;this.infoWindowId_=B;this.options_=D==null?{}:D;this.ajaxUrl_=this.options_.ajaxUrl==null?null:this.options_.ajaxUrl;this.callback_=this.options_.ajaxCallback==null?null:this.options_.ajaxCallback;this.borderSize_=this.options_.beakOffset==null?0:this.options_.beakOffset;this.paddingX_=this.options_.paddingX==null?0+this.borderSize_:this.options_.paddingX+this.borderSize_;this.paddingY_=this.options_.paddingY==null?0+this.borderSize_:this.options_.paddingY+this.borderSize_;this.map_=null;this.container_=document.createElement("div");this.container_.style.position="relative";this.container_.style.display="none";this.contentDiv_=document.createElement("div");this.contentDiv_.id=this.infoWindowId_+"_contents";if(typeof this.html_=="string"){this.contentDiv_.innerHTML=this.html_}else{$(this.contentDiv_).append(this.html_)}this.contentDiv_.style.display="block";this.contentDiv_.style.visibility="hidden";this.wrapperDiv_=document.createElement("div")}if(typeof GOverlay!="undefined"){ExtInfoWindow.prototype=new GOverlay()}ExtInfoWindow.prototype.initialize=function(map){this.map_=map;this.defaultStyles={containerWidth:this.map_.getSize().width/2,borderSize:1};this.wrapperParts={tl:{t:0,l:0,w:0,h:0,domElement:null},t:{t:0,l:0,w:0,h:0,domElement:null},tr:{t:0,l:0,w:0,h:0,domElement:null},l:{t:0,l:0,w:0,h:0,domElement:null},r:{t:0,l:0,w:0,h:0,domElement:null},bl:{t:0,l:0,w:0,h:0,domElement:null},b:{t:0,l:0,w:0,h:0,domElement:null},br:{t:0,l:0,w:0,h:0,domElement:null},beak:{t:0,l:0,w:0,h:0,domElement:null},close:{t:0,l:0,w:0,h:0,domElement:null}};for(var i in this.wrapperParts){var tempElement=document.createElement("div");tempElement.id=this.infoWindowId_+"_"+i;tempElement.style.visibility="hidden";document.body.appendChild(tempElement);tempElement=document.getElementById(this.infoWindowId_+"_"+i);var tempWrapperPart=eval("this.wrapperParts."+i);tempWrapperPart.w=parseInt(this.getStyle_(tempElement,"width"));tempWrapperPart.h=parseInt(this.getStyle_(tempElement,"height"));document.body.removeChild(tempElement)}for(var i in this.wrapperParts){if(i=="close"){this.wrapperDiv_.appendChild(this.contentDiv_)}var wrapperPartsDiv=null;if(this.wrapperParts[i].domElement==null){wrapperPartsDiv=document.createElement("div");this.wrapperDiv_.appendChild(wrapperPartsDiv)}else{wrapperPartsDiv=this.wrapperParts[i].domElement}wrapperPartsDiv.id=this.infoWindowId_+"_"+i;wrapperPartsDiv.style.position="absolute";wrapperPartsDiv.style.width=this.wrapperParts[i].w+"px";wrapperPartsDiv.style.height=this.wrapperParts[i].h+"px";wrapperPartsDiv.style.top=this.wrapperParts[i].t+"px";wrapperPartsDiv.style.left=this.wrapperParts[i].l+"px";this.wrapperParts[i].domElement=wrapperPartsDiv}this.map_.getPane(G_MAP_FLOAT_PANE).appendChild(this.container_);this.container_.id=this.infoWindowId_;var containerWidth=this.getStyle_(document.getElementById(this.infoWindowId_),"width");this.container_.style.width=(containerWidth==null?this.defaultStyles.containerWidth:containerWidth);this.map_.getContainer().appendChild(this.contentDiv_);this.contentWidth=this.getDimensions_(this.container_).width;this.contentDiv_.style.width=this.contentWidth+"px";this.contentDiv_.style.position="absolute";this.container_.appendChild(this.wrapperDiv_);GEvent.bindDom(this.container_,"mousedown",this,this.onClick_);GEvent.bindDom(this.container_,"dblclick",this,this.onClick_);GEvent.bindDom(this.container_,"DOMMouseScroll",this,this.onClick_);GEvent.trigger(this.map_,"extinfowindowopen");if(this.ajaxUrl_!=null){this.ajaxRequest_(this.ajaxUrl_)}};ExtInfoWindow.prototype.onClick_=function(A){if(navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&document.all){window.event.cancelBubble=true;window.event.returnValue=false}else{A.stopPropagation()}};ExtInfoWindow.prototype.remove=function(){if(this.map_.getExtInfoWindow()!=null){GEvent.trigger(this.map_,"extinfowindowbeforeclose");GEvent.clearInstanceListeners(this.container_);if(this.container_.outerHTML){this.container_.outerHTML=""}if(this.container_.parentNode){this.container_.parentNode.removeChild(this.container_)}this.container_=null;GEvent.trigger(this.map_,"extinfowindowclose");this.map_.setExtInfoWindow_(null)}};ExtInfoWindow.prototype.copy=function(){return new ExtInfoWindow(this.marker_,this.infoWindowId_,this.html_,this.options_)};ExtInfoWindow.prototype.redraw=function(F){if(!F||this.container_==null){return }var E=this.contentDiv_.offsetHeight;this.contentDiv_.style.height=E+"px";this.contentDiv_.style.left=this.wrapperParts.l.w+"px";this.contentDiv_.style.top=this.wrapperParts.tl.h+"px";this.contentDiv_.style.visibility="visible";this.wrapperParts.tl.t=0;this.wrapperParts.tl.l=0;this.wrapperParts.t.l=this.wrapperParts.tl.w;this.wrapperParts.t.w=(this.wrapperParts.l.w+this.contentWidth+this.wrapperParts.r.w)-this.wrapperParts.tl.w-this.wrapperParts.tr.w;this.wrapperParts.t.h=this.wrapperParts.tl.h;this.wrapperParts.tr.l=this.wrapperParts.t.w+this.wrapperParts.tl.w;this.wrapperParts.l.t=this.wrapperParts.tl.h;this.wrapperParts.l.h=E;this.wrapperParts.r.l=this.contentWidth+this.wrapperParts.l.w;this.wrapperParts.r.t=this.wrapperParts.tr.h;this.wrapperParts.r.h=E;this.wrapperParts.bl.t=E+this.wrapperParts.tl.h;this.wrapperParts.b.l=this.wrapperParts.bl.w;this.wrapperParts.b.t=E+this.wrapperParts.tl.h;this.wrapperParts.b.w=(this.wrapperParts.l.w+this.contentWidth+this.wrapperParts.r.w)-this.wrapperParts.bl.w-this.wrapperParts.br.w;this.wrapperParts.b.h=this.wrapperParts.bl.h;this.wrapperParts.br.l=this.wrapperParts.b.w+this.wrapperParts.bl.w;this.wrapperParts.br.t=E+this.wrapperParts.tr.h;this.wrapperParts.close.l=this.wrapperParts.tr.l+this.wrapperParts.tr.w-this.wrapperParts.close.w-this.borderSize_;this.wrapperParts.close.t=this.borderSize_;this.wrapperParts.beak.l=(this.contentWidth/2)-(this.wrapperParts.beak.w/2);this.wrapperParts.beak.t=this.wrapperParts.bl.t+this.wrapperParts.bl.h-this.borderSize_;for(var D in this.wrapperParts){if(D=="close"){this.wrapperDiv_.insertBefore(this.contentDiv_,this.wrapperParts[D].domElement)}var C=null;if(this.wrapperParts[D].domElement==null){C=document.createElement("div");this.wrapperDiv_.appendChild(C)}else{C=this.wrapperParts[D].domElement}C.id=this.infoWindowId_+"_"+D;C.style.position="absolute";C.style.width=this.wrapperParts[D].w+"px";C.style.height=this.wrapperParts[D].h+"px";C.style.top=this.wrapperParts[D].t+"px";C.style.left=this.wrapperParts[D].l+"px";this.wrapperParts[D].domElement=C}var H=this.marker_;var G=this.map_;GEvent.addDomListener(this.wrapperParts.close.domElement,"click",function(){G.closeExtInfoWindow()});var B=this.map_.fromLatLngToDivPixel(this.marker_.getPoint());this.container_.style.position="absolute";var A=this.marker_.getIcon();this.container_.style.left=(B.x-(this.contentWidth/2)-A.iconAnchor.x+A.infoWindowAnchor.x)+"px";this.container_.style.top=(B.y-this.wrapperParts.bl.h-E-this.wrapperParts.tl.h-this.wrapperParts.beak.h-A.iconAnchor.y+A.infoWindowAnchor.y+this.borderSize_)+"px";this.container_.style.display="block";if(this.map_.getExtInfoWindow()!=null){this.repositionMap_()}};ExtInfoWindow.prototype.resize=function(){var A=this.contentDiv_.cloneNode(true);A.id=this.infoWindowId_+"_tempContents";A.style.visibility="hidden";A.style.height="auto";document.body.appendChild(A);A=document.getElementById(this.infoWindowId_+"_tempContents");var E=A.offsetHeight;document.body.removeChild(A);this.contentDiv_.style.height=E+"px";var B=this.contentDiv_.offsetWidth;var D=this.map_.fromLatLngToDivPixel(this.marker_.getPoint());var C=this.wrapperParts.t.domElement.offsetHeight+this.wrapperParts.l.domElement.offsetHeight+this.wrapperParts.b.domElement.offsetHeight;var G=this.wrapperParts.t.domElement.offsetTop;this.wrapperParts.l.domElement.style.height=E+"px";this.wrapperParts.r.domElement.style.height=E+"px";var F=this.wrapperParts.b.domElement.offsetTop-E;this.wrapperParts.l.domElement.style.top=F+"px";this.wrapperParts.r.domElement.style.top=F+"px";this.contentDiv_.style.top=F+"px";windowTHeight=parseInt(this.wrapperParts.t.domElement.style.height);F-=windowTHeight;this.wrapperParts.close.domElement.style.top=F+this.borderSize_+"px";this.wrapperParts.tl.domElement.style.top=F+"px";this.wrapperParts.t.domElement.style.top=F+"px";this.wrapperParts.tr.domElement.style.top=F+"px";this.repositionMap_()};ExtInfoWindow.prototype.repositionMap_=function(){this.map_.panTo(this.marker_.getPoint());return };ExtInfoWindow.prototype.ajaxRequest_=function(A){var D=this.map_;var C=this.callback_;var B=this.options_;GDownloadUrl(A,function(F,E){var G=document.getElementById(D.getExtInfoWindow().infoWindowId_+"_contents");if(F==null||E==-1){G.innerHTML='<span class="error">ERROR: The Ajax request failed to get HTML content from "'+A+'"</span>'}else{G.innerHTML=F}if(C!=null){C(B,G)}D.getExtInfoWindow().resize();GEvent.trigger(D,"extinfowindowupdate")})};ExtInfoWindow.prototype.getDimensions_=function(C){var G=this.getStyle_(C,"display");if(G!="none"&&G!=null){return{width:C.offsetWidth,height:C.offsetHeight}}var B=C.style;var F=B.visibility;var D=B.position;var A=B.display;B.visibility="hidden";B.position="absolute";B.display="block";var H=C.clientWidth;var E=C.clientHeight;B.display=A;B.position=D;B.visibility=F;return{width:H,height:E}};ExtInfoWindow.prototype.getStyle_=function(B,C){var E=false;C=this.camelize_(C);var D=B.style[C];if(!D){if(document.defaultView&&document.defaultView.getComputedStyle){var A=document.defaultView.getComputedStyle(B,null);D=A?A[C]:null}else{if(B.currentStyle){D=B.currentStyle[C]}}}if((D=="auto")&&(C=="width"||C=="height")&&(this.getStyle_(B,"display")!="none")){if(C=="width"){D=B.offsetWidth}else{D=B.offsetHeight}}return(D=="auto")?null:D};ExtInfoWindow.prototype.camelize_=function(C){var E=C.split("-"),A=E.length;if(A==1){return E[0]}var D=C.charAt(0)=="-"?E[0].charAt(0).toUpperCase()+E[0].substring(1):E[0];for(var B=1;B<A;B++){D+=E[B].charAt(0).toUpperCase()+E[B].substring(1)}return D};if(typeof GMap!="undefined"){GMap.prototype.ExtInfoWindowInstance_=null;GMap.prototype.ClickListener_=null;GMap.prototype.InfoWindowListener_=null}if(typeof GMarker!="undefined"){GMarker.prototype.openExtInfoWindow=function(B,D,A,C){if(B==null){throw"Error in GMarker.openExtInfoWindow: map cannot be null";return false}if(D==null||D==""){throw"Error in GMarker.openExtInfoWindow: must specify a cssId";return false}B.closeInfoWindow();if(B.getExtInfoWindow()!=null){B.closeExtInfoWindow()}if(B.getExtInfoWindow()==null){B.setExtInfoWindow_(new ExtInfoWindow(this,D,A,C));if(B.ClickListener_==null){B.ClickListener_=GEvent.addListener(B,"click",function(E){if(!E&&B.getExtInfoWindow()!=null){B.closeExtInfoWindow()}})}if(B.InfoWindowListener_==null){B.InfoWindowListener_=GEvent.addListener(B,"infowindowopen",function(E){if(B.getExtInfoWindow()!=null){B.closeExtInfoWindow()}})}B.addOverlay(B.getExtInfoWindow())}};GMarker.prototype.closeExtInfoWindow=function(A){if(A.getExtInfWindow()!=null){A.closeExtInfoWindow()}}}if(typeof GMap2!="undefined"){GMap2.prototype.getExtInfoWindow=function(){return this.ExtInfoWindowInstance_};GMap2.prototype.setExtInfoWindow_=function(A){this.ExtInfoWindowInstance_=A};GMap2.prototype.closeExtInfoWindow=function(){if(this.getExtInfoWindow()!=null){this.ExtInfoWindowInstance_.remove()}}} 
/* *************** TWEEDE DEEL ****************** */ 
var globals={};globals.countries={AF:"Afghanistan",AX:"&Aring;land Islands",AL:"Albani&euml;",DZ:"Algerije",AS:"Amerikaans Samoa",VI:"Amerikaanse Maagdeneilanden",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua en Barbuda",AR:"Argentini&euml;",AM:"Armeni&euml;",AW:"Aruba",AU:"Australi&euml;",AZ:"Azerbeidzjan",BS:"Bahama&#039;s",BH:"Bahrein",BD:"Bangladesh",BB:"Barbados",BE:"Belgi&euml;",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia",BA:"Bosni&euml;-Herzegovina",BW:"Botswana",BV:"Bouvet",BR:"Brazili&euml;",IO:"British Indian Ocean Territory",VG:"Britse Maagdeneilanden",BN:"Brunei",BG:"Bulgarije",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodja",CA:"Canada",KY:"Caymaneilanden",CF:"Centraal-Afrikaanse Republiek",CL:"Chili",CN:"China",CX:"Christmaseiland",CC:"Cocoseilanden",CO:"Colombia",KM:"Comoren",CK:"Cookeilanden",CR:"Costa Rica",CU:"Cuba",CY:"Cyprus",CD:"Democratische Republiek Congo",DK:"Denemarken",DJ:"Djibouti",DM:"Dominica",DO:"Dominicaanse Republiek",DE:"Duitsland",EC:"Ecuador",EG:"Egypte",IM:"Eiland Man",SV:"El Salvador",GQ:"Equatoriaal Guinea",ER:"Eritrea",EE:"Estland",ET:"Ethiopi&euml;",FO:"Faer&ouml;er",FK:"Falklandeilanden",FJ:"Fiji",PH:"Filippijnen",FI:"Finland",FR:"Frankrijk",GF:"Frans-Guyana",PF:"Frans-Polynesi&euml;",TF:"Franse Zuidelijke en Antarctische gebieden",GA:"Gabon",GM:"Gambia",GE:"Georgi&euml;",GH:"Ghana",GI:"Gibraltar",GD:"Grenada",GR:"Griekenland",GL:"Groenland",LU:"Groothertogdom Luxemburg",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GN:"Guinee",GW:"Guinee-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard- en McDonaldeilanden",HN:"Honduras",HU:"Hongarije",HK:"Hongkong",IE:"Ierland",IS:"IJsland",IN:"India",ID:"Indonesi&euml;",IQ:"Irak",IR:"Iran",IL:"Isra&euml;l",IT:"Itali&euml;",CI:"Ivoorkust",JM:"Jamaica",JP:"Japan",YE:"Jemen",JO:"Jordani&euml;",CV:"Kaapverdi&euml;",CM:"Kameroen",KZ:"Kazachstan",KE:"Kenia",KG:"Kirgizi&euml;",KI:"Kiribati",KW:"Koeweit",HR:"Kroati&euml;",LA:"Laos",LS:"Lesotho",LV:"Letland",LB:"Libanon",LR:"Liberia",LY:"Libi&euml;",LI:"Liechtenstein",LT:"Litouwen",MO:"Macao",MK:"Macedoni&euml;",MG:"Madagaskar",MW:"Malawi",MV:"Maldiven",MY:"Maleisi&euml;",ML:"Mali",MT:"Malta",MA:"Marokko",MH:"Marshalleilanden",MQ:"Martinique",MR:"Mauritani&euml;",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesi&euml;",MC:"Monaco",MN:"Mongoli&euml;",MS:"Montserrat",MZ:"Mozambique",MM:"Myanmar",NA:"Namibi&euml;",NR:"Nauru",NL:"Nederland",AN:"Nederlandse Antillen",NP:"Nepal",NI:"Nicaragua",NC:"Nieuw-Caledoni&euml;",NZ:"Nieuw-Zeeland",NE:"Niger",NG:"Nigeria",NU:"Niue",KP:"Noord-Korea",MP:"Noordelijke Marianen",NO:"Noorwegen",NF:"Norfolkeiland",UG:"Oeganda",UA:"Oekra&iuml;ne",UZ:"Oezbekistan",OM:"Oman",TL:"Oost-Timor",AT:"Oostenrijk",PK:"Pakistan",PW:"Palau",PS:"Palestina",PA:"Panama",PG:"Papoea-Nieuw-Guinea",PY:"Paraguay",PE:"Peru",PN:"Pitcairneilanden",PL:"Polen",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",CG:"Republiek Congo",MD:"Republiek Moldavi&euml;",RO:"Roemeni&euml;",RU:"Rusland",RW:"Rwanda",RE:"R&eacute;union",KN:"Saint Kitts en Nevis",LC:"Saint Lucia",VC:"Saint Vincent en de Grenadines",PM:"Saint-Pierre en Miquelon",SB:"Salomonseilanden",WS:"Samoa",SM:"San Marino",ST:"Sao Tom&eacute; en Principe",SA:"Saoedi-Arabi&euml;",SN:"Senegal",CS:"Servi&euml; en Montenegro",SC:"Seychellen",SL:"Sierra Leone",SG:"Singapore",SH:"Sint-Helena",SI:"Sloveni&euml;",SK:"Slowakije",SO:"Somali&euml;",ES:"Spanje",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard",SZ:"Swaziland",SY:"Syri&euml;",TJ:"Tadzjikistan",TW:"Taiwan",TZ:"Tanzania",TH:"Thailand",TG:"Togo",TK:"Tokelau -eilanden",TO:"Tonga",TT:"Trinidad en Tobago",TD:"Tsjaad",CZ:"Tsjechi&euml;",TN:"Tunesi&euml;",TR:"Turkije",TM:"Turkmenistan",TC:"Turks- en Caicoseilanden",TV:"Tuvalu",UM:"United States Minor Outlying Eilanden",UY:"Uruguay",VU:"Vanuatu",VA:"Vaticaanstad",VE:"Venezuela",GB:"Verenigd Koninkrijk",AE:"Verenigde Arabische Emiraten",US:"Verenigde Staten",VN:"Vietnam",WF:"Wallis en Futuna",EH:"Westelijke Sahara",BY:"Wit-Rusland",ZM:"Zambia",ZW:"Zimbabwe",ZA:"Zuid-Afrika",GS:"Zuid-Georgi&euml; en de Zuidelijke Sandwicheilanden",KR:"Zuid-Korea",SE:"Zweden",CH:"Zwitserland"};String.prototype.ucFirst=function(){return this.substr(0,1).toUpperCase()+this.substr(1,this.length)};String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")};function dechex(A){if(A>255){return"FF"}if(A<1){return"00"}return parseInt(A).toString(16)}function makeBlue(C){var B=(C/5);var A=(B>1?1:(B<-1?-1:B))*70;return"00"+dechex(160+A)+dechex(198+A)}function makePurple(C){var B=(C/5);var A=(B>1?1:(B<-1?-1:B))*70;return dechex(100+A)+"00"+dechex(100+A)}function returnFalse(){return false}function bindImproveForm(){$("#improvefield").one("click",showImproveForm)}function showImproveForm(){var A=$(this).parent("div");$(this).replaceWith($('<textarea name="data[Improvement][suggestion]" id="ImprovementSuggestion"></textarea>'));A.removeClass("text").addClass("textarea");$('<div class="submit"><input type="submit" value="Verstuur suggestie" class="contentbutton"/></div>').insertAfter(A);$('<div class="input text"><input type="text" value="" maxlength="200" class="field" name="data[Improvement][email]"/></div>').insertAfter(A);$('<p class="field explanation">Niet verplicht. Zodat we evt. contact met je op kunnen nemen.</p>').insertAfter(A);$('<p class="field description">Je e-mailadres</p>').insertAfter(A);$("#ImprovementSuggestion").focus()}function fixColumns(){try{$(".column").css("height","auto");$(".left.column").each(leftColumnFix)}catch(A){}}function leftColumnFix(){var C=$(this);var B=C.next(".right.column");var D=C.height();var A=B.height();if(A==D){}else{if(A>D){C.css("height",A+"px")}else{B.css("height",D+"px")}}}function initDocument(){$(".lastfooterlink").remove();fixColumns();bindImproveForm();if(typeof GUnload=="function"){$(window).unload(GUnload)}if(typeof Tracker!="undefined"){globals.tracker=new Tracker()}if(typeof GoogleMap!="undefined"){globals.googleMap=new GoogleMap()}if(typeof DateManager!="undefined"){globals.dateManager=new DateManager()}if(typeof MessageManager!="undefined"){globals.messageManager=new MessageManager()}if(typeof PinManager!="undefined"){globals.pinManager=new PinManager()}if(typeof TabManager!="undefined"){globals.tabManager=new TabManager()}if(typeof UploadformManager!="undefined"){globals.uploadformManager=new UploadformManager()}}var SWFUpload;if(SWFUpload==undefined){SWFUpload=function(A){this.initSWFUpload(A)}}SWFUpload.prototype.initSWFUpload=function(B){try{this.customSettings={};this.settings=B;this.eventQueue=[];this.movieName="SWFUpload_"+SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash();this.displayDebugInfo()}catch(A){delete SWFUpload.instances[this.movieName];throw A}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version="2.2.0 Beta 5 2008-01-29";SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};SWFUpload.CURSOR={ARROW:-1,HAND:-2};SWFUpload.WINDOW_MODE={WINDOW:"window",TRANSPARENT:"transparent",OPAQUE:"opaque"};SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(B,A){this.settings[B]=(this.settings[B]==undefined)?A:this.settings[B]};this.ensureDefault("upload_url","");this.ensureDefault("file_post_name","Filedata");this.ensureDefault("post_params",{});this.ensureDefault("use_query_string",false);this.ensureDefault("requeue_on_error",false);this.ensureDefault("http_success",[]);this.ensureDefault("file_types","*.*");this.ensureDefault("file_types_description","All Files");this.ensureDefault("file_size_limit",0);this.ensureDefault("file_upload_limit",0);this.ensureDefault("file_queue_limit",0);this.ensureDefault("flash_url","swfupload.swf");this.ensureDefault("prevent_swf_caching",true);this.ensureDefault("button_image_url","");this.ensureDefault("button_width",1);this.ensureDefault("button_height",1);this.ensureDefault("button_text","");this.ensureDefault("button_text_style","color: #000000; font-size: 16pt;");this.ensureDefault("button_text_top_padding",0);this.ensureDefault("button_text_left_padding",0);this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault("button_disabled",false);this.ensureDefault("button_placeholder_id","");this.ensureDefault("button_cursor",SWFUpload.CURSOR.ARROW);this.ensureDefault("button_window_mode",SWFUpload.WINDOW_MODE.WINDOW);this.ensureDefault("debug",false);this.settings.debug_enabled=this.settings.debug;this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault("swfupload_loaded_handler",null);this.ensureDefault("file_dialog_start_handler",null);this.ensureDefault("file_queued_handler",null);this.ensureDefault("file_queue_error_handler",null);this.ensureDefault("file_dialog_complete_handler",null);this.ensureDefault("upload_start_handler",null);this.ensureDefault("upload_progress_handler",null);this.ensureDefault("upload_error_handler",null);this.ensureDefault("upload_success_handler",null);this.ensureDefault("upload_complete_handler",null);this.ensureDefault("debug_handler",this.debugMessage);this.ensureDefault("custom_settings",{});this.customSettings=this.settings.custom_settings;if(!!this.settings.prevent_swf_caching){this.settings.flash_url=this.settings.flash_url+(this.settings.flash_url.indexOf("?")<0?"?":"&")+"preventswfcaching="+new Date().getTime()}delete this.ensureDefault};SWFUpload.prototype.loadFlash=function(){var A,B;if(document.getElementById(this.movieName)!==null){throw"ID "+this.movieName+" is already in use. The Flash Object could not be added"}A=document.getElementById(this.settings.button_placeholder_id);if(A==undefined){throw"Could not find the placeholder element: "+this.settings.button_placeholder_id}B=document.createElement("div");B.innerHTML=this.getFlashHTML();A.parentNode.replaceChild(B.firstChild,A);if(window[this.movieName]==undefined){window[this.movieName]=this.getMovieElement()}};SWFUpload.prototype.getFlashHTML=function(){return['<object id="',this.movieName,'" type="application/x-shockwave-flash" data="',this.settings.flash_url,'" width="',this.settings.button_width,'" height="',this.settings.button_height,'" class="swfupload">','<param name="wmode" value="',this.settings.button_window_mode,'" />','<param name="movie" value="',this.settings.flash_url,'" />','<param name="quality" value="high" />','<param name="menu" value="false" />','<param name="allowScriptAccess" value="always" />','<param name="flashvars" value="'+this.getFlashVars()+'" />',"</object>"].join("")};SWFUpload.prototype.getFlashVars=function(){var B=this.buildParamString();var A=this.settings.http_success.join(",");return["movieName=",encodeURIComponent(this.movieName),"&amp;uploadURL=",encodeURIComponent(this.settings.upload_url),"&amp;useQueryString=",encodeURIComponent(this.settings.use_query_string),"&amp;requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&amp;httpSuccess=",encodeURIComponent(A),"&amp;params=",encodeURIComponent(B),"&amp;filePostName=",encodeURIComponent(this.settings.file_post_name),"&amp;fileTypes=",encodeURIComponent(this.settings.file_types),"&amp;fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&amp;fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&amp;fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&amp;fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&amp;debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&amp;buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&amp;buttonWidth=",encodeURIComponent(this.settings.button_width),"&amp;buttonHeight=",encodeURIComponent(this.settings.button_height),"&amp;buttonText=",encodeURIComponent(this.settings.button_text),"&amp;buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&amp;buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&amp;buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),"&amp;buttonAction=",encodeURIComponent(this.settings.button_action),"&amp;buttonDisabled=",encodeURIComponent(this.settings.button_disabled),"&amp;buttonCursor=",encodeURIComponent(this.settings.button_cursor)].join("")};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined){this.movieElement=document.getElementById(this.movieName)}if(this.movieElement===null){throw"Could not find Flash element"}return this.movieElement};SWFUpload.prototype.buildParamString=function(){var C=this.settings.post_params;var B=[];if(typeof (C)==="object"){for(var A in C){if(C.hasOwnProperty(A)){B.push(encodeURIComponent(A.toString())+"="+encodeURIComponent(C[A].toString()))}}}return B.join("&amp;")};SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,false);var A=null;A=this.getMovieElement();if(A&&typeof (A.CallFunction)==="unknown"){for(var C in A){try{if(typeof (A[C])==="function"){A[C]=null}}catch(E){}}try{A.parentNode.removeChild(A)}catch(B){}}window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieElement=null;this.settings=null;this.customSettings=null;this.eventQueue=null;this.movieName=null;return true}catch(D){return false}};SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n","\t","upload_url:               ",this.settings.upload_url,"\n","\t","flash_url:                ",this.settings.flash_url,"\n","\t","use_query_string:         ",this.settings.use_query_string.toString(),"\n","\t","requeue_on_error:         ",this.settings.requeue_on_error.toString(),"\n","\t","http_success:             ",this.settings.http_success.join(", "),"\n","\t","file_post_name:           ",this.settings.file_post_name,"\n","\t","post_params:              ",this.settings.post_params.toString(),"\n","\t","file_types:               ",this.settings.file_types,"\n","\t","file_types_description:   ",this.settings.file_types_description,"\n","\t","file_size_limit:          ",this.settings.file_size_limit,"\n","\t","file_upload_limit:        ",this.settings.file_upload_limit,"\n","\t","file_queue_limit:         ",this.settings.file_queue_limit,"\n","\t","debug:                    ",this.settings.debug.toString(),"\n","\t","prevent_swf_caching:      ",this.settings.prevent_swf_caching.toString(),"\n","\t","button_placeholder_id:    ",this.settings.button_placeholder_id.toString(),"\n","\t","button_image_url:         ",this.settings.button_image_url.toString(),"\n","\t","button_width:             ",this.settings.button_width.toString(),"\n","\t","button_height:            ",this.settings.button_height.toString(),"\n","\t","button_text:              ",this.settings.button_text.toString(),"\n","\t","button_text_style:        ",this.settings.button_text_style.toString(),"\n","\t","button_text_top_padding:  ",this.settings.button_text_top_padding.toString(),"\n","\t","button_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n","\t","button_action:            ",this.settings.button_action.toString(),"\n","\t","button_disabled:          ",this.settings.button_disabled.toString(),"\n","\t","custom_settings:          ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n","\t","swfupload_loaded_handler assigned:  ",(typeof this.settings.swfupload_loaded_handler==="function").toString(),"\n","\t","file_dialog_start_handler assigned: ",(typeof this.settings.file_dialog_start_handler==="function").toString(),"\n","\t","file_queued_handler assigned:       ",(typeof this.settings.file_queued_handler==="function").toString(),"\n","\t","file_queue_error_handler assigned:  ",(typeof this.settings.file_queue_error_handler==="function").toString(),"\n","\t","upload_start_handler assigned:      ",(typeof this.settings.upload_start_handler==="function").toString(),"\n","\t","upload_progress_handler assigned:   ",(typeof this.settings.upload_progress_handler==="function").toString(),"\n","\t","upload_error_handler assigned:      ",(typeof this.settings.upload_error_handler==="function").toString(),"\n","\t","upload_success_handler assigned:    ",(typeof this.settings.upload_success_handler==="function").toString(),"\n","\t","upload_complete_handler assigned:   ",(typeof this.settings.upload_complete_handler==="function").toString(),"\n","\t","debug_handler assigned:             ",(typeof this.settings.debug_handler==="function").toString(),"\n"].join(""))};SWFUpload.prototype.addSetting=function(B,C,A){if(C==undefined){return(this.settings[B]=A)}else{return(this.settings[B]=C)}};SWFUpload.prototype.getSetting=function(A){if(this.settings[A]!=undefined){return this.settings[A]}return""};SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement();var returnValue,returnString;try{returnString=movieElement.CallFunction('<invoke name="'+functionName+'" returntype="javascript">'+__flash__argumentsToXML(argumentArray,0)+"</invoke>");returnValue=eval(returnString)}catch(ex){throw"Call to "+functionName+" failed"}if(returnValue!=undefined&&typeof returnValue.post==="object"){returnValue=this.unescapeFilePostParams(returnValue)}return returnValue};SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile")};SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles")};SWFUpload.prototype.startUpload=function(A){this.callFlash("StartUpload",[A])};SWFUpload.prototype.cancelUpload=function(A,B){if(B!==false){B=true}this.callFlash("CancelUpload",[A,B])};SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload")};SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats")};SWFUpload.prototype.setStats=function(A){this.callFlash("SetStats",[A])};SWFUpload.prototype.getFile=function(A){if(typeof (A)==="number"){return this.callFlash("GetFileByIndex",[A])}else{return this.callFlash("GetFile",[A])}};SWFUpload.prototype.addFileParam=function(A,B,C){return this.callFlash("AddFileParam",[A,B,C])};SWFUpload.prototype.removeFileParam=function(A,B){this.callFlash("RemoveFileParam",[A,B])};SWFUpload.prototype.setUploadURL=function(A){this.settings.upload_url=A.toString();this.callFlash("SetUploadURL",[A])};SWFUpload.prototype.setPostParams=function(A){this.settings.post_params=A;this.callFlash("SetPostParams",[A])};SWFUpload.prototype.addPostParam=function(A,B){this.settings.post_params[A]=B;this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.removePostParam=function(A){delete this.settings.post_params[A];this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.setFileTypes=function(A,B){this.settings.file_types=A;this.settings.file_types_description=B;this.callFlash("SetFileTypes",[A,B])};SWFUpload.prototype.setFileSizeLimit=function(A){this.settings.file_size_limit=A;this.callFlash("SetFileSizeLimit",[A])};SWFUpload.prototype.setFileUploadLimit=function(A){this.settings.file_upload_limit=A;this.callFlash("SetFileUploadLimit",[A])};SWFUpload.prototype.setFileQueueLimit=function(A){this.settings.file_queue_limit=A;this.callFlash("SetFileQueueLimit",[A])};SWFUpload.prototype.setFilePostName=function(A){this.settings.file_post_name=A;this.callFlash("SetFilePostName",[A])};SWFUpload.prototype.setUseQueryString=function(A){this.settings.use_query_string=A;this.callFlash("SetUseQueryString",[A])};SWFUpload.prototype.setRequeueOnError=function(A){this.settings.requeue_on_error=A;this.callFlash("SetRequeueOnError",[A])};SWFUpload.prototype.setHTTPSuccess=function(A){if(typeof A==="string"){A=A.replace(" ","").split(",")}this.settings.http_success=A;this.callFlash("SetHTTPSuccess",[A])};SWFUpload.prototype.setDebugEnabled=function(A){this.settings.debug_enabled=A;this.callFlash("SetDebugEnabled",[A])};SWFUpload.prototype.setButtonImageURL=function(A){if(A==undefined){A=""}this.settings.button_image_url=A;this.callFlash("SetButtonImageURL",[A])};SWFUpload.prototype.setButtonDimensions=function(C,A){this.settings.button_width=C;this.settings.button_height=A;var B=this.getMovieElement();if(B!=undefined){B.style.width=C+"px";B.style.height=A+"px"}this.callFlash("SetButtonDimensions",[C,A])};SWFUpload.prototype.setButtonText=function(A){this.settings.button_text=A;this.callFlash("SetButtonText",[A])};SWFUpload.prototype.setButtonTextPadding=function(B,A){this.settings.button_text_top_padding=A;this.settings.button_text_left_padding=B;this.callFlash("SetButtonTextPadding",[B,A])};SWFUpload.prototype.setButtonTextStyle=function(A){this.settings.button_text_style=A;this.callFlash("SetButtonTextStyle",[A])};SWFUpload.prototype.setButtonDisabled=function(A){this.settings.button_disabled=A;this.callFlash("SetButtonDisabled",[A])};SWFUpload.prototype.setButtonAction=function(A){this.settings.button_action=A;this.callFlash("SetButtonAction",[A])};SWFUpload.prototype.setButtonCursor=function(A){this.settings.button_cursor=A;this.callFlash("SetButtonCursor",[A])};SWFUpload.prototype.queueEvent=function(B,C){if(C==undefined){C=[]}else{if(!(C instanceof Array)){C=[C]}}var A=this;if(typeof this.settings[B]==="function"){this.eventQueue.push(function(){this.settings[B].apply(this,C)});setTimeout(function(){A.executeNextEvent()},0)}else{if(this.settings[B]!==null){throw"Event handler "+B+" is unknown or is not a function"}}};SWFUpload.prototype.executeNextEvent=function(){var A=this.eventQueue?this.eventQueue.shift():null;if(typeof (A)==="function"){A.apply(this)}};SWFUpload.prototype.unescapeFilePostParams=function(C){var E=/[$]([0-9a-f]{4})/i;var F={};var D;if(C!=undefined){for(var A in C.post){if(C.post.hasOwnProperty(A)){D=A;var B;while((B=E.exec(D))!==null){D=D.replace(B[0],String.fromCharCode(parseInt("0x"+B[1],16)))}F[D]=C.post[A]}}C.post=F}return C};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash("TestExternalInterface")}catch(A){return false}};SWFUpload.prototype.flashReady=function(){var A=this.getMovieElement();if(!A){this.debug("Flash called back ready but the flash movie can't be found.");return }this.cleanUp(A);this.queueEvent("swfupload_loaded_handler")};SWFUpload.prototype.cleanUp=function(A){try{if(this.movieElement&&typeof (A.CallFunction)==="unknown"){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(var C in A){try{if(typeof (A[C])==="function"){A[C]=null}}catch(B){}}}}catch(D){}window["__flash__removeCallback"]=function(E,F){try{if(E){E[F]=null}}catch(G){}}};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler")};SWFUpload.prototype.fileQueued=function(A){A=this.unescapeFilePostParams(A);this.queueEvent("file_queued_handler",A)};SWFUpload.prototype.fileQueueError=function(A,C,B){A=this.unescapeFilePostParams(A);this.queueEvent("file_queue_error_handler",[A,C,B])};SWFUpload.prototype.fileDialogComplete=function(A,B){this.queueEvent("file_dialog_complete_handler",[A,B])};SWFUpload.prototype.uploadStart=function(A){A=this.unescapeFilePostParams(A);this.queueEvent("return_upload_start_handler",A)};SWFUpload.prototype.returnUploadStart=function(A){var B;if(typeof this.settings.upload_start_handler==="function"){A=this.unescapeFilePostParams(A);B=this.settings.upload_start_handler.call(this,A)}else{if(this.settings.upload_start_handler!=undefined){throw"upload_start_handler must be a function"}}if(B===undefined){B=true}B=!!B;this.callFlash("ReturnUploadStart",[B])};SWFUpload.prototype.uploadProgress=function(A,C,B){A=this.unescapeFilePostParams(A);this.queueEvent("upload_progress_handler",[A,C,B])};SWFUpload.prototype.uploadError=function(A,C,B){A=this.unescapeFilePostParams(A);this.queueEvent("upload_error_handler",[A,C,B])};SWFUpload.prototype.uploadSuccess=function(B,A){B=this.unescapeFilePostParams(B);this.queueEvent("upload_success_handler",[B,A])};SWFUpload.prototype.uploadComplete=function(A){A=this.unescapeFilePostParams(A);this.queueEvent("upload_complete_handler",A)};SWFUpload.prototype.debug=function(A){this.queueEvent("debug_handler",A)};SWFUpload.prototype.debugMessage=function(C){if(this.settings.debug){var A,D=[];if(typeof C==="object"&&typeof C.name==="string"&&typeof C.message==="string"){for(var B in C){if(C.hasOwnProperty(B)){D.push(B+": "+C[B])}}A=D.join("\n")||"";D=A.split("\n");A="EXCEPTION: "+D.join("\nEXCEPTION: ");SWFUpload.Console.writeLine(A)}else{SWFUpload.Console.writeLine(C)}}};SWFUpload.Console={};SWFUpload.Console.writeLine=function(D){var B,A;try{B=document.getElementById("SWFUpload_Console");if(!B){A=document.createElement("form");document.getElementsByTagName("body")[0].appendChild(A);B=document.createElement("textarea");B.id="SWFUpload_Console";B.style.fontFamily="monospace";B.setAttribute("wrap","off");B.wrap="off";B.style.overflow="auto";B.style.width="700px";B.style.height="350px";B.style.margin="5px";A.appendChild(B)}B.value+=D+"\n";B.scrollTop=B.scrollHeight-B.clientHeight}catch(C){alert("Exception: "+C.name+" Message: "+C.message)}};var SWFUpload;if(typeof (SWFUpload)==="function"){SWFUpload.prototype.initSettings=function(A){return function(){if(typeof (A)==="function"){A.call(this)}this.refreshCookies(false)}}(SWFUpload.prototype.initSettings);SWFUpload.prototype.refreshCookies=function(I){if(I===undefined){I=true}I=!!I;var E=this.settings.post_params;var C,H=document.cookie.split(";"),B=H.length,D,G,A,F;for(C=0;C<B;C++){D=H[C];while(D.charAt(0)===" "){D=D.substring(1,D.length)}G=D.indexOf("=");if(G>0){A=D.substring(0,G);F=D.substring(G+1);E[A]=F}}if(I){this.setPostParams(E)}}}var SWFUpload;if(typeof (SWFUpload)==="function"){SWFUpload.queue={};SWFUpload.prototype.initSettings=(function(A){return function(){if(typeof (A)==="function"){A.call(this)}this.queueSettings={};this.queueSettings.queue_cancelled_flag=false;this.queueSettings.queue_upload_count=0;this.queueSettings.user_upload_complete_handler=this.settings.upload_complete_handler;this.queueSettings.user_upload_start_handler=this.settings.upload_start_handler;this.settings.upload_complete_handler=SWFUpload.queue.uploadCompleteHandler;this.settings.upload_start_handler=SWFUpload.queue.uploadStartHandler;this.settings.queue_complete_handler=this.settings.queue_complete_handler||null}})(SWFUpload.prototype.initSettings);SWFUpload.prototype.startUpload=function(A){this.queueSettings.queue_cancelled_flag=false;this.callFlash("StartUpload",[A])};SWFUpload.prototype.cancelQueue=function(){this.queueSettings.queue_cancelled_flag=true;this.stopUpload();var A=this.getStats();while(A.files_queued>0){this.cancelUpload();A=this.getStats()}};SWFUpload.queue.uploadStartHandler=function(A){var B;if(typeof (this.queueSettings.user_upload_start_handler)==="function"){B=this.queueSettings.user_upload_start_handler.call(this,A)}B=(B===false)?false:true;this.queueSettings.queue_cancelled_flag=!B;return B};SWFUpload.queue.uploadCompleteHandler=function(B){var C=this.queueSettings.user_upload_complete_handler;var D;if(B.filestatus===SWFUpload.FILE_STATUS.COMPLETE){this.queueSettings.queue_upload_count++}if(typeof (C)==="function"){D=(C.call(this,B)===false)?false:true}else{if(B.filestatus===SWFUpload.FILE_STATUS.QUEUED){D=false}else{D=true}}if(D){var A=this.getStats();if(A.files_queued>0&&this.queueSettings.queue_cancelled_flag===false){this.startUpload()}else{if(this.queueSettings.queue_cancelled_flag===false){this.queueEvent("queue_complete_handler",[this.queueSettings.queue_upload_count]);this.queueSettings.queue_upload_count=0}else{this.queueSettings.queue_cancelled_flag=false;this.queueSettings.queue_upload_count=0}}}}}function DateManager(){}DateManager.prototype.formats={"named":"%A %d %B %Y","shortNamed":"%a %d %b %Y","simpleNamed":"%d %B %Y","simpleShortNamed":"%d %b %Y","numeric":"%Y-%m-%d","yearMonth":"%Y-%m","yearMonthNamed":"%B %Y","yearMonthShortNamed":"%b %y"};DateManager.prototype.named={weekday_short:["zo","ma","di","wo","do","vr","za"],weekday_long:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],month_short:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],month_long:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"]};DateManager.prototype.fromString=function(B){var A=B.split("-");return new Date(A[0],A[1]-1,A[2])};DateManager.prototype.fromMySQLString=function(C){var A=/^([0-9]{2,4})-([0-1][0-9])-([0-3][0-9]) (?:([0-2][0-9]):([0-5][0-9]):([0-5][0-9]))?$/;var B=C.replace(A,"$1 $2 $3 $4 $5 $6").split(" ");return new Date(B[0],B[1]-1,B[2],B[3],B[4],B[5])};DateManager.prototype.format=function(B,C){var A=new String(C);A=A.replace(/%A/,this.named.weekday_long[B.getDay()]);A=A.replace(/%a/,this.named.weekday_short[B.getDay()]);A=A.replace(/%B/,this.named.month_long[B.getMonth()]);A=A.replace(/%b/,this.named.month_short[B.getMonth()]);A=A.replace(/%d/,this.addLeadingZero(B.getDate()));A=A.replace(/%Y/,B.getFullYear());A=A.replace(/%y/,(B.getFullYear()+"").substr(2,3));A=A.replace(/%m/,this.addLeadingZero(B.getMonth()+1));return A};DateManager.prototype.addLeadingZero=function(B){var A=new String(B);if(A.length==1){return"0"+A}return A};DateManager.prototype.formatNamed=function(A){return this.format(A,this.formats.named)};DateManager.prototype.formatShortNamed=function(A){return this.format(A,this.formats.shortNamed)};DateManager.prototype.formatSimpleNamed=function(A){return this.format(A,this.formats.simpleNamed)};DateManager.prototype.formatSimpleShortNamed=function(A){return this.format(A,this.formats.simpleShortNamed)};DateManager.prototype.formatNumeric=function(A){return this.format(A,this.formats.numeric)};DateManager.prototype.formatYearMonth=function(A){return this.format(A,this.formats.yearMonth)};DateManager.prototype.formatYearMonthNamed=function(A){return this.format(A,this.formats.yearMonthNamed)};DateManager.prototype.formatYearMonthShortNamed=function(A){return this.format(A,this.formats.yearMonthShortNamed)};DateManager.prototype.formatNice=function(A){var B=new Date();var C=(B.getTime()-A.getTime())/1000;if(C<120){return"zojuist"}else{if(C<60*60){return Math.round(C/60)+" minuten geleden"}else{if(C<60*60*24){return Math.round(C/3600)+" uur geleden"}else{if(C<86400*2){return"gisteren"}else{if(C<86400*3){return"eergisteren"}else{if(C<86400*31){return Math.round(C/86400)+" dagen geleden"}else{return DateManager.prototype.formatSimpleShortNamed(A)}}}}}}};DateManager.prototype.lastDayOfMonth=function(A){var A=new Date(A.getFullYear(),A.getMonth()+1,1);A.setDate(A.getDate()-1);return A};DateManager.prototype.firstDayOfMonth=function(A){return new Date(A.getFullYear(),A.getMonth(),1)};DateManager.prototype.totalDaysInMonth=function(A){return this.lastDayOfMonth(A).getDate()};DateManager.prototype.transform=function(B,C,A){if(A==undefined){A=0}return new Date(B.getFullYear(),B.getMonth()+A,B.getDate()+C)};DateManager.prototype.daysBetween=function(B,A){return Math.round((A.getTime()/1000-B.getTime()/1000)/86400)};DateManager.prototype.monthsBetween=function(C,A){var B=(A.getFullYear()-C.getFullYear())*12;B+=A.getMonth()-C.getMonth();return B};function GoogleMap(){if(typeof GBrowserIsCompatible!="function"||!GBrowserIsCompatible()){return }this.map=$(".googlemaps");if(this.map.length>0){this.geocoder=new GClientGeocoder();this.gmap=new GMap2(this.map.get(0));if(typeof initialData.gmapStart=="undefined"){this.gmap.setCenter(new GLatLng(-0.703107,24.609375),1,G_SATELLITE_MAP)}else{this.gmap.setCenter(new GLatLng(parseFloat(initialData.gmapStart.lon),parseFloat(initialData.gmapStart.lat)),initialData.gmapStart.zoom,G_SATELLITE_MAP)}this.gmap.addControl(new GMapTypeControl());this.gmap.enableDoubleClickZoom();this.gmap.addControl(new GLargeMapControl3D());this.map=$(".googlemaps");setTimeout(GoogleMap.prototype.ChangeCopyright,500);$(this.map.children()[1]).before($("<div></div>").css({position:"absolute",bottom:"0px",left:"0px",height:"40px",width:"100%","background-color":"#fff",opacity:0.5}));$("#amtc_option_2").remove()}this.map=$(".googlemaps")}GoogleMap.prototype.ChangeCopyright=function(){var B=$(globals.googleMap.map.children()).children("a");if(B.length==0){B=null;setTimeout(GoogleMap.prototype.ChangeCopyright,500);return }var A=$(globals.googleMap.map.children()[3]);B.css("border-bottom","0px").attr("target","_blank");A.css({"white-space":"normal","width":"400px"});A.children("span").css({"color":"white"});A=B=null};GoogleMap.prototype.addPin=function(C,B){var A=C.getMarker();this.gmap.addOverlay(A);if(typeof B!="undefined"&&typeof A.O!="undefined"&&typeof A.O[0]!="undefined"){$(A.O[0]).css("opacity",B)}C.setAdded(true);return A};GoogleMap.prototype.addLine=function(A){this.gmap.addOverlay(A)};GoogleMap.prototype.setPoint=function(A){this.gmap.panTo(A)};GoogleMap.prototype.focusPin=function(A){this.gmap.setCenter(A.getPoint())};GoogleMap.prototype.setZoom=function(A){this.gmap.setZoom(A)};GoogleMap.prototype.getLocation=function(A,B){this.geocoder.setBaseCountryCode("NL");this.geocoder.getLocations(A,B)};GoogleMap.prototype.checkResize=function(){this.gmap.checkResize()};GoogleMap.prototype.clear=function(){this.gmap.clearOverlays()};function MessageManager(){this._initLoad();this._initError();this.button=null}MessageManager.prototype._initLoad=function(){imgObj=$("<img>").attr({"src":"/images/loading.gif","border":0,"align":"absmiddle"});textObj=$("<p></p>").html("Gegevens laden...");loadObj=$("<div></div>").attr({"id":"loading_message"}).addClass("global loading message").append(imgObj).append(textObj).appendTo($("body")).hide();loadObj.ajaxStart(MessageManager.prototype.ShowLoading);loadObj.ajaxStop(MessageManager.prototype.HideLoading)};MessageManager.prototype._initError=function(){textObj=$("<span></span>").html("Foutmelding laden...");errorObj=$("<div></div>").attr({"id":"error_message"}).addClass("global error message").append(textObj).appendTo($("body")).hide()};MessageManager.prototype.ShowLoading=function(){$("#loading_message").show()};MessageManager.prototype.HideLoading=function(){$("#loading_message").hide()};MessageManager.prototype.showError=function(B,A){var C=this._getElement(A);if(!C.is(":visible")){C.fadeIn("slow");setTimeout(this._hideErrorMessage,3000)}C.attr("shown",true).html("<span>"+B+"</span>");this._hideLoadButton();return false};MessageManager.prototype.emptyError=function(A){var B=this._getElement(A);B.empty();return false};MessageManager.prototype._getElement=function(A){var B=null;if(typeof A=="undefined"){B=$(".error-message")}else{B=$("#pin"+A.ucFirst()+"ErrorMessage")}return B};MessageManager.prototype.showLoadButton=function(A){this.button=A.hide();$('<input type="submit" value="." class="contentbutton loadingbutton">').click(returnFalse).insertAfter(A)};MessageManager.prototype._hideLoadButton=function(){$(".loadingbutton").remove();if(this.button!=null){this.button.show();this.button=null}};MessageManager.prototype._hideErrorMessage=function(){$("#error_message").fadeOut("slow")};function PindataPin(A,B){if(B==undefined){this.data={"Pindata":{"id":0,"date":"","country":"","city":"","street":"","lon":"","lat":"","text":"","title":""},"User":initialData.currentUser?initialData.currentUser:{"username":"","id":""}}}else{this.data=B}this.myPin=(initialData.currentUser&&initialData.currentUser.id==this.data.User.id);this.color=A?A:(this.myPin&&initialData.page.controller!="pindata"?"blue":"purple");this.added=false;this.trail=null;this.marker=null;this.draggable=false;this.title="Pin van "+this.data.User.username.ucFirst()+(this.data.Pindata.date?(" op "+this.data.Pindata.date):"");this.point=B?new GLatLng(parseFloat(B.Pindata.lat),parseFloat(B.Pindata.lon)):null;this.listeners=new Array();this.icon=null;this.lastLocationLookup=null}PindataPin.prototype=new Trackable;PindataPin.prototype.destroy=function(){if(this.listeners){var A=this.listeners.length;for(var B=0;B<A;B++){GEvent.removeListener(this.listeners[B]);this.listeners[B]=null}}if(this.marker){this.marker.refObj=null}A=this.listeners=null;this.color=this.data=this.added=this.trail=this.marker=this.draggable=this.title=this.point=this.icon=this.lastLocationLookup=null;this.untrack()};PindataPin.prototype.center=function(){globals.googleMap.setPoint(this.getPoint())};PindataPin.prototype.setAdded=function(A){this.added=A};PindataPin.prototype.isAdded=function(){return this.added};PindataPin.prototype.isMyPin=function(){return this.type=="myPin"};PindataPin.prototype.isNew=function(){return this.data.Pindata.id==0};PindataPin.prototype.getUser=function(){return this.data.User};PindataPin.prototype.getDate=function(){return globals.dateManager.fromString(this.data.Pindata.date)};PindataPin.prototype.getPoint=function(){return this.point};PindataPin.prototype.setPoint=function(A){this.point=A;this.getMarker().setPoint(A);this.SetPointOnFields(A);if(!this.isAdded()){globals.googleMap.addPin(this)}};PindataPin.prototype.setTrail=function(A){this.trail=A};PindataPin.prototype.daysBetween=function(A){return globals.dateManager.daysBetween(this.getDate(),A.getDate())};globals.pin=null;PindataPin.prototype.markerClick=function(){var A=this.refObj?this.refObj:this;if(A.data&&A.data.Pindata&&A.data.Pindata.id!=0){if(globals.viewManager&&globals.viewManager.lastResult&&globals.viewManager.lastResult.pin&&globals.viewManager.lastResult.pin.Pindata.id==A.data.Pindata.id){A.openInfoWindow(A.renderInfoWindow())}else{A.openInfoWindow($(A.renderInfoWindow()).append($("<div class='loader'/>")),"/pindata/teaser/"+A.data.Pindata.id)}}return false};PindataPin.prototype.markerMouseover=function(){if(globals.timeMachine){globals.timeMachine.highlight(this.refObj.data)}if(this.refObj.trail){this.refObj.trail.highlight()}return false};PindataPin.prototype.markerMouseout=function(){if(globals.timeMachine){globals.timeMachine.removeHighlight()}if(this.refObj.trail){this.refObj.trail.stopHighlight()}return false};PindataPin.prototype.setEventListeners=function(){this.listeners.push(GEvent.addListener(this.marker,"click",PindataPin.prototype.markerClick));this.listeners.push(GEvent.addListener(this.marker,"mouseover",PindataPin.prototype.markerMouseover));this.listeners.push(GEvent.addListener(this.marker,"mouseout",PindataPin.prototype.markerMouseout))};PindataPin.prototype.dragStart=function(A){this.listeners.push(GEvent.addListener(this.getMarker(),"dragstart",A))};PindataPin.prototype.dragEnd=function(A){this.listeners.push(GEvent.addListener(this.getMarker(),"dragend",A))};PindataPin.prototype.click=function(A){this.listeners.push(GEvent.addListener(this.getMarker(),"click",A))};PindataPin.prototype.loadedInfoWindowCallback=function(B,A){$("a.pinlink",A).trackedEvent("click",B.pindataPin,"pinLinkClick")};PindataPin.prototype.openInfoWindow=function(A,B){this.getMarker().openExtInfoWindow(globals.googleMap.gmap,"infowindow",A,{beakOffset:3,ajaxUrl:B,ajaxCallback:PindataPin.prototype.loadedInfoWindowCallback,pindataPin:this,paddingX:10});return };PindataPin.prototype.closeInfoWindow=function(){this.getMarker().closeInfoWindow()};PindataPin.prototype.initIcon=function(D){if(!D){this.icon=new GIcon();if(this.color=="blue"){this.icon.image="/images/icon/my_pin.png"}else{this.icon.image="/images/icon/pin.png"}this.icon.shadow="/images/icon/pinshade.png";this.icon.iconSize=new GSize(14,49);this.icon.shadowSize=new GSize(47,49);this.icon.iconAnchor=new GPoint(7,49);this.icon.infoWindowAnchor=new GPoint(7,51)}else{var A=D.color||"00A0C6";var C=D.label||this.data.Pindata.date.substr(8);var B="http://chart.apis.google.com/chart?cht=it&chs=18x18&chco="+A+",000000ff,ffffff01&chl="+C+"&chx=FFFFFF,9&chf=bg,s,00000000&ext=.png";this.icon=new GIcon(G_DEFAULT_ICON);this.icon.image=B;this.icon.iconSize=new GSize(18,18);this.icon.shadowSize=new GSize(0,0);this.icon.iconAnchor=new GPoint(9,9);this.icon.infoWindowAnchor=new GPoint(9,9)}};PindataPin.prototype.getMarker=function(){if(this.marker!=null){return this.marker}if(!this.icon){this.initIcon()}if(this.point==undefined){this.point=new GLatLng(38.91027,-114.389648)}this.marker=new GMarker(this.point,{"icon":this.icon,"draggable":true,"title":this.title});if(!this.draggable){this.disableDragging()}this.setEventListeners();this.marker.refObj=this;return this.marker};PindataPin.prototype.markerStartDragging=function(){this.refObj.closeInfoWindow()};PindataPin.prototype.enableDragging=function(){this.draggable=true;this.getMarker().enableDragging();this.dragStart(PindataPin.prototype.markerStartDragging);this.dragEnd(PindataPin.prototype.markerAddressDragEnd)};PindataPin.prototype.disableDragging=function(){this.draggable=true;if(this.marker){this.marker.disableDragging()}};PindataPin.prototype.markerAddressDragEnd=function(){var A=this.getPoint();this.refObj.setPoint(A);A=null};PindataPin.prototype.enableAddressTrigger=function(){this.enableDragging();var C=$("#PindataStreet");var B=$("#actionbutton");var A=$("<div></div>").hide().insertAfter(C);B.trackedEvent("click",this,"addressChangeHandler");C=B=null};PindataPin.prototype.GetPointFromFields=function(){var A={};A.lng=$("#PindataLon").attr("value");A.lat=$("#PindataLat").attr("value");return A};PindataPin.prototype.SetPointOnFields=function(A){$("#PindataLon").val(A.lng());$("#PindataLat").val(A.lat())};PindataPin.prototype.LocationLookupValueFromFields=function(){var A=$("#PindataCountry").val()==""?"NL":$("#PindataCountry").val();var C=A;try{C=globals.countries[A]}catch(B){}return C+(", "+$("#PindataCity").val())+($("#PindataStreet").val()!=""?(","+$("#PindataStreet").val()):"")};PindataPin.prototype.addressChangeHandler=function(C){var B=this.LocationLookupValueFromFields();globals.messageManager.emptyError();var A=this;globals.googleMap.getLocation(B,function(E){var D=A._handleLocationResponse(E);if(D==null||!D){globals.messageManager.showError("De stad en/of straat kon niet gevonden worden. Wijzig de stad of de straat en probeer opnieuw.")}else{A.SetPointOnFields(D);A.doSaveForm();$("#contentbutton").show()}A=null});B=null};PindataPin.prototype._handleLocationResponse=function(B){if(!B||B.Status.code!=200){return null}else{var A=this._movePin(B.Placemark[0].Point.coordinates);this.center();var C="<h4>"+this.getPlacemarkText(B.Placemark[0])+"</h4><p class='no_bottom'><b>Controleer de locatie!</b> Is deze niet goed? Verander dan de stad en/of straat en probeer opnieuw. Je kunt de pin ook oppakken<br />en verplaatsen naar de juiste plek.</p>";this.openInfoWindow('<div class="container">'+C+"</div>")}return A};PindataPin.prototype._movePin=function(B){var A=new GLatLng(B[1],B[0]);this.setPoint(A);return A};PindataPin.prototype.getPlacemarkText=function(B){var A="onbekende locatie";try{A=globals.countries[B.AddressDetails.Country.CountryNameCode];A+=", "+B.AddressDetails.Country.AdministrativeArea.Locality.LocalityName;A+=", "+B.AddressDetails.Country.AdministrativeArea.Locality.DependentLocality.Thoroughfare.ThoroughfareName}catch(C){try{A=B.address}catch(C){}}return A};PindataPin.prototype.renderInfoWindow=function(){var A=globals.dateManager.fromString(this.data.Pindata.date);return'<div class="container"><h4 class="no_bottom">'+this.data.User.username.ucFirst()+", "+globals.dateManager.formatSimpleShortNamed(A)+", "+globals.countries[this.data.Pindata.country]+", "+this.data.Pindata.city.ucFirst()+"</h4></div>"};PindataPin.prototype.renderPinLink=function(){return $('<a href="/pindata/user/'+this.data.User.username.toLowerCase()+"/"+this.data.Pindata.date+'">Deze pin bekijken »</a>').trackedEvent("click",this,"pinLinkClick")};PindataPin.prototype.pinLinkClick=function(){if(typeof globals.viewManager.getPins=="function"){globals.googleMap.gmap.closeExtInfoWindow();if(globals.timeMachine.setUser(this.data.User)){globals.viewManager.getPins(this.data.User)}else{globals.timeMachine.animateTo(globals.dateManager.fromString(this.data.Pindata.date))}return false}return true};PindataPin.prototype.renderProfileLink=function(){return $("<a href=/users/profile/"+this.data.User.username.toLowerCase()+">Profiel van "+this.data.User.username.ucFirst()+" bekijken »</a>")};PindataPin.prototype.renderPindataLocationForm=function(){return $('<h2>Plaats een nieuwe pin</h2><p class="field description">Land (verplicht)</p><p class="field explanation">Kies het land waarin je op deze datum was.</p><div class="input select">'+globals.viewManager.renderCountrySelect("data[Pindata][country]","PindataCountry",this.data.Pindata.country)+'</div><p class="field description">Stad (verplicht)</p><p class="field explanation">De stad waarin je op deze datum was.</p><div class="input text"><input name="data[Pindata][city]" type="text" class="field" value="'+this.data.Pindata.city+'" id="PindataCity" /></div><p class="field description">Straat (optioneel)</p><p class="field explanation">Naam van de straat met eventueel huisnummer</p><div class="input text"><input name="data[Pindata][street]" type="text" class="field" value="'+this.data.Pindata.street+'" id="PindataStreet" /></div><div class="error-message" id="pinAddErrorMessage"></div><input type="button" class="actionbutton" id="actionbutton" value="Plaats pin"><input type="button" class="contentbutton" id="contentbutton" value="Bevestig"><input type="hidden" value="'+this.data.Pindata.lon+'" id="PindataLon" name="data[Pindata][lon]"/><input type="hidden" value="'+this.data.Pindata.lat+'" id="PindataLat" name="data[Pindata][lat]"/>')};PindataPin.prototype.renderPindataDetailsForm=function(){return $('<h2>Plaats tekst bij je pin</h2><p class="field description">Titel</p><p class="field explanation">Geef je pin een korte duidelijke titel</p><div class="input text"><input type="text" name="data[Pindata][title]" id="PindataTitle" value="'+this.data.Pindata.title+'"></div><p class="field description">Tekst</p><p class="field explanation">Je kunt nu, maar ook later tekst toevoegen.</p><div class="input textarea"><textarea name="data[Pindata][text]" id="PindataText">'+this.data.Pindata.text+'</textarea></div><div class="error-message" id="pinAddErrorMessage"></div><input type="button" class="actionbutton" id="actionbutton" value="Ga terug"><input type="button" class="contentbutton" id="contentbutton" value="Sla op">'+this.getPindataCodeExplanation())};PindataPin.prototype.getPindataCodeExplanation=function(){return'<h2>Legenda</h2><table class="small parsercode"><tbody><tr><td class="character">!</td><td>Zet dit aan het begin van de regel en deze wordt als titel getoond</td></tr><tr><td class="character">&gt;</td><td>Zet dit aan het begin van de regel en deze wordt als quote getoond</td></tr><tr><td class="character">-</td><td>Zet dit aan het begin van meerdere regels en deze worden als lijst getoond</td></tr><tr><td class="code">/schuin/</td><td>De tekst tussen `/` zal cursief vertoond worden</td></tr><tr><td class="code">*dik*</td><td>De tekst tussen `*` zal dikgedrukt vertoond worden</td></tr><tr><td class="code">_klein_</td><td>De tekst tussen `_` zal extra klein vertoond worden</td></tr></tbody></table>'};PindataPin.prototype.renderPinListing=function(){var B=globals.dateManager.fromString(this.data.Pindata.date);var A=new Array();if(globals.countries[this.data.Pindata.country]){A.push(globals.countries[this.data.Pindata.country])}if(this.data.Pindata.city){A.push(this.data.Pindata.city)}if(this.data.Pindata.street){A.push(this.data.Pindata.street)}return $("<li></li>").append($('<a href="#"><span class="date">'+globals.dateManager.formatSimpleShortNamed(B)+', </span><span class="name">'+this.data.User.username.ucFirst()+', </span><span class="location">'+A.join(",&nbsp;")+"</span></a>").trackedEvent("click",this,"markerClick"))};PindataPin.prototype.doSaveForm=function(){if($("#PindataText").length==1){this.data.Pindata.text=$("#PindataText").val()}if($("#PindataTitle").length==1){this.data.Pindata.title=$("#PindataTitle").val()}if($("#PindataCountry").length==1){this.data.Pindata.country=$("#PindataCountry").val();this.data.Pindata.street=$("#PindataStreet").val();this.data.Pindata.city=$("#PindataCity").val();this.data.Pindata.lon=$("#PindataLon").attr("value");this.data.Pindata.lat=$("#PindataLat").attr("value")}if(typeof this.data.Comment=="undefined"){this.data.Comment={}}if($("#CommentText").length==1){this.data.Comment.text=$("#CommentText").val()}if($("#CommentCname").length==1){this.data.Comment.cname=$("#CommentCname").val()}this.data.Pindata.date=globals.dateManager.formatNumeric(globals.timeMachine.getDate())};PindataPin.prototype.add=function(B){this.doSaveForm();var A=this;$.ajax({type:"POST",url:"/pindata/add/"+(new Date().getTime()),data:this.data.Pindata,dataType:"json",success:function(C){A.checkAddPin(C,B);A=null}})};PindataPin.prototype.checkAddPin=function(A,B){if(A.error){return globals.messageManager.showError(A.error,"add")}if(typeof B=="function"){B.call(this)}};PindataPin.prototype.remove=function(B){var A=this;$.ajax({type:"POST",url:"/pindata/remove/"+(new Date().getTime()),data:this.data.Pindata,dataType:"json",success:function(C){A.checkRemovePin(C,B);A=null}})};PindataPin.prototype.checkRemovePin=function(A,B){if(A.error){return globals.messageManager.showError(A.error,"remove")}if(B!=undefined){B.call(this)}};PindataPin.prototype.edit=function(B){this.doSaveForm();var A=this;$.ajax({type:"POST",url:"/pindata/edit/"+this.data.Pindata.id+"/"+(new Date().getTime()),data:this.data.Pindata,dataType:"json",success:function(C){A.checkEditPin(C,B);A=null}})};PindataPin.prototype.checkEditPin=function(A,B){if(A.error){return globals.messageManager.showError(A.error,"edit")}if(typeof B=="function"){B.call(this)}};PindataPin.prototype.comment=function(B){this.doSaveForm();var A=this;$.ajax({type:"POST",url:"/pindata/comment/"+this.data.Pindata.id+"/"+(new Date().getTime()),data:this.data.Comment,dataType:"json",success:function(C){A.checkCommentPin(C,B);A=null}})};PindataPin.prototype.checkCommentPin=function(A,B){if(A.error){return globals.messageManager.showError(A.error,"comment")}if(typeof B=="function"){B.call(this)}};function PindataViewManager(){globals.timeMachine=new TimeMachine();this.maxphotos=6;this.lastResult=null;this.setUser(initialData.user?initialData.user:initialData.currentUser);this.spam=$("<div></div>").addClass("ads block").append("<h2>Advertentie</h2>").append('<center><IFRAME SRC="http://pindat.com.site-id.nl/servlet/_am?n=3706&sid=3140" WIDTH="468" HEIGHT="60" FRAMEBORDER="0" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="no"></IFRAME></center>');this.lastResult={"pin":initialData.pin,"trail":initialData.pinTrail,"pins":initialData.pinsToday};this.currentPin=new PindataPin("blue")}PindataViewManager.prototype=new ViewManager;PindataViewManager.prototype.setUser=function(A){this.currentUser=A;this.isMyPindata=(typeof initialData.currentUser!="undefined"&&initialData.currentUser.id==this.currentUser.id);globals.timeMachine.setUser(this.currentUser);globals.tabManager.set(this.currentUser,globals.timeMachine.getDate())};PindataViewManager.prototype.changeView=function(){this.currentPin.doSaveForm();this.getPins()};PindataViewManager.prototype.getPins=function(A,B){if(typeof A!="undefined"){this.setUser(A)}if(typeof B=="undefined"){B=globals.dateManager.formatNumeric(globals.timeMachine.getDate())}$.ajax({type:"GET",url:"/pindata/details/"+this.currentUser.id+"/"+B+"/"+(new Date().getTime()),dataType:"json",success:PindataViewManager.prototype.ProcessPinsWrapper})};PindataViewManager.prototype.ProcessPinsWrapper=function(A){globals.viewManager.lastResult=A;globals.viewManager.processPins(A)};PindataViewManager.prototype.processPins=function(A){if(!A){A=this.lastResult}if(!this.currentPin.isNew()){this.currentPin.destroy();this.currentPin=new PindataPin("blue")}globals.pinManager.clear();globals.pinManager.addPindataPins(A.pins);if(A.pin){this.transFormToShowPinView();this.renderShowPinView();globals.pinManager.generateTrails(A.trail,new Array(A.pin));this.currentPin.destroy();this.currentPin=globals.pinManager.getPindataPin(A.pin);this.currentPin.center()}else{this.transFormToSelectPinView();this.renderSelectPinView()}globals.uploadformManager.signalChangedLayout()};PindataViewManager.prototype.renderChangePinDetailsView=function(){this.currentPin.doSaveForm();this.transFormToShowPinView();this.currentPin.center();$("#pintexteditform").hide();$("#pinimageaddform").hide();$("#pincomments").hide();$("#pinimages").hide();$("#pintext").html(this.currentPin.renderPindataDetailsForm()).show();$("#pinlist").html(this.renderPindataList(this.lastResult.pins));$("#actionbutton").click(PindataViewManager.prototype.ClickGoBack);$("#contentbutton").click(PindataViewManager.prototype.ClickSave);fixColumns()};PindataViewManager.prototype.ClickGoBack=function(){globals.viewManager.currentPin.doSaveForm();globals.viewManager.transFormToSelectPinView();globals.viewManager.renderSelectPinView();globals.viewManager.currentPin.center()};PindataViewManager.prototype.ClickSave=function(){globals.messageManager.showLoadButton($(this));globals.viewManager.currentPin.add(PindataViewManager.prototype.SavedCallback)};PindataViewManager.prototype.SavedCallback=function(){globals.timeMachine.getPins();globals.viewManager.currentPin=new PindataPin("blue");globals.viewManager.getPins()};PindataViewManager.prototype.renderSelectPinView=function(){$("#pinlist").html(this.renderPindataList(this.lastResult.pins));$("#addpinform").html(this.currentPin.renderPindataLocationForm());$("#contentbutton").hide().click(PindataViewManager.prototype.ClickConfirmPinLocation);this.currentPin.enableAddressTrigger();if(this.isMyPindata){$("#addpinform").show();if(this.currentPin.isAdded()&&this.currentPin.isNew()){globals.googleMap.addPin(this.currentPin);this.currentPin.center();$("#contentbutton").show()}}else{$("#addpinform").hide()}fixColumns()};PindataViewManager.prototype.ClickConfirmPinLocation=function(){var A=$("#PindataCity");if(A.val()!=""){globals.viewManager.renderChangePinDetailsView()}else{$("#PindataCityError").remove();$('<div class="error-message" id="PindataCityError">Stad moet verplicht ingevuld worden</div>').insertAfter(A)}};PindataViewManager.prototype.transFormToSelectPinView=function(){var A=$($(".left.column").get(0));var B=$($(".right.column").get(0));$(".block:has('#pinlist')",B).remove();this.spam.appendTo(B);A.empty().append($("<div></div>").addClass("block").attr("id","addpinform").hide()).append($("<div class='block'></div>").append($("<h2>Pins op deze dag</h2>")).append($("<div></div>").attr("id","pinlist")));return };PindataViewManager.prototype.renderShowPinView=function(){$("#pinlist").html(this.renderPindataList(this.lastResult.pins));$("#pintext").html(this.lastResult.pin.Pindata.parsed).prepend($("<h3></h3>").text(this.lastResult.pin.Pindata.title));this.renderImagesList(this.lastResult.pin);this.renderCommentsList(this.lastResult.pin);$("#pintexteditform").hide();$("#pintext").show();$("#pinimageaddform").hide();if(this.isMyPindata){var B=$('<ul id="mypindataEditLinks" class="links"></ul>').appendTo($("#pintext"));if($("#pinimagesholder").children().length<this.maxphotos){$("<li></li>").append($('<input type="button" class="contentbutton" value="Foto\'s toevoegen"/>').click(PindataViewManager.prototype.ClickAddPhotos)).appendTo(B)}$("<li></li>").append($('<input type="button" class="contentbutton" value="Pin bewerken"/>').click(PindataViewManager.prototype.ClickEditPin)).appendTo(B);var A=globals.dateManager.formatNumeric(globals.timeMachine.getDate());$("<li></li>").append($('<input type="button" class="contentbutton" value="Pin verwijderen"/>').click(PindataViewManager.prototype.ClickRemovePin)).appendTo(B);B=data=null}fixColumns()};PindataViewManager.prototype.ClickAddPhotos=function(){globals.uploadformManager.showForm();return false};PindataViewManager.prototype.ClickEditPin=function(){var A=globals.viewManager.lastResult.pin.Pindata;$("#PindataTitle").val(A.title);$("#PindataText").val(A.text.replace(/<br\/>/ig,"\n"));$("#pintexteditform").show();$("#pintext").hide();$("#pincomments").hide();$("#pinimagesholder").hide();A=null;return false};PindataViewManager.prototype.ClickRemovePin=function(){if(confirm("Weet je zeker dat je deze pin en alle informatie (tekst, foto`s en reacties) wilt verwijderen?")){globals.messageManager.showLoadButton($(this));globals.viewManager.currentPin.remove(PindataViewManager.prototype.RemovedCallback)}return false};PindataViewManager.prototype.RemovedCallback=function(){globals.timeMachine.getPins();globals.viewManager.currentPin=new PindataPin("blue");globals.viewManager.getPins()};PindataViewManager.prototype.getPinEditForm=function(){return $('<form action="error" method="POST"><h2>Pin bewerken</h2><p class="field description">Titel</p><p class="field explanation">Geef je pin een korte duidelijke titel</p><div class="input text"><input type="text" name="data[Pindata][title]" id="PindataTitle"></div><p class="field description">Tekst</p><div class="input textarea"><textarea id="PindataText" name="data[Pindata][text]" /></div><div class="error-message" id="pinEditErrorMessage" /></form>').append($('<input type="button" name="submit" value="Annuleren" class="actionbutton" />').click(PindataViewManager.prototype.ClickCancelEdit)).append($('<input type="submit" name="submit" value="Opslaan" class="contentbutton" />')).submit(PindataViewManager.prototype.SubmitEditForm).append(this.currentPin.getPindataCodeExplanation())};PindataViewManager.prototype.ClickCancelEdit=function(){if(confirm("Weet je zeker dat je het bewerken wilt annuleren? De wijzigingen zullen verloren gaan.")){$("#pintexteditform").hide();$("#pintext").show();$("#pincomments").show();$("#pinimagesholder").show()}return false};PindataViewManager.prototype.SubmitEditForm=function(){globals.messageManager.showLoadButton($(".contentbutton"),this);globals.viewManager.currentPin.edit(PindataViewManager.prototype.EditedCallback);return false};PindataViewManager.prototype.EditedCallback=function(){globals.viewManager.getPins()};PindataViewManager.prototype.transFormToShowPinView=function(){var A=$($(".left.column").get(0));var B=$($(".right.column").get(0));$(".block:has('#pinlist')",B).remove();B.append('<div class="block"><h2>Andere pins op deze dag</h2><div id="pinlist"></div></div>').append(this.spam);A.empty().append($("<div></div>").addClass("block").attr("id","pintext")).append($('<div id="pintexteditform" class="block"></div>').html(this.getPinEditForm()).hide()).append($('<div id="pinimages" class="block"></div>').append($('<div id="pinimageaddform"></div>').hide()).append($('<div id="pinimagesholder" class="images"></div>'))).append($("<div></div>").addClass("block").attr("id","pincomments"))};PindataViewManager.prototype.renderReactionForm=function(A){var B=$("<form></form>").submit(PindataViewManager.prototype.SubmitReactionForm).append($('<div class="input textarea"></div>').append($('<p class="field description">Jouw reactie:</p>')).append($('<textarea name="data[Comment][text]" id="CommentText" cols="30" rows="6"></textarea>')).append($('<div class="error-message" id="pinCommentErrorMessage"></div>')).append($('<input type="submit" class="contentbutton" value="Plaats reactie" />')));if(!initialData.currentUser){B.prepend($('<p class="field description">Jouw naam:</p><div class="input text"><input type="text" name="data[Comment][cname]" id="CommentCname" class="field"></div>'))}return B.prepend($("<h2>Plaats een reactie</h2>"))};PindataViewManager.prototype.SubmitReactionForm=function(){globals.messageManager.showLoadButton($(".contentbutton",this));globals.viewManager.currentPin.comment(PindataViewManager.prototype.ReactedCallback);return false};PindataViewManager.prototype.ReactedCallback=function(){globals.viewManager.getPins()};PindataViewManager.prototype.renderCommentsList=function(C){var B=$("#pincomments").empty();var A=C.Comments.length;$("<h2></h2>").text((A==0?"Geen":"Al "+A)+" reactie"+(A==1?"":"s")+" bij deze pin").appendTo(B);var F=$("<ul></ul>").addClass("comments").appendTo(B);for(var D=0;D<A;D++){var E=DateManager.prototype.formatNice(DateManager.prototype.fromMySQLString(C.Comments[D].Comment.created));$("<li></li>").addClass("comment").appendTo(F).append($("<div></div>").addClass("info").append($("<span></span>").addClass("user").append(this.renderUserCommentLink(C.Comments[D]))).append($("<span></span>").addClass("date").text(E))).append($("<div></div>").addClass("text").append($("<p></p>").html(C.Comments[D].Comment.text))).append($("<div></div>").html("&nbsp;").addClass("clear"))}this.renderReactionForm(C).appendTo(B)};PindataViewManager.prototype.renderUserCommentLink=function(A){if(A.User.username!=""){return $("<a></a>").attr("href","/users/profile/"+A.User.username).text(A.User.username.ucFirst())}return A.Comment.cname.ucFirst()};PindataViewManager.prototype.renderImagesList=function(B){var D=$("#pinimagesholder").empty();var A=B.Photos.length;if(A>0){for(var C=0;C<A;C++){this.renderImage(this.currentUser.id,B.Pindata.id,B.Photos[C].Photo.hash).appendTo(D)}$("#pinimages").show()}else{$("#pinimages").hide()}$("#pinimagesholder a").fancybox(PindataViewManager.prototype.fancyBoxSettings)};PindataViewManager.prototype.fancyBoxSettings={"hideOnContentClick":true,"padding":0,"zoomSpeedIn":350};PindataViewManager.prototype.renderImage=function(A,C,B){thumburl="/images/uploads/user."+A+"/pin."+C+"/"+B+"_t.jpg";imageurl="/images/uploads/user."+A+"/pin."+C+"/"+B+".jpg";return $('<a href="'+imageurl+'" rel="images"><img width="120" height="120" class="thumb" src="'+thumburl+'"></a>')};function focusPoint(){point=new GLatLng($(this).attr("lat"),$(this).attr("lon"));globals.googleMap.setPoint(point)}function PinManager(){this.pintrails=new Array();this.pins=new Array();this.pinsOnID=new Array()}PinManager.prototype.addPindataPins=function(D){var A=D.length;var B=null;for(var C=0;C<A;C++){B=new PindataPin(null,D[C]);this.pins.push(B);this.pinsOnID[D[C].Pindata.id]=B;globals.googleMap.addPin(B);B=null}};PinManager.prototype.getPindataPin=function(A){if(this.pinsOnID[A.Pindata.id]){return this.pinsOnID[A.Pindata.id]}alert("pin not found");return null};PinManager.prototype.generateTrails=function(H,F){var A=H.length;var D=this._setOnID(F);for(var E=0;E<A;E++){var G=H[E].Pindata.id;var C=new PindataPin("blue",H[E]);this.pins.push(C);this.pinsOnID[G]=C;var B=this._addToTrail(C);if(typeof D[G]!="undefined"){B.addMiddlePin(C)}G=C=B=null}D=null;A=this.pintrails.length;for(var E=0;E<A;E++){this.pintrails[E].add();this.pintrails[E].showMiddlePins()}};PinManager.prototype._setOnID=function(D){var B={};var A=D.length;for(var C=0;C<A;C++){B[D[C].Pindata.id]=C}return B};PinManager.prototype._addToTrail=function(C){var A=this.pintrails.length;for(var D=0;D<A;D++){if(this.pintrails[D].addPin(C)){return this.pintrails[D]}}var B=new PinTrail(C.getUser());B.addPin(C);this.pintrails.push(B);return B};PinManager.prototype.clear=function(B){globals.googleMap.gmap.closeExtInfoWindow();var A=this.pintrails.length;for(var C=0;C<A;C++){this.pintrails[C].destroy();this.pintrails[C]=null}A=this.pins.length;for(var C=0;C<A;C++){this.pins[C].destroy();this.pins[C]=null}for(key in this.pinsOnID){this.pinsOnID[key].destroy();this.pinsOnID[key]=null}this.pinsOnID=new Array();this.pins=new Array();this.pintrails=new Array();globals.googleMap.clear()};function PinTrail(A){this.settings={maxDiff:18,maxOpacity:0.75,minOpacity:0.35};this.pins=new Array();this.middlePins=new Array();this.lines=new Array();this.date={max:null,min:null};this.user=A;this.highlightTimers=new Array()}PinTrail.prototype.destroy=function(){this.stopHighlight();var A=this.pins.length;for(var B=0;B<A;B++){this.pins[B].destroy();this.pins[B]=null}var A=this.middlePins.length;for(var B=0;B<A;B++){this.middlePins[B].destroy();this.middlePins[B]=null}var A=this.lines.length;for(var B=0;B<A;B++){this.lines[B]=null}this.settings=this.pins=this.middlePins=this.lines=this.date=this.user=this.highlightTimers=null};PinTrail.prototype.addPin=function(B){if(!this._canContain(B)){return false}var A=this.pins.length;this.pins[A]=B;B.setTrail(this);var C=B.getDate();this.date.max=this.date.max>C?this.date.max:C;this.date.min=this.date.min>C?this.date.min:C;return true};PinTrail.prototype._canContain=function(A){if(A.getUser().id!=this.user.id){return false}if(this.date.max==null||this.date.min==null){return true}var B=A.getDate();var C=globals.dateManager.daysBetween(this.date.max,B);if((C<0?C*-1:C)>this.settings.maxDiff){return false}var C=globals.dateManager.daysBetween(this.date.min,B);if((C<0?C*-1:C)>this.settings.maxDiff){return false}return true};PinTrail.prototype.addMiddlePin=function(B){var A=this.middlePins.length;this.middlePins[A]=B};PinTrail.prototype._connect=function(F,D,E,C){if(F==null){return null}if(!C){C=F.color=="blue"?"009fc5":"630063"}var A=this.lines.length;var B=new GPolyline([F.getPoint(),D.getPoint()],"#"+C,3,E);this.lines[A]=B;globals.googleMap.addLine(B);return B};PinTrail.prototype.stopHighlight=function(){var A=this.highlightTimers.length;for(var B=0;B<A;B++){clearTimeout(this.highlightTimers[B]);this.highlightTimers[B]=null}this.highlightTimers=new Array();var A=this.lines.length;for(var B=0;B<A;B++){this.lines[B].setStrokeStyle({opacity:0.5})}};PinTrail.prototype.highlight=function(){var A=this.lines.length;this.stopHighlight();for(var B=-2;B<A+2;B++){this.highlightTimers.push(this._highlightTimer(B))}var C=this;this.highlightTimers.push(setTimeout(function(){C.highlight();C=null},B*100));A=null};PinTrail.prototype._highlightTimer=function(A){var B=this;return setTimeout(function(){if(A-2>=0&&B.lines[A-2]){B.lines[A-2].setStrokeStyle({opacity:0.5})}if(A-1>=0&&B.lines[A-1]){B.lines[A-1].setStrokeStyle({opacity:0.75})}if(A>=0&&B.lines[A]){B.lines[A].setStrokeStyle({opacity:1})}if(A+1>=0&&B.lines[A+1]){B.lines[A+1].setStrokeStyle({opacity:0.75})}if(A+2>=0&&B.lines[A+2]){B.lines[A+2].setStrokeStyle({opacity:0.5})}B=null},A*100);B=null};PinTrail.prototype._assignMiddlePins=function(){var G=this.pins.length;var E=this.middlePins.length;for(var C=0;C<G;C++){if(E>1){var A=9999;var D=0;var F=null;for(var B=0;B<E;B++){D=this.middlePins[B].daysBetween(this.pins[C]);D=D<0?D*-1:D;if(D<A){A=D;F=this.middlePins[B]}}this.pins[C].MiddlePin=F}else{this.pins[C].MiddlePin=this.middlePins[0]}}};PinTrail.prototype.showMiddlePins=function(){var A=this.middlePins.length;for(var B=0;B<A;B++){this.middlePins[B].marker.show()}};PinTrail.prototype.hideTrail=function(){var A=this.pins.length;for(var B=0;B<A;B++){this.pins[B].marker.hide()}var A=this.lines.length;for(var B=0;B<A;B++){this.lines[B].hide()}this.showMiddlePins()};PinTrail.prototype.showTrail=function(){var A=this.pins.length;for(var B=0;B<A;B++){this.pins[B].marker.show()}var A=this.lines.length;for(var B=0;B<A;B++){this.lines[B].show()}};PinTrail.prototype.add=function(){this._assignMiddlePins();var B=this.pins.length;var A=null;var H=1;var F=null;var D=null;var C=null;for(var G=0;G<B;G++){between=this.pins[G].MiddlePin.daysBetween(this.pins[G]);var E=this.pins[G].color=="blue"?makeBlue(between):makePurple(between);if(between!=0){this.pins[G].initIcon({"color":E,"angle":between<0?30:-30});F=1}else{F=1}pinMarker=globals.googleMap.addPin(this.pins[G],F);C=this._connect(A,this.pins[G],0.5,E);A=this.pins[G];H=F}};function postletStatus(A,B,C){}function postletRealStatus(C,B,F,A){$(".files ul.pins li.active").removeClass("active");A=A.ucFirst()+"... ";if(F>0){var E=B-F;var D=Math.ceil((E/B)*100);postletSetProgress(C.hash,A+D+"%")}else{postletSetProgress(C.hash,A)}}function postletSetProgress(B,A){$("#file_"+B+" .progress").text(A);$("#file_"+B).addClass("active")}function postletErrorMessage(A){globals.messageManager.showError(A,"photo")}function postletFinished(){$(".files ul.pins li.active").removeClass("active")}function postletInit(){try{$("#postlet").get(0).postletSetMaxFiles(globals.viewManager.maxphotos-$("#pinimagesholder").children().length);var A=globals.viewManager.lastResult.pin.Pindata.id;$("#postlet").get(0).postletSetDestination("http://"+initialData.host+"/pindata/photo/postlet/"+A)}catch(B){}}function postletFiles(E){if(E.length>0){$("#postletUploadButton").show();$("#javaUploadFormProblems").hide()}else{$("#postletUploadButton").hide();$("#javaUploadFormProblems").show()}var F=$('<ul class="pins"></ul>');var A=0;for(key in E){A+=1;var B=E[key].name;var C=E[key].size/(1024*1024);var D=(Math.round(C*100)/100)+"MB";F.append($("<li></li>").attr("id","file_"+E[key].hash).append($('<span class="name"></span>').text(B+", ")).append($('<span class="size"></span>').text(D+", ")).append($('<span class="progress"></span>').text("gereed")))}$("#uploadQueue").empty().append(F);if(A==0){$("#javaUploadProblems h2").text("Foto's uploaden via Java")}else{$("#javaUploadProblems h2").text(A+" foto"+(A>1?"'s":"")+" geselecteerd:")}}function postletError(A,B){postletSetProgress(B.hash,"Mislukt")}function postletFileComplete(C,D){postletSetProgress(C.hash,"Klaar");$(".files ul.pins li.active").removeClass("active");var G=new RegExp(".*HASH:([^ ]*)");var A=D.match(G);if(A&&A[1]){var E=globals.viewManager.lastResult.pin.Pindata.id;var B=$("#pinimagesholder");var F=globals.viewManager.renderImage(initialData.currentUser.id,E,A[1]).hide();F.appendTo(B).fadeIn("slow",fixColumns);$("#pinimagesholder a").unbind("click").fancybox(PindataViewManager.prototype.fancyBoxSettings)}}function SimpleDate(A,D,B,C){this.day=A;this.month=D+1;this.year=B;this.weekday=C}SimpleDate.prototype.getDate=function(){return this.day};SimpleDate.prototype.getDay=function(){return this.weekday};SimpleDate.prototype.getMonth=function(){return this.month-1};SimpleDate.prototype.getFullYear=function(){return this.year};SimpleDate.prototype.incrementDay=function(){if(++this.weekday==7){this.weekday=0}if(++this.day==32){this.month++;this.day=1}else{if(this.day==31){if((this.month==4)||(this.month==6)||(this.month==9)||(this.month==11)){this.month++;this.day=1}}else{if(this.day==30){if(this.month==2){this.month++;this.day=1}}else{if(this.day==29){if((this.month==2)&&(this._isNotLeap())){this.month++;this.day=1}}}}}if(this.month==13){this.month=1;this.year++}};SimpleDate.prototype._isNotLeap=function(){if(!this.year%100){return(this.year%400)}else{return(this.year%4)}};function SmartBounds(){this.points=new Array()}SmartBounds.prototype.extend=function(A){this.points.push(A)};SmartBounds.prototype.getCenter=function(){var A=this.points.length;var E={lat:0,lng:0};for(var C=0;C<A;C++){E.lat+=this.points[C].lat();E.lng+=this.points[C].lng()}var D={lat:E.lat/A,lng:E.lng/A};console.log(D);var G={lat:0,lng:0};for(var C=0;C<A;C++){G.lat+=Math.pow(this.points[C].lat()-D.lat,2);G.lng+=Math.pow(this.points[C].lng()-D.lng,2)}var G={lat:Math.sqrt(G.lat/(A-1)),lng:Math.sqrt(G.lng/(A-1))};console.log(G);console.log(this.points);for(var C=0;C<A;C++){var F={lat:(this.points[C].lat()-D.lat),lng:(this.points[C].lng()-D.lng)};var B={lat:D.lat/100,lng:D.lng/100};console.log("lat, lng",this.points[C].lat(),",",this.points[C].lng(),"def",F.lat/B.lat,",",F.lng/B.lng)}};SmartBounds.prototype.getZoom=function(){return 3};function SWFUploader(A){if(jQuery.browser.safari){throw"No flash upload support for safari"}this.data={queue:[]};settings={refObj:this};this.swfu=new SWFUpload({upload_url:"upload.php",flash_url:"/swfupload/swfupload.swf",swfupload_loaded_handler:A,upload_start_handler:this.startHandler,upload_success_handler:this.successHandler,file_queued_handler:this.queuedHandler,file_queue_error_handler:this.queueErrorHandler,file_dialog_complete_handler:this.dialogComplete,upload_progress_handler:this.progressHandler,upload_error_handler:this.errorHandler,upload_complete_handler:this.completeHandler,button_placeholder_id:"swfuploader",button_width:"72",button_height:"30",button_window_mode:SWFUpload.WINDOW_MODE.TRANSPARENT,button_cursor:SWFUpload.CURSOR.HAND,file_post_name:"Filedata",file_types:"*.jpg;*.jpeg;*.JPG;*.JPEG;*.Jpg;*.Jpeg",file_types_description:"Plaatjes",file_size_limit:"10 MB",file_upload_limit:settings.max,file_queue_limit:settings.max,custom_settings:settings})}SWFUploader.prototype.init=function(B){var A=globals.viewManager.maxphotos-$("#pinimagesholder").children().length;if(A<=0){A=1}this.data={queue:[]};try{this.swfu.setStats({successful_uploads:0});this.swfu.setFileUploadLimit(A);this.swfu.setFileQueueLimit(0);this.swfu.setUploadURL(B);this.swfu.cancelQueue()}catch(C){}};SWFUploader.prototype.checkClose=function(){try{var B=this.swfu.getStats();if(B.in_progress==1){alert("Wacht tot alle uploads klaar zijn.");return false}}catch(A){return false}return true};SWFUploader.prototype.setProgress=function(B,A){$("#"+B+" .progress").text(A);this.data.queue[B].progress=A};SWFUploader.prototype.startHandler=function(A){$("#"+A.id).addClass("active");return true};SWFUploader.prototype.queuedHandler=function(F){globals.messageManager.emptyError("photo");F.progress="";this.customSettings.refObj.data.queue[F.id]=F;var B=this.customSettings.refObj.data.queue;var D=$(".files ul.pins li.active").attr("id");var H=$('<ul class="pins"></ul>');var A=0;for(key in B){A+=1;var C=B[key].name;var E=B[key].size/(1024*1024);var G=(Math.round(E*100)/100)+"MB";H.append($("<li></li>").attr("id",B[key].id).append($('<span class="name"></span>').text(C+", ")).append($('<span class="size"></span>').text(G+", ")).append($('<span class="progress"></span>').text(B[key].progress)))}$("#flashInfoMessage").hide();$("#uploadQueue").empty().append(H);$("#myUploadForm h2").text(A+" foto"+(A>1?"'s":"")+" geselecteerd:");if(D){$("#"+D).addClass("active")}UploadformManager.prototype.RepositionFlash()};SWFUploader.prototype.queueErrorHandler=function(C,E,B){try{var D=null;switch(E){case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:D="Je mag maximaal 6 foto's per pin plaatsen.";break;case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:D="De foto is te groot.";break;case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:D="Het is niet mogelijk een lege foto te uploaden.";break;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:D="De foto moet van het type JPEG zijn.";break;default:if(C!==null){D="Onverwachtte fout."}break}globals.messageManager.showError(D,"photo")}catch(A){}UploadformManager.prototype.RepositionFlash()};SWFUploader.prototype.dialogComplete=function(A,D){try{var C=this.getStats();if(C.in_progress!=1){this.startUpload()}}catch(B){}};SWFUploader.prototype.progressHandler=function(B,E,D){try{var C=Math.ceil((E/D)*100);if(C==100){this.customSettings.refObj.setProgress(B.id,"Afbeelding verkleinen...")}else{this.customSettings.refObj.setProgress(B.id,"Uploaden... "+C+"%")}}catch(A){}};SWFUploader.prototype.successHandler=function(file,serverData){$("#"+file.id).removeClass("active");try{eval("objres = "+serverData);if(!objres.error){this.customSettings.refObj.setProgress(file.id,"Klaar");var holder=$("#pinimagesholder");var image=globals.viewManager.renderImage(initialData.currentUser.id,globals.viewManager.lastResult.pin.Pindata.id,objres.hash).hide();image.appendTo(holder).fadeIn("slow",fixColumns);$("#pinimagesholder a").unbind("click").fancybox(PindataViewManager.prototype.fancyBoxSettings)}else{globals.messageManager.showError(objres.error,"photo");this.customSettings.refObj.setProgress(file.id,"Mislukt...")}}catch(ex){globals.messageManager.showError("Er is een onverwachtte fout opgetreden.","photo")}UploadformManager.prototype.RepositionFlash()};SWFUploader.prototype.completeHandler=function(A){var B=$("#pinPhotoErrorMessage");return B.text().length==0};SWFUploader.prototype.errorHandler=function(A,C,B){switch(C){case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:B="Geannuleerd";break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:B="Gestopt";case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:B="Limiet bereikt";break}if(A!=null){this.customSettings.refObj.setProgress(A.id,B)}};function TabManager(){this.currentUser=null;this.currentDate=null;if(initialData&&initialData.page.controller=="pindata"){$("#myPindata > a").click(TabManager.prototype.ClickMyPindata)}this.handleSiteTabs()}TabManager.prototype.ClickMyPindata=function(){globals.viewManager.getPins(initialData.currentUser);return false};TabManager.prototype.set=function(A,B){this.currentUser=A;this.currentDate=B;this.renderTabs()};TabManager.prototype.renderTabs=function(){$("#tabs #theirPindata").remove();$("#tabs #theirProfile").remove();$("#tabs #addFriend").remove();if(initialData.currentUser&&this.currentUser.id==initialData.currentUser.id){$("#tabs #myPindata > a").addClass("active")}else{$("#tabs #myPindata > a").removeClass("active");if(typeof initialData.currentUser!="undefined"){$("#tabs ul").prepend(this.renderAddFriendTab())}$("#tabs ul").prepend(this.renderProfileTab()).prepend(this.renderPindataTab());$("#tabs #theirPindata > a").addClass("active")}if(initialData.currentUser&&initialData.currentUser.permission=="W"){$(".selectpin").remove();$("#tabs ul").prepend(this.renderSelectPinTab())}};TabManager.prototype.renderPindataTab=function(){return $('<li class="pindata" id="theirPindata"><a href="/pindata/user/'+this.currentUser.username.toLowerCase()+"/"+globals.dateManager.formatNumeric(this.currentDate)+'" title="bekijk pins van '+this.currentUser.username.ucFirst()+'">Pindata: '+this.currentUser.username.ucFirst()+"</a></li>")};TabManager.prototype.renderProfileTab=function(){return $('<li class="profile" id="theirProfile"><a href="/users/profile/'+this.currentUser.username.toLowerCase()+'" title="bekijk profiel van '+this.currentUser.username.ucFirst()+'">Profiel: '+this.currentUser.username.ucFirst()+"</a></li>")};TabManager.prototype.renderAddFriendTab=function(){return $('<li class="addfriend" id="addFriend"><a href="/friends/add/'+this.currentUser.username.toLowerCase()+'" title="'+this.currentUser.username.ucFirst()+' aan mijn vrienden toevoegen.">&nbsp;</a></li>')};TabManager.prototype.renderSelectPinTab=function(){return $('<li class="selectpin" id="selectPin"></li>').append($('<a href="#" title="Deze pin uitlichten.">*</a>').click(TabManager.prototype.ClickSelectPin))};TabManager.prototype.ClickSelectPin=function(){$.ajax({type:"GET",url:"/pindata/select/"+globals.viewManager.currentPin.data.Pindata.id,dataType:"html",success:TabManager.prototype.CheckSelectPin});return false};TabManager.prototype.CheckSelectPin=function(A){alert(A)};TabManager.prototype._tabClickLoad=function(C){var D=$(C.currentTarget||C.srcElement);if(D.hasClass("active")){return false}var B=D.parents("ul");B.children("li").children("a").removeClass("active");D.addClass("active");var A=D.attr("id").substr(9);globals.googleMap.gmap.closeExtInfoWindow();$.ajax({type:"GET",url:"/pindata/get/"+A,dataType:"json",success:TabManager.prototype.ProcessTabClickLoad});return false};TabManager.prototype.ProcessTabClickLoad=function(A){globals.pinManager.clear();globals.pinManager.addPindataPins(A.pins);globals.viewManager.renderPindataList(A.pins,$("#tabbed_pins"));fixColumns()};TabManager.prototype.handleSiteTabs=function(){$("#pins_tab_new, #pins_tab_popular, #pins_tab_active, #pins_tab_selected, #pins_tab_newest").click(TabManager.prototype._tabClickLoad)};function TimeMachine(){this.settings={days:31,months:13};this.animating=false;this.selectedDate=initialData&&initialData.date?globals.dateManager.fromString(initialData.date):new Date();this.calculateStartDate();this.currentPins=typeof initialData.pins!="undefined"?initialData.pins:[];this.currentPinMonths={};this.currentPinDays={};this.currentUser=initialData.user?initialData.user:initialData.currentUser;this.machine={days:$("#timemachinedays"),months:$("#timemachinemonths")};this.processPins(this.currentPins)}TimeMachine.prototype.calculateStartDate=function(){this.selectedDate.setHours(0);this.selectedDate.setMinutes(0);this.selectedDate.setSeconds(0);return this.startDate=globals.dateManager.transform(this.selectedDate,-1*((this.settings.days-1)/2))};TimeMachine.prototype.renderDays=function(){this.machine.days.empty();var C=(this.settings.days-1)/2;var B=new SimpleDate(this.startDate.getDate(),this.startDate.getMonth(),this.startDate.getFullYear(),this.startDate.getDay());try{for(var A=0;A<this.settings.days;A++){this.renderDay(B,A-C).appendTo(this.machine.days);B.incrementDay()}}catch(D){alert("An exception occurred in the script. Error name: "+D.name+". Error message: "+D.message)}B=C=null};TimeMachine.prototype.renderDay=function(I,A){var F=globals.dateManager.formatNumeric(I);var C=globals.dateManager.formatShortNamed(I).toUpperCase();var G=(typeof this.currentPinDays[F]!="undefined");if(G){var B=this.currentPinDays[F];var E=B.Pindata.city;title=(E==""?"":E+", ")+globals.countries[B.Pindata.country];tooltipTitle=C+" : "+title}else{title=F;tooltipTitle=C}var D=G?"#"+makeBlue(A):"";var H=G?"day pinned":"day";return $('<div class="'+H+'"></div>').attr({"id":"day_"+F,"date":F,"title":title}).append($('<a href="#">'+I.getDate()+"</a>").click(TimeMachine.prototype.dayClick).attr("title",tooltipTitle).css("background-color",D))};TimeMachine.prototype.renderFakeDayHtml=function(B){var D=globals.dateManager.formatNumeric(B);var A=(typeof this.currentPinDays[D]!="undefined");var C=A?"day pinned":"day";return'<div class="'+C+'"><a href="#">'+B.getDate()+"</a></div>"};TimeMachine.prototype.renderMonths=function(){var D=(this.settings.months-1)/2;var A=globals.dateManager.firstDayOfMonth(this.selectedDate);this.machine.months.empty();for(var C=0;C<this.settings.months;C++){var B=globals.dateManager.transform(A,0,C-D);this.renderMonth(B,D==C).appendTo(this.machine.months)}};TimeMachine.prototype.renderMonth=function(B,D){var C=globals.dateManager.formatYearMonth(B);var A=(typeof this.currentPinMonths[C]!="undefined");return $("<div></div>").addClass("month").addClass(A?"pinned":"").addClass(D?"active":"").attr({"id":"month_"+C,"date":C}).append($("<a href='#'></a>").text(D?globals.dateManager.formatYearMonthNamed(B):globals.dateManager.formatYearMonthShortNamed(B)).click(TimeMachine.prototype.monthClick))};TimeMachine.prototype.renderFakeMonth=function(B){var C=globals.dateManager.formatYearMonth(B);var A=(typeof this.currentPinMonths[C]!="undefined");return $("<div></div>").addClass("month").addClass(A?"pinned":"").append($("<a href='#'></a>").text(globals.dateManager.formatYearMonthShortNamed(B)))};TimeMachine.prototype.getPins=function(){$.ajax({type:"GET",url:"/pindata/pins/"+this.currentUser.id+"/"+(new Date().getTime()),dataType:"json",success:TimeMachine.prototype.processPinsWrapper})};TimeMachine.prototype.processPinsWrapper=function(A){globals.timeMachine.processPins(A.pins)};TimeMachine.prototype.processPins=function(D){this.currentPins=D;this.currentPinMonths={};this.currentPinDays={};if(typeof D=="undefined"){return }var A=this.currentPins.length;var C="";for(var B=0;B<A;B++){C=this.currentPins[B].Pindata.date;this.currentPinDays[C]=this.currentPins[B];this.currentPinMonths[C.substr(0,7)]=true}this.renderMonths();this.renderDays();this.showDate()};TimeMachine.prototype.dayClick=function(C){var B=(!C.target?C.srcElement:C.target);var A=$(B).parent("div").attr("date");globals.timeMachine.animateTo(globals.dateManager.fromString(A));return false};TimeMachine.prototype.monthClick=function(C){var B=(!C.target?C.srcElement:C.target);var A=$(B).parent("div").attr("date");globals.timeMachine.animateTo(globals.dateManager.fromString(A+"-16"));return false};TimeMachine.prototype.animateTo=function(S){if(this.animating){alert("al bezig met animeren");return }this.animating=true;var D={max:1000,min:200,days:5};var E=3;var H=27;var I=false;var C=globals.dateManager.daysBetween(this.selectedDate,S);if(C==0){this.animating=false;return }if(C<0){I=true;C*=-1}MessageManager.prototype.ShowLoading();$(".day.active").removeClass("active");this.machine.days.addClass("noactive");$(".day.pinned").removeClass("pinned");$("#dayStripContainer").remove();var J=$("<div></div>").attr("id","dayStripContainer").addClass("strip container").addClass("timemachine days noactive").insertAfter(this.machine.days).hide();var M=$("<div></div>").attr("id","dayStripSlider").addClass("strip slider").appendTo(J);if(I){var R=globals.dateManager.transform(this.startDate,this.settings.days);var L=globals.dateManager.transform(this.startDate,-1*C)}else{var L=this.startDate;var R=globals.dateManager.transform(this.startDate,C+this.settings.days)}var Q=globals.dateManager.daysBetween(L,R);var A="";var F=new SimpleDate(L.getDate(),L.getMonth(),L.getFullYear(),L.getDay());for(var O=0;O<Q;O++){A+=this.renderFakeDayHtml(F);F.incrementDay()}M.html(A);var P=globals.dateManager.firstDayOfMonth(this.selectedDate);var K=globals.dateManager.daysBetween(L,this.startDate);var G=-1*(K*(E+H));M.css({"left":G});if(I){var B=G+(C*(E+H))}else{var B=G-(C*(E+H))}if(this.selectedDate.getMonth()!=S.getMonth()){this.animateMonths(this.selectedDate,S)}this.selectedDate=S;this.calculateStartDate();this.renderMonths();this.machine.days.hide();J.show();var N=Math.min(D.max,Math.max(D.min,((D.max/D.days)*C)));M.animate({left:B},N,"easeInOutCirc",TimeMachine.prototype.animateDaysReadyWrapper)};TimeMachine.prototype.animateDaysReadyWrapper=function(){globals.timeMachine.animateDaysReady()};TimeMachine.prototype.animateDaysReady=function(){this.renderDays();$("#dayStripContainer").remove();$("#dayStripSlider").remove();this.machine.days.removeClass("noactive").show();this.showDate();this.animating=false;globals.viewManager.changeView()};TimeMachine.prototype.animateMonths=function(H,Q){var D={min:200,max:700};var O=20;var M=39;var G=false;var L=globals.dateManager.monthsBetween(H,Q);if(L<0){G=true;L*=-1}$("#monthStripContainer").remove();var K=$("<div></div>").attr("id","monthStripContainer").addClass("strip container").addClass("timemachine months").insertAfter(this.machine.months).hide();var A=$("<div></div>").attr("id","monthStripSlider").addClass("strip slider").appendTo(K);var I=globals.dateManager.firstDayOfMonth(this.selectedDate);if(G){var P=globals.dateManager.transform(I,0,((this.settings.months-1)/2)+1);var J=globals.dateManager.transform(P,0,-1*(L+this.settings.months))}else{var J=globals.dateManager.transform(I,0,-1*((this.settings.months-1)/2));var P=globals.dateManager.transform(J,0,L+this.settings.months)}var B=globals.dateManager.monthsBetween(J,P);for(var N=0;N<B;N++){var E=globals.dateManager.transform(J,0,N);this.renderFakeMonth(E).appendTo(A)}$("<div></div>").addClass("month active").append($("<a href='#'></a>").html("&nbsp;")).appendTo(A);var R=G?$($("#monthStripContainer .month").get(L)):$("#monthStripContainer .month:first");$("#timemachinedays").hide();K.show();var F=$("#timemachinemonths .month:first").offset().left-R.offset().left;this.machine.months.hide();A.css({"left":F});$("#timemachinedays").show();if(G){var C=F+(L*(O+M))}else{var C=F-(L*(O+M))}A.animate({left:C},700,"easeInOutQuad",TimeMachine.prototype.animateMonthsReadyWrapper);return };TimeMachine.prototype.animateMonthsReadyWrapper=function(){globals.timeMachine.animateMonthsReady()};TimeMachine.prototype.animateMonthsReady=function(){$("#monthStripContainer").remove();$("#monthStripSlider").remove();this.machine.months.show()};TimeMachine.prototype.showDate=function(){var B=globals.dateManager.formatNamed(this.selectedDate);var A=$(".day#day_"+globals.dateManager.formatNumeric(this.selectedDate));var C=A.hasClass("pinned")?A.attr("title"):"";$(".day.active").removeClass("active");A.addClass("active");$("#timemachinetitle .location").html(C);$("#timemachinetitle .date").html(B)};TimeMachine.prototype.getDate=function(){return this.selectedDate};TimeMachine.prototype.getStartDate=function(){return this.startDate};TimeMachine.prototype.getDays=function(){return this.settings.days};TimeMachine.prototype.getUser=function(){return this.currentUser};TimeMachine.prototype.setUser=function(A){if(A.id!=this.currentUser.id){this.currentUser=A;this.getPins();return true}return false};TimeMachine.prototype.highlight=function(A){if(A.User.id==this.currentUser.id){$("#day_"+A.Pindata.date).addClass("highlight")}};TimeMachine.prototype.removeHighlight=function(){$(".day.highlight").removeClass("highlight")};function Tracker(){this.objects=new Array()}Tracker.prototype.register=function(A){if(!A.isTrackable){alert("not trackable");return null}if(!A.tracked){A.trackerID=this.objects.length;this.objects[A.trackerID]=A;A.tracked=true}return A.trackerID};Tracker.prototype.get=function(A){return this.objects[A]};Tracker.prototype.remove=function(A){if(!A.isTrackable){return false}if(!A.tracked){return true}this.objects[A.trackerID]=null;A.tracked=false;A.trackerID=false;return true};Tracker.prototype.HandleTrackedEvent=function(event){var result=true;try{var obj=globals.tracker.objects[event.data.objectId];var func=eval("obj."+event.data.functionName);result=func.call(obj,event,this);obj=func=null}catch(e){}return result};function Trackable(){this.trackerID=false;this.tracked=false;this.isTrackable=true}Trackable.prototype.untrack=function(A){return globals.tracker.remove(this)};jQuery.fn.trackedEvent=function(A,D,C){var E=globals.tracker.register(D);var B=null;if(D.tracked){B={"objectId":E,"functionName":C};this.bind(A,B,Tracker.prototype.HandleTrackedEvent)}else{alert("function could not be bound")}E=null;B=null;return(this)};var UPLOADFORM_STATE_INIT=0;var UPLOADFORM_STATE_JAVA=1;var UPLOADFORM_STATE_FLASH=2;var UPLOADFORM_STATE_BASE=3;function UploadformManager(){this.state=UPLOADFORM_STATE_INIT;this.swfu=null;this.swfuOk=false;this.container=$("<div></div>").appendTo($("body"))}UploadformManager.prototype.showForm=function(){$("#pinimages").show();$("#pinimageaddform").show();$("#mypindataEditLinks").hide();globals.messageManager.emptyError("photo");if(this.state==UPLOADFORM_STATE_INIT||this.state==UPLOADFORM_STATE_JAVA&&$("#javaUploadForm").length==0){$("#pinimageaddform").append(this.renderJavaUploadForm());fixColumns()}else{if(this.state==UPLOADFORM_STATE_FLASH&&$("#flashUploadForm").length==0){$("#pinimageaddform").append(this.renderFlashUploadForm());if(this.swfuOk){this.EnableFlashUploadForm()}fixColumns()}else{if(this.state==UPLOADFORM_STATE_BASE&&$("#baseUploadForm").length==0){$("#pinimageaddform").append(this.renderBaseUploadForm());fixColumns()}}}UploadformManager.prototype.RepositionFlash()};UploadformManager.prototype.ClickCancelUpload=function(){globals.uploadformManager.hideUploadForm()};UploadformManager.prototype.signalChangedLayout=function(){$(".swfupload").css({left:-2000})};UploadformManager.prototype.hideUploadForm=function(){if(this.swfu!=null){if(!this.swfu.checkClose()){return false}}try{if($("#postlet").length>0){var A=$("#postlet").get(0);if(A.postletIsBusy()){alert("Wacht tot alle uploads klaar zijn.");return false}A.postletCancelFiles();postletFiles([]);if(A.isUploadEnabled()){A.cancelUpload()}}}catch(B){}$("#flashInfoMessage").show();$("#pinimages").show();$("#pinimageaddform").hide();$("#mypindataEditLinks").show();this.signalChangedLayout();fixColumns();return true};UploadformManager.prototype.ClickStartFlashUploadForm=function(){var A=globals.uploadformManager;if(A.state==UPLOADFORM_STATE_JAVA){$("#javaUploadForm").remove()}else{alert("state exception 4");return }A.state=UPLOADFORM_STATE_FLASH;$("#pinimageaddform").append(A.renderFlashUploadForm());fixColumns();return false};UploadformManager.prototype.RepositionFlash=function(){try{var A=$("#flashUploadBrowse:visible");var C=A.length==1?A.position():$("#flashUploadForm").position();$(".swfupload").css({top:C.top,left:C.left})}catch(B){}};UploadformManager.prototype.EnableFlashUploadForm=function(){if($("#flashUploadFormLoader").length==0){return }$("#flashUploadFormLoader").remove();$("#flashUploadForm h2").after($('<div id="uploadQueue" class="files"></div>')).after($('<div id="flashInfoMessage"></div>').html("Selecteer &eacute;&eacute;n of meerdere foto's tegelijk van je computer. Lukt het uploaden niet direct vanaf je camera? Kopieer de foto's dan eerst naar je bureaublad en probeer het vanaf daar."));$('<input type="button" name="select" value="Bladeren" class="contentbutton" id="flashUploadBrowse"/>').insertBefore($("#flashUploadForm .clear"));$('<input type="button" name="select" value="Sluiten" class="contentbutton" />').click(UploadformManager.prototype.ClickCancelUpload).insertBefore($("#flashUploadForm .clear"));$("#myUploadForm h2").text("Foto's uploaden via Flash");var A=globals.viewManager.lastResult.pin.Pindata.id;globals.uploadformManager.swfu.init("/pindata/photo/js/"+A);globals.uploadformManager.swfuOk=true;UploadformManager.prototype.RepositionFlash();fixColumns()};UploadformManager.prototype.renderFlashUploadForm=function(){if(this.state==UPLOADFORM_STATE_JAVA||this.state==UPLOADFORM_STATE_FLASH){$("#javaUploadForm").remove()}else{alert("state exception 2");return }this.state=UPLOADFORM_STATE_FLASH;this.startSwfupload();setTimeout(UploadformManager.prototype.RepositionFlash,200);var A=$('<form id="flashUploadForm" enctype="multipart/form-data" action="/pindata/photo/html/'+globals.viewManager.lastResult.pin.Pindata.id+'" method="POST" class="a_form"></form>');A.append($('<div id="flashUploadFormLoader" class="loadingFlash">Flash laden... Blijft dit bericht langer staan? Dan werkt Flash waarschijnlijk niet. </div>').append($("<a href='#'>Gebruik dan de basis-uploader.</a>").click(UploadformManager.prototype.ClickStartBaseUploadForm))).append($('<div class="clear">&nbsp;</div>'));return A.prepend($('<div class="error-message" id="pinPhotoErrorMessage"></div>')).prepend($("<h2>Foto's uploaden via Flash</h2>"))};UploadformManager.prototype.startSwfupload=function(){var A=$(".swfupload");if(A.length>0){return }this.container.append($('<div id="swfuploader"></div>'));try{this.swfu=new SWFUploader(UploadformManager.prototype.EnableFlashUploadForm)}catch(B){this.swfu=null}};UploadformManager.prototype.ClickStartBaseUploadForm=function(){var A=globals.uploadformManager;if(A.state==UPLOADFORM_STATE_FLASH){$("#flashUploadForm").remove()}else{alert("state exception 2");return }A.state=UPLOADFORM_STATE_BASE;$("#pinimageaddform").append(A.renderBaseUploadForm());fixColumns();return false};UploadformManager.prototype.renderBaseUploadForm=function(){var A=$('<form id="baseUploadForm" enctype="multipart/form-data" action="/pindata/photo/html/'+globals.viewManager.lastResult.pin.Pindata.id+'" method="POST" class="a_form"></form>');A.append($('<div id="uploadfield"></div>').append($('<input name="MAX_FILE_SIZE" value="10485760" type="hidden" />')).append($('<input name="Filedata" id="pinimageaddforminput"  type="file" />')).append($("<p></p>")).append($('<input type="button" name="cancel" value="Annuleren" class="contentbutton"/>').click(UploadformManager.prototype.ClickCancelUpload)).append($('<input type="submit" name="submit" value="Uploaden" class="contentbutton" />')));return A.prepend($("<h2>Fotos uploaden</h2>"))};UploadformManager.prototype.startApplet=function(){var B=$("#postlet");if(B.length>0){return }var C=globals.viewManager.lastResult.pin.Pindata.id;var A=$('<applet id="postlet"name="Java Foto Uploader" code="Main.class" codebase="/postlet/" archive="postlet.jar" width="1" height="1" mayscript><param name = "maxthreads"		value = "1" /><param name = "language"		value = "NL" /><param name = "type"			value = "application/x-java-applet;version=1.3.1" /><param name = "destination"		value = "http://'+initialData.host+"/pindata/photo/postlet/"+C+'" /><param name = "backgroundcolour" value = "16777215" /><param name = "tableheaderbackgroundcolour" value = "14079989" /><param name = "tableheadercolour" value = "0" /><param name = "warnmessage" value = "false" /><param name = "autoupload" value = "false" /><param name = "helpbutton" value = "false" /><param name = "fileextensions" value = "Fotos,jpg,jpeg,JPG,JPEG" /><param name = "maxfiles" value = "'+globals.viewManager.maxphotos+'" /><param name = "helppage" value = "http://www.pindat.com/help/" /><param name = "maxpixels" value = "'+(1600*1200)+'" /></applet>');A.appendTo(this.container)};UploadformManager.prototype.renderJavaUploadForm=function(){if(this.state==UPLOADFORM_STATE_INIT||this.state==UPLOADFORM_STATE_JAVA){this.state=UPLOADFORM_STATE_JAVA}else{alert("state exception");return }this.startApplet();var A=$('<div id="uploadQueue" class="files"></div>');var D=$('<div class="error-message" id="pinPhotoErrorMessage"></div>');var C=$("<div></div>").append($('<input type="submit" name="submit" value="Bladeren" class="contentbutton" />').click(function(){try{postletInit();$("#postlet").get(0).postletAdd()}catch(E){}return false})).append($('<input type="submit" name="submit" value="Uploaden" class="contentbutton" id="postletUploadButton" />').click(function(){try{postletInit();$("#postlet").get(0).postletUpload()}catch(E){}return false}).hide()).append($('<input type="button" name="cancel" value="Sluiten" class="contentbutton"/>').click(UploadformManager.prototype.ClickCancelUpload));var B=$('<div id="javaUploadProblems"></div').append($("<h2>Foto's uploaden via Java</h2>")).append($('<p id="javaUploadFormProblems">De Java-uploader is de snelste methode om je fotos te uploaden. Heb je geen Java geinstalleerd? <a href="http://java.sun.com/getjava" target="_blank">Klik hier.</a> Lukt het niet de Java-uploader te gebruiken? </p>').append($("<a href='#'>Probeer dan onze Flash-uploader.</a>").click(UploadformManager.prototype.ClickStartFlashUploadForm)));return $("<div id='javaUploadForm'></div>").append(B).append(A).append(D).append(C).append($('<div class="clear">&nbsp;</div>'))};function ViewManager(){}ViewManager.prototype.renderPindataList=function(G,F){var B=$("<ul></ul>").addClass("pins");var A=G.length;var E=null;for(var D=0;D<A;D++){var C=globals.pinManager.getPindataPin(G[D]);B.append(C.renderPinListing());C=null}if(A==0){$("<li>geen pins gevonden</li>").appendTo(B)}if(F){F.html(B)}return B};ViewManager.prototype.renderCountrySelect=function(B,E,D){var C='<select name="'+B+'" id="'+E+'">';if(D==undefined||D==""){D="NL"}for(key in globals.countries){var A=(key==D)?' selected="selected"':"";C+='<option value="'+key+'"'+A+">"+globals.countries[key]+"</option>"}return C+"</select>"}