/*_____Menu-variablen____________________________________________________*/
	var leerzeichen = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
	var menusalzhome = "<a href=\"start.html\">salzhome<\/a>";
	var menusalzshop = "<a href=\"sw_start.html\">salzshop<\/a>" + leerzeichen + "<a href=\"http://www.spreadshirt.net/shop.php?sid=115979\">basics <span class=\"druecker\">o-+</span><\/a>" + leerzeichen + "<a href=\"http://www.spreadshirt.net/shop.php?sid=127695\">basics <span class=\"druecker\">o-></span><\/a>";
// Salzgalerie mit menüpunkt fotoproduktionen! wurde temporär rausgenommen!
//	var menusalzgalerie = "<a href=\"sg_sommer.html\">salzgalerie<\/a>" + leerzeichen + "<a href=\"sg_sommer.html\">sommer<\/a>" + leerzeichen + "<a href=\"sg_viplounge.html\">vip-lounge<\/a>" + leerzeichen + "<a href=\"sg_kollektion.html\">laufsteg<\/a>" + leerzeichen + "<a href=\"sg_basecaps.html\">la d&eacute;esse<\/a>" + leerzeichen + "<a href=\"sg_shirts.html\">shirts<\/a>" + leerzeichen + "<a href=\"sg_shooting1.html\">fotoprodutkionen<\/a>";
	var menusalzgalerie = "<a href=\"sg_tretboot.html\">salzgalerie<\/a>" + leerzeichen + "<a href=\"sg_tretboot.html\">tretboot<\/a>" + leerzeichen + "<a href=\"sg_les-belles.html\">les belles<\/a>" + leerzeichen + "<a href=\"sg_roessle.html\">rössle<\/a>" + leerzeichen + "<a href=\"sg_viplounge.html\">vip-lounge<\/a>" + leerzeichen + "<a href=\"sg_basecaps.html\">la d&eacute;esse<\/a>";
	var menusalzkontakt = "<a href=\"sk_kontakt.html\">salzkontakt<\/a>" + leerzeichen + "<a href=\"sk_kontakt.html\">kontakt<\/a>" + leerzeichen + "<a href=\"sk_salzlinks.html\">links<\/a>" + leerzeichen + "<a href=\"sk_impressum.html\">impressum<\/a>";
	var menuitem = "";
	var vari = "";
	var coords_y = 0;
/*end of Menu-variablen____________________________________________________*/

var content = new Array();

//shooting1-text:
content[999] = "Das Outfit gibts bei Ilona Forner<br> (Liststra&szlig;e 25, 70180 Stuttgart).<br><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"120\" valign=\"top\">Setbau:</td><td><strong>peter boeck</strong> </td></tr><tr><td>model:</td><td><strong> me_are</strong> </td></tr><tr><td valign=\"top\">Fotodesign:</td><td valign=\"top\"><strong>you_am</strong></td></tr></table>";
//shooting2-text:
content[1000] = "Die M&ouml;bel und Accessoires gibts bei Andreas Bloy<br> (Liststraße 29, 70180 Stuttgart).<br><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"120\" valign=\"top\">Setbau:</td><td valign=\"top\"><strong>Peter Boeck</strong></td></tr><tr><td valign=\"top\">Model:</td><td valign=\"top\"><strong> me_are</strong></td></tr><tr><td valign=\"top\">Fotodesign:</td><td valign=\"top\"><strong>you_am</strong></td></tr></table>";
//basecaps-text:
content[1001] = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"120\" valign=\"top\">basecap:</td><td valign=\"top\">stylisches 6panel basecap<br>hochwertiger baumwollcord<br>one size for all</td></tr><tr><td valign=\"top\">Farbe:</td><td valign=\"top\">schwarz</td></tr><tr><td valign=\"top\">Stickerei:</td><td valign=\"top\">salzwatte logo und schriftzug gestickt<br>in rosa blau oder anthrazit</td></tr><tr><td valign=\"top\">Preis:</td><td valign=\"top\">19,- EUR</td></tr><tr><td valign=\"top\">Bestellung:</td><td valign=\"top\"><strong><a href=\"sw_tac_002.html\">zum shop</a></strong></td></tr></table>";
//tops-text:
content[1002] = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"120\" valign=\"top\">top:</td><td valign=\"top\">unwiderstehlich sch&ouml;nes top<br>pailletten, perlen, steine<br>spitzenbesatz<br>100% baumwolle </td></tr><tr><td valign=\"top\">Farbe:</td><td valign=\"top\">schwarz</td></tr><tr><td valign=\"top\">gr&ouml;ssen:</td><td valign=\"top\">s, m, l</td></tr><tr><td valign=\"top\">Preis:</td><td valign=\"top\">55,- EUR</td></tr><tr><td valign=\"top\">Bestellung:</td><td valign=\"top\"><strong><a href=\"sw_topsandcaps.html\">zum shop</a></strong></td></tr></table>";
//kennzeichen-text:
content[1003] = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"120\" valign=\"top\">kennzeichen d:</td><td valign=\"top\">wir drucken dein pers&ouml;nliches <br>kfz-kennzeichen auf hochwertige <br>marken t-shirts, sweater, jacken <br>und accessoires. f&uuml;r m&auml;nner, <br>frauen, jungs und m&auml;dels.</td></tr><tr><td valign=\"top\">bestellung:</td><td valign=\"top\"><strong><a href=\"sw_kennzeichend_1.html\">zum shop</a></strong></td></tr></table>";

