//
// (c)2000 fotograf4u
//

// Rollover Buttons

var loaded = new Array();

//
// Flyers
//
// Size      = 132x196 Pixel
// Name      = sflyerN.jpg
// Link-HTML = flyer000N.htm

var flyerno  = 1;			// Start with this flyer
var flyermax = 4;			// Number of flyers available
var flyert  = 5000;			// Show flyers for flyert millisec
var flyertf = 3;				// Duration of crossfade (seconds)

var flyerpics = new Array();

function F_initStatus() {
	if (document.images && document.images.flyer) {
		s=document.images.flyer.src;
		ix=s.indexOf("sflyer");
		for (i=0; i<flyermax; i++) {
			flyerpics[i]=new Image();
			flyerpics[i].src=s.substr(0,ix+6)+(i+1)+".jpg";
		}
	}
	window.setTimeout('F_swap();',flyert);
}

function F_swap() {
	if (document.images && document.images.flyer) {
		if (++flyerno>flyermax) flyerno=1;
		if (document.all){
			document.images.flyer.style.filter="blendTrans(duration=2)";
			document.images.flyer.style.filter="blendTrans(duration=flyertf)";
			document.images.flyer.filters.blendTrans.Apply();      
		}
		document.images.flyer.src = flyerpics[flyerno-1].src;
		if (document.all)
			document.images.flyer.filters.blendTrans.Play();
   	}
	window.setTimeout('F_swap();',flyert);   
}

function F_go() {
	if (document.images && document.images.flyer) {
		s=document.images.flyer.src;
		if ( (ix=s.indexOf("sflyer",0))>0 )
		s=s.substr(0,ix)+"flyer000"+flyerno+".htm";
		window.location.href=s;
	}
} 

function F_loadRollover(image,imageName) {
	if (image && image.src &&
		(null == image.out || typeof(image.out) == typeof(void(0)))) {
		s = image.src;
		image.out = new Image();
		image.out.src = s;
		image.over = new Image();
		if (imageName.lastIndexOf('/') >= 0 || imageName.lastIndexOf('\\') >= 0) {
			s = imageName;
		} else {
			i = s.lastIndexOf('/');
			if (i<0) i = s.lastIndexOf('\\');
			if (i<0) { s = imageName; }
			else	 { s = s.substring(0,i+1) + imageName; }
		}
		image.over.src = s;
		loaded[image.name] = image;
	}
	return true;
}

function F_roll(imageName,over) {
	if (document.images) {
	image = loaded[imageName];
	if (over) { imageObject = "over";}
	else	  { imageObject = "out";}
	if (image) {
		ref = eval("image."+imageObject);
		if (ref) image.src = eval("image."+imageObject+".src");
	}
	if (window.event)
		window.event.cancelBubble = true;
	}
}

function popmap()
{
// karte = window.open("http://www.fotograf4u.de/cgi-bin/ax.cgi?http://www.yellowmap.de/KartenService/KartenService.asp?RADIUS=1000&DBName=YellowMapDB&Kennung=910017754&CSS=","fotograf4u_Lageplan","width=680,height=500,toolbar=no,resizable=yes,scrollbars=yes,menubar=yes,status=yes");
// karte = window.open("http://www.fotograf4u.de/cgi-bin/ax.cgi?http://www.stadtplandienst.de/query;ORT=m;LL=11.374799x48.199200;GR=3;IMGTXT=fotograf4u-Studio;TXT=fotograf4u-Studio+im+Tiroler+Hof,+Gr%C3%B6benzell.+Parkpl%C3%A4tze+finden+Sie+in+der+Mozartstra%C3%9Fe+und+in+der+Eschenriederstra%C3%9Fe.","fotograf4u_Lageplan","toolbar=no,resizable=yes,scrollbars=yes,menubar=yes,status=yes");

karte = window.open("http://www.mapquest.de/cgi-bin/ia_find?link=btwn%2Ftwn-map_results&uid=u5jeh5r0l5t5zbba%3A2516rw901n&event=options_update&SNVData=3mad3-96%2Chr%253brg9f10%253du2x0az%253bpq%257cs9z%2Cp7%253b8aq.hqu%253b%2528O%2512MLPXSGV%2514%2517GFJ%253a%2516%2518XVSR%2516D%2513C%253dVV%2516JNL_502wq%253a%2515M%253dwynhfz_9ubaly%2528nl.fhxqs-tbhm-oxiw.qc%2528sqvx8c3mw0%252b%2529%252bGvfqdi%2524om-7n0m%25241w-u.wf7%253bxcx5sf7.grfe%257cs%2524jdvnd%257c9xjqu47u5f%252b_%252b%251379rvbuf7n%2540%252b1y%252b.%252branhw%252bU4%25f6pmwkscn&pcat=&title=BrillenAtelier+-+Bahnhofstr.+26+-+82194+Gr%F6benzell&mapsize=large&maptype=rare&origin_label=Brillen-Atelier&origin_icon=13","brillenatelier_Lageplan","toolbar=no,resizable=yes,scrollbars=yes,menubar=yes,status=yes");

karte.focus();
}

