function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

ceerrormess=new Array();
ceerrormess[0]="ACHTUNG: Dieses Feld ist ein Pflichtfeld!";				
ceerrormess[1]="ACHTUNG: Bitte eine gültige Email-Adresse eingeben!";			
ceerrormess[2]="ACHTUNG: Bitte lesen Sie unsere AGBs durch!";

function fehlermeldung(fehlerid){
	alert(ceerrormess[fehlerid]);
}
function checkeingabe(dasformular){
	var dieform=document.getElementsByName(dasformular);
	//alert(dieform[0].length);
	for (i=0; i<dieform[0].length; i++){
		var dasfelement=dieform[0][i];
		if (dasfelement.attributes.inputrequired){
			var inpreq=dasfelement.attributes.inputrequired.value.toLowerCase();
			if (dasfelement.attributes.derorigstyleborder) {
				dasfelement.style.border=dasfelement.attributes.derorigstyleborder.value;
			}
			if (inpreq=="true" || inpreq=="1"){
				if (dasfelement.value==""){
					var dasfelementstyleborder=dasfelement.style.border;
					dasfelement.setAttribute("derorigstyleborder",dasfelement.style.border);
					dasfelement.style.border='2px solid orange';
					dasfelement.focus();
					fehlermeldung(0);
					return false;
				}
			}else if(inpreq=="email"){
				if ((dasfelement.value.indexOf("@")==-1)||(dasfelement.value.indexOf(".")==-1)||(dasfelement.value.length < 7)){
					var dasfelementstyleborder=dasfelement.style.border;
					dasfelement.setAttribute("derorigstyleborder",dasfelement.style.border);
					dasfelement.style.border='2px solid orange';
					dasfelement.focus();
					fehlermeldung(1);
					return false;
				}
			}else if(inpreq=="agb"){
				if (!dasfelement.checked){
					var dasfelementstyleborder=dasfelement.style.border;
					dasfelement.setAttribute("derorigstyleborder",dasfelement.style.border);
					dasfelement.style.border='2px solid orange';
					dasfelement.focus();
					fehlermeldung(2);
					return false;
				}
			}
		}
	}
}

function ForceFrames(framesetfile)
 {if(window==top.window)
   {loc=document.location+"";
    document.cookie = "location="+escape(loc)+";"
    // just let browser (NN3) to make breath
    setTimeout("document.location='"+framesetfile+"'",100);
   }
 }

function CheckPageToLoad()
 {fromN = document.cookie.indexOf('location=');
  if(fromN >= 0)
   {fromN+=9;
    toN=document.cookie.indexOf(";",fromN);
    if(toN==-1) toN=document.cookie.length;
      {loc=unescape(document.cookie.substring(fromN,toN));
       setTimeout("document.location='"+loc+"'",100);
      }
   }
 }


var newwindow = '';

function popitup(url,url_name) {
	
if (newwindow.location && !newwindow.closed) {
	newwindow.close();
 	newwindow=window.open('','htmlname','width=1,height=1,resizable=0');
	newwindow.document.write ('<html><head><title>Garni Rieplhof - www.rieplhof.com  '+url_name+'</title><SCRIPT LANGUAGE="JavaScript">');
	newwindow.document.write ('function resizer() {');
	newwindow.document.write ('windowWidth=pix.width+30;');
	newwindow.document.write ('windowHeight=pix.height+50;');
	newwindow.document.write ('windowLeft = (screen.availWidth / 2) - (windowWidth / 2);');
	newwindow.document.write ('windowTop = (screen.availHeight / 2) - (windowHeight / 2);');
	newwindow.document.write ('window.resizeTo(windowWidth,windowHeight+55);');
	newwindow.document.write ('window.moveTo(windowLeft,windowTop);}');
	newwindow.document.write ('</SCRIPT></head>');
	newwindow.document.write ('<body topmargin="0" leftmargin="0" bgcolor="#fffecb">');
	newwindow.document.write ('<table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0"><tr><td width="100%" valign="middle" align="center" height="100%"><img id="pix" name="pix" style="border: 1 solid #000000" src="'+url+'"  onLoad="setTimeout(\'resizer()\',500)"></td></tr><td align="right"><a href="javascript:self.close();"><img border="0" src="http://www.rieplhof.com/close_d.png" width="150" height="17"></a></td>');
	newwindow.document.write ('</tr></table></body></html>');
	newwindow.focus();

} 

else { 
    	newwindow=window.open('','htmlname','width=1,height=1,resizable=0');
	newwindow.document.write ('<html><head><title>Garni Rieplhof - www.rieplhof.com  '+url_name+'</title><SCRIPT LANGUAGE="JavaScript">');
	newwindow.document.write ('function resizer() {');
	newwindow.document.write ('windowWidth=pix.width+30;');
	newwindow.document.write ('windowHeight=pix.height+50;');
	newwindow.document.write ('windowLeft = (screen.availWidth / 2) - (windowWidth / 2);');
	newwindow.document.write ('windowTop = (screen.availHeight / 2) - (windowHeight / 2);');
	newwindow.document.write ('window.resizeTo(windowWidth,windowHeight+55);');
	newwindow.document.write ('window.moveTo(windowLeft,windowTop);}');
	newwindow.document.write ('</SCRIPT></head>');
	newwindow.document.write ('<body topmargin="0" leftmargin="0" bgcolor="#fffecb">');
	newwindow.document.write ('<table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0"><tr><td width="100%" valign="middle" align="center" height="100%"><img id="pix" name="pix" style="border: 1 solid #000000" src="'+url+'"  onLoad="setTimeout(\'resizer()\',500)"></td></tr><td align="right"><a href="javascript:self.close();"><img border="0" src="http://www.rieplhof.com/close_d.png" width="150" height="17"></a></td>');
	newwindow.document.write ('</tr></table></body></html>');
	newwindow.focus();
	
}
}

function tidy() {
if (newwindow.location && !newwindow.closed) { 
   newwindow.close(); } 
}





