
/*************** Bilder laden ***************/

// Navigation

news_off = new Image();
news_off.src = "../../gfx/nav_news.gif";
news_over = new Image(); 
news_over.src = "../../gfx/nav_news_over.gif";

kosten_off = new Image(); 
kosten_off.src = "../../gfx/nav_kosten.gif";
kosten_over = new Image();
kosten_over.src = "../../gfx/nav_kosten_over.gif";

produkte_off = new Image(); 
produkte_off.src = "../../gfx/nav_produkte.gif";
produkte_over = new Image(); 
produkte_over.src = "../../gfx/nav_produkte_over.gif";

foerder_off = new Image(); 
foerder_off.src = "../../gfx/nav_foerder.gif";
foerder_over = new Image(); 
foerder_over.src = "../../gfx/nav_foerder_over.gif";

fach_off = new Image(); 
fach_off.src = "../../gfx/nav_fach.gif";
fach_over = new Image(); 
fach_over.src = "../../gfx/nav_fach_over.gif";

info_off = new Image(); 
info_off.src = "../../gfx/nav_info.gif";
info_over = new Image();
info_over.src = "../../gfx/nav_info_over.gif";


/*************** Funktionen ***************/

var isDOM = (document.nodeType)?true:false;
var isIE = (document.all)?true:false;
var isOver = false;
var boxstate=true;
 
if (isDOM) document.onmousemove=moveMe;

function showTip(text){
    
	if (isDOM) {
	
		el=document.getElementById("infotip");
	
		if (text!=0 && text!=null && text!="undefined") { el.firstChild.data=text; isOver=true; }
		else { el.style.visibility="hidden"; isOver=false; }
	
	} // if DOM

} // show it off

function moveMe(e) {

    if (isOver) {

		var cx=(isIE)?eval(event.x):e.pageX;
		el=document.getElementById("infotip");
		el.style.top="100px";
    	el.style.left=eval(cx+10)+"px";
    	el.style.visibility="visible";
    
    } // moving 
    
} // move me


function go(x) {

	if (x!="") document.location.href = "forum_thema.php4?TID="+x;
        
} // 

function flip(ziel,bild,text) {

	document.images[ziel].src = eval(bild +".src")

} // flip


function fliptext(text) {

	window.status = text;
	return true;

} // fliptext


function pagetop() {

	window.scrollTo(0,0);

}


function checkform() {
	
	if (document.formular["name"].value=="") {
		alert("Bitte geben Sie einen Namen ein");
		document.formular["name"].focus();
		return false;
	} 
	
	else if (document.formular["email"].value=="") {
		alert("Bitte geben Sie ihre E-Mail-Adresse ein");
		document.formular["email"].focus();
		return false;
	} 
	
	else if (document.formular["nachricht"].value=="") {
		alert("Bitte verfassen Sie eine Nachricht");
		document.formular["nachricht"].focus();
		return false;
	} 
	
	else return true;


} // checkform


function loadgruppe() {

	x=document.formular.gruppe.options[document.formular.gruppe.options.selectedIndex].value;
	if (x!="") document.location.href = "private_send.php4?gruppe="+x;

}

function ieBlur() {

	window.defaultStatus="solarcontact.de";

	if (document.images&&navigator.userAgent.indexOf("MSIE")!=-1){

		for (i=0;i<document.links.length;i++){

			target=eval("document.links[i]")
			target.onfocus=keinRahmen

		} // for

	} // if

} // ieblur

function keinRahmen(){

	obj=window.event.srcElement
	if (obj.tagName == "A"||obj.tagName=="AREA") obj.blur()

} // ieBlur


function checkBoxes() {

	for (i=0;i<document.chk.length;i++) {
	
		if (document.chk[i].type=="checkbox") {
	
			document.chk[i].checked=boxstate;
			rowcolor(document.chk[i].value);
	
		} // if
	
	} // for

	boxstate=!boxstate;

} // checkBoxes


function checkBetriebe() {

var checker=0;

for (i=0;i<document.chk.length;i++) if (document.chk[i].type=="checkbox" && document.chk[i].checked) checker++;

if (checker==0) {

alert("Es wurde kein Betrieb ausgewaehlt.");
return false;

} else return true;

} // checkBoxes


function rowcolor(x) {
        
if (document.getElementById) {

if (document.chk["id"+x].checked) document.getElementById("td"+x).style.backgroundColor="#efefef";
else document.getElementById("td"+x).style.backgroundColor="#ffffff";

} // if

} // rowcolor

function empfehlen() {

} // empfehlen


function wopen(x){

	klima = window.open(x,"Klimazonen","width=500,height=490,resizable=no,toolbar=no,location=no,dependent=yes,toolbar=no,status=no,top=50,left=100");
	klima.focus();

} //--

		
function isEmail(x) {

	var checkmail=/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@([^ \"]+\.)+([a-zA-Z]{2,4})$/i;
	return (x!='')?checkmail.test(x):false;
	
} // isEmail

		
function isURL(x) {

	var checkurl=/^http:\/\/([^ \"]+\.)+([a-zA-Z]{2,4})+(.*)$/i;
	//var checkurl=/^http:\/\/([^ \"\n]+)/i;
	return (x!='')?checkurl.test(x):false;
		
} // isURL


function getURL(feld) {
	
	if (feld!="" && feld!="undefined") {
	
		url=document.formular[feld].options[document.formular[feld].options.selectedIndex].value;
		if (url!="" && url!="undefined") document.location.href=url;
	
	} // if feld

} // getURL


function fSuche(x) {
	
	suchfeld=document.suchformular["query_string"];
	query=suchfeld.value;
		
	if (x) {
	
		if (query==suchfeld.defaultValue) suchfeld.value="";
	
	} else {
	
		if (query=="") suchfeld.value=suchfeld.defaultValue;
	
	} // else

} // function

function fNewsletter(x) {
	
	suchfeld=document.newsform["newsletter"];
	query=suchfeld.value;
		
	if (x) {
	
		if (query==suchfeld.defaultValue) suchfeld.value="";
	
	} else {
	
		if (query=="") suchfeld.value=suchfeld.defaultValue;
	
	} // else

} // function

function checkmail() {
     
    email=document.newsform["newsletter"].value;
    
	if (email==document.newsform["newsletter"].defaultValue || !isEmail(email)) return false;
	else return true;

} // function


function fensterlein(fUrl,fBreite,fHoehe) {

	ansicht = window.open(fUrl,"Bildansicht","width="+fBreite+",height="+fHoehe+",scrollbars=yes,toolbar=no,dependent=yes,resizable=no");
	ansicht.focus();
	    
} // fensterlein


/********** empfehlen() **********/

function empfehlen(){

	url=document.location.href;
			
	if (url!="" && url!="undefined") {
	
		buddy = window.open("../../empfehlung.php4?url="+url,"empfehlung","width=300,height=370,menubar=no,scrollbars=no,location=no,toolbar=no,ubar=no,resizable=no,dependent=yes,top=100,left=100");
		buddy.focus();
	
	} // if

} // empfehlen

// eof <-------------