//general_funcs sind von der datei weinrot.js getrennt zu halten, da general_funcs im gegensatz dazu ohne mootools arbeiten

//########## EMailadresse verstecken. Defaultwert: info@weinrot.com

function HideEA( EMail, EMailText, StyleCSS, DomainText )
{
	var Domain;
	var EMail;
	if( DomainText=="" || DomainText==undefined )
		Domain="weinrot.com";
	else
		Domain=DomainText;
	if( EMail=="" || EMail==undefined )
		EMail="info";
	if( StyleCSS=="" ){
		if( EMailText=="" )
			document.write( '<a href="mailto:'+EMail+'@'+Domain+'">'+EMail+'@'+Domain+'</a>');// -->
		else
			document.write( '<a href="mailto:'+EMail+'@'+Domain+'">'+EMailText+'</a>');// -->
	}
	else {
		if( EMailText=="" )
			document.write( '<a href="mailto:'+EMail+'@'+Domain+'"class="'+StyleCSS+'">'+EMail+'@'+Domain+'</a>');// -->
		else
			document.write( '<a href="mailto:'+EMail+'@'+Domain+'"class="'+StyleCSS+'">'+EMailText+'</a>');// -->
	}
}
//########## EMailadresse verstecken ENDE



/*///////////////////////////POPUPFENSTER///////////////////////////*/


//don't touch
function popImage(imageURL, imageTitle) {

PositionX = 10;
PositionY = 10;
defaultWidth  = 600;
defaultHeight = 400;

var AutoClose = true;	

    var imgWin = window.open("", "_popImage", "scrollbars=no,resizable=1,width=" + defaultWidth + ",height=" + defaultHeight + ",left=" + PositionX + ",top=" + PositionY);
    if (!imgWin) {
        return true;
    }
    imgWin.document.write("<html><head><title>" + imageTitle + "</title><script type=\"text/javascript\">\r\n" + "function resizeWinTo() {\r\n" + "if( !document.images.length ) { document.images[0] = document.layers[0].images[0]; }" + "var oH = document.images[0].height+30, oW = document.images[0].width+30;\r\n" + "if( !oH || window.doneAlready ) { return; }\r\n" + "window.doneAlready = true;\r\n" + "var x = window; x.resizeTo( oW + 200, oH + 200 );\r\n" + "var myW = 0, myH = 0, d = x.document.documentElement, b = x.document.body;\r\n" + "if( x.innerWidth ) { myW = x.innerWidth; myH = x.innerHeight; }\r\n" + "else if( d && d.clientWidth ) { myW = d.clientWidth; myH = d.clientHeight; }\r\n" + "else if( b && b.clientWidth ) { myW = b.clientWidth; myH = b.clientHeight; }\r\n" + "if( window.opera && !document.childNodes ) { myW += 16; }\r\n" + "x.resizeTo( oW = oW + ( ( oW + 200 ) - myW ), oH = oH + ( (oH + 200 ) - myH ) );\r\n" + "var scW = screen.availWidth ? screen.availWidth : screen.width;\r\n" + "var scH = screen.availHeight ? screen.availHeight : screen.height;\r\n" + "if( !window.opera ) { x.moveTo(Math.round((scW-oW)/2),Math.round((scH-oH)/2)); }\r\n" + "}\r\n" + "</script>" + "</head><body style=\"margin: 0px;\" onload=\"resizeWinTo();\"" + (AutoClose ? " onblur=\"self.close();\"" : "") + ">" + (document.layers ? "<layer left=\"0\" top=\"0\">" : "<div style=\"position:absolute; margin-top: 15px; margin-left: 15px; margin-right: 15px;\">") + "<a href=\"#\"  onclick=\"self.close();\"><img src=" + imageURL + " border=\"0\" alt=\"Loading image ...\" title=\"\" onload=\"resizeWinTo();\"></a>" + (document.layers ? "</layer>" : "</div>") + "</body></html>");
    imgWin.document.close();
    if (imgWin.focus) {
        imgWin.focus();
    }
    return false;
}

/*///////////////////////////POPUPFENSTER ENDE///////////////////////////*/