/**
 * Configuration for site components javascript
 *
 * Configuration array structure:
 * {<component>: {<parameter>: value, <parameter>: value, ... }, ...}
 */
var siteComponentsConfig = {
    'tooltip': {
        'positionby': 'element' //Valid values: mouse (default), element
     },

    'keywords': {
        'elements': ['placeholder-content'],
        'skiptags': ['h1','h2','h3','h4','h5','h6'],
        'usetooltip': true
    }
    
    /*
    // Use this to override the default fontsizes in the fontsize selector
    // (html/lib/fontsize.js)
    
    'fontsize': {
        'sizes': ["10pt", "15pt", "24pt"]
    }
    */
    
};

var articleMouseoverTimerID = 0;

function showArticlelistMouseoverImage(url, imageWidth, imageHeight) {
	
	if (imageHeight > 250) {
		imageHeight = 250;
	}
	
	$$('.article-mouseoverimage').each(function(element) {
		element.update('<img src="' + url + '" />');
		
		element.setStyle({
			display: 'block',
			width: imageWidth + 'px',
			height: imageHeight + 'px'
		});
		
		if (articleMouseoverTimerID > 0) {
			// Cancel existing timeouts (multiple mouseovers)
			clearTimeout(articleMouseoverTimerID);
		}
		articleMouseoverTimerID = setTimeout('hideArticlelistMouseoverImage()', 10000);
	});
}

function hideArticlelistMouseoverImage() {
	$$('.article-mouseoverimage').each(function(element) {
		Effect.Fade(element, { duration: 3.0 });
	});
}

function clearTextinput(element, value) {
	if(element.value == value) {
		element.value = '';
	}
	
}
