function changeColor(colorSrc,colorName){
	$('#img_chip').attr({src:colorSrc});
	$('#nameColor').html("<strong>"+colorName+"</strong>");
}
function jquery_changeImage(pictureSrc,showColor){
	$('#image_center').attr({src:pictureSrc});
	$('.jqueryColor').hide();
	$("#"+showColor).toggle();
}
function jquery_hideSwatch(id){
	$('#div'+id).empty();
	$('#img'+id).show();
	
}
function jquery_showOverSwatch(colorSrc,id,name,link){
	$('.jquery_swatch').hide();
	
	if (link == ''){
		link = '#';
	}
	
	var htmlContent = "";
	var htmlContent = "<div style=\"position:absolute;top:-10px;left:-10px;z-index:8;\">"+
	"<table width=\"92\" cellspacing=\"0\" cellpadding=\"1\" border=\"0\" bgcolor=\"#000066\">" +
	"<tr>" +
	"<td valign=\"top\">"+
		"<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" bgcolor=\"#ffffff\">" +
			"<tr valign=\"top\" >" +
				"<td rowspan=\"7\" onmouseout=\"jquery_hideSwatch('"+id+"')\"><img id=\"ciRoLeft_"+id+"\" src=\"swatch/1pix.gif\" width=\"9\" height=\"1\" border=\"0\" alt=\"\" /></td>" +
				"<td height=\"9\" width=\"100%\" onmouseout=\"jquery_hideSwatch('"+id+"')\"><img src=\"swatch/1pix.gif\" width=\"1\" height=\"9\" border=\"0\" alt=\"\" /></td>" +
				"<td rowspan=\"7\" onmouseout=\"jquery_hideSwatch('"+id+"')\"><img id=\"ciRoRight_"+id+"\" src=\"swatch/1pix.gif\" width=\"9\" height=\"1\" border=\"0\" alt=\"\" /></td>" +
			"</tr>" +
			"<tr><td><a href=\""+link+"\" onClick=\"changeColor('"+colorSrc+"','"+name+"')\"><img src=\""+colorSrc+"\" width=\"72\" height=\"31\" border=\"0\" alt=\"\" /></a></td></tr>" +
			"<tr><td class=\"colourlink\"><a href=\""+link+"\" onClick=\"changeColor('"+colorSrc+"','"+name+"')\">"+name+"</a><br /></td></tr>" +
			"<tr></tr><tr><td height=\"9\" onmouseout=\"jquery_hideSwatch('"+id+"')\"><img src=\"swatch/1pix.gif\" width=\"1\" height=\"9\" border=\"0\" alt=\"\" /></td></tr>" +
		"</table></td>" +
	"</tr>" +
	"</table>"+
	"</div>";
	$('#div'+id).html(htmlContent).show();
}

