function foto_availWidth() {
	if(screen.availWidth > 1288) { 
		if(!parent.mitte) { top.location.href="http://www.superphotos.info/defaultframe.htm?" + location.href; }
	}
	if(screen.availWidth < 999) { 
		if(top!=self) { top.location=self.location; }
	}  
}


function BildFenster(bildNr,bild,w,h) {
	var wF = parseInt(w) ;
	var hF = parseInt(h) + 12 ;
	var nam = 'fenster' + bildNr;
	var para = '';
	var Fenstermax = 0 ;
	if (document.layers) {
		if (screen.availLeft > 100) {
			para += 'outerWidth=' + screen.availWidth + ',outerHeight=' + screen.availHeight;
			para += ',screenX=' + Math.min(screen.availLeft,wF) + 'screenY=' + Math.min(screen.availTop,hF);
			if (screen.availTop < hF) { Fenstermax = 1 ; }
		}
		else { para += 'width=800,height=600'; }
	}
	else {
		if (document.all) {
			if (screen.availWidth > 100) {
				para += 'width=' + Math.min(screen.availWidth,wF) + ',height=' + Math.min(screen.availHeight,hF);
				if (screen.availHeight < hF) { Fenstermax = 1 ; }
			}
			else { para += 'width=800,height=600'; }
		}
		else { para += 'width=800,height=600'; }
	}

	if ( Fenstermax == 0 ) { para += ',location=0,directories=0,status=0,menubar=0,resizable=1,scrollbars=0,toolbar=0'; }
	else  { para += ',location=0,directories=0,status=0,menubar=0,resizable=1,scrollbars=1,toolbar=0'; }
	neu = window.open("about:blank",nam,para);
	
	if (document.all) {
		if ( Fenstermax == 1 ) { neu.resizeTo(screen.availWidth,screen.availHeight) ; }
		neu.moveTo(0,0) ;
	}
	if ( Fenstermax == 0 ) {
		neu.document.open();
		neu.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>'+bild+'</title></head></HEAD><body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0" bgcolor="#FFFFFF"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"><tr><td align="center" valign="top"><img src="'+bild+'"><br><font size="1" face="Verdana, Arial"><a href="javascript:window.close()" title="Bitte hier klicken, um dieses Fenster zu schließen">Fenster schlie&szlig;en</a></font></td></tr></table></body></html>');
		neu.document.close();
	}
	else {
		neu.location.href=bild;
	}
	neu.focus();
}

function PopUpHelp(url){
	var PopUpHelpX = (screen.width/2)-150;
	var PopUpHelpY = (screen.height/2)-200;
	var pos = "left="+PopUpHelpX+",top="+PopUpHelpY;
	PopUpHelpWindow = window.open("http://www.superphotos.info/Das_beste_Foto/"+url,"Smilies","width=311,height=450,directories=0,status=0,menubar=0,resizable=1,scrollbars=1,toolbar=0,"+pos);
}


function foto_code_fenster(url){
	var PopUpHelpX = (screen.width/2)-100;
	var PopUpHelpY = (screen.height/2)-100;
	var jetzt = new Date();
	var Sekunden = jetzt.getSeconds();
	var Fenstername = "FotoCode" + Sekunden ;
	var pos = "left="+PopUpHelpX+",top="+PopUpHelpY;
	PopUpHelpWindow = window.open("http://www.superphotos.info/Das_beste_Foto/"+url,Fenstername,"width=700,height=420,directories=0,status=0,menubar=0,resizable=1,scrollbars=1,toolbar=0,"+pos);
}


function foto_js_footer() {
  if(window.external) {
  with(document) {
  open("text/html");
  write(" | <A HREF=\"javascript:window.external.AddFavorite(location.href, document.title)\" title=\"Bitte klicken Sie hier, um die Seite mit dem Foto: " + document.title + " Ihren Lesezeichen hinzuzuf&uuml;gen.\">bookmark</A>");
  write(" | <a href=\"mailto:?subject=Hallo%20-%20habe%20ein%20interessantes%20Foto%20gefunden&amp;body=" + window.location.href + "\" title=\"Sende deinen Freunden eine email mit einem Link zu dieser Seite.\">email a friend</a>");
  close(); } }
}