// JavaScript Library for Junker & Halverscheid Formenbau GmbH & Co. KG
// WebSite juha.de
// Copyright © Christian Germelmann · chgTools Solution Development · www.chgtools.net


var ItmImg=new Array("","home","leistungen","produkte","seals","","kontakt","anfahrt","","impressum","","pr","","","","logo");
var mnuImg=new Array();
var hovImg=new Array();
var curImg=new Image(), curNum='';
var navImgPath = "../images/nav/de/";

for(i=0;i<=14;i++)
{
	if(ItmImg[i])
	{
		mnuImg[i] = new Image();
		mnuImg[i].src = navImgPath+"nav_"+ItmImg[i]+".gif";
		hovImg[i] = new Image();
		hovImg[i].src = navImgPath+"nav_"+ItmImg[i]+"_over.gif";
	}
}

function chgMenu(m)
{	
	if(m==cp)
	{
		curNum = m;
		status=''
	}
	else if(m==0)
	{
		document.images[curNum].src = curImg.src;		
		document.images[cp].src = hovImg[cp].src;
	}
	else
	{
		curNum = m;
		curImg.src = document.images[curNum].src;
		document.images[curNum].src = hovImg[m].src;
		document.images[cp].src = mnuImg[cp].src;
		status=''
	}
	return true
}
function openNewswf()
{
	var pt=window.open("anwbrcht_wf_de.pdf","_blank","width=400,height=600,left=100,top=100,locationbar=yes,menubar=no,resizable=yes,status=no,scrollbars=yes");
	pt.focus();		
}
function openNewstoday()
{
	var pt=window.open("juha_today24_2003_de.pdf","_blank","width=800,height=600,left=100,top=100,locationbar=yes,menubar=no,resizable=yes,status=no,scrollbars=yes");
	pt.focus();		
}
function openNewsinfo()
{
	var pt=window.open("info0407.pdf","_blank","width=400,height=600,left=100,top=100,locationbar=yes,menubar=no,resizable=yes,status=no,scrollbars=yes");
	pt.focus();		
}
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
function changeImagesArray(array) {
	if (preloadFlag == true) {
		var d = document; var img;
		for (var i=0; i<array.length; i+=2) {
			img = null; var n = array[i];
			if (d.images) {img = d.images[n];}
			if (!img && d.getElementById) {img = d.getElementById(n);}
			if (img) {img.src = array[i+1];}
		}
	}
}
function changeImages() {
	changeImagesArray(changeImages.arguments);
}
		var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		pre_nav_big_home1_over = newImage('../images/nav/nav_big_home1_over.gif');
		pre_nav_big_home2_over = newImage('../images/nav/nav_big_home2_over.gif');
		pre_nav_big_home3_over = newImage('../images/nav/nav_big_home3_over.gif');
		pre_nav_big_home4_over = newImage('../images/nav/nav_big_home4_over.gif');
		pre_nav_big_home5_over = newImage('../images/nav/nav_big_home5_over.gif');
		pre_nav_big_leist_fb1_over = newImage('../images/nav/nav_big_leist_fb1_over.gif');
		pre_nav_big_leist_fb2_over = newImage('../images/nav/nav_big_leist_fb2_over.gif');
		pre_nav_big_leist_fb3_over = newImage('../images/nav/nav_big_leist_fb3_over.gif');
		pre_nav_big_leist_fb4_over = newImage('../images/nav/nav_big_leist_fb4_over.gif');
		pre_nav_big_leist_fb5_over = newImage('../images/nav/nav_big_leist_fb5_over.gif');
		pre_nav_big_leist_f1_over = newImage('../images/nav/nav_big_leist_f1_over.gif');
		pre_nav_big_leist_f2_over = newImage('../images/nav/nav_big_leist_f2_over.gif');
		pre_nav_big_leist_f3_over = newImage('../images/nav/nav_big_leist_f3_over.gif');
		pre_nav_big_leist_f4_over = newImage('../images/nav/nav_big_leist_f4_over.gif');
		pre_nav_big_leist_f5_over = newImage('../images/nav/nav_big_leist_f5_over.gif');
		pre_anwbrchtwf_de_over = newImage('../images/nav/de/anwbrchtwf_de_over.gif');
		pre_anwbrchttoday_de_over = newImage('../images/nav/de/anwbrchttoday_de_over.gif');
		preloadFlag = true;
	}
}
function openpict(p)
{
var url = new Array("big/firma1.html",
                    "big/firma2.html",
                    "big/firma3.html",
                    "big/firma4.html",
                    "big/erodier.html",
                    "big/wkz3.html",
                    "big/wkz1.html",
                    "big/detailmont.html",
                    "big/zeichnung.html",
                    "big/arburg520c.html",
                    "big/auto1.html",
                    "big/automati.html",
                    "big/siliconmas.html",
                    "big/siliconwkz.html");
        var pt=window.open(url[p],"_blank","width=450,height=395,left=100,top=100,locationbar=yes,menubar=no,resizable=yes,status=no,scrollbars=no");
        pt.focus();             
}