//salzgalerie_shirts-text:
content[1004] = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"120\" valign=\"top\">tops und t-shirts:</td><td valign=\"top\">individuelle salzwatte-designs<br> hochwertige  aufdrucke<br> 100% baumwolle</td></tr><tr><td valign=\"top\">bestellung:</td><td valign=\"top\"><strong><a href=\"http://www.spreadshirt.net/shop.php?sid=115979\">zum shop</a></strong></td></tr></table>";
content[1005] = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"120\" valign=\"top\">tops und t-shirts:</td><td valign=\"top\">individuelle salzwatte-designs<br> hochwertige  aufdrucke<br> 100% baumwolle</td></tr><tr><td valign=\"top\">bestellung:</td><td valign=\"top\"><strong><a href=\"http://www.spreadshirt.net/shop.php?sid=115979\">zum shop</a></strong></td></tr></table>";

//salzgalerie_kollektion-text:
content[1006] = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"320\" valign=\"top\"></td></tr></table>";
//salzgalerie_les-belles-text:
content[1007] = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"320\" valign=\"top\"></td></tr></table>";
//salzgalerie_tretboot-text:
content[1007] = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"320\" valign=\"top\"></td></tr></table>";


//_____end of LayerText__________________________________________________________________

//globale variablen _____________________________________________________________________
	g_timers = new Array();
	g_inhalt = "";
	g_txt = "";
	g_opacity = 100;

	vertikal = 0;
	abstandli = 0;
	layerheight = 0;
	thelayerwidth = 0;


	
	
	
// end of globale variablen______________________________________________________________


//---------------------------------------------------------------------------------------
//----menu funktionen--------------------------------------------------------------------
//---------------------------------------------------------------------------------------

	function setTimer(divname) {
		g_timers[divname] = window.setTimeout( 'removeMenu(\''+divname+'\')', 2000);
//		g_timers[divname] = window.setTimeout( 'addDebug(\'++++++++'+divname+'\')', 1000);
		addDebug(' - setTimer' + g_timers['portfolio'] + ' - ');
	}
	
//---------------------------------------------------------------------------------------
	function checkTimer(divname) {
		addDebug(' - ***checkTimer ' + g_timers['portfolio'] + ' - ');
		if( g_timers[divname] ) {
			window.setTimeout( 'window.clearTimeout( \''+g_timers[divname]+'\' )', 20);
			addDebug(' - checkTimer If ' + g_timers['portfolio'] + ' - ');
		}
	}
	function killTimer(fg_timers){
		window.clearTimeout(fg_timers);
	}
