<!--
dojo.require("dojo.fx.easing");
dojo.require("dojox.fx.scroll");
dojo.require("dijit.TitlePane");
dojo.require("dojo.parser");	

dojo.provide("pwc.Fader");
dojo.require("dijit._Widget");
dojo.declare(
	"pwc.Fader",
	[dijit._Widget],
{
	duration: 2000,
	
	_setDurationAttr: function(duration) {
		this.duration = (duration / 2);
	},
	
	postCreate: function() {
		this.inherited(arguments);
		
		dojo.style(this.domNode, {
			opacity: 0,
			display: 'block'
		});
		
		var self = this;
		this._fadeIn = dojo.fadeIn({
			node: this.domNode,
			beforeBegin: function() {
				this.duration = self.duration;
			},
			onEnd: dojo.hitch(this, function() {
				this._fadeOut.play()
			})
		});	
		
		this._fadeOut = dojo.fadeOut({
			node: this.domNode,
			beforeBegin: function() {
				this.duration = self.duration;
			},
			onEnd: dojo.hitch(this, function() {
				this._fadeIn.play()
			})
		});	
			
	},
	
	startup: function() {
		if (this.started) return;

		this._fadeIn.play();
		
		this.inherited(arguments);
	}
});
	

function showPulldown(nummer) {
	//if (nummer != 285) {
		clearTimeout(timeOn); 	
		hideAllLayers(); 
		showLayer(nummer); 
		clearTimeout(timeOn); 
		//return true;
	//}
}

function clearField(field) {
  // Check if field contains the default value
  if (field.value == field.defaultValue) {
    // It does, so clear the field
    field.value = "";
  }
}

function toggleDiv(divje) {
	var speed = 1000;
	var spacer = 250;
	var node = dojo.byId(divje);
	
	if (node._anim) {
		node._anim.stop();
	}
	
	if (dojo.style(node,"display") == "none") {
		node._anim = dojo.fx.wipeIn({
			node: node,
			duration: speed,
			easing: dojo.getObject("dojo.fx.easing.expoOut")
		})
		node._anim.play();
	}
	else {
		node._anim = dojo.fx.wipeOut({
			node: node,
			duration: speed,
			easing: dojo.getObject("dojo.fx.easing.expoOut")
		});
		node._anim.play();
	}
}

// -->


