function ShowHideProdPics(elemID,maxCount)
{
    
    var currentZIndex;
    var newZIndex; 
    
    for(i = 0;i < maxCount; i++)
    {
      var picid;
      picid = "add_pic_" + i;
      if(elemID == picid)
        document.getElementById(picid).style.display = "block";
      else
        document.getElementById(picid).style.display = "none";
    
    }
    
}

function openPopup(path,w,h){
	
	window.open(path,"newWin","width=" + w + ",height=" + h + ",left=50,top=20,resizable=yes");
  
}

function showMenu() {
	var nav_main = document.getElementById('nav_main');
	nav_main.style.display = 'block';

	var nav_innen = document.getElementById('nav_innen');
	nav_innen.style.height = "450px"

}
function hideMenu() {
	var nav_main = document.getElementById('nav_main');
	nav_main.style.display = 'none';

	var nav_innen = document.getElementById('nav_innen');
	nav_innen.style.height = "0px"
}

function showSWF(img,wsize,hsize,idname,wmode,bgcolor){
	document.write("<object id=\"" + idname + "\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" align=\"middle\" width=\"" + wsize + "\" height=\"" + hsize + "\">");
	document.write("<param name=\"movie\" value=\"" + img + "\">");
	document.write("<param name=\"quality\" value=\"high\">");
	document.write("<param name=\"wmode\" value=\"" + wmode + "\">");
	document.write("<param name=\"bgcolor\" value=\"" + bgcolor + "\">");
	document.write("<embed wmode=\"" + wmode + "\" bgcolor=\"" + bgcolor + "\" src=\"" + img + "\" name=\"" + idname + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + wsize + "\" height=\"" + hsize + "\"></embed>");
	document.write("</object>");
}

function showLayer(elemID){
	document.getElementById(elemID).style.display = "block";
}
function hideLayer(elemID){
	document.getElementById(elemID).style.display = "none";
}

function printZoom(filepath,w,h){

	var nw = window.open(filepath, "nw", "width=" + w + ",height=" + h + ",left=200,top=200");
	nw.print();

	return;
}

function showResultsProducts(){
	document.getElementById("search_products").style.display = 'block';
	document.getElementById("search_news").style.display = 'none';
	document.getElementById("search_content").style.display = 'none';

	document.getElementById("navi_products").className = 'navi_pro_hl';
	document.getElementById("text_pro").className = 'navi_hl';

	document.getElementById("navi_pages").className = 'navi_pages';
	document.getElementById("navi_news").className = 'navi_news';
	document.getElementById("text_page").className = 'navi';
	document.getElementById("text_news").className = 'navi';

}

function showResultsContent(){
	document.getElementById("search_products").style.display = 'none';
	document.getElementById("search_news").style.display = 'none';
	document.getElementById("search_content").style.display = 'block';


	document.getElementById("navi_pages").className = 'navi_pages_hl';
	document.getElementById("text_page").className = 'navi_hl';

	document.getElementById("navi_products").className = 'navi_pro';
	document.getElementById("navi_news").className = 'navi_news';
	document.getElementById("text_pro").className = 'navi';
	document.getElementById("text_news").className = 'navi';
}

function showResultsNews(){
	document.getElementById("search_products").style.display = 'none';
	document.getElementById("search_content").style.display = 'none';
	document.getElementById("search_news").style.display = 'block';

	document.getElementById("navi_news").className = 'navi_news_hl';
	document.getElementById("text_news").className = 'navi_hl';

	document.getElementById("navi_pages").className = 'navi_pages';
	document.getElementById("navi_products").className = 'navi_pro';
	document.getElementById("text_pro").className = 'navi';
	document.getElementById("text_page").className = 'navi';
}

