/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) {
	if (!document.getElementById) { return; }
	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
	this.params = new Object();
	this.variables = new Object();
	this.attributes = new Array();
	if(swf) { this.setAttribute('swf', swf); }
	if(id) { this.setAttribute('id', id); }
	if(w) { this.setAttribute('width', w); }
	if(h) { this.setAttribute('height', h); }
	if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
	if (!window.opera && document.all && this.installedVer.major > 7) {
		// only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
		deconcept.SWFObject.doPrepUnload = true;
	}
	if(c) { this.addParam('bgcolor', c); }
	var q = quality ? quality : 'high';
	this.addParam('quality', q);
	this.setAttribute('useExpressInstall', false);
	this.setAttribute('doExpressInstall', false);
	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
	this.setAttribute('xiRedirectUrl', xir);
	this.setAttribute('redirectUrl', '');
	if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
	useExpressInstall: function(path) {
		this.xiSWFPath = !path ? "expressinstall.swf" : path;
		this.setAttribute('useExpressInstall', true);
	},
	setAttribute: function(name, value){
		this.attributes[name] = value;
	},
	getAttribute: function(name){
		return this.attributes[name];
	},
	addParam: function(name, value){
		this.params[name] = value;
	},
	getParams: function(){
		return this.params;
	},
	addVariable: function(name, value){
		this.variables[name] = value;
	},
	getVariable: function(name){
		return this.variables[name];
	},
	getVariables: function(){
		return this.variables;
	},
	getVariablePairs: function(){
		var variablePairs = new Array();
		var key;
		var variables = this.getVariables();
		for(key in variables){
			variablePairs[variablePairs.length] = key +"="+ variables[key];
		}
		return variablePairs;
	},
	getSWFHTML: function() {
		var swfNode = "";
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
			if (this.getAttribute("doExpressInstall")) {
				this.addVariable("MMplayerType", "PlugIn");
				this.setAttribute('swf', this.xiSWFPath);
			}
			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'" wmode="transparent"';
			swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
			var params = this.getParams();
			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
			var pairs = this.getVariablePairs().join("&");
			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
			swfNode += '/>';
		} else { // PC IE
			if (this.getAttribute("doExpressInstall")) {
				this.addVariable("MMplayerType", "ActiveX");
				this.setAttribute('swf', this.xiSWFPath);
			}
			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'">';
			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
			var params = this.getParams();
			for(var key in params) {
			 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
			}
			var pairs = this.getVariablePairs().join("&");
			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
			swfNode += "</object>";
		}
		return swfNode;
	},
	write: function(elementId){
		if(this.getAttribute('useExpressInstall')) {
			// check to see if we need to do an express install
			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
			if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
				this.setAttribute('doExpressInstall', true);
				this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
				document.title = document.title.slice(0, 47) + " - Flash Player Installation";
				this.addVariable("MMdoctitle", document.title);
			}
		}
		if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
			var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
			n.innerHTML = this.getSWFHTML();
			return true;
		}else{
			if(this.getAttribute('redirectUrl') != "") {
				document.location.replace(this.getAttribute('redirectUrl'));
			}
		}
		return false;
	}
}

