function zeigeOI(wo,was){
var out = document.getElementById(wo);
out.firstChild.nodeValue=was;
out.style.left = window.event.clientX;
out.style.top = window.event.clientY;
}

function versteckeOI(mich){
var out = document.getElementById(mich);
out.style.top='-200px';
}

sfHover = function() {
	var sfEls = document.getElementById("main_nav_list").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


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


function findMouse(Ereignis, divID){
/*  Mausefänger */

    if(divID=="") divID = "appInfo1";
	
	divID = document.getElementById(divID);

  if (document.layers) {
	  alert("bin bei layers");
    document.layers[0].left = Ereignis.pageX;
    document.layers[0].top = Ereignis.pageY;
  } else if (document.getElementById) {
	  
	divID.style.display = "block";
    divID.style.left = Ereignis.pageX + "px";
	divID.style.margin = "15px"; /* -210px */
    divID.style.top = Ereignis.pageY + "px";
  }
}


function chkFormular()
{
 if(document.kontakt.vorname.value == "")  {
   alert("Bitte Ihren Voramen eingeben.");
   document.kontakt.vorname.focus();
   return false;
  }
 if(document.kontakt.nachname.value == "") {
   alert("Bitte Ihren Nachnamen eingeben.");
   document.kontakt.nachname.focus();
   return false;
  }
 if(document.kontakt.email.value == "") {
   alert("Bitte Ihre eMail-Adresse eingeben!");
   document.kontakt.email.focus();
   return false;
  }
 if(document.kontakt.email.value.indexOf('@') == -1) {
   alert("Keine gültige eMail-Adresse!");
   document.kontakt.email.focus();
   return false;
  }
 if(document.kontakt.nachricht.value == "") {
   alert("Bitte geben Sie Ihre Nachricht ein.");
   document.kontakt.nachricht.focus();
   return false;
  }
  
 if(document.kontakt.telefon.value != "" && document.kontakt.einwilligung.checked==false) {
   alert("Sie haben eine Telefonnnumer angegeben. Bitte erteilen Sie uns die Einwilligung zur telefonischen Kontaktaufnahme.");
   document.kontakt.nachricht.focus();
   return false;
  } 
  
  
}

function Details(objID){
		var width;
		var height;
		var adr = "referenzdetails.php?objID="+objID;
		var titel = "Galerie";
		var options;
			width=screen.width;
			height=screen.height;
			posx=((width-650)/2);
			posy=((height-380)/2);
			options = "toolbar=0, scrollbars=no, location=0, statusbar=1, menubar=0, resizable=0, width=<? echo medres_width+30 ?>, height=<? echo medres_height+120 ?>, left = " + posx + ", top = " + posy;
		window.open(adr, titel, options);
	}
	
function SchmuckprobePopUp01(){
		var width;
		var height;
		var adr = "http://www.catena-schmuck.de/Schmuckprobe/default.htm";
		var titel = "Schmuckprobe";
		var options;
			width=screen.width;
			height=screen.height;
			posx=((width-600)/2);
			posy=((height-425)/2);
			options = "toolbar=0, scrollbar=0, location=0, statusbar=1, menubar=0, resizable=0, width=600, height=425, left = " + posx + ", top = " + posy;
		window.open(adr, titel, options);
		}

function media(datei, title){
		var width;
		var height;
		var adr = "../../content/medialib/media.php?filename="+datei+"&title="+title;
		var titel = "Media";
		var options;
			width=screen.width;
			height=screen.height;
			posx=((width-400)/2);
			posy=((height-380)/2);
			options = "toolbar=0, scrollbars=no, location=0, statusbar=1, menubar=0, resizable=0, width=400, height=380, left = " + posx + ", top = " + posy;
		window.open(adr, titel, options);
	}
	
function blogValuate(id,value) {

	     valueBlock = document.getElementById("blogValuation");
	   
       if (valueBlock) 
	      {
            new Ajax.Updater(valueBlock, '../includes/blogvaluation.php?ID='+id+'&VAL='+value, {method: 'post'});
		  }	
	
}