// function removeMenu() -> menü ausblenden ------------------------------------------------
	function removeMenu(divname){
		if(divname == 'ulimaier'){
			umvariable = 'uli maier';
			oldlink = "<a href=\"#\" onMouseOver=\"menuausklappen(\'" + divname + "\'), checkTimer(\'" + divname + "\'),addDebug(\'<br>" + divname + " - onMouseOver - href over\')\" onMouseOut=\"addDebug(\'<br>" + divname + " - onMouseOut - href - out\')\">" + umvariable + "<\/a>";
		}else{
			oldlink = "<a href=\"#\" onMouseOver=\"menuausklappen(\'" + divname + "\'), checkTimer(\'" + divname + "\'),addDebug(\'<br>" + divname + " - onMouseOver - href over\')\" onMouseOut=\"addDebug(\'<br>" + divname + " - onMouseOut - href - out\')\">" + divname + "<\/a>";
		}
		document.getElementById(divname).innerHTML = oldlink;
		g_timers[divname] = 0;
	}

	function menuausklappen(divname){
		document.getElementById(divname).innerHTML = eval("menu" + divname);
	}


	
// für den debugmodus siehe datei: debug.html-------------------------------------------
	function addDebug(inhalt){
		g_inhalt = g_inhalt.concat(inhalt);
		g_inhalt = g_inhalt + " # ";
//		g_inhalt = g_inhalt.concat(g_timers['portfolio']);
//		document.getElementById('debug').innerHTML = g_inhalt;
	}
	
// debug-inhalt zurücksetzen ------------------------------------------------------------
	function clearDebug(){
		g_inhalt = "";
//		document.getElementById('debug').innerHTML = g_inhalt;
	}

//end of menu js-------------------------------------------------------------------------

//---------------------------------------------------------------------------------------
//------ Bilder js ----------------------------------------------------------------------
//---------------------------------------------------------------------------------------
/*
-------function changeImg-------------- tauscht die bilder aus!--------------------
descr.:   übergabewerte: img = bildnummer(z.b. 01), picsize ( hochformat=1, quadrat=2, quer=3), art (1. teil des bildnamens. z.b. 'sh_1_0'), n_zeilen ( wieviel zeilen soll textlayer hoch sein z.b. 6 )
*/
var fade_flag = 0;
var i = 01;
function changeImg(img, picsize, art, n_zeilen, special){
	if(fade_flag == 1){
		return;
	}
	fade_flag = 1;
	switch (picsize) {
	  case "1":
		thewidth = 388;
		theheight = 480;
		deadheight = 10;
		linkerabstand = 20;
		n_zeichen = 45;
		break;
	  case "2":
		thewidth = 480;
		theheight = 388;
		deadheight = 71;		
		linkerabstand = 10;		
		n_zeichen = 55;		
		break;
	  case "3":
		thewidth = 420;
		theheight = 420;
		deadheight = 39;	
		linkerabstand = 30;		
		n_zeichen = 40;
		break;
	  default:
		thewidth = 420;
		theheight = 420;
		deadheight = 39;	
		linkerabstand = 30;
		n_zeichen = 55;		
		break;
	}

//zähler i Für Layer anpassen
	i = img;

//layertext neu und passend zu bild füllen (Achtung, Wert ist eins höher als Content-Id) 
	if(art == 'sh_1_0')i = 1000;
	if(art == 'sh_2_0')i = 1001;
	if(art == 'bc_0')i = 1002;	
	if(art == 'top_0')i = 1003;
	if(art == 'gs_0')i = 1004;
	if(art == 'shirt_0')i = 1005;
	if(special == 'otherLink')i = 1006;
	if(art == 'me_0')i = 1007;
	if(art == 'vip_0')i = 1007;
	if(art == 'som_0')i = 1007;
	if(art == 'roe_0')i = 1007;
	if(art == 'belles_0')i = 1008;
	if(art == 'tretboot_0')i = 1007;
	
//bild austauschen:
	prefix = art;
	n = img;
	
//	text-layer-ausrichtung 
	thelayerwidth = thewidth - 38;
	abstandli = (480 - thewidth)/2 + 8;
	zeilenanzahl = Math.round(content[i-1].length/n_zeichen);
	lineheight = 18;
	layerheight = n_zeilen * lineheight;
	vertikal = layerheight + 18;	
	
//textlayer ausblenden bevor bild ausgeblendet wird
	fadeItOut('textlayer');
	
// bilder ausblenden! die function fadein zum einblenden wird in fadeout aufgerufen.
	fadeout(prefix, n, deadheight, picsize, thewidth, theheight);

	
}

