/*
 * Javascript Functions
 *
 * Copyright (c) CLICKSPORTS
 * $Rev: 14 $
 * $Author: cs $
 * $Date: 2009-04-16 14:05:38 +0200 (Do, 16 Apr 2009) $
 *
 */

// Run stuff when dom is loaded
document.observe("dom:loaded", function() {
	getOldCompat();
});

/*
 * Set some values that cannot be set directly because
 * of the old template structure
 */
function getOldCompat() {
	
	// Set spacer gifs to corret height
	$$('div#content_inset td').each(function(td) {
		
		// Set correct backgrounds
		bg = td.getAttribute('background');
		
		if(bg == "grafiken/feldum.gif" || bg == "../../grafiken/feldum.gif" || bg == "grafiken/menuelom.gif" || bg == "grafiken/fmw.gif") {
			td.setStyle({
				backgroundRepeat: 'repeat-x',
			});
		}
		
	});
	
	$$('div#content_inset img').each(function(img) {
		
		// Get the image source
		src = img.getAttribute('src');
		
		if(src == 'grafiken/feldel.gif') {
			img.hide();
		}
		
	});
	
}
