";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._restrictMinMax(inst,this._daylightSavingAdjust(new Date(year,month,day)));inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_restrictMinMax:function(inst,date){var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&datemaxDate?maxDate:date);return date},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax){return this._determineDate(inst,this._get(inst,minMax+"Date"),null)},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[0]*numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date.getTime()>=minDate.getTime())&&(!maxDate||date.getTime()<=maxDate.getTime()))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate"||options=="widget")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.8rc3";window["DP_jQuery_"+dpuuid]=$})(jQuery);;/*
* jQuery UI Progressbar 1.8rc3
*
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI/Progressbar
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
*/
(function(a){a.widget("ui.progressbar",{options:{value:0},_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=a("").appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove();a.Widget.prototype.destroy.apply(this,arguments)},value:function(b){if(b===undefined){return this._value()}this._setOption("value",b);return this},_setOption:function(b,c){switch(b){case"value":this.options.value=c;this._refreshValue();this._trigger("change");break}a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var b=this.options.value;if(typeof b!=="number"){b=0}if(bthis._valueMax()){b=this._valueMax()}return b},_valueMin:function(){return 0},_valueMax:function(){return 100},_refreshValue:function(){var b=this.value();this.valueDiv[b===this._valueMax()?"addClass":"removeClass"]("ui-corner-right").width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.8rc3"})})(jQuery);;
/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* $LastChangedDate: 2007-07-21 18:45:56 -0500 (Sat, 21 Jul 2007) $
* $Rev: 2447 $
*
* Version 2.1.1
*/
(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='';return this.each(function(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild);});}return this;};})(jQuery);(function($){$.belowthefold=function(element,settings){var fold=$(window).height()+$(window).scrollTop();return fold<=$(element).offset().top-settings.threshold;};$.abovethetop=function(element,settings){var top=$(window).scrollTop();return top>=$(element).offset().top+$(element).height()-settings.threshold;};$.rightofscreen=function(element,settings){var fold=$(window).width()+$(window).scrollLeft();return fold<=$(element).offset().left-settings.threshold;};$.leftofscreen=function(element,settings){var left=$(window).scrollLeft();return left>=$(element).offset().left+$(element).width()-settings.threshold;};$.inviewport=function(element,settings){return!$.rightofscreen(element,settings)&&!$.leftofscreen(element,settings)&&!$.belowthefold(element,settings)&&!$.abovethetop(element,settings);};$.extend($.expr[':'],{"below-the-fold":function(a,i,m){return $.belowthefold(a,{threshold:0});},"above-the-top":function(a,i,m){return $.abovethetop(a,{threshold:0});},"left-of-screen":function(a,i,m){return $.leftofscreen(a,{threshold:0});},"right-of-screen":function(a,i,m){return $.rightofscreen(a,{threshold:0});},"in-viewport":function(a,i,m){return $.inviewport(a,{threshold:0});}});})(jQuery);/*
* No Spam (1.3)
* by Mike Branski (www.leftrightdesigns.com)
* mikebranski@gmail.com
*
* Copyright (c) 2008 Mike Branski (www.leftrightdesigns.com)
* Licensed under GPL (www.leftrightdesigns.com/library/jquery/nospam/gpl.txt)
*
* NOTE: This script requires jQuery to work. Download jQuery at www.jquery.com
*
* Thanks to Bill on the jQuery mailing list for the double slash idea!
*
* CHANGELOG:
* v 1.3 - Added support for e-mail addresses with multiple dots (.) both before and after the at (@) sign
* v 1.2.1 - Included GPL license
* v 1.2 - Finalized name as No Spam (was Protect Email)
* v 1.1 - Changed switch() to if() statement
* v 1.0 - Initial release
*
*/
jQuery.fn.nospam = function(settings) {
settings = jQuery.extend({
replaceText: false, // optional, accepts true or false
filterLevel: 'normal', // optional, accepts 'low' or 'normal'
checkLength: false // add br before @
}, settings);
return this.each(function(){
e = null;
if(settings.filterLevel == 'low') { // Can be a switch() if more levels added
if($(this).is('a[rel]')) {
e = $(this).attr('rel').replace('//', '@').replace(/\//g, '.');
} else {
e = $(this).text().replace('//', '@').replace(/\//g, '.');
}
} else { // 'normal'
if($(this).is('a[rel]')) {
e = $(this).attr('rel').split('').reverse().join('').replace('//', '@').replace(/\//g, '.');
} else {
e = $(this).text().split('').reverse().join('').replace('//', '@').replace(/\//g, '.');
}
}
if(e) {
if($(this).is('a[rel]')) {
$(this).attr('href', 'mailto:' + e);
if(settings.replaceText) {
$(this).text(e);
}
if(settings.checkLength) {
e = e.replace('@', ' @');
$(this).html(e);
}
} else {
$(this).text(e);
}
}
});
};
/**
* jQuery.ScrollTo - Easy element scrolling using jQuery.
* Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
* Dual licensed under MIT and GPL.
* Date: 5/25/2009
* @author Ariel Flesler
* @version 1.4.2
*
* http://flesler.blogspot.com/2007/10/jqueryscrollto.html
*/
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);/*
* jQuery.SerialScroll - Animated scrolling of series
* Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
* Dual licensed under MIT and GPL.
* Date: 06/14/2009
* @author Ariel Flesler
* @version 1.2.2
* http://flesler.blogspot.com/2008/02/jqueryserialscroll.html
*/
;(function(a){var b=a.serialScroll=function(c){return a(window).serialScroll(c)};b.defaults={duration:1e3,axis:"x",event:"click",start:0,step:1,lock:!0,cycle:!0,constant:!0};a.fn.serialScroll=function(c){return this.each(function(){var t=a.extend({},b.defaults,c),s=t.event,i=t.step,r=t.lazy,e=t.target?this:document,u=a(t.target||this,e),p=u[0],m=t.items,h=t.start,g=t.interval,k=t.navigation,l;if(!r){m=d()}if(t.force){f({},h)}a(t.prev||[],e).bind(s,-i,q);a(t.next||[],e).bind(s,i,q);if(!p.ssbound){u.bind("prev.serialScroll",-i,q).bind("next.serialScroll",i,q).bind("goto.serialScroll",f)}if(g){u.bind("start.serialScroll",function(v){if(!g){o();g=!0;n()}}).bind("stop.serialScroll",function(){o();g=!1})}u.bind("notify.serialScroll",function(x,w){var v=j(w);if(v>-1){h=v}});p.ssbound=!0;if(t.jump){(r?u:d()).bind(s,function(v){f(v,j(v.target))})}if(k){k=a(k,e).bind(s,function(v){v.data=Math.round(d().length/k.length)*k.index(this);f(v,this)})}function q(v){v.data+=h;f(v,this)}function f(B,z){if(!isNaN(z)){B.data=z;z=p}var C=B.data,v,D=B.type,A=t.exclude?d().slice(0,-t.exclude):d(),y=A.length,w=A[C],x=t.duration;if(D){B.preventDefault()}if(g){o();l=setTimeout(n,t.interval)}if(!w){v=C<0?0:y-1;if(h!=v){C=v}else{if(!t.cycle){return}else{C=y-v-1}}w=A[C]}if(!w||t.lock&&u.is(":animated")||D&&t.onBefore&&t.onBefore(B,w,u,d(),C)===!1){return}if(t.stop){u.queue("fx",[]).stop()}if(t.constant){x=Math.abs(x/i*(h-C))}u.scrollTo(w,x,t).trigger("notify.serialScroll",[C])}function n(){u.trigger("next.serialScroll")}function o(){clearTimeout(l)}function d(){return a(m,p)}function j(w){if(!isNaN(w)){return w}var x=d(),v;while((v=x.index(w))==-1&&w!=p){w=w.parentNode}return v}})}})(jQuery);/*
* jQuery selectbox plugin
*
* Copyright (c) 2007 Sadri Sahraoui (brainfault.com)
* Licensed under the GPL license and MIT:
* http://www.opensource.org/licenses/GPL-license.php
* http://www.opensource.org/licenses/mit-license.php
*
* The code is inspired from Autocomplete plugin (http://www.dyve.net/jquery/?autocomplete)
*
* Revision: $Id$
* Version: 0.6
*
* Changelog :
* Version 0.6
* - Fix IE scrolling problem
* Version 0.5
* - separate css style for current selected element and hover element which solve the highlight issue
* Version 0.4
* - Fix width when the select is in a hidden div @Pawel Maziarz
* - Add a unique id for generated li to avoid conflict with other selects and empty values @Pawel Maziarz
*/
jQuery.fn.extend({
selectbox: function(options) {
return this.each(function() {
new jQuery.SelectBox(this, options);
});
}
});
/* pawel maziarz: work around for ie logging */
if (!window.console) {
var console = {
log: function(msg) {
}
}
}
/* */
jQuery.SelectBox = function(selectobj, options) {
var opt = options || {};
opt.inputClass = opt.inputClass || "selectbox";
opt.containerClass = opt.containerClass || "selectbox-wrapper";
opt.hoverClass = opt.hoverClass || "current";
opt.currentClass = opt.selectedClass || "selected"
opt.debug = opt.debug || false;
var elm_id = selectobj.id;
var active = 0;
var inFocus = false;
var hasfocus = 0;
//jquery object for select element
var $select = $(selectobj);
// jquery container object
var $container = setupContainer(opt);
//jquery input object
var $input = setupInput(opt);
// hide select and append newly created elements
$select.hide().before($input).before($container);
init();
$input
.click(function(){
if (!inFocus) {
$container.toggle();
}
})
.focus(function(){
if ($container.not(':visible')) {
inFocus = true;
$container.show();
}
})
.keydown(function(event) {
switch(event.keyCode) {
case 38: // up
event.preventDefault();
moveSelect(-1);
break;
case 40: // down
event.preventDefault();
moveSelect(1);
break;
//case 9: // tab
case 13: // return
event.preventDefault(); // seems not working in mac !
$('li.'+opt.hoverClass).trigger('click');
break;
case 27: //escape
hideMe();
break;
}
})
.blur(function() {
if ($container.is(':visible') && hasfocus > 0 ) {
if(opt.debug) console.log('container visible and has focus')
} else {
// Workaround for ie scroll - thanks to Bernd Matzner
if($.browser.msie || $.browser.safari){ // check for safari too - workaround for webkit
if(document.activeElement.getAttribute('id').indexOf('_container')==-1){
hideMe();
} else {
$input.focus();
}
} else {
hideMe();
}
}
});
function hideMe() {
hasfocus = 0;
$container.hide();
}
function init() {
$container.append(getSelectOptions($input.attr('id'))).hide();
var width = $input.css('width');
$container.width(width);
}
function setupContainer(options) {
var container = document.createElement("div");
$container = $(container);
$container.attr('id', elm_id+'_container');
$container.addClass(options.containerClass);
return $container;
}
function setupInput(options) {
var input = document.createElement("input");
var $input = $(input);
$input.attr("id", elm_id+"_input");
$input.attr("type", "text");
$input.addClass(options.inputClass);
$input.attr("autocomplete", "off");
$input.attr("readonly", "readonly");
$input.attr("tabIndex", $select.attr("tabindex")); // "I" capital is important for ie
return $input;
}
function moveSelect(step) {
var lis = $("li", $container);
if (!lis || lis.length == 0) return false;
active += step;
//loop through list
if (active < 0) {
active = lis.size();
} else if (active > lis.size()) {
active = 0;
}
scroll(lis, active);
lis.removeClass(opt.hoverClass);
$(lis[active]).addClass(opt.hoverClass);
}
function scroll(list, active) {
var el = $(list[active]).get(0);
var list = $container.get(0);
if (el.offsetTop + el.offsetHeight > list.scrollTop + list.clientHeight) {
list.scrollTop = el.offsetTop + el.offsetHeight - list.clientHeight;
} else if(el.offsetTop < list.scrollTop) {
list.scrollTop = el.offsetTop;
}
}
function setCurrent() {
var li = $("li."+opt.currentClass, $container).get(0);
var ar = (''+li.id).split('_');
var el = ar[ar.length-1];
$select.val(el);
$input.val($(li).html());
return true;
}
// select value
function getCurrentSelected() {
return $select.val();
}
// input value
function getCurrentValue() {
return $input.val();
}
function getSelectOptions(parentid) {
var select_options = new Array();
var ul = document.createElement('ul');
$select.children('option').each(function() {
var li = document.createElement('li');
li.setAttribute('id', parentid + '_' + $(this).val());
li.innerHTML = $(this).html();
if ($(this).is(':selected')) {
$input.val($(this).html());
$(li).addClass(opt.currentClass);
}
ul.appendChild(li);
$(li)
.mouseover(function(event) {
hasfocus = 1;
if (opt.debug) console.log('over on : '+this.id);
jQuery(event.target, $container).addClass(opt.hoverClass);
})
.mouseout(function(event) {
hasfocus = -1;
if (opt.debug) console.log('out on : '+this.id);
jQuery(event.target, $container).removeClass(opt.hoverClass);
})
.click(function(event) {
var fl = $('li.'+opt.hoverClass, $container).get(0);
if (opt.debug) console.log('click on :'+this.id);
$('li.'+opt.currentClass).removeClass(opt.currentClass);
$(this).addClass(opt.currentClass);
setCurrent();
//$select.change();
$select.get(0).blur();
hideMe();
});
});
return ul;
}
};
/**
* Cookie plugin
*
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
/**
* Create a cookie with the given name and value and other optional parameters.
*
* @example $.cookie('the_cookie', 'the_value');
* @desc Set the value of a cookie.
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
* @desc Create a cookie with all available options.
* @example $.cookie('the_cookie', 'the_value');
* @desc Create a session cookie.
* @example $.cookie('the_cookie', null);
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
* used when the cookie was set.
*
* @param String name The name of the cookie.
* @param String value The value of the cookie.
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
* If set to null or omitted, the cookie will be a session cookie and will not be retained
* when the the browser exits.
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
* require a secure protocol (like HTTPS).
* @type undefined
*
* @name $.cookie
* @cat Plugins/Cookie
* @author Klaus Hartl/klaus.hartl@stilbuero.de
*/
/**
* Get the value of a cookie with the given name.
*
* @example $.cookie('the_cookie');
* @desc Get the value of a cookie.
*
* @param String name The name of the cookie.
* @return The value of the cookie.
* @type String
*
* @name $.cookie
* @cat Plugins/Cookie
* @author Klaus Hartl/klaus.hartl@stilbuero.de
*/
jQuery.cookie = function(name, value, options) {
if (typeof value != 'undefined') { // name and value given, set cookie
options = options || {};
if (value === null) {
value = '';
options.expires = -1;
}
var expires = '';
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
var date;
if (typeof options.expires == 'number') {
date = new Date();
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
} else {
date = options.expires;
}
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
}
// CAUTION: Needed to parenthesize options.path and options.domain
// in the following expressions, otherwise they evaluate to undefined
// in the packed version for some reason...
var path = options.path ? '; path=' + (options.path) : '';
var domain = options.domain ? '; domain=' + (options.domain) : '';
var secure = options.secure ? '; secure' : '';
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
} else { // only name given, get cookie
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
}
};/*
* URL Utils - v1.11 - 9/10/2009
* http://benalman.com/
*
* Copyright (c) 2009 "Cowboy" Ben Alman
* Licensed under the MIT license
* http://benalman.com/about/license/
*/
(function($){var M,q={},z,i=this,u=true,J=false,F="onhashchange" in i,a=Array.prototype.slice,j=document.location,E,d,b,x,v,e,C,I,p="urlInternal",L="urlExternal",y="queryString",G="fragment",H="update",f="passQueryString",w="passFragment",c="fragmentChange",o="hashchange."+c,h,g;function B(O){return typeof O==="string"}function l(O){return typeof O==="object"}function m(){var O=a.call(arguments),P=O.shift();return function(){return P.apply(this,O.concat(a.call(arguments)))}}function k(){return j.href.replace(/^[^#]*#?/,"")}$.urlTagAttrList=E=function(O){return $.extend(q,O)};E({a:"href",img:"src",form:"action",base:"href",script:"src",iframe:"src",link:"href"});function r(O){var P=O.nodeName;return P?q[P.toLowerCase()]:""}$.urlInternalHost=d=function(Q){Q=Q?"(?:"+Q+"\\.)?":"";var P=new RegExp("^"+Q+"(.*)","i"),O="^"+j.protocol+"//"+j.hostname.replace(P,Q+"$1")+(j.port?":"+j.port:"")+"/";return b(O)};$.urlInternalRegExp=b=function(O){if(O){M=B(O)?new RegExp(O,"i"):O}return M};d("www");$.isUrlInternal=x=function(O){if(!O){return z}if(M.test(O)){return u}if(/^https?:\/\//i.test(O)){return J}if(/^(?:#|[a-z\d.-]+:)/i.test(O)){return z}return u};$.isUrlExternal=v=function(O){var P=x(O);return typeof P==="boolean"?!P:P};e=function(P,O){return this.filter(":"+P+(O?"("+O+")":""))};$.fn[p]=m(e,p);$.fn[L]=m(e,L);C=function(S,R,Q,P){var O=P[3]||r(R);return O?!!S($(R).attr(O)):J};$.expr[":"][p]=m(C,x);$.expr[":"][L]=m(C,v);function K(Q,R,P,O){var S;if(B(P)||l(P)){return n(R,P,O,Q)}else{if(l(R)){return $.param(R)}else{if(B(R)){return D(R,P,Q)}else{S=Q?k():j.search;return D(S,R,Q)}}}}$[y]=m(K,0);$[G]=m(K,1);function N(){var O,S,R,Q=a.call(arguments),P=Q.shift();if(B(Q[1])||l(Q[1])){O=Q.shift()}S=Q.shift();R=Q.shift();return this.each(function(){var V=$(this),T=O||r(this),U=T&&V.attr(T)||"";U=K(P,U,S,R);V.attr(T,U)})}$.fn[y]=m(N,0);$.fn[G]=m(N,1);function A(){var Q=a.call(arguments),P=Q.shift(),O=Q.shift(),R=K(P);if($.isFunction(Q[0])){R=Q.shift()(R)}else{if($.isArray(Q[0])){$.each(Q.shift(),function(T,S){delete R[S]})}}return K(P,O,R,Q.shift())}$[f]=m(A,0);$[w]=m(A,1);function t(){var O,Q=a.call(arguments),P=Q.shift();if(B(Q[0])){O=Q.shift()}return this.each(function(){var T=$(this),R=O||r(this),S=R&&T.attr(R)||"";S=A.apply(this,[P,S].concat(Q));T.attr(R,S)})}$.fn[f]=m(t,0);$.fn[w]=m(t,1);function D(U,T,Q){var P,W,S,V={},R={"null":null,"true":u,"false":J},O=decodeURIComponent,X=Q?/^.*[#]/:/^.*[?]|#.*$/g;U=U.replace(X,"").replace(/\+/g," ").split("&");while(U.length){P=U.shift().split("=");W=O(P[0]);if(P.length===2){S=O(P[1]);if(T){if(S&&!isNaN(S)){S=Number(S)}else{if(S==="undefined"){S=z}else{if(R[S]!==z){S=R[S]}}}}if($.isArray(V[W])){V[W].push(S)}else{if(V[W]!==z){V[W]=[V[W],S]}else{V[W]=S}}}else{if(W){V[W]=T?z:""}}}return V}function n(O,Q,T,P){var U,W=P?/^([^#]*)[#]?(.*)$/:/^([^#?]*)[?]?([^#]*)(#?.*)/,S=O.match(W),V=D(S[2],0,P),R=S[3]||"";if(B(Q)){Q=D(Q,0,P)}if(T===2){U=Q}else{if(T===1){U=$.extend({},Q,V)}else{U=$.extend({},V,Q)}}U=$.param(U);return S[1]+(P?"#":U||!S[1]?"?":"")+U+R}$.setFragment=I=function(P,O){var Q=l(P)?K(u,P):(P||"").replace(/^#/,"");Q=P?n("#"+k(),"#"+Q,O,1):"#";j.href=j.href.replace(/#.*$/,"")+Q};$[c]=function(O){if(O===u){O=100}function P(){var R=$.Event(c);R[G]=k();$(document).trigger(R)}F&&$(i).unbind(o);h&&clearTimeout(h);h=null;if(typeof O==="number"){if(F){$(i).bind(o,P)}else{g=k();if($.isFunction(s)){s=s()}(function Q(){var S=k(),R=s[G](g);if(S!==g){s[H](S,R);g=S;P()}else{if(R!==g){I(R,2)}}h=setTimeout(Q,O<0?0:O)})()}}};function s(){var O,P=$.browser,Q={};Q[H]=Q[G]=function(R){return R};if(P.msie&&P.version<8){Q[H]=function(T,R){var S=O.document;if(T!==R){S.open();S.close();S.location.hash="#"+T}};Q[G]=function(){return O.document.location.hash.replace(/^#/,"")};O=$("").hide().appendTo("body").get(0).contentWindow;Q[H](k())}return Q}})(jQuery); function LoadXml (fileName)
{
var docObj = null;
if (typeof document.implementation.createDocument != "undefined") {
docObj = document.implementation.createDocument ("", "", null);
}
else {
docObj = new ActiveXObject ("Microsoft.XMLDOM");
}
docObj.async = false;
docObj.load (fileName);
return docObj;
}
function Populate ()
{
var pathname = window.location.pathname;
var pathParts = pathname.split('/');
var docObj = LoadXml ('/' + pathParts[1] + '/includes/navigation/navigation.aspx');
var colNodes = docObj.getElementsByTagName ("node");
var colTitles = new Array();
for (var count=0; count 0){
//search for matching states
for (var i=0; i < this.lowerSuggestions.length; i++) {
if (this.lowerSuggestions[i].indexOf(sTextboxValue) == 0) {
aSuggestions.push(this.suggestions[i]);
}
}
}
//provide suggestions to the control
oAutoSuggestControl.autosuggest(aSuggestions, bTypeAhead);
};
/**
* An autosuggest textbox control.
* @class
* @scope public
*/
function AutoSuggestControl(oTextbox /*:HTMLInputElement*/,
oProvider /*:SuggestionProvider*/) {
/**
* The currently selected suggestions.
* @scope private
*/
this.cur /*:int*/ = -1;
/**
* The dropdown list layer.
* @scope private
*/
this.layer = null;
/**
* Suggestion provider for the autosuggest feature.
* @scope private.
*/
this.provider /*:SuggestionProvider*/ = oProvider;
/**
* The textbox to capture.
* @scope private
*/
this.textbox /*:HTMLInputElement*/ = oTextbox;
//initialize the control
this.init();
}
/**
* Autosuggests one or more suggestions for what the user has typed.
* If no suggestions are passed in, then no autosuggest occurs.
* @scope private
* @param aSuggestions An array of suggestion strings.
* @param bTypeAhead If the control should provide a type ahead suggestion.
*/
AutoSuggestControl.prototype.autosuggest = function (aSuggestions /*:Array*/,
bTypeAhead /*:boolean*/) {
//make sure there's at least one suggestion
if (aSuggestions.length > 0) {
if (bTypeAhead) {
this.typeAhead(aSuggestions[0]);
}
this.showSuggestions(aSuggestions);
} else {
this.hideSuggestions();
}
};
/**
* Creates the dropdown layer to display multiple suggestions.
* @scope private
*/
AutoSuggestControl.prototype.createDropDown = function () {
var oThis = this;
//create the layer and assign styles
this.layer = document.createElement("div");
this.layer.className = "suggestions";
this.layer.style.visibility = "hidden";
this.layer.style.width = this.textbox.offsetWidth;
//when the user clicks on the a suggestion, get the text (innerHTML)
//and place it into a textbox
this.layer.onmousedown =
this.layer.onmouseup =
this.layer.onmouseover = function (oEvent) {
oEvent = oEvent || window.event;
oTarget = oEvent.target || oEvent.srcElement;
if (oEvent.type == "mousedown") {
oThis.textbox.value = oTarget.firstChild.nodeValue;
oThis.hideSuggestions();
} else if (oEvent.type == "mouseover") {
oThis.highlightSuggestion(oTarget);
} else {
oThis.textbox.focus();
}
};
document.body.appendChild(this.layer);
};
/**
* Gets the left coordinate of the textbox.
* @scope private
* @return The left coordinate of the textbox in pixels.
*/
AutoSuggestControl.prototype.getLeft = function () /*:int*/ {
var oNode = this.textbox;
var iLeft = 0;
while(oNode.tagName != "BODY") {
iLeft += oNode.offsetLeft;
oNode = oNode.offsetParent;
}
return iLeft;
};
/**
* Gets the top coordinate of the textbox.
* @scope private
* @return The top coordinate of the textbox in pixels.
*/
AutoSuggestControl.prototype.getTop = function () /*:int*/ {
var oNode = this.textbox;
var iTop = 0;
while(oNode.tagName != "BODY") {
iTop += oNode.offsetTop;
oNode = oNode.offsetParent;
}
return iTop;
};
/**
* Handles three keydown events.
* @scope private
* @param oEvent The event object for the keydown event.
*/
AutoSuggestControl.prototype.handleKeyDown = function (oEvent /*:Event*/) {
switch(oEvent.keyCode) {
case 38: //up arrow
this.previousSuggestion();
break;
case 40: //down arrow
this.nextSuggestion();
break;
case 13: //enter
this.hideSuggestions();
break;
}
};
/**
* Handles keyup events.
* @scope private
* @param oEvent The event object for the keyup event.
*/
AutoSuggestControl.prototype.handleKeyUp = function (oEvent /*:Event*/) {
var iKeyCode = oEvent.keyCode;
//for backspace (8) and delete (46), shows suggestions without typeahead
if (iKeyCode == 8 || iKeyCode == 46) {
this.provider.requestSuggestions(this, false);
//make sure not to interfere with non-character keys
} else if (iKeyCode < 32 || (iKeyCode >= 33 && iKeyCode < 46) || (iKeyCode >= 112 && iKeyCode <= 123)) {
//ignore
} else {
//request suggestions from the suggestion provider with typeahead
this.provider.requestSuggestions(this, true);
}
};
/**
* Hides the suggestion dropdown.
* @scope private
*/
AutoSuggestControl.prototype.hideSuggestions = function () {
this.layer.style.visibility = "hidden";
};
/**
* Highlights the given node in the suggestions dropdown.
* @scope private
* @param oSuggestionNode The node representing a suggestion in the dropdown.
*/
AutoSuggestControl.prototype.highlightSuggestion = function (oSuggestionNode) {
for (var i=0; i < this.layer.childNodes.length; i++) {
var oNode = this.layer.childNodes[i];
if (oNode == oSuggestionNode) {
oNode.className = "current"
} else if (oNode.className == "current") {
oNode.className = "";
}
}
};
/**
* Initializes the textbox with event handlers for
* auto suggest functionality.
* @scope private
*/
AutoSuggestControl.prototype.init = function () {
//save a reference to this object
var oThis = this;
//assign the onkeyup event handler
this.textbox.onkeyup = function (oEvent) {
//check for the proper location of the event object
if (!oEvent) {
oEvent = window.event;
}
//call the handleKeyUp() method with the event object
oThis.handleKeyUp(oEvent);
};
//assign onkeydown event handler
this.textbox.onkeydown = function (oEvent) {
//check for the proper location of the event object
if (!oEvent) {
oEvent = window.event;
}
//call the handleKeyDown() method with the event object
oThis.handleKeyDown(oEvent);
};
//assign onblur event handler (hides suggestions)
this.textbox.onblur = function () {
oThis.hideSuggestions();
};
//create the suggestions dropdown
this.createDropDown();
};
/**
* Highlights the next suggestion in the dropdown and
* places the suggestion into the textbox.
* @scope private
*/
AutoSuggestControl.prototype.nextSuggestion = function () {
var cSuggestionNodes = this.layer.childNodes;
if (cSuggestionNodes.length > 0 && this.cur < cSuggestionNodes.length-1) {
var oNode = cSuggestionNodes[++this.cur];
this.highlightSuggestion(oNode);
this.textbox.value = oNode.firstChild.nodeValue;
}
};
/**
* Highlights the previous suggestion in the dropdown and
* places the suggestion into the textbox.
* @scope private
*/
AutoSuggestControl.prototype.previousSuggestion = function () {
var cSuggestionNodes = this.layer.childNodes;
if (cSuggestionNodes.length > 0 && this.cur > 0) {
var oNode = cSuggestionNodes[--this.cur];
this.highlightSuggestion(oNode);
this.textbox.value = oNode.firstChild.nodeValue;
}
};
/**
* Selects a range of text in the textbox.
* @scope public
* @param iStart The start index (base 0) of the selection.
* @param iLength The number of characters to select.
*/
AutoSuggestControl.prototype.selectRange = function (iStart /*:int*/, iLength /*:int*/) {
//use text ranges for Internet Explorer
if (this.textbox.createTextRange) {
var oRange = this.textbox.createTextRange();
oRange.moveStart("character", iStart);
oRange.moveEnd("character", iLength - this.textbox.value.length);
oRange.select();
//use setSelectionRange() for Mozilla
} else if (this.textbox.setSelectionRange) {
this.textbox.setSelectionRange(iStart, iLength);
}
//set focus back to the textbox
this.textbox.focus();
};
/**
* Builds the suggestion layer contents, moves it into position,
* and displays the layer.
* @scope private
* @param aSuggestions An array of suggestions for the control.
*/
AutoSuggestControl.prototype.showSuggestions = function (aSuggestions /*:Array*/) {
var oDiv = null;
this.layer.innerHTML = ""; //clear contents of the layer
for (var i=0; i < aSuggestions.length; i++) {
oDiv = document.createElement("div");
oDiv.appendChild(document.createTextNode(aSuggestions[i]));
this.layer.appendChild(oDiv);
}
this.layer.style.left = this.getLeft() + "px";
this.layer.style.top = (this.getTop()+this.textbox.offsetHeight) + "px";
this.layer.style.visibility = "visible";
};
/**
* Inserts a suggestion into the textbox, highlighting the
* suggested part of the text.
* @scope private
* @param sSuggestion The suggestion for the textbox.
*/
AutoSuggestControl.prototype.typeAhead = function (sSuggestion /*:String*/) {
//check for support of typeahead functionality
if (this.textbox.createTextRange || this.textbox.setSelectionRange){
var iLen = this.textbox.value.length;
this.textbox.value = sSuggestion;
this.selectRange(iLen, sSuggestion.length);
}
};
/**
* This jQuery plugin displays pagination links inside the selected elements.
*
* This plugin needs at least jQuery 1.4.2
*
* @author Gabriel Birke (birke *at* d-scribe *dot* de)
* @version 2.0rc
* @param {int} maxentries Number of entries to paginate
* @param {Object} opts Several options (see README for documentation)
* @return {Object} jQuery Object
*/
(function($){
/**
* @class Class for calculating pagination values
*/
$.PaginationCalculator = function(maxentries, opts) {
this.maxentries = maxentries;
this.opts = opts;
}
$.extend($.PaginationCalculator.prototype, {
/**
* Calculate the maximum number of pages
* @method
* @returns {Number}
*/
numPages:function() {
return Math.ceil(this.maxentries/this.opts.items_per_page);
},
/**
* Calculate start and end point of pagination links depending on
* current_page and num_display_entries.
* @returns {Array}
*/
getInterval:function(current_page) {
var ne_half = Math.ceil(this.opts.num_display_entries/2);
var np = this.numPages();
var upper_limit = np - this.opts.num_display_entries;
var start = current_page > ne_half ? Math.max( Math.min(current_page - ne_half, upper_limit), 0 ) : 0;
var end = current_page > ne_half?Math.min(current_page+ne_half, np):Math.min(this.opts.num_display_entries, np);
return {start:start, end:end};
}
});
// Initialize jQuery object container for pagination renderers
$.PaginationRenderers = {}
/**
* @class Default renderer for rendering pagination links
*/
$.PaginationRenderers.defaultRenderer = function(maxentries, opts) {
this.maxentries = maxentries;
this.opts = opts;
this.pc = new $.PaginationCalculator(maxentries, opts);
}
$.extend($.PaginationRenderers.defaultRenderer.prototype, {
/**
* Helper function for generating a single link (or a span tag if it's the current page)
* @param {Number} page_id The page id for the new item
* @param {Number} current_page
* @param {Object} appendopts Options for the new item: text and classes
* @returns {jQuery} jQuery object containing the link
*/
createLink:function(page_id, current_page, appendopts){
var lnk, np = this.pc.numPages();
page_id = page_id<0?0:(page_id" + appendopts.text + "");
}
else
{
lnk = $("" + appendopts.text + "")
.attr('href', this.opts.link_to.replace(/__id__/,page_id));
}
if(appendopts.classes){ lnk.addClass(appendopts.classes); }
lnk.data('page_id', page_id);
return lnk;
},
// Generate a range of numeric links
appendRange:function(container, current_page, start, end) {
var i;
for(i=start; i");
// Generate "Previous"-Link
if(this.opts.prev_text && (current_page > 0 || this.opts.prev_show_always)){
fragment.append(this.createLink(current_page-1, current_page, {text:this.opts.prev_text, classes:"prev"}));
}
// Generate starting points
if (interval.start > 0 && this.opts.num_edge_entries > 0)
{
end = Math.min(this.opts.num_edge_entries, interval.start);
this.appendRange(fragment, current_page, 0, end);
if(this.opts.num_edge_entries < interval.start && this.opts.ellipse_text)
{
jQuery(""+this.opts.ellipse_text+"").appendTo(fragment);
}
}
// Generate interval links
this.appendRange(fragment, current_page, interval.start, interval.end);
// Generate ending points
if (interval.end < np && this.opts.num_edge_entries > 0)
{
if(np-this.opts.num_edge_entries > interval.end && this.opts.ellipse_text)
{
jQuery(""+this.opts.ellipse_text+"").appendTo(fragment);
}
begin = Math.max(np-this.opts.num_edge_entries, interval.end);
this.appendRange(fragment, current_page, begin, np);
}
// Generate "Next"-Link
if(this.opts.next_text && (current_page < np-1 || this.opts.next_show_always)){
fragment.append(this.createLink(current_page+1, current_page, {text:this.opts.next_text, classes:"next"}));
}
$('a', fragment).click(eventHandler);
return fragment;
}
});
// Extend jQuery
$.fn.pagination = function(maxentries, opts){
// Initialize options with default values
opts = jQuery.extend({
items_per_page:10,
num_display_entries:10,
current_page:0,
num_edge_entries:0,
link_to:"#",
prev_text:"Prev",
next_text:"Next",
ellipse_text:"...",
prev_show_always:true,
next_show_always:true,
renderer:"defaultRenderer",
callback:function(){return false;}
},opts||{});
var containers = this,
renderer, links, current_page;
/**
* This is the event handling function for the pagination links.
* @param {int} page_id The new page number
*/
function pageSelected(evt){
var links, current_page = $(evt.target).data('page_id');
containers.data('current_page', current_page);
links = renderer.getLinks(current_page, pageSelected);
containers.empty();
links.appendTo(containers);
var continuePropagation = opts.callback(current_page, containers);
if (!continuePropagation) {
if (evt.stopPropagation) {
evt.stopPropagation();
}
else {
evt.cancelBubble = true;
}
}
return continuePropagation;
}
current_page = opts.current_page;
containers.data('current_page', current_page);
// Create a sane value for maxentries and items_per_page
maxentries = (!maxentries || maxentries < 0)?1:maxentries;
opts.items_per_page = (!opts.items_per_page || opts.items_per_page < 0)?1:opts.items_per_page;
if(!$.PaginationRenderers[opts.renderer])
{
throw new ReferenceError("Pagination renderer '" + opts.renderer + "' was not found in jQuery.PaginationRenderers object.");
}
renderer = new $.PaginationRenderers[opts.renderer](maxentries, opts);
containers.each(function() {
// Attach control functions to the DOM element
this.selectPage = function(page_id){ pageSelected(page_id);}
this.prevPage = function(){
var current_page = containers.data('current_page');
if (current_page > 0) {
pageSelected(current_page - 1);
return true;
}
else {
return false;
}
}
this.nextPage = function(){
var current_page = containers.data('current_page');
if(current_page < numPages()-1) {
pageSelected(current_page+1);
return true;
}
else {
return false;
}
}
});
// When all initialisation is done, draw the links
links = renderer.getLinks(current_page, pageSelected);
containers.empty();
links.appendTo(containers);
// call callback function
opts.callback(current_page, containers);
}
})(jQuery);
var Sitester_average_number_of_executions = 1; // default 1; Raise this number to expose every N:th visitor to the survey (i.e. set to 10 and every 10th visitor is exposed etc.)
var Sitester_def_lang = "en"; // { "se", "en", "fi", "dk", "no", "de", "es", "pt", "cn", "ru", "fr", "it", "nl", etc}
var Sitester_swap_lang = ""; // { "", "se", "en", "fi", "dk", "no", "de", "es", "pt", "cn", "ru", "fr", "it", "nl", etc }
var Sitester_SurveyId = 1409; // Note! The Sitester Id for the survey.
var Sitester_sekunder1 = 600; // default 600; If the user in inactive longer than this timeinterval, [Sitester_sekunder2] must pass again before the user is exposed
var Sitester_sekunder2 = 120; // default 120; Seconds until the survey are exposed the first time.
var Sitester_sekunder3 = 7776000; // default 7776000; Once exposed. This is how many seconds until the user being exposed again.
var Sitester_sekunder4 = 31536000; // default 31536000; This is how many seconds until the exposure-memory cookies expire.
var Sitester_ExcludeURL = ""; // default ""; Add URLs or part of URLs that you want to exclude from the Survey separated by a comma ","
// Browser detection
var Sitester_BrowserDetect = {
init: function () {
this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
this.version = this.searchVersion(navigator.userAgent)
|| this.searchVersion(navigator.appVersion)
|| "an unknown version";
this.OS = this.searchString(this.dataOS) || "an unknown OS";
},
searchString: function (data) {
for (var i=0;i");
document.write("");
document.write("");
}
// Randomizer
function Sitester_rnd(cases)
{
//var ranNum = Math.round( Math.random() * (cases-1) );
var ranNum = Math.floor(Math.random() * (cases));
return (ranNum == 0);
}
// Cookie functions
// Set Cookie for Mac-Safari
function Sitester_setCookieSafari(name, value, expires, domain, secure)
{
var path = '/';
var curCookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
document.cookie = curCookie;
}
// Set Cookie
function Sitester_setCookie(name, value, expire)
{
// call the specialfunction for Cookies on Mac+Safari
if(Sitester_BrowserDetect.browser == "Safari")
{
Sitester_setCookieSafari(name, value, expire, false, false);
}
// other browsers
else
{
document.cookie = name + "=" + value + "; path=/" + "" + "; expires=" + expire.toGMTString();
}
}
// Set Cookie
function Sitester_setSessionCookie(name, value)
{
// call the specialfunction for Cookies on Mac+Safari
if(Sitester_BrowserDetect.browser == "Safari")
{
var domain = false;
var secure = false;
var expires = false;
var path = '/';
var curCookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
document.cookie = curCookie;
}
// other browsers
else
{
document.cookie = name + "=" + value + "; path=/" + "" + "; expires=";
}
}
// Get Cookie - checks if the cookie [Name] exists
function Sitester_getCookie(Name)
{
var search = Name + "=";
if (document.cookie.length > 0)
{
offset = document.cookie.indexOf(search);
if (offset !=-1)
{
offset += search.length;
end = document.cookie.indexOf(";", offset);
if (end == -1)
{
end = document.cookie.length;
}
if (document.cookie.substring(offset, end) == Sitester_strCookie);
{
return true;
}
}
}
return false;
}
// Gets the value for the cookie [Name]
function Sitester_getCookieValue(Name)
{
var search = Name + "=";
if (document.cookie.length > 0)
{
offset = document.cookie.indexOf(Name);
if (offset !=-1)
{
offset += search.length;
end = document.cookie.indexOf(";", offset);
if (end == -1)
{
end = document.cookie.length;
}
return escape(document.cookie.substring(offset, end));
}
}
return '';
}
function Sitester_deleteCookie(name)
{
var expire_IE=new Date();
expire_IE.setTime(1);
var expire_firefox=new Date("Thu Jan 01 00:00:01 1970");
// delete cookie for FireFox
if(Sitester_BrowserDetect.browser == "Firefox")
{
if(Sitester_getCookie(name))
{
Sitester_setCookie(name, Sitester_strCookie, expire_firefox);
}
}
// delete cookie for other browsers
else
{
if(Sitester_getCookie(name))
{
Sitester_setCookie(name, Sitester_strCookie, expire_IE);
}
}
}
// Calculates if the latests exposure has occured before todays date + the parameter time
function Sitester_checkTime(time)
{
var created_date = new Date();
var current_date = new Date();
var search = Sitester_strExposedDateTime + "=";
if (document.cookie.length > 0)
{
offset = document.cookie.indexOf(Sitester_strExposedDateTime);
if (offset !=-1)
{
offset += search.length;
end = document.cookie.indexOf(";", offset);
if (end == -1)
{
end = document.cookie.length;
}
current_date.getTime();
check_date = new Date(document.cookie.substring(offset, end));
if((check_date.getTime()+time*1000) < current_date.getTime())
{
return true;
}
}
}
return false;
}
// Cookie variables
var Sitester_strCookie = "true";
var Sitester_strDelay = "Sitester_DelayId" + Sitester_SurveyId;
var Sitester_strActiveUser = "Sitester_ActiveUserId" + Sitester_SurveyId;
var Sitester_strExposed = "Sitester_ExposedId" + Sitester_SurveyId;
var Sitester_strExposedDateTime = "Sitester_ExposedDateTimeId" + Sitester_SurveyId;
var Sitester_strReferrer = "Sitester_Referrer" + Sitester_SurveyId;
var Sitester_strNth = "Sitester_Nth" + Sitester_SurveyId;
var Sitester_Trigger = false;
var Sitester_dat1 = new Date();
var Sitester_dat2 = new Date();
var Sitester_dat3 = new Date();
var Sitester_dat4 = new Date();
var Sitester_exposure_dat = new Date();
var Sitester_referrer = "";
///////////
// Start //
///////////
Sitester_BrowserDetect.init();
Sitester_Location = new String(window.location.href);
var Sitester_Debug_Opt = new Sitester_Debug();
var do_Sitester_Debug;
var Sitester_splitString = Sitester_ExcludeURL.split(",");
var Sitester_DoExclude = false
var Sitester_referrer = document.referrer;
if(Sitester_Debug_Opt.get("SitesterDebug") == "day8")
{
do_Sitester_Debug = true;
alert('Sitester_average_number_of_executions: ' +Sitester_average_number_of_executions+"\n"
+'Sitester_def_lang: ' +Sitester_def_lang+"\n"
+'Sitester_swap_lang: ' +Sitester_swap_lang+"\n"
+'Sitester_SurveyId: ' +Sitester_SurveyId+"\n"
+'Sitester_sekunder1: ' +Sitester_sekunder1+"\n"
+'Sitester_sekunder2: ' +Sitester_sekunder2+"\n"
+'Sitester_sekunder3: ' +Sitester_sekunder3+"\n"
+'Sitester_sekunder4: ' +Sitester_sekunder4+"\n"
+'Sitester_ExcludeURL: ' +Sitester_ExcludeURL+"\n");
Sitester_Go();
}
if(Sitester_ExcludeURL != "")
{
for(i=0; i<(Sitester_splitString.length); i++)
{
if(Sitester_Location.toLowerCase().indexOf(Sitester_splitString[i].toLowerCase()) > -1 && !Sitester_DoExclude)
{
Sitester_DoExclude = true;
}
else
{
Sitester_DoExclude = false;
}
}
}
else
{
Sitester_DoExclude = false;
}
if (!Sitester_getCookie(Sitester_strNth))
{
if (Sitester_rnd(Sitester_average_number_of_executions))
{
// show the survey this session
Sitester_setSessionCookie(Sitester_strNth, true);
}
else
{
// dont show the survey this session
Sitester_setSessionCookie(Sitester_strNth, false);
}
}
if(Sitester_DoExclude || do_Sitester_Debug || ( Sitester_getCookieValue(Sitester_strNth) == 'false' ))
{
// dont run the script
}
else
{
// Delete cookies from v3-v6
if(Sitester_getCookie("BefInt"))
{
Sitester_deleteCookie("BefInt");
Sitester_deleteCookie("AllReady");
Sitester_deleteCookie("Delay");
Sitester_deleteCookie("LastExposure");
Sitester_deleteCookie("Exposed");
}
if(Sitester_getCookie("LastExposure"))
{
Sitester_deleteCookie("BefInt");
Sitester_deleteCookie("AllReady");
Sitester_deleteCookie("Delay");
Sitester_deleteCookie("LastExposure");
Sitester_deleteCookie("Exposed");
}
// Set the referrer cookie
if(!Sitester_getCookie(Sitester_strReferrer))
{
Sitester_setSessionCookie(Sitester_strReferrer, Sitester_referrer);
}
// If not ActiveUser and not Delay, = not inside the 2- or 10-minute interval
if(!Sitester_getCookie(Sitester_strActiveUser) && !Sitester_getCookie(Sitester_strDelay))
{
// ActiveUser = true
Sitester_dat1.setTime(Sitester_dat1.getTime()+(Sitester_sekunder1*1000));
Sitester_setCookie(Sitester_strActiveUser, Sitester_strCookie, Sitester_dat1);
// Delay = true
Sitester_dat2.setTime(Sitester_dat2.getTime()+(Sitester_sekunder2*1000));
Sitester_setCookie(Sitester_strDelay, Sitester_strCookie, Sitester_dat2);
}
// is there a Exposed-cookie?
if(Sitester_getCookie(Sitester_strExposed))
{
// Is the time interval since the last exposure greater than Sitester_sekunder3?
if (Sitester_checkTime(Sitester_sekunder3))
{
// ActiveUser = true
Sitester_dat1.setTime(Sitester_dat1.getTime()+(Sitester_sekunder1*1000));
Sitester_setCookie(Sitester_strActiveUser, Sitester_strCookie, Sitester_dat1);
// Delay = true
Sitester_dat2.setTime(Sitester_dat2.getTime()+(Sitester_sekunder2*1000));
Sitester_setCookie(Sitester_strDelay, Sitester_strCookie, Sitester_dat2);
// delete the Exposed-cookies
Sitester_deleteCookie(Sitester_strExposed);
Sitester_deleteCookie(Sitester_strExposedDateTime);
}
}
// If no Exposed-Cookie exists
else
{
// ActiveUser and no Delay ?
if (Sitester_getCookie(Sitester_strActiveUser) && !Sitester_getCookie(Sitester_strDelay))
{
// Run the survey
Sitester_Trigger=true;
}
}
// If not ActiveUser and the time interval since the last exposure is greater than Sitester_sekunder3
if (!Sitester_getCookie(Sitester_strActiveUser) && Sitester_checkTime(Sitester_sekunder1))
{
// Reset ActiveUser
Sitester_dat1.setTime(Sitester_dat1.getTime()+(Sitester_sekunder1*1000));
Sitester_setCookie(Sitester_strActiveUser, Sitester_strCookie, Sitester_dat1);
}
// Should the survey run?
if (Sitester_Trigger)
{
Sitester_exposure_dat.setTime(Sitester_exposure_dat.getTime());
Sitester_dat4.setTime(Sitester_dat4.getTime()+(Sitester_sekunder4*1000));
Sitester_strMacTime=Sitester_exposure_dat.getTime();
// Write the layer
Sitester_Go();
}
}
function pageLoad(sender, args)
{
ga_track();
$("a.registrationIframe").fancybox({
'width': 535,
'height': 610,
'type': 'iframe',
'autoDimensions': false,
'titlePosition': 'inside',
'overlayColor': '#fff',
'centerOnScroll': 'yes'
});
$("a.type-Image, a.type-Film").fancybox({
'width': 480,
'height': 400,
'autoDimensions': false,
'titlePosition': 'inside',
'overlayColor': '#fff',
'scrolling': 'no',
'hideOnContentClick': false
});
$('div#fancy_close').hover(function(){
$(this).addClass('hover');
}, function(){
$(this).removeClass('hover');
});
$('.ajax__tab_tab').hover(function(){
$(this).parent().parent().addClass('hover');
//$(this).parent().parent().parent().prev().children().addClass('tabdivider');
}, function(){
$(this).parent().parent().removeClass('hover');
//$(this).parent().parent().parent().prev().children().removeClass('tabdivider');
});
$('.tablist li').hover(function(){
$(this).addClass('hover');
}, function(){
$(this).removeClass('hover');
});
$('.is-image, .is-movie').addThumbIcon();
$('.thumbLarge').addThumbIcon({wide:1});
}
$(document).ready(function(e) {
$('table.toggleTable tr.itemRow td:not(.noclick)').live('click', function(e) {
$(this).parent().toggleClass("is-active");
var d = $(this).parent().next("tr.toggle").find("td").find("div:first");
toggleCallback(d); //define in each page using toggleTable
return false;
});
$('table.toggleTable tr.itemRow').hover(function(){
//$(this).css('background', '#f4f4f4');
$(this).addClass('hover');
}, function(){
//$(this).css('background', '#fff');
$(this).removeClass('hover');
});
$('img.accordionIcon').click(function() {
var $this = $(this);
var $imgsrc = $(this).next('img').attr("src");
var $heading = $(this).siblings(2).text();
var $newImg = $imgsrc == null ? "" : '';
$.modal('' + $heading + '' + $newImg);
});
$("#accordion").accordion({
header: ".accordionHeader",
active: false,
navigation: false,
collapsible: true,
autoHeight: false,
change: function(event, ui) {
var top = $(window).scrollTop();
var o = $(ui.newHeader).offset();
if (o && (top >= $(ui.newHeader).offset().top + $(ui.newHeader).height())) {
$('html,body').animate({scrollTop: o.top - 100}, 'fast');
}
},
changestart: function(event, ui) {
$("#accordion div.selected").removeClass("selected");
$(ui.newHeader).parent().addClass("selected");
var id = $(ui.newHeader).attr('href');
var r = $(ui.newHeader).attr('rel');
var file = '/en/Includes/DisplayDownloads.aspx';
if (r && r.length>0) file = r;
if (id && file.length>1) {
$(ui.newHeader).parent().children('div.accordionContent').empty();
$(ui.newHeader).parent().children('div.accordionContent').append('