window.addEvent('domready', function(){
	var i = 0;	
	var accordion = new Array();
	$$('.tx-irfaq-pi1').each(function(container){
		accordion[i] = new Accordion( 	'.accToggler', 
										'.accContent', 
										{	onActive: function(toggler, element){
												toggler.addClass('selToggler');
											},
										 
											onBackground: function(toggler, element){
												toggler.removeClass('selToggler');
											},
											alwaysHide: true,
											display: -1
										},
										container
									);
		i++;
	});
	
	if ($('topsearchfield')) {
		$('topsearchfield').setProperty('rel', $('topsearchfield').getValue());
		
		//for default value in search field
		$('topsearchfield').addEvent("focus", function() {
			if(this.getValue() == this.getProperty("rel")) {
				this.value = "";
			}
		});
	 
		$('topsearchfield').addEvent("blur", function() {
			if(this.getValue() == "") {
				this.value = this.getProperty("rel");
			}
		});
	}
	 
	//create dialog instance for waiting message
	window.dialog = new Dialog();
	
});

function initDownload(url, msg) {
	window.dialog.show(msg);
	$('downloaddummy').src = url;
}