/*--------------------------------------------------------------------
Basic Javascript Sheet - Frontoffice

Version: 1.0
Copyright: 2008, dicode® VOF - understanding internet
W: www.dicode.nl
E: info@dicode.nl
T: 0570-750680
--------------------------------------------------------------------*/

/* Global
--------------------------------------------------------------------*/

/* remove url dotted border */
$(document).ready(function() {
	
	var arr = document.getElementsByTagName('a');
	for(i = 0; i < arr.length; i++)
		arr[i].onfocus = new Function("this.blur()");
	
	var arr = document.getElementsByTagName('input');
	for(i = 0; i < arr.length; i++)
		if(arr[i].className == 'button')
			arr[i].onfocus = new Function("this.blur()");
			
	//FormElements.init();

	$('.popupwindow').each( function(index) {
		$(this).popupwindow({ front : {
			height:768,
			width:1024,
			toolbar:1,
			scrollbars:1,
			status:1,
			resizable:1,
			left:0,
			top:0,
			center:1,
			createnew:0,
			location:1,
			menubar:1
		} });
	});

	$('*').ifixpng();
    
    $('.eo').emptyonclick();

	switchHeader(1,2);
	//setTimeout($.sprintf('switchHeader(%d, %d)', 1, 2), 10000);
});

function switchHeader( a, b ) {
	$($.sprintf('#id_head%d', a)).fadeOut(4000);
	$($.sprintf('#id_head%d', b)).fadeIn(4000);
	
	setTimeout($.sprintf('switchHeader(%d, %d)', b, a), 10000);
}