function jquery_showEffect(effekt){
	$('.middleContent').hide();
	$('#image_kreative').attr({src:'images/transparent.gif'});
	$("#"+effekt).toggle();
	$('.rightContent').hide();
	$("#"+effekt+"_start").toggle();
	$('.jquery_leftmenu').css({color:"white"});
	$('.jquery_img_leftmenu').attr({src:'images/arrow_white_0.gif'});
	$("#link_"+effekt).css({color:"#091858"});
	$("#img_link_"+effekt).attr({src:'images/arrow_white_1.gif'});
	$("#"+effekt+"_print").toggle();
}
function jquery_showLacke(effekt){
	$('.middleContent').hide();
	$('.middleContentStart').hide();
	$('#right_menu').attr({height:'215'});
	$('#image_kreative').attr({src:'images/transparent.gif'}).attr({height:'0'}).attr({width:'0'});
	$("#"+effekt).toggle();
	$('.rightContent').hide();
	$("#"+effekt+"_step1").toggle();
	$('.jquery_leftmenu').css({color:"#FFFFFF"});
	$('.jquery_img_leftmenu').attr({src:'images/arrow_white_0.gif'});
	$('#span_img_printer').hide();
	$('#rightContent').html('Ausf&uuml;hrliche Informationen zu den Arbeitsschritten in diesem Bereich erhalten Sie  -einfach und schnell - durch Mouse-Klick auf das entsprechende Anwendungsfoto.');
	$("#link_"+effekt).css({color:"#091858"});
	$("#img_link_"+effekt).attr({src:'images/arrow_white_0.gif'});
	$('#div_definition').css({'height':'215px','overflow':'hidden','width':'240px'});
}
function jquery_showEffekte(effekt){
	$('.middleContent').hide();
	$('.middleContentStart').hide();
	$('#image_kreative').attr({src:'images/transparent.gif'}).attr({height:'0'}).attr({width:'0'});
	$("#"+effekt).toggle();
	$('.rightContent').hide();
	$("#"+effekt+"_step1").toggle();
	$('.jquery_leftmenu').css({color:"#FFFFFF"});
	$('.jquery_img_leftmenu').attr({src:'images/arrow_white_0.gif'});
	$('#span_img_printer').hide();
	$("#link_"+effekt).css({color:"#091858"});
	$("#img_link_"+effekt).attr({src:'images/arrow_white_0.gif'});
	if (effekt == 'werkzeuge'){
	 $('#td_definition').hide();
	}else{
	 $('#td_definition').show();
	}
	$('#div_definition').css({'height':'263px','overflow':'hidden','width':'240px'});
	$.ajax({
   		url: 'xml/lacke.xml',
	    type: 'GET',
	    dataType: 'xml',
	    error: function(){
       	alert('Error loading XML document');
   		},
	    success: function(xmlData){
			$('#rightContent').html($(effekt+'_start',xmlData).text().replace(/#{#/g,'<').replace(/#}#/g,'>').replace(/\[/g,'<').replace(/\]/g,'>'));
			$('#div_definition').show();
		}
	});
	
}
function jquery_showContent(content){
	$('.rightContent').hide();
	$("#"+content).toggle();
	id = content.substring(0,(content.indexOf('_')));
	$("#link_"+id).css({color:"#091858"});
		$("#"+id+"_print").show();
	$("#img_link_"+id).attr({src:'images/arrow_white_1.gif'});
}
function jquery_showHighlightedHeader(idShow, idHide, newHeight){
	$("#link_"+idShow).css({color:"#091858"});
	$("#img_link_"+idShow).attr({src:'images/arrow_white_1.gif'});
	$("#link_"+idHide).css({color:"#FFFFFF"});
	$("#img_link_"+idHide).attr({src:'images/arrow_white_0.gif'});
	$("#image_"+idShow).show();
	$("#image_"+idHide).hide();
	$("#image_start").hide();
	$("#"+idHide).hide();
	$("#"+idShow).show();
	$('.middleContentStart').show();
	$('.middleContent').hide();
	$('#rightContent').empty();
	$('#span_img_printer').hide();
	$('#right_menu').attr({height:newHeight});
	$('#div_definition').css({'width':'240px','height':newHeight,'overflow':'hidden'});
	$('#rightContent').html('Vom "Selber machen" zum "Besser machen"<br/><br/>In zwanzig bebilderten Beispielen zeigen wir Ihnen auf dieser Seite, wie die perfekt aufeinander abgestimmten DULUX-Produkte Sie bei Ihrem DIY-Projekt wirkungssicher unterst&uuml;tzen.<br/><br/>So kommen auch Einsteiger Schritt f&uuml;r Schritt zu einem professionellen Ergebnis.');
}
function jquery_assignHeader(highLighted){
	switch (highLighted){
		case 'inspiration':
			$('#menu_inspiration').attr({src:'images/menu/nav_insp_on_189x20.gif'});
		break;
		case 'produkte':
			$('#menu_product').attr({src:'images/menu/nav_col_on_190x20.gif'});
		break;
		case 'tipps':
			$('#menu_tipps').attr({src:'images/menu/nav_mpro_on_189x20.gif'});
		break;
		case 'news':
			$('#menu_news').attr({src:'images/menu/nav_prct_on_190x20.gif'});
		break;
	}

}
function jquery_rollover(item,rollover){
	$("#"+item).attr({src:'images/'+rollover});
	jquery_assignHeader(highLighted);
	
}
function jquery_change_page(newhref,id){
	$("#"+id).attr({href:newhref});
}
function jquery_showSubject(id,extraline){
	var str_br = '';
	if (extraline > 0){
		for (x=0;x<extraline;x++){
			str_br += "<br/>";
		}
	}
	$('#spacer').html(str_br);
	$('.answer').hide();
	$('#answer').show();
	$('#'+id).show();
}
function jquery_show_product(imgsrc,name){
	$('#jquery_product_image').attr({src:'images/product/'+imgsrc});
	$('#jquery_product_name').html(name);
	$('#jquery_div_product').show();
}