/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(){
	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0){ // if Windows CE
		var axo = 1;
		var counter = 3;
		while(axo) {
			try {
				counter++;
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter);
//				document.write("player v: "+ counter);
				PlayerVersion = new deconcept.PlayerVersion([counter,0,0]);
			} catch (e) {
				axo = null;
			}
		}
	} else { // Win IE (non mobile)
		// do minor version lookup in IE, but avoid fp6 crashing issues
		// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
		try{
			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		}catch(e){
			try {
				var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
				axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
			} catch(e) {
				if (PlayerVersion.major == 6) {
					return PlayerVersion;
				}
			}
			try {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			} catch(e) {}
		}
		if (axo != null) {
			PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
		}
	}
	return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
	this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
	this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
	this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
}
deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
	if(this.major < fv.major) return false;
	if(this.major > fv.major) return true;
	if(this.minor < fv.minor) return false;
	if(this.minor > fv.minor) return true;
	if(this.rev < fv.rev) return false;
	return true;
}
/* ---- get value of query string param ---- */
deconcept.util = {
	getRequestParameter: function(param) {
		var q = document.location.search || document.location.hash;
		if (param == null) { return q; }
		if(q) {
			var pairs = q.substring(1).split("&");
			for (var i=0; i < pairs.length; i++) {
				if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
					return pairs[i].substring((pairs[i].indexOf("=")+1));
				}
			}
		}
		return "";
	}
}
/* fix for video streaming bug */
deconcept.SWFObjectUtil.cleanupSWFs = function() {
	var objects = document.getElementsByTagName("OBJECT");
	for (var i = objects.length - 1; i >= 0; i--) {
		objects[i].style.display = 'none';
		for (var x in objects[i]) {
			if (typeof objects[i][x] == 'function') {
				objects[i][x] = function(){};
			}
		}
	}
}
// fixes bug in some fp9 versions see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
if (deconcept.SWFObject.doPrepUnload) {
	if (!deconcept.unloadSet) {
		deconcept.SWFObjectUtil.prepUnload = function() {
			__flash_unloadHandler = function(){};
			__flash_savedUnloadHandler = function(){};
			window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs);
		}
		window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
		deconcept.unloadSet = true;
	}
}
/* add document.getElementById if needed (mobile IE < 5) */
if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }}

/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;


// Swf Filme
// flash anzeige auf ok schalten
var flashOk=true;
var home_swf="optiker_bode_november_08_ver_1.1.swf";
function zeigeFlash() {
	/*if(window.location.search.indexOf("f_1") > -1) {
		var flashOk=false;
	}
	else {
		*/
		if(flashOk) {
		var swf1 = new SWFObject(home_swf, + "flash1", "1014", "570", "9");
		swf1.write("flash_container");
		}
	}

