  //Seite kann nicht in einem Frame geladen werden!
  /*if(parent.frames.length > 0)
  {
    var Pfad = this.location;
    window.top.location.href=Pfad;
  };*/
  
  function getPageSize() {
	        
	     var xScroll, yScroll;
		
		if (window.innerHeight && window.scrollMaxY) {	
			xScroll = window.innerWidth + window.scrollMaxX;
			yScroll = window.innerHeight + window.scrollMaxY;
		} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
			xScroll = document.body.scrollWidth;
			yScroll = document.body.scrollHeight;
		} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
			xScroll = document.body.offsetWidth;
			yScroll = document.body.offsetHeight;
		}
		
		var windowWidth, windowHeight;
		
		if (self.innerHeight) {	// all except Explorer
			if(document.documentElement.clientWidth){
				windowWidth = document.documentElement.clientWidth; 
			} else {
				windowWidth = self.innerWidth;
			}
			windowHeight = self.innerHeight;
		} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
			windowWidth = document.documentElement.clientWidth;
			windowHeight = document.documentElement.clientHeight;
		} else if (document.body) { // other Explorers
			windowWidth = document.body.clientWidth;
			windowHeight = document.body.clientHeight;
		}	

		// for small pages with total height less then height of the viewport
		if(yScroll < windowHeight){
			pageHeight = windowHeight;
		} else { 
			pageHeight = yScroll;
		}
	
		// for small pages with total width less then width of the viewport
		if(xScroll < windowWidth){	
			pageWidth = xScroll;		
		} else {
			pageWidth = windowWidth;
		}

		return [pageWidth,pageHeight];
	}

  function zeigetd(){
    var arrayPageSize = getPageSize();
    var ad = document.getElementById('ausblendung');
    var tdb = document.getElementById('tdbox');
    var tdbw = tdb.getWidth();
    ad.setStyle({ width: arrayPageSize[0] + 'px', height: arrayPageSize[1] + 'px' });
    tdb.setStyle({ left: ((arrayPageSize[0] / 2)-(tdbw / 2)) + 'px', height: (arrayPageSize[1]-60) + 'px'});
    new Effect.Appear('ausblendung', { duration: 0.5, from: 0.0, to: 0.8 });
    
    new Effect.Appear('tdbox', { duration: 1.0, from: 0.0, to: 1.0 });
  }
  function schliessetd(){
    new Effect.Puff('tdbox', { duration: 0.5});
    new Effect.Fade('ausblendung', { duration: 1.0, from: 0.8});
   
  }
  
  function aemail(){
	  var string1 = "info";
	  var string2 = "@";
	  var string3 = "benelli.de";
	  var string4 = "ed.illeneb";
    var string5 = "@ofni";
    return "<a title=\"eMail schicken\" href=" + "mail" + "to:" + string1 + string2 + string3 + "><span class=\"liam\">" + string4 + string5 + "</span></a>";
  }
  
  function showmail(string3,string1){
	  
	  var string2 = "@";

	  
    return "<a title=\"eMail schicken\" href=" + "mail" + "to:" + string1 + string2 + string3 + "><span class=\"buttonlike\">" + string1 +'(at)' + string3 + "</span></a>";
  }
  
  function getEBC(targetclass){
	 if (document.querySelectorAll)
		  return document.querySelectorAll("."+targetclass)
	 else{
		  var classnameRE=new RegExp("(^|\\s+)"+targetclass+"($|\\s+)", "i") //regular expression to screen for classname
		  var pieces=[]
		  var alltags=document.all? document.all : document.getElementsByTagName("*")
		  for (var i=0; i<alltags.length; i++){
			 if (typeof alltags[i].className=="string" && alltags[i].className.search(classnameRE)!=-1)
				  pieces[pieces.length]=alltags[i]
		  }
		  return pieces
	 }
  }
