search = 'leer';
   var markerText = '';
   var oldOnLoadGoogleMap = window.onload,
       map,
       mapDir,
       marker,
       infoWindowHidden = false,
       suggestPlacemarks;
   var my_gal_id;
   var xa_gal_flag = 0;

function SW(pfad1,pfad2,c)
{
	var smsBs="";
	var smsTs="";
	var smsGe=0;
	
	
	
	
	
	zw="MP="+pfad1+"&MPC="+pfad2+"&P="+c;
	
	pos=pfad2.substr(1,1);
	
	reset_menu();
	reset_p();
	
	classid="M"+pos;
	
	
	set_menu(classid);
	set_p(c);
	
	$.ajax({
		url: "fillsb.php",
		data: zw,
		async:false,
		success: function(msg){
			smsBs=msg;
		}
	});
	
	$.ajax({
		url: "fillst.php",
		data: zw,
		async:false,
		success: function(msg){
			smsTs=msg;
		}
	});

	
		
	document.getElementById('divContText').style.display = "none";
	
	document.getElementById('divContBildLoad').style.visibility = 'visible';
	
	
	$.ajax({
		url: "fill.php",
		data: zw,
		async:false,
		success: function(msg){
			//alert (msg);
			$('#divContText').html(msg);
			if (smsTs=="f")
			{	
			$("#divContText").fadeIn('2000');
			}
			else if (smsTs=="s")
			{
			$("#divContText").slideDown("slow");
			}
			
		}
	});
	
	zw=pfad1+"/"+pfad2+"/"+c+"/bild.jpg";
	
	zw1='url('+zw+')';
	
	
	document.getElementById('divContBild').style.backgroundImage = zw1;
	document.getElementById('divContBild').style.display = "none";
	
	zw1=pfad1+"/"+pfad2+"/"+c+"/gbild.jpg";
	
	$('#divContBild').unbind('mouseup');
	
	$('#divContBild').mouseup(function() {
			showlb(zw1);
		});
	
	
	if (smsBs=="f")
	{	
	$("#divContBild").fadeIn('2000');
	}
	else if (smsBs=="s")
	{
	$("#divContBild").slideDown('slow');
	}

	zw="MP="+pfad1+"&MPC="+pfad2+"&P="+c;
	
	zw2="MP="+pfad1+"&MPC="+pfad2+"&P="+c.substr(1,1);
	
	aa=10;
	
	mysms_pfad = 'http://www.ossenbuehl.net/SMS/main.php?' + zw2;
	
	document.getElementById("sms_pfad").value = mysms_pfad;
	
	$.ajax({
		url: "fillge.php",
		data: zw,
		async:false,
		cache:false,
		success: function(msg){
			smsGe=msg;
			zwtext='<label onclick="sms_js_kont()" style="cursor:pointer"> M&ouml;chte ich auch haben </label> | dies gef&auml;llt '+msg+' Leuten. Gef&auml;llt mir <img src="gm.jpeg" style="cursor:pointer" width="12" height="12" border="0" alt="" onclick=fc("'+zw+'")  >';
			$('#divContFuss').html(zwtext);
		}
	});
	
	document.getElementById('divContBildLoad').style.visibility = 'hidden';
	
}

function reset_p()
{
	if (document.getElementById("P1")!=null)
		document.getElementById("P1").style.backgroundColor = '#000000';
	if (document.getElementById("P2")!=null)
		document.getElementById("P2").style.backgroundColor = '#000000';
	if (document.getElementById("P3")!=null)
		document.getElementById("P3").style.backgroundColor = '#000000';
	if (document.getElementById("P4")!=null)
		document.getElementById("P4").style.backgroundColor = '#000000';
	if (document.getElementById("P5")!=null)
		document.getElementById("P5").style.backgroundColor = '#000000';
	if (document.getElementById("P6")!=null)
		document.getElementById("P6").style.backgroundColor = '#000000';
}

function set_p(pid)
{
	if (document.getElementById(pid)!=null)
		document.getElementById(pid).style.backgroundColor = '#FF0000';
}