/*
---------function fadeout -------------------------------------------------------------------
 übergabewerte: prefix(1.teil des bildnamens), n(bildnummer), deadheight(höhe des blindgifs - vertikaler abstand), picsize(hoch-, quadrat, querformat), thewidth(breite des bildes), theheight( höhe des bildes))
*/
interval = 50;
function fadeout(prefix, n, deadheight, picsize, thewidth, theheight){
	if(	g_opacity <= 0){
		document.getElementById("theimg").src = "images/" + prefix + n + ".jpg";
		
		document.getElementById("behaelter").style.height = vertikal+'px';	
	//	document.getElementById("behaelter").style._marginTop = '-' + eval(vertikal+18) +'px';
	// wenn ie dann vertikal + 24 sonst + 30
		if(document.all){	
			document.getElementById("behaelter").style.marginTop = '-' + eval(vertikal+24) +'px';
		}else{
			document.getElementById("behaelter").style.marginTop = '-' + eval(vertikal+30) +'px';
		}
			
		document.getElementById("abstandlinks").width = abstandli;
		document.getElementById("textlayer").style.height = layerheight+'px';
		document.getElementById("textlayer").style.width = thelayerwidth+'px';
		document.getElementById("textlayer").style.marginLeft = '0px';	

		writeNew(1);
		top_positionierung(deadheight, picsize);
		bildgroesse(thewidth, theheight);
		fadein(prefix, n);		
		return;
	}else{
		window.setTimeout( 'fadeout(\''+prefix+'\',\''+n+'\',\''+deadheight+'\',\''+picsize+'\',\''+thewidth+'\',\''+theheight+'\')', interval);		
	}
	g_opacity -= 10;	
	if(document.all){
		document.getElementById("theimg").style.filter = 'alpha(opacity='+g_opacity+')';
	}else{
		document.getElementById("theimg").style.opacity = '.'+g_opacity;	
		document.getElementById("theimg").style.mozOpacity = '.'+g_opacity;		
	}
}

/* blendet das bild ein, in 10er schritten --------------------------------------------*/
function fadein(prefix, n){
	if(document.all){
		document.getElementById("theimg").style.filter = 'alpha(opacity='+g_opacity+')';
	}else{
		if(g_opacity == 100){
			document.getElementById("theimg").style.opacity = '0.99';	
			document.getElementById("theimg").style.mozOpacity = '0.99';			
		}else{
			document.getElementById("theimg").style.opacity = '.'+g_opacity;	
			document.getElementById("theimg").style.mozOpacity = '.'+g_opacity;			
		}
	}	
	
	if(	g_opacity == 100){
		if(g_layerflag)
			fadeItIn('textlayer');
		fade_flag = 0;
		return;
	}else{
		window.setTimeout( 'fadein(\''+prefix+'\',\''+n+'\')', interval);		
	}
	g_opacity += 10;	
}


text_interval = 20;
g_textlayer_opacity = 0;
// fadeItOut wird nur für textlayer benützt --------------------------------------------------
function fadeItOut(element_id){
	if(	g_textlayer_opacity <= 0){
//		g_layerflag = false;
		return;
	}else{
		window.setTimeout( 'fadeItOut(\''+element_id+'\')', text_interval);		
	}
	g_textlayer_opacity -= 10;	
	if(document.all){
		document.getElementById(element_id).style.filter = 'alpha(opacity='+g_textlayer_opacity+')';
	}else{
		document.getElementById(element_id).style.opacity = '.'+g_textlayer_opacity;	
		document.getElementById(element_id).style.mozOpacity = '.'+g_textlayer_opacity;		
	}
}

