pos_x=new Array(0,0,230,214,203,0,186)
pos_y=new Array(0,0,99,119,139,0,179)

sm_hr=new Array()
sm_src=new Array()
sm_alt=new Array()
sm_src[2]=new Array("images/sm2_01_1.gif","images/sm2_02_1.gif","images/sm2_03_1.gif","images/sm2_04_1.gif","images/sm2_05_1.gif")
sm_hr[2]=new Array("prod1.php3","prod2.php3","prod3.php3","prod4.php3","prod5.php3")
sm_alt[2]=new Array("Siebdruck","Schilder","Folienschriften","Digitale Bildbearbeitung","Textilien")
sm_src[3]=new Array("images/sm3_01_1.gif","images/sm3_02_1.gif","images/sm3_03_1.gif")
sm_hr[3]=new Array("dien1.php3","dien2.php3","dien3.php3")
sm_alt[3]=new Array("Beratung","Gestaltung","Montage")
sm_src[4]=new Array("images/sm4_01_1.gif","images/sm4_02_1.gif","images/sm4_03_1.gif")
sm_hr[4]=new Array("akt1.php3","akt2.php3","akt3.php3")
sm_alt[4]=new Array("Top-Angebot (AP)","Neue Produkte","Referenzen")
sm_src[6]=new Array("images/sm6_01_1.gif","images/sm6_02_1.gif","images/sm6_03_1.gif")
sm_hr[6]=new Array("kont1.php3","kont2.php3","kont3.php3")
sm_alt[6]=new Array("Angebot","Kontaktaufnahme","Anfahrtskizze")



function f_m(n,a){

	if (a==2){ondiv=1;f_sm(n,2)}
	else{ondiv=0;outd=setTimeout('f_sm('+n+',1)',300)}

	if (page==n){return}
	if (n<7){document.images["p"+n].src="images/point_"+a+".gif"}
	else{document.images["p"+n].src=a}
}


// work with menu in one div

ns4=(navigator.appName.indexOf("Netscape")>=0 && !document.getElementById)? true : false;
ie4=(document.all && !document.getElementById)? true : false;
ie5=(document.getElementById && document.all)? true : false;
ns6=(document.getElementById && navigator.appName.indexOf("Netscape")>=0 )? true: false;
w3c=(document.getElementById)? true : false;

if(ns4){document.write ('<layer name="di1"></layer>')}else{document.write ('<div id="di1" style="position:absolute;z-index:100" ></div>')}

outd=""

if(w3c)div1=document.getElementById('di1')
if(ie4)div1=document.all['di1']
if(ns4)div1=document.layers['di1']

function move_div(x,y){
	if (isNaN(x+y))return
	if(ns4){div1.moveTo(x,y)}else{div1.style.left=x+'px';div1.style.top=y+'px';}
}

function write_div(text){
	if(ns4){
		div1.document.open();
		div1.document.write(text);
		div1.document.close();
	}
	else {div1.innerHTML=text;}
}




// image preload
img_preload=new Array()
n=0
for (i in sm_src){
	if (i!=""){
		for (j in sm_src[i]){
			if (j!="")n++;img_preload[n]=new Image();img_preload[n].src=sm_src[i][j];n++;img_preload[n]=new Image();img_preload[n].src=sm_src[i][j].replace("1.gif","2.gif")
		}
	}
	n++;img_preload[n]=new Image();img_preload[n].src='images/main_06_2.gif'
	n++;img_preload[n]=new Image();img_preload[n].src='images/main_07_2.gif'
}

function f_sm_out(n){
	document.images["p"+n].src="images/point_1.gif";
	outd=setTimeout('f_sm('+n+',1)',300)
}


ondiv=0
p1_old=""
function f_sm(p1,p2){
	if (p1>6){return}

	if (p2==2){
		if(p1_old==p1){return}
		p1_old=p1
		if (pos_x[p1]<1){	write_div("");move_div(-1000,-1000);return}
		html="<table border=0 cellspacing=0 cellpadding=0><tr><td valign=top background=images/bg_sm1.gif><a href=javascript:void(0)  onmouseout=' ondiv=0;f_sm_out("+p1+");' onmouseover='ondiv=1; document.images.p"+p1+".src=\"images/point_2.gif\"'><img border=0 src=images/sm1.gif></a></td><td valign=top bgcolor=#ffffff><a href=javascript:void(0)  onmouseout=' ondiv=0;f_sm_out("+p1+");' onmouseover='ondiv=1; document.images.p"+p1+".src=\"images/point_2.gif\"'><img border=0 src=images/spacer.gif width=14 height=35></a><td bgcolor=#ffffff>"
		for (i in sm_src[p1]){
			html+="<a href='"+sm_hr[p1][i]+"' onmouseout=' ondiv=0;f_sm_out("+p1+");document.images.i_sm"+i+".src=\""+sm_src[p1][i]+"\";window.status=\" \"; return true' onmouseover='ondiv=1;document.images.i_sm"+i+".src=\""+sm_src[p1][i].replace("1.gif","2.gif")+"\"; document.images.p"+p1+".src=\"images/point_2.gif\";window.status=\""+sm_alt[p1][i]+"\"; return true'><img border=0 name=i_sm"+i+" src='"+sm_src[p1][i]+"' alt=\""+sm_alt[p1][i]+"\"><a><br>"
		}
		html+='</td></tr></table>'
		write_div(html)
		move_div(pos_x[p1],pos_y[p1])
	}else{
		if(ondiv==1)return
		write_div("");
		move_div(-1000,-1000)
		p1_old=""
	}
}