function reset_menu()
{

	if (document.getElementById("M1")!=null)
	document.getElementById("M1").style.fontWeight = 'normal';
	
	if (document.getElementById("M2")!=null)
	document.getElementById("M2").style.fontWeight = 'normal';
	
	if (document.getElementById("M3")!=null)
	document.getElementById("M3").style.fontWeight = 'normal';
	
	if (document.getElementById("M4")!=null)
	document.getElementById("M4").style.fontWeight = 'normal';
	
	if (document.getElementById("M5")!=null)
	document.getElementById("M5").style.fontWeight = 'normal';
	
	if (document.getElementById("M6")!=null)
	document.getElementById("M6").style.fontWeight = 'normal';
	
	if (document.getElementById("M7")!=null)
	document.getElementById("M7").style.fontWeight = 'normal';
	
	if (document.getElementById("M8")!=null)
	document.getElementById("M8").style.fontWeight = 'normal';
	
	}

function set_menu(classid)
{
	document.getElementById(classid).style.fontWeight = 'bold';
	}


function fc(pfad)
{
	zw=pfad
	
	$.ajax({
		url: "fillcge.php",
		data: zw,
		async:false,
		cache:false,
		success: function(msg){
			smsGe=msg;
			zwtext='<label onclick="sms_js_kont()" style="cursor:pointer"> M&ouml;chte ich auch haben </label> | dies gef&auml;llt '+msg+' Leuten. Gef&auml;llt mir <img src="gm.jpeg" style="cursor:pointer" "width="12" height="12" border="0" alt="" onclick=fc("'+zw+'")  >';
			$('#divContFuss').html(zwtext);

		}
	});
	
}

function showlb(pfad)
{
	//var $dialog=null;
	/*
	var $dialog = $('<div class="dialogdiv" id="dialogdiv"></div>')
   	.html('<img src="'+pfad+'"></img>')
   	.dialog({
   		autoOpen: false,
   		height : 740,
   		width : 1060,
   		buttons: {"Abbrechen": function() { $(this).dialog('destroy');
														}},
   		title: 'Bild',
   		resizable: false
   	});	
	
	$dialog.dialog('open');
	
	//alert ("jj");
	*/
}


function sms_js_kont()
{

	var $dialog=null;
		
	var $dialog = $('<div class="dialogdiv" id="dialogdiv"></div>')
   	.html('<form id="form_id_hw" method="post"><br>'+
   			'Sie interessieren Sich für dieses Produkt?<br>'+
   			'Dann füllen Sie bitte das Formular aus.<br>'+
   			'Wir werden uns mit Ihnen in Verbindung setzen.<br>'+
   			'<input id="sms_pfad" type="hidden" id="sms_pfad" name="sms_pfad" value="'+document.getElementById("sms_pfad").value+'" size="" maxlength="">'+
   			'<div class="form_item2" >'+
			'<div class="form_element form_item_sr cf_textbox">'+
				'<label class="cf_label" >Name *</label>'+
				'<input class="validate[required] cf_inputboxd" maxlength="150" title="Ihr Name" id="name" name="name" type="text" value="" style="width: 300px;"/>'+
			'</div>'+
			'</div>'+
			'<div class="form_item2" >'+
			'<div class="form_element form_item_sr cf_textbox">'+
				'<label class="cf_label" >Mail *</label>'+
				'<input class="validate[required] cf_inputboxd" maxlength="150" title="Ihe EMail Adressee" id="mail" name="mail" type="text" value="" style="width: 300px;"/>'+
			'</div>'+
			'</div>'+
			'<div class="form_item2" >'+
			'<div class="form_element form_item_sr cf_textbox">'+
				'<label class="cf_label" >Telefon </label>'+
				'<input class="validate[required] cf_inputboxd" maxlength="150" title="Ihre Telefonnummer" id="telefon" name="telefon" type="text" value="" style="width: 300px;"/>'+
			'</div>'+
			'</div>'+
			'<script>'+
			'$("#form_id_hw").validationEngine("attach");'+
			'</script>'+
   		   '</form>')
   	.dialog({
   		autoOpen: false,
   		height : 330,
   		width : 350,
   		buttons: {"Abbrechen": function() { $.validationEngine.closePrompt(".formError",true);
											$(this).dialog('destroy');
														},
   					"Senden": function() { 
   											if ($("#form_id_hw").validationEngine({returnIsValid:true})==true)
   												{
   														dataString = "name="+document.getElementById("name").value+"&mail="+document.getElementById("mail").value+"&telefon="+document.getElementById("telefon").value+"&sms_pfad="+document.getElementById("sms_pfad").value;
   														$.ajax({
   															type: "POST",
   															url: "sendanf.php",
   															data: dataString,
   															success: function(msg, textStatus, XMLHttpRequest){
   														}
   												      });
													$("#form_id_hw").validationEngine('destroy');													
													$(this).dialog('destroy');
													

   												}
   											
   											}
   					},
   		title: 'Treten Sie mit uns in Kontakt',
   		resizable: false,
   		draggable: false
   	});	
	
	$dialog.dialog('open');
	
}