// fadeItIn wird nur für textlayer benützt ----------------------------------------------------
function fadeItIn(element_id){

	if(document.all){
		document.getElementById(element_id).style.filter = 'alpha(opacity='+g_textlayer_opacity+')';
	}else{
		document.getElementById(element_id).style.opacity = '.'+g_textlayer_opacity;	
		document.getElementById(element_id).style.mozOpacity = '.'+g_textlayer_opacity;			
	}	
	
	if(	g_textlayer_opacity == 90){
//		g_layerflag = true;
		return;
	}else{
		window.setTimeout( 'fadeItIn(\''+element_id+'\')', text_interval);		
	}
	g_textlayer_opacity += 10;	
}


function top_positionierung(deadheight, picsize){
	//bild abstand oben 
	if(picsize == 1){
		document.getElementById("dead").height = deadheight-5;			
	}else{
		document.getElementById("dead").height = deadheight;			
	}
	document.getElementById("dead").width = 384;				
}

function bildgroesse(thewidth, theheight){
	document.getElementById("theimg").width = thewidth ;
	document.getElementById("theimg").height = theheight ;	
}

function showLayer(){
		document.getElementById("textlayer").style.visibility = 'visible';
}

function hideLayer(){
		document.getElementById("textlayer").style.visibility = 'hidden';
}

//____LAYER manuell an / aus_______________________
g_layerflag = false;
function showhideLayer()
{
	if(!g_layerflag)
	{
		fadeItIn('textlayer');
		g_layerflag = true;
	}
	else 
	{
		fadeItOut('textlayer');
		g_layerflag = false;
	}
}

//____TEXT in LAYER schreiben_______________________
// übergabe-parameter ist nicht relevant!!!
function writeNew(n)
{
	nm="textlayer";
	g_txt= content[i-1];
	if(document.layers) 
		{with(document.layers[nm].document)
			{open();write(g_txt);close();}}
	else if(document.getElementById) {document.getElementById(nm).innerHTML=g_txt;}
	else if (document.all) {document.all[nm].innerHTML=g_txt;}
} // end function writeNew(n)

/* speichert den layername und wert in assoziativen array*/
function setTimerBild(name) {
	g_timers[name] = window.setTimeout( 'hideLayer()', 500);
}

function checkTimerBild(name) {
	if( g_timers[name] ) {
		window.setTimeout( 'window.clearTimeout( \''+g_timers[name]+'\' )', 20);
	}
}

function setzen()
{
	x = parseInt(self.Spreadshop.document.getElementsById('body')[0].scrollHeight);
	alert("x = " + x);
	document.getElementById('Spreadshop').style.height = x;
}

//---------------------------------------------------------------------------------------
/*------------dreamweaver-stuff---------------------------------------------------------*/
//---------------------------------------------------------------------------------------
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//----full screen opener funktionen-------------------------------------------------------------

function WinFullscreen(Ie,other){
x=screen.availWidth;
y=screen.availHeight;
target = parseFloat(navigator.appVersion.substring(navigator.appVersion.indexOf('.')-1,navigator.appVersion.length));
if((navigator.appVersion.indexOf("Mac")!=-1) &&(navigator.userAgent.indexOf("MSIE")!=-1) &&(parseInt(navigator.appVersion)==4))
window.open(other,"sub",'scrollbars=yes');
if (target >= 4){
	if (navigator.appName=="Netscape"){
    var WinFullscreen=window.open(other,"WinFullscreen",'scrollbars=yes','width='+x+',height='+y+',top=0,left=0');
	WinFullscreen.moveTo(0,0);
	WinFullscreen.resizeTo(x,y);}
	if (navigator.appName=="Microsoft Internet Explorer")
		window.open(Ie,"WinFullscreen","fullscreen=yes");
	}
	else window.open(other,"sub",'scrollbars=yes');
}