function pophtml(url,name,x,y)
{
	params = "width="+x+",height="+y+",toolbar=no,resizable=no,scrollbars=no,menubar=no,status=no";
	serie = window.open(url,name,params);
	serie.focus();
}

var popimg_win=null;
function popimg(url,name,x,y)
{
	y2=eval(y)+24;
	if ( popimg_win ) popimg_win.close();
	params = "width="+x+",height="+y2+",toolbar=no,resizable=no,scrollbars=no,menubar=no,status=no";
	popimg_win = window.open(null,name,params);
	popimg_win.focus();
	popimg_win.document.write("<head><title>Preview "+name+"</title></head><body leftmargin=0 topmargin=0 bgcolor=#000000>");
	popimg_win.document.write("<center><table border=0 cellpadding=0 cellspacing=0 width="+x+">");
	popimg_win.document.write("<tr><td colspan=2 width="+x+" height="+y+"><img src="+url+" width="+x+" height="+y+" alt='name'></td></tr>");
	popimg_win.document.write("<tr><td width=1 height=24><img src=/cp.gif width=1 height=24></td><td align=right><a href='javascript:window.close();' title='Fenster schließen'><font face='Verdana,Arial' color=#C8C8C8 valign=middle><u>Fenster schlie&szlig;en</u></font><\/a></td></tr>");
	popimg_win.document.write("</table></center></body></html>");
	if (window.event) {
		window.event.cancelBubble = true;
	}

}

var f7_droplayer=new Array();
f7_droplayer[0]="mmHome";
f7_droplayer[1]="mmProdukte";
f7_droplayer[2]="mmService";
f7_droplayer[3]="mmKontakt";

//simple browser check 

var f7_v4=(parseInt(navigator.appVersion)>=4 && parseInt(navigator.appVersion)<=5)?1:0;
var f7_ie=(document.all && f7_v4)?1:0;
var f7_ns=(document.layers && f7_v4)?1:0;
var f7_w = 0;

function f7_init() {
  if ( f7_ie ) {
    f7_w = document.all.f4ubody.offsetWidth;
  } else {
    f7_w = window.innerWidth; 
  }
}

function f7_calcpos(pos) {
  if ( !f7_w ) return pos;
  var div = parseInt((f7_w - 653)/2+0.5);
  if ( div < 0 ) div = 21;
  return pos + div;
}

//code for drops
function f7_showdrop(thelayer){
  f7_keep=thelayer; f7_hideall(); f7_showitnow=1;
  f7_showit(thelayer);
}

function f7_showit(thelayer){
  if(f7_ie){ eval(f7_droplayer[thelayer]+ '.style.visibility="visible"'); }
  if(f7_ns){ eval('document.'+f7_droplayer[thelayer]+ '.visibility="show"');}
}

function f7_hidedrop(){
  f7_keep=-1; setTimeout('f7_hideall()',500);
}

var f7_keep=-1;

function f7_hideall(){
  for(i=0;i<f7_droplayer.length;i++){ 
    f7_hideit=0; f7_checkmousepos(i);
    if(f7_ie && f7_keep!=i){ 
      if(f7_hideit && f7_droplayer[i]){ eval(f7_droplayer[i]+'.style.visibility="hidden"'); } 
    }
    if(f7_ns && f7_keep!=i){ 
      if(f7_hideit && document.f7_droplayer[i]){ eval('document.'+f7_droplayer[i]+'.visibility="hide"'); }
    }
  }
}

//deal with cursor over layer
document.onmousemove = f7_getmousepos;
if (f7_ns) document.captureEvents(Event.MOUSEMOVE);

function f7_getmousepos(e){
  if(f7_ns){f7_mousex=e.pageX; f7_mousey=e.pageY;}
  if(f7_ie){f7_mousex=event.clientX; f7_mousey=event.clientY;}
}

function f7_checkmousepos(i){ 
  if(f7_ns){ 
    f7_x_min=eval('document.'+f7_droplayer[i]+'.left');
    f7_x_max=f7_x_min+eval('document.'+ f7_droplayer[i]+ '.clip.width');
    f7_y_min=eval('document.'+f7_droplayer[i]+'.top');
    f7_y_max=f7_y_min+eval('document.'+ f7_droplayer[i]+ '.clip.height');
  } 
  if(f7_ie){ 
    f7_x_min=eval(f7_droplayer[i]+'.style.pixelLeft');
    f7_x_max=f7_x_min+eval(f7_droplayer[i]+ '.style.pixelWidth');
    f7_y_min=eval(f7_droplayer[i]+'.style.pixelTop');
    f7_y_max=f7_y_min+eval(f7_droplayer[i]+ '.style.pixelHeight');
  }
  if (f7_mousex>=f7_x_min && f7_mousex<=f7_x_max && f7_mousey>=f7_y_min && f7_mousey<=f7_y_max){
    f7_hideit=0; setTimeout('f7_hideall()',500);
  } else { f7_hideit=1; }
  return f7_hideit;
}