search = 'leer';
var markerText = '';
var oldOnLoadGoogleMap = window.onload,
    map,
    mapDir,
    marker,
    infoWindowHidden = false,
    suggestPlacemarks;
var my_gal_id;
var xa_gal_flag = 0;

var initmap = function(xpos,ypos) {
               if (oldOnLoadGoogleMap) oldOnLoadGoogleMap();
               if (GBrowserIsCompatible()) {

               	//xpos=1;
               	//ypos=1;
               	
                   map = new GMap2(document.getElementById('map'));

                   map.addControl(new GLargeMapControl());
                   map.addControl(new GScaleControl(), new GControlPosition(G_ANCHOR_BOTTOM_LEFT, new GSize(64,15)));
                   map.addControl(new GMapTypeControl());
                   map.addControl(new GOverviewMapControl());
                   map.setCenter(new GLatLng(49.282847, 7.103004), 18);	
                   map.setMapType(G_SATELLITE_MAP);
                   var point = new GLatLng(49.282847, 7.103004);

                   marker = new GMarker(point);
                   
                   marker.openInfoWindowHtml(buildhtml());
                   
                   map.addOverlay(marker);
                   
                   //var mt = new MarkerTracker(marker, map);

                   map.enableScrollWheelZoom();

                   
                   GEvent.addListener(map, 'dblclick', function(){
                       marker.setPoint(map.getCenter());
                       showLatLng();
                   });

               } else {
                   alert('Ihr Browser ist mit Google Maps nicht kompatibel.');
               }
           };
           
           
          
  

   function buildhtml ()
   {
	   //<img src="pic/slogo.jpg" width="60" height="41" border="0" alt="">
   	zw='<div style="width:200px;height:80px;font-family: arial;font-size: 12px;" ><div style="top:10px;left:0px;position:absolute;"></div><div style="left:80px;position:absolute;"><b> Wellness Company St. Ingbert</b> <br>Gehnbachstr. 1-3<br>66386 St. Ingbert</div> </div>';
   	
   	return zw;
   }   	
           
   function onclickUrl(href){
	   window.location.href = href;
   }   
   
   
   

   var initmap = function(xpos,ypos) {
                  if (oldOnLoadGoogleMap) oldOnLoadGoogleMap();
                  if (GBrowserIsCompatible()) {

                  	//xpos=1;
                  	//ypos=1;
                  	
                      map = new GMap2(document.getElementById('map'));

                      map.addControl(new GLargeMapControl());
                      map.addControl(new GScaleControl(), new GControlPosition(G_ANCHOR_BOTTOM_LEFT, new GSize(64,15)));
                      map.addControl(new GMapTypeControl());
                      map.addControl(new GOverviewMapControl());
                      map.setCenter(new GLatLng(49.19651971365369, 7.0246195793151855), 18);	
   					  map.setMapType(G_SATELLITE_MAP);
                      var point = new GLatLng(49.19651971365369, 7.0246195793151855);

                      marker = new GMarker(point);
                      
                      marker.openInfoWindowHtml(buildhtml());
                      
                      map.addOverlay(marker);
                      
                      //var mt = new MarkerTracker(marker, map);

                      map.enableScrollWheelZoom();

                      
                      GEvent.addListener(map, 'dblclick', function(){
                          marker.setPoint(map.getCenter());
                          showLatLng();
                      });

                  } else {
                      alert('Ihr Browser ist mit Google Maps nicht kompatibel.');
                  }
              };
              
              
             
     

      function buildhtml ()
      {

      	zw='<div style="width:200px;height:80px;font-family: arial;font-size: 12px;" ><div style="top:10px;left:0px;position:absolute;"><img src="pic/slogo.jpg" width="60" height="60" border="0" alt=""></div><div style="left:80px;position:absolute;"><b> SMS Innenausbau GmbH</div> </div>';
      	
      	return zw;
      }   	
              
              
