function start20j()
{
    $('#verl').hide();
    $('#best').hide();
    
    $("#formID").validationEngine('bind');
}

function showverl()
{
    $('#verl').show();
}

function hideverl()
{
    $('#verl').hide();
    $('#formID').validationEngine('hide');
    
    
}

function showbest()
{
    $('#best').show();   
}

function hidebest()
{
    $('#best').hide();
}

function showmi()
{
    location.href='http://www.asus.de/Display/LCD_Monitors/27T1E/#overview';
}


function sendverl()
{
     
    if ($("#formID").validationEngine({returnIsValid:true})==true)
        {
            zw=$('#name').val();
            zw1=$('#mail').val();
            $.post("lib/ajax.php", { job: "g20j", name: zw, mail: zw1 },
                function(data) {
                    showggew();
                    $('#name').val("")
                    $('#mail').val("");
                });
                
            $('#verl').hide();
            $('#formID1').validationEngine('hide');
            
        }
   
}

function showggew()
{
    
    var $dialog=null;
		
	var $dialog = $('<div class="dialogdiv" id="dialogdiv"></div>')
   	.html('Vielen Dank.<br>'+
        '<br>'+
        'Ihre Daten wurden übertragen. Falls Sie gewonnen haben, werden wir uns mit Ihnen in Verbindunge setzen.')
   	.dialog({
   		autoOpen: false,
   		height : 220,
   		width : 350,
   		buttons: {"OK": function() {$(this).dialog('destroy');}
                },
                title: ' Datenübertragung',
   		resizable: false
   	});	
	
	$dialog.dialog('open');
    
    
    
}




function showgabg()
{
    
    var $dialog=null;
		
	var $dialog = $('<div class="dialogdiv" id="dialogdiv"></div>')
   	.html('Teilnahmebedingungen<br>'+
        '<br>'+
        'Teilnahmeschluss ist der 15.01.2012 24:00 Uhr<br>'+
        'Der Gewinner wird per per Losentscheid ermittelt.<br>'+
        'Der Rechtsweg ist ausgeschlossen. <br>'+
        'Eine Barauszahlung ist nicht möglich. <br>'+
        'Ein Teilnahme ist über das Internet oder per Postkarte mit dem Stichwort "20 Jahre" an die Adresse "Firma Cornelius W. Ossenbühl,  Am Kieselhumes 86, 66123 Saarbrücken" möglich.<br>'+
        'Der Gewinner ist damit einverstanden, im Werbezettel, in der Presse und im Internet veröffentlicht zu werden.<br>'+
        'Mitarbeiter der Firma Cornelius W. Ossenbühl und weiteren am Gewinnspiel beteiligten Unternehmen sowie deren Angehörige sind von der Teilnahme ausgeschlossen.<br>'+
        '<br>'+
        'Verlost wird 1 Samsung Story Station 3.0 2 TB. <br>'+
        '<br>'+
        'Der Gewinner wird von der Firma Cornelius W. Ossenbühl oder im Namen der Firma Cornelius W. Ossenbhl schriftlich innerhalb von vier Wochen nach Teilnahmeschluss benachrichtigt. Diese Gewinnbenachrichtigung wird an die Adresse gerichtet, die der Teilnehmer bei der Teilnahme angegeben hat. Im Falle einer unzustellbaren Gewinnbenachrichtigung ist die der Firma Cornelius W. Ossenbhl nicht verpflichtet, weitere Nachforschungen anzustellen. In der Gewinnbenachrichtigung werden dem jeweiligen Gewinner die genauen Modalitäten der Gewinnübermittlung mitgeteilt. Eine Zusendung der Gewinne ist jedoch nur an eine gültige Post-Adresse in Deutschland möglich.<br>'+
        '<br>'+
        'Meldet sich der Gewinner nicht innerhalb von vier (4) Wochen nach dem Absenden der Benachrichtigung, so verfällt der Anspruch auf den Gewinn und es wird per Losentscheid unter den restlichen Teilnehmern ein neuer Gewinner ermittelt. Der Anspruch auf den Gewinn verfällt ebenfalls, wenn die Übermittlung des Gewinns nicht innerhalb von sechs (6) Monaten nach der ersten Benachrichtigung über den Gewinn aus Gründen, die in der Person des Gewinners liegen, erfolgen kann.<br>'+
        '<br>        '+
        'Ihre Daten werden nur zur Abwicklung den Gewinnspiels gespeichert und nach Abschluss des Gewinnspiels gelöscht.<br>'+
        'Sie werden selbstverständlich nicht weitergegeben und auch sonst in keiner, auser für die Verlosung notwendigen, weise genutzt.<br>'+
        'Wenn Sie Fragen zu Ihren Daten haben wenden Sie sich bitte an "datenschutz@ossenbuehl.net"<br>')
   	.dialog({
   		autoOpen: false,
   		height : 420,
   		width : 550,
   		buttons: {"Abbrechen": function() {$(this).dialog('destroy');}
                },
                title: ' Teilnahmebedingungen und Datenschutz',
   		resizable: 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;

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();
	
	classid="M"+pos;
	
	set_menu(classid);
	
	$.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);
	
	sms_pfad="http://www.ossenbuehl.net/SMS/main.php?"+zw2;
	
	document.getElementById("sms_pfad").value = sms_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_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>'+
   			'<div id="hookError" style="color:red; font-weight:bold;height:20px;"></div>'+
   			'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" 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="adress" 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="adress" 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="adress" name="telefon" type="text" value="" style="width: 300px;"/>'+
			'</div>'+
			'</div>'+
			'<script>'+
			'$("#form_id_hw").validationEngine("attach",{'+
			 'isOverflown: true,'+
             'overflownDIV: "#hookError"});'+
             '$("#form_id_hw").bind("jqv.form.validating", function(event){'+
					'$("#hookError").html("")'+
				'});'+
				'$("#form_id_hw").bind("jqv.form.result", function(event , errorFound){'+
					'if(errorFound) $("#hookError").append("There is some problems with your form");'+
				'});'+	
			'</script>'+
   		   '</form>')
   	.dialog({
   		autoOpen: false,
   		height : 320,
   		width : 350,
   		buttons: {"Abbrechen": function() { $.validationEngine.closePrompt(".formError",true);
											$(this).dialog('destroy');
														},
   					"Senden": function() { 
   											if ($("#form_id_hw").validationEngine({returnIsValid:true})==true)
   												{
   														dataString = "";
   														$.ajax({
   															type: "POST",
   															url: "",
   															data: dataString,
   															success: function(msg, textStatus, XMLHttpRequest){
   														}
   												      });
													$("#form_id_hw").validationEngine('destroy');													
													$(this).dialog('destroy');
													

   												}
   											
   											}
   					},
   		title: 'Treten Sie mit uns in Kontakt',
   		resizable: 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;
      }   	
              
              