function f7_make_div(id,xpos,title,inner,width,height) {
  var xpos = f7_calcpos(xpos);
  if ( !height ) height=115;
  if ( !width ) width=100;
  var s= '<div id="'+id+'" class="dropdown" style="position:absolute; left:'+xpos+'px; top:118px; width:'+width+'px; height:'+height+'px; z-index:1; padding: 3px;" align="left"><p>';
  if (title != '') s+=title+"<br>";
  s+=inner+'<\/p><\/div>';
  return s;
}

function f7_make_href(link,title,text,level) {
   if ( !level ) level=1;
   var s=''; var txt=text;
   var q='&raquo;';
   if ( level>1 ) q='-';
   for ( i=0; i<level; i++ ) { s+="&nbsp"; }
   if (link != '') txt='<a href="'+link+'" class="dropitem" title="'+title+'">'+q+'&nbsp;'+text+'<\/a>';
   return '<nobr>'+s+txt+'<\/nobr><br>';
}

function f7_make() {
  var s=f7_make_div("mmHome",187,"",
                       f7_make_href("\/","Startseite...","Home")+
                       f7_make_href("","","Galerien:")+
                       f7_make_href("\/gallery\/architektur","Architektur Galerie...","Architektur",2)+
                       f7_make_href("\/gallery\/werbung","Werbung Galerie...","Werbung",2)+
                       f7_make_href("\/gallery\/technik","Technik Galerie...","Technik",2)+
                       f7_make_href("\/gallery\/portrait","Portrait Galerie...","Portrait",2)+
                       f7_make_href("\/gallery\/hochzeit","Hochzeit Galerie...","Hochzeit",2)+
                       f7_make_href("\/gallery\/portrait\/swakt","Akt Galerie...","Akt",2)+
                       f7_make_href("\/gallery\/weihnachten","Weihnachts Galerie...","Weihnachten",2)+
                       f7_make_href("\/gallery\/portrait\/schulanfang","Schulanfang Galerie...","Schulanfang",2)+
                       f7_make_href("\/gallery\/portrait\/kommunion","Kommunion Galerie...","Kommunion",2),
                       150,
                       190
  );

  s+=f7_make_div("mmProdukte",300,'',
                       f7_make_href("\/produkte","Titelseite...","Titelseite")+
                       f7_make_href("\/produkte\/foto.htm","Fotografie...","Fotografie")+
                       f7_make_href("\/produkte\/grafik.htm","Grafikdesign...","Grafikdesign")+
                       f7_make_href("\/produkte\/grafik.htm","Übersicht...","Übersicht...",2)+
                       f7_make_href("\/cgi-bin\/gallery.cgi?album=werbung&pic=1","Ihre Ideen verwirklicht mit VisionComposing...","VisionComposing",2)+
                       f7_make_href("\/produkte\/360.htm","360° Panoramabilder...","Panoramen",2)+
                       f7_make_href("\/produkte\/altneu1.htm","Bildrestauration...","Bildrestauration",2)+
                       f7_make_href("\/produkte\/web.htm","Webdesign...","Webdesign")+
                       f7_make_href("\/produkte\/xtra.htm","Sonstiges...","Und mehr..."),
                       150,
                       152
  );

  s+=f7_make_div("mmService",447,'',
                       f7_make_href("\/service","Übersicht...","Übersicht")+
                       f7_make_href("\/service\/index.htm#fotostar","Bilder per Internet bestellen...","Bilder per Internet")+
                       f7_make_href("\/service\/index.htm#forum","Fotograf4u-Forum...","Forum")+
                       f7_make_href("\/service\/index.htm#chat","Fotograf4u-Forum...","Chat")+
                       f7_make_href("\/service\/index.htm#wap","Zugang zur WAP-Homepage...","WAP")+
                       f7_make_href("\/service\/index.htm#map","Anfahrtsplan...","Anfahrtsplan")+
                       f7_make_href("\/service\/index.htm#paybox","Bezahlen mit dem Handy...","Paybox"),
                       150,
                       120
  );

  s+=f7_make_div("mmKontakt",514,'',
                       f7_make_href("\/kontakt","Übersicht...","Übersicht")+
                       f7_make_href("\/kontakt\/index.htm#mailform","eMail Kontaktformular...","Kontakt-Formular")+
                       f7_make_href("\/cgi-bin\/forum\/forum.pl?action=gbook&board=guestbook&SID=","Unser Gästebuch...","Gästebuch")+
                       f7_make_href("\/kontakt\/impressum.htm","Impressum...","Impressum"),
                       150,
                       76
  );

  return s;
}


