
fillSpec = function() {
	
	var si = $('spec_id').value;
    
	new Ajax.Request('?P=ajaxmod', {	
		method: 'get',
		parameters: 'ajax_opt=spec_data&spec_id=' + si,
		onFailure: function(resp) { 
		},
		onSuccess: function(resp) {
		    	
			var thData = resp.responseText.evalJSON(true);
                        
			tagPlace(si);
            
			$('tag-holder-spec').setStyle({
				width: thData.width + 'px',
				height: thData.height + 'px'
				//backgroundColor: ('#' + thData[4])
			});
			
		}	
	});
} // einde function	

tagPlace = function(si) {
	
	new Ajax.Request('?P=ajaxmod', {	
		method: 'get',
		parameters: 'ajax_opt=tagsspec&active=1&spec_id=' + si,
		onSuccess: function(resp) {
			var tags = resp.responseText.evalJSON(true);
			
			var tags_html = '';
			
			tags.each( function( data ) {
				tags_html += '<div id="tag_' + data.id + '" class="tag" style="position: absolute; font-size:' + data.fsize + 'px;margin:' + data.posy + 'px 0 0 ' + data.posx + 'px;">';
				tags_html += '<a href="' + data.url + data.turl + '" style="text-decoration: none; color: #' + data.color + ';">' + data.title + '</a></div>';
			});
			
			$('tag-holder-spec').update(tags_html);
		} // einde function	
			

	});
} // einde function	