
if (self.parent.frames.length != 0)
        self.parent.location="/index.php";

function fav()
{
if ((navigator.appName == 'Microsoft Internet Explorer') && (parseInt(navigator.appVersion) >= 4) && (navigator.platform != 'MacPPC'))
		{
		  window.external.AddFavorite('http://www.thomas-rathay.de', 'Thomas Rathay PhotoDesign');
		  return false;
		}
		else
		{
		  alert('Dies funktioniert leider nur mit Internet Explorer ab Version 4.x unter Windows!');
		  return false;
		}
}


function printPage1() {
if (window.print) window.print()
else
alert("Sorry, aber Ihr Browser unterst&uuml;zt nicht das direkte Drucken von HTML-Seiten!");
}


var ebenenref;
function Zeige(Nr){
ebenenref="sub"+Nr;
if (document.getElementById) // IE 5.x und NN 6
{document.getElementById(ebenenref).style.visibility="visible";
}
if (document.layers) // NN 4.x
{document.layers[ebenenref].visibility="visible";
}
if (document.all && !document.getElementById) // IE 4
{document.all[ebenenref].style.visibility="visible";
}
}
function Verstecke(Nr)
{ebenenref="sub"+Nr;
if (document.getElementById) // IE 5.x und NN 6
{document.getElementById(ebenenref).style.visibility="hidden";
}
if (document.layers) // NN 4.x
{document.layers[ebenenref].visibility="hidden";
}
if (document.all && !document.getElementById) // IE 4
{document.all[ebenenref].style.visibility="hidden";
}
}

function change(objshow,objhide)
{
	if(document.layers)
	{		objhide.visibility="hide";
			objshow.visibility="show";	}
	if(document.all)
	{		objhide.style.visibility="hidden";
			objshow.style.visibility="visible";	}
}



function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function haftung(mypage){
	var mypage; var winname='Haftung';
	var w=450; var h=450;
	var winbreite=(screen.width-w)/10;
	var winhoehe=(screen.height-h)/10;
	winprops='height='+h+',width='+w+',top='+winhoehe+',left='+winbreite+',resizable=yes,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,locationbar=no';
	win=window.open(mypage, winname, winprops);
	win.focus();
}
function mailan(){
	var mypage="mailan.php";
	var w=440; var h=420;
	var winbreite=(screen.width-w)/10;
	var winhoehe=(screen.height-h)/10;
	var myname="mailan";
	winprops='height='+h+',width='+w+',top='+winhoehe+',left='+winbreite+',scrollbars=1,resizable=0';
	win=window.open(mypage, myname, winprops);
	win.focus();
}
function empfehlen(){
	var mypage="empfehlen.php";
	var w=440; var h=420;
	var winbreite=(screen.width-w)/10;
	var winhoehe=(screen.height-h)/10;
	var myname="empfehlen";
	winprops='height='+h+',width='+w+',top='+winhoehe+',left='+winbreite+',scrollbars=1,resizable=0';
	win=window.open(mypage, myname, winprops);
	win.focus();
}
function open_win(ziel,attr) {
   var a='<img src='+ziel+' border=0>'
   if (attr==0) 
   type="width=630,height=450,screenX=10,screenY=10,resizable=yes,scrollbars=no,toolbar=no,status=no,directories=no,menubar=no,locationbar=no"
   if (attr==1)
   type="width=1000,height=780,screenX=10,screenY=10,resizable=yes,scrollbars=no,toolbar=no,status=no,directories=no,menubar=no,locationbar=no"
   if (attr==2)
   type="width=340,height=510,screenX=10,screenY=10,resizable=yes,scrollbars=no,toolbar=no,status=no,directories=no,menubar=no,locationbar=no"
   if (attr==3)
   type="width=520,height=560,screenX=10,screenY=10,resizable=yes,scrollbars=no,toolbar=no,status=no,directories=no,menubar=no,locationbar=no"
   newwindow = window.open("","Yeah",type);
   newwindow.document.open();
	newwindow.document.write("<link rel='stylesheet' type='text/css' href='style-spi-w.css'>");
   newwindow.document.write("<p align='center'><a href='javascript:window.close()'>");
   newwindow.document.write(a);
   newwindow.document.write("</a></p>");
   newwindow.document.write("<p align='center'><a href='javascript:window.close()' class=small>");
   newwindow.document.write("<br>Fenster schliessen</a></p>");
	newwindow.focus();
   newwindow.document.close();
}
      var Name = navigator.appName;             
      var Version = parseInt(navigator.appVersion);
      var JavaScript = 0;
      if ((Name == "Netscape" && Version >= 4) || (Name == "Microsoft Internet Explorer" && Version >=4)) { JavaScript = 1; }
      function openWin(adresse) {
      if (JavaScript == 1) { 
      Fenster = open(adresse,"Yeah","width=850,height=550,screenX=10,screenY=10,resizable=yes,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,locationbar=no");
      Fenster.focus();
      }
      }

// <a href="#" onClick="javascript:open_win('bildname',3)"> 


function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}

function disableRightClick(e)
{
    var browser = navigator.appName.substring ( 0, 9 );
    var eventNumber = 0;

    if(browser=="Microsoft") eventNumber = event.button;
    else if(browser=="Netscape") eventNumber = e.which;

    if((eventNumber == 2) || (eventNumber == 3)) {
        alert('Alle Beiträge und Bildinformationen sind urheberrechtlich geschützt und dürfen nicht ohne schriftliche Genehmigung des Eigentümers verwendet werden.');
        return false;
    }

    return true;
}

function trapPageMouseEvents()
{
    var browser = navigator.appName.substring ( 0, 9 );

    document.onmousedown = disableRightClick;

    if(browser == "Netscape") document.captureEvents(Event.MOUSEDOWN);
}

function beforeSearchSubmit() {
    document.forms.search_form.search_par.value="true";
    if (document.forms.search_form.search_par.value=="false") alert(document.forms.search_form.search_par.value);
        return true;
}