function init()
{
	var arr_url;
	arr_url = window.location.search.split("&");

	show_products = true;
	show_news = false;
	show_pages = false;

	for(i=0;i<arr_url.length;i++)
	{
		split = arr_url[i].split("=");

		if(split[0] == "mode")
		{
			if(split[1] == "p")
			{
				showResultsContent();
				show_products = false;
				show_news = false;
			}
			else if(split[1] == "n"){
				showResultsNews();
				show_products = false;
				show_news = false;
			}

		}
	}

	if(show_products)
	showResultsProducts();
	if(show_news)
	showResultsNews();
}
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 &&
navigator.userAgent.indexOf("Windows") != -1 &&
navigator.userAgent.indexOf("Windows 3.1") == -1) 
{
	document.write('<script type="text/vbscript"> \n');
	document.write('on error resume next \n');
	document.write('Sub Kampagnenwechsler_1_FSCommand(ByVal Befehl, ByVal Modus)\n');
	document.write('  call Kampagnenwechsler_1_DoFSCommand(Befehl, Modus)\n');
	document.write('end sub\n');
	document.write('</script\> \n');
	
	document.write('<script type="text/vbscript"> \n');
	document.write('on error resume next \n');

	document.write('Sub button_ovation_FSCommand(ByVal Befehl, ByVal Modus)\n');
	document.write('  call button_ovation_DoFSCommand(Befehl, Modus)\n');
	document.write('end sub\n');
	document.write('</script\> \n');

    
	// button_cashback
	document.write('<script type="text/vbscript"> \n');
	document.write('on error resume next \n');

	document.write('Sub button_cashback_FSCommand(ByVal Befehl, ByVal Modus)\n');
	document.write('  call button_cashback_DoFSCommand(Befehl, Modus)\n');
	document.write('end sub\n');
	document.write('</script\> \n');

	// button_Grundig2plus1
	document.write('<script type="text/vbscript"> \n');
	document.write('on error resume next \n');
	
	document.write('Sub Grundig2plus1_FSCommand(ByVal Befehl, ByVal Modus)\n');
	document.write('  call Grundig2plus1_DoFSCommand(Befehl, Modus)\n');
	document.write('end sub\n');
	document.write('</script\> \n');
		
	// HDEvolution
	document.write('<script type="text/vbscript"> \n');
	document.write('on error resume next \n');
		
	document.write('Sub HDEvolution_FSCommand(ByVal Befehl, ByVal Modus)\n');
	document.write('  call HDEvolution_DoFSCommand(Befehl, Modus)\n');
	document.write('end sub\n');
	document.write('</script\> \n');

}
function button_ovation_DoFSCommand(Befehl, Modus){
/* Modus getauscht!!! nach einsetzen korrigierten Teaser die Modus-Kennnummer wieder tauschen!!! */
	if(Modus == '2'){
		window.open("fileadmin/highlights/ovation_DE/index.html","OvationSpecial","width=800,height=565,left=10,top=10,resizable=yes");
	}
	if(Modus == '1'){
		window.open("fileadmin/highlights/ovation_EN/index.html","OvationSpecial","width=800,height=565,left=10,top=10,resizable=yes");
	}
	if(Modus == 'pl'){
	window.open("fileadmin/content_images/Produkte_PNG/Poland/Ovation_presentation/Hauptfilm.html","OvationSpecial","width=815,height=585,left=10,top=10,resizable=no");
	}
}
function HDEvolution_DoFSCommand(Befehl, Modus){
	if(Modus == '1')  {	
		window.open("fileadmin/highlights/hd_evol/index.html","HDEvolution","width=910,height=600,left=50,top=20,resizable=yes");
	}
	else if(Modus == '2')  {
		window.open("fileadmin/highlights/hd_evol_en/index.html","HDEvolutionEN","width=910,height=600,left=50,top=20,resizable=yes");
	}
	else if(Modus == 'pl')  {
		window.open("fileadmin/content_images/Produkte_PNG/Poland/HD_Evolution_presentation/start.html","HDEvolutionEN","width=870,height=580,left=50,top=20,resizable=no");
	}
}
function Kampagnenwechsler_1_DoFSCommand(Befehl, Modus){
	if(Modus == '1')  {	
		window.open("fileadmin/highlights/hd_evol/index.html","HDEvolution","width=910,height=600,left=50,top=20,resizable=yes");
	}
	else if(Modus == '2')  {
		window.open("fileadmin/highlights/fileadmin/highlights/hd_evol_en/index.html","HDEvolutionEN","width=910,height=600,left=50,top=20,resizable=yes");
	}
	else if(Modus == '3')  {
		window.open("fileadmin/highlights/grundig2plus1/index.html","Grundig_1plus2","width=1070,height=800,left=50,top=20,resizable=yes");
	}
	else if(Modus == '4')  {
		window.open("fileadmin/highlights/ovation_DE/index.html","OvationSpecial","width=800,height=565,left=10,top=10,resizable=yes");
	}
	else if(Modus == '5')  {
		window.open("fileadmin/highlights/ovation_EN/index.html","OvationSpecial","width=800,height=565,left=10,top=10,resizable=yes");
	}
	
}
function Grundig2plus1_DoFSCommand(Befehl, Modus){
	if(Modus == '3')  { 
		window.open("fileadmin/highlights/grundig2plus1/index.html","Grundig_1plus2","width=1070,height=800,left=50,top=20,resizable=yes");
	}
}




//Fehler unterdruecken
onerror = stopError;
function stopError()
{
 return true;
}