// Jumpmenue
function jumpMenu(targ,selObj,restore){
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

/*function Go(x) {
 if(x == "nothing") {
   document.forms[0].reset();
   document.forms[0].elements[0].blur();
   return;
 }
 else if(x == "end")
   top.location.href = parent.frames[1].location;
 else {
   parent.frames[1].location.href = x;
   document.forms[0].reset();
   document.forms[0].elements[0].blur();
 }
}*/

// ################## Sehqualitaet textfunction ########################

function mouse_over_texte(inhalt) {

	var t1="<h1>Ergonomische Form:</h1>Bei Optiker Bode können Sie sich immer auf besten Tragekomfort verlassen. ";
		t1 +="Denn Sie finden garantiert die Brille, die perfekt auf Ihre Gesichtsform und Ihr Gesichtsfeld zugeschnitten ";
		t1 +="ist.<br /><br />Und das professionelle Team von Bode sorgt dafür, dass das auch so bleibt. Die regelmäßige ";
		t1 +="Anpassung Ihrer Brille an Ihre Passform ist bei Optiker Bode natürlich kostenlos.";

	var t2="<h1>Gläser in bester Sehqualität:</h1>Gutes Sehen hängt in erster Linie von guten Gläsern ab. ";
		t2 +="Deshalb verarbeiten wir, von Optiker Bode, auschließlich Markengläser vom Weltmarktführer. ";
		t2 +="Auf die besonders gute Qualität von Bode geben wir Ihnen daher volle 3 Jahre Garantie.<br /><br />";
		t2 +="Wenn es um Gleitsichtgläser geht, lohnt sich natürlich ganz besonders auf eine gute Glasqualität ";
		t2 +="zu achten. Der Gleitsichtspezialist Optiker Bode garantiert Ihnen für jede Gleitsichtbrille beste ";
		t2 +="Spontanverträglichkeit und gewährt Ihnen volle 6 Wochen Verträglichkeitsgarantie.";

	var t3="<h1>Allergiefreie Materialien:</h1>Bei Optiker Bode findet wirklich jeder die Brille,";
		t3 +="die seinen individuellen Bedürfnissen entspricht – auch Allergiker.<br /><br />Durch die große ";
		t3 +="Auswahl an allergiefreien Titanfassungen internationaler Marken müssen auch Allergiker auf die ";
		t3 +="beste Sehqualität und den besten Tragekomfort nicht verzichten.";

	var t4="<h1>Aktuelles Design:</h1>Die riesige Auswahl an internationalen Topmarken wie Emporio Armani,";
		t4 +="Fossil und Gucci sorgt dafür, dass Sie immer die passende Brille zu Ihrem Typ finden.<br /><br />";
		t4 +="Design muss nicht teuer sein: Bei Bode finden Sie nicht nur eine umfassende Auswahl von Desingerbrillen,";
		t4 +="sondern auch immer günstige Angebote für besonders gefragte Markenbrillen.";

	var t5="<h1>Besonders leicht:</h1>Eine gute Brille sollte nicht nur für beste Sehqualität stehen, sondern ";
		t5 +="auch kaum zu spüren sein.<br /><br />Neuste Materialien sind dabei besonders stabil und leicht ";
		t5 +="zugleich.<br /><br />Durch die vorwiegende Verwendung von Kunststoffgläsern sind die Brillen bei ";
		t5 +="Optiker Bode um bis zu 70 % leichter als Brillen aus Mineralgläsern. ";

		if(inhalt=="t1") {
		  inhalt=t1;
		}
		if(inhalt=="t2") {
		  inhalt=t2;
		}
		if(inhalt=="t3") {
		  inhalt=t3;
		}
		if(inhalt=="t4") {
		  inhalt=t4;
		}
		if(inhalt=="t5") {
		  inhalt=t5;
		}

		document.getElementById("scroll_inner_sehqualitaet").innerHTML=inhalt;
}

function mouse_out_texte() {

		var start ="<h1>Woran Sie die bessere Sehqualität bei Bode erkennen können?</h1>";
		start +="<b>Finden Sie es heraus!</b><br /><br />Einfach die Bode-Qualitätsmerkmale an der Brille auf der linken Seite &uuml;berfahren.";

		document.getElementById("scroll_inner_sehqualitaet").innerHTML=start;
}


// ################# Formular Check ###################################

function checkform(f) {
      var fehlermeldung = "";

	  if (f.elements["name"].value == "") {
        fehlermeldung += "Geben Sie einen Namen ein!\n";
		document.getElementById("name").style.color="red";
      }
	  else{document.getElementById("name").style.color="";}

      if (f.elements["email"].value.indexOf("@") == -1) {
        fehlermeldung += "Geben Sie eine email ein!\n";
		document.getElementById("email").style.color="red";
	  }
	  else{document.getElementById("email").style.color="";}

	  if (f.elements["nachricht"].value == "") {
        fehlermeldung += "Geben Sie eine Nachricht ein!\n";
		document.getElementById("nachricht").style.color="red";
      }
      else{document.getElementById("nachricht").style.color="";}

      if (fehlermeldung == "") {
	  	document.getElementById("danke").style.display="block";
		document.getElementById("formbox").style.display="none";
		return true;
	  } else {
        document.getElementById("fehler").style.display="block";
		//alert("Es ist ein Fehler aufgetreten!\n\n" + fehlermeldung);
		return false;
      }

    }

function check_suchform(f) {
      var fehlermeldung = "";

	  if (f.elements["plz"].value == "") {
        fehlermeldung += "Geben Sie einen Namen ein!\n";
		document.getElementById("plz").style.color="red";
      }
	  else{document.getElementById("plz").style.color="";}


	  if (f.elements["ort"].value == "") {
        fehlermeldung += "Geben Sie eine Nachricht ein!\n";
		document.getElementById("ort").style.color="red";
      }
      if (f.elements["plz"].value !== "" || f.elements["ort"].value !== "") {
	  	return true;
	  } else {
        document.getElementById("fehler").style.display="block";
		//alert("Es ist ein Fehler aufgetreten!\n\n" + fehlermeldung);
		return false;
      }

    }

function check_suchform_unten(f) {
      var fehlermeldung = "";

	  if (f.elements["suche"].value == "") {
        fehlermeldung += "Geben Sie einen Namen ein!\n";
		document.getElementById("suche").style.color="red";
		document.getElementById("suche").value="Suchbegriff eingeben";
      }
	  else{document.getElementById("suche").value="";}

      if (f.elements["suche"].value !== "") {
	  	return true;
	  } else {
        return false;
      }

    }

// ########################## Brillen-mode scroll Function ########################

function initPage()
{

obj_scrolldiv = document.getElementById( "scroll_inner_brillen_mode_unten_scrollbox" );

isScrolling = false;

DX = 50;
DELAY = 100;

};

function scroll2Left( evt )
{
	if ( evt )
		isScrolling = true;

	if ( isScrolling )
	{
		if ( obj_scrolldiv.scrollLeft > 0 )
		{
			obj_scrolldiv.scrollLeft -= DX;
			window.setTimeout( "scroll2Left()", DELAY );
		};
	};
};

function scroll2Right( evt )
{
		if ( evt )
			isScrolling = true;

		if ( isScrolling )
		{
			obj_scrolldiv.scrollLeft += DX;
			window.setTimeout( "scroll2Right()", DELAY );
		};

};

function stopScrolling()
{
	isScrolling = false;
}


/* ################### Ajax code ####################### */

var http_request = false;

    function Request(url,div) {

        http_request = false;

        if (window.XMLHttpRequest) { // Mozilla, Safari,...
            http_request = new XMLHttpRequest();
            if (http_request.overrideMimeType) {
                http_request.overrideMimeType('text/html');
                // zu dieser Zeile siehe weiter unten
            }
        } else if (window.ActiveXObject) { // IE
            try {
                http_request = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    http_request = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
            }
        }

        if (!http_request) {
            alert('Ende :( Kann keine XMLHTTP-Instanz erzeugen');
            return false;
        }
        http_request.onreadystatechange = alertInhalt;
        http_request.open('GET', url, true);
		http_request.send(null);

 function alertInhalt() {
        if (http_request.readyState == 4) {
              var answer = http_request.responseText;
              if(document.getElementById(div).innerHTML != answer){
                document.getElementById(div).innerHTML = answer;
			  if(url=="show_form.php") {
				document.getElementById('show_form_butt').style.display ="none";
			  }
			  else {
			  	document.getElementById('show_form_butt').style.display ="block";
			  }

              }
              else{
                document.getElementById(div).innerHTML = "";
			}
        }

    }
 }


 function Request_suche(url,div) {

        http_request = false;

        if (window.XMLHttpRequest) { // Mozilla, Safari,...
            http_request = new XMLHttpRequest();
            if (http_request.overrideMimeType) {
                http_request.overrideMimeType('text/html');
                // zu dieser Zeile siehe weiter unten
            }
        } else if (window.ActiveXObject) { // IE
            try {
                http_request = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    http_request = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
            }
        }

        if (!http_request) {
            alert('Ende :( Kann keine XMLHTTP-Instanz erzeugen');
            return false;
        }
        http_request.onreadystatechange = alertInhalt;
        http_request.open('GET', url, true);
		http_request.send(null);

 function alertInhalt() {
        if (http_request.readyState == 4) {
              var answer = http_request.responseText;
              if(document.getElementById(div).innerHTML != answer){
                document.getElementById(div).innerHTML = answer;

              }
              else{
                document.getElementById(div).innerHTML = "";
			}
        }

    }
 }


 // Home grafiktausch Function

 function tausche_grafik(id, bild) {
 	var img = document.getElementById(id);
    img.setAttribute("src", "images/"+ bild);
 }

 function aktion_tausche_grafik(id, monat, bild) {
 	var img = document.getElementById(id);
    img.setAttribute("src", "monatsaktion/"+ monat +"/images/"+ bild);
 }

 // Karte Label Function

 function show_label(id) {
 	document.getElementById('label_'+id).style.display="block";
 }

 function hide_label(id) {
 	document.getElementById('label_'+id).style.display="none";
 }

 function show_uebersicht(id) {
 	document.getElementById(id).style.display="block";
 }

 function hide_uebersicht(id) {
 	document.getElementById(id).style.display="none";
 }


 // Tooltip
 /*
 tooltip_move = null;

document.onmousemove = updatetooltip_move;

function updatetooltip_move(e) {
	x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
	y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
	if (tooltip_move != null) {
		tooltip_move.style.left = (x + 20) + "px";
		tooltip_move.style.top 	= (y + 20) + "px";
		}
	}
*/



function show_menu(id) {

	if(id=="contactlinsen_sub_navi") {document.getElementById(id).style.display='block';
	document.getElementById("sehhilfen_sub_navi").style.display='none';
	document.getElementById("service_beratung_sub_navi").style.display='none';
	document.getElementById("unternehmen_sub_navi").style.display='none';
	document.getElementById("brillen_sub_navi").style.display='none';
	}
	if(id=="sehhilfen_sub_navi") {document.getElementById(id).style.display='block';
	document.getElementById("contactlinsen_sub_navi").style.display='none';
	document.getElementById("service_beratung_sub_navi").style.display='none';
	document.getElementById("unternehmen_sub_navi").style.display='none';
	document.getElementById("brillen_sub_navi").style.display='none';
	}
	if(id=="service_beratung_sub_navi") {document.getElementById(id).style.display='block';
	document.getElementById("contactlinsen_sub_navi").style.display='none';
	document.getElementById("sehhilfen_sub_navi").style.display='none';
	document.getElementById("unternehmen_sub_navi").style.display='none';
	document.getElementById("brillen_sub_navi").style.display='none';
	}
	if(id=="unternehmen_sub_navi") {document.getElementById(id).style.display='block';
	document.getElementById("contactlinsen_sub_navi").style.display='none';
	document.getElementById("sehhilfen_sub_navi").style.display='none';
	document.getElementById("service_beratung_sub_navi").style.display='none';
	document.getElementById("brillen_sub_navi").style.display='none';
	}
	if(id=="brillen_sub_navi") {document.getElementById(id).style.display='block';
	document.getElementById("contactlinsen_sub_navi").style.display='none';
	document.getElementById("sehhilfen_sub_navi").style.display='none';
	document.getElementById("service_beratung_sub_navi").style.display='none';
	document.getElementById("unternehmen_sub_navi").style.display='none';
	}
	if(id=="sehqualitaet" || id=="komplettangebote")
	{
	document.getElementById("brillen_sub_navi").style.display='none';
	document.getElementById("contactlinsen_sub_navi").style.display='none';
	document.getElementById("sehhilfen_sub_navi").style.display='none';
	document.getElementById("service_beratung_sub_navi").style.display='none';
	document.getElementById("unternehmen_sub_navi").style.display='none';
	}
}

var popUpWin=0;

function popUpWindow(URLStr, left, top, width, height) {
  if(popUpWin) {
  if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');

}


function changeMap(url, action) {
	if(action) {
		$('#bode_filial_karte').attr('src', 'images/karten/'+url+'.jpg');	
	}
	else {
		$('#bode_filial_karte').attr('src', 'images/karten/karte_gesamt.jpg');	
	}
}

function showMap(id) {
	$('#'+id).fadeIn('slow');	
}

function closeMap(id) {
	$('#'+id).fadeOut('fast');		
}



function closeShowHideTooltip(id, action ) {
	
	switch (action) {
		case "s":
			$('#label_'+id).css('display', 'block');
			
			//alert(id);
		break;
		case "h":
			$('#label_'+id).css('display', 'none');
		break;
		case "c":
			$('#'+id).css('display', 'none');
		break;
		
	}
}



var cssObj;

function ShowHideTooltip(name,top,left,action ) {
	
	var cssObj = {
        top: top,
        left: left,
		display: "block"
    }
	
	//alert(cssObj.top);
	
	switch (action) {
		case "s":
			$('#label').css(cssObj);
			$('#label h3').html(name)
			break;
		case "h":
			$('#label').css('display', 'none');
			$('#label h3').html('&nbsp;')
			break;
	}
}

function closeMap(id) {
	$('#'+id).fadeOut('slow');	
}

/* Sansibar change big image */

function changeSansibarImage(name) {
	$('#sansibarImage').attr("src","images/brillen/sansibar/brillen_gross/"+name);
}

