var xmlHttp = null;
// Mozilla, Opera, Safari sowie Internet Explorer 7
if (typeof XMLHttpRequest != 'undefined') {
	xmlHttp = new XMLHttpRequest();
}
if (!xmlHttp) {
	// Internet Explorer 6 und älter
	try {
		xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
	} catch(e) {
		try {
			xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
		} catch(e) {
			xmlHttp  = null;
		}
	}
}

/* Bei dem Teaser rechts oben auf der Startseite ('flash_content') 
 * neuen Inhalt */
function change_flash_content(video_nr)
{
	var obj = document.getElementById('flashcontent');
	//obj.removeChild(obj.firstChild);
	
	//Content nachladen
	if(xmlHttp) {
		var load_div = document.getElementById("loading");
		if(load_div != null)
			load_div.style.display = "block";

		xmlHttp.open('GET', 'http://shopde.basler-haarkosmetik.de/out/1/html/0/dyn_images/content.'+video_nr+'.html', true);
		xmlHttp.onreadystatechange = function() {
			if(xmlHttp.readyState == 4) {
				var werte = xmlHttp.responseText;
				obj.innerHTML = werte;
				
				if(load_div != null)
					load_div.style.display = "none";

				//Fuer IE6 - PNG-Bilder durchsichtig darstellen
				correctPNG();
			}
		};
		xmlHttp.send(null);
	}
}

function change_content(wohin)
{
	
	//SWF nur auf der Startseite anzeigen
	if(wohin == 'start')
		document.getElementById("flash_video_container").style.display = "block";
	else
		document.getElementById("flash_video_container").style.display = "none";
	
	//Content nachladen
	if(xmlHttp) {
		var load_div = document.getElementById("loading");
		if(load_div != null)
			load_div.style.display = "block";
		
		xmlHttp.open('GET', 'incs/'+wohin+'.html', true);
		xmlHttp.onreadystatechange = function() {
			if(xmlHttp.readyState == 4) {
				var werte = xmlHttp.responseText;
				var output_div = document.getElementById("main");
				output_div.innerHTML = werte;
				
				if(load_div != null)
					load_div.style.display = "none";
			}
		};
		xmlHttp.send(null);
	}
}

