document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/default/init.css\" />");

if(is_internet_explorer() && is_windows()) {
   document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/default/fix-win32-internet-explorer.css\" />");
}

function include(inUrl) {
   theHead = document.getElementsByTagName("head")[0];
   theElement = document.createElement("script");
   theAttribute = document.createAttribute("type");
   theAttribute.nodeValue = "text/javascript";
   theElement.setAttributeNode(theAttribute);
   theAttribute = document.createAttribute("src");
   theAttribute.nodeValue = inUrl;
   theElement.setAttributeNode(theAttribute);
   theHead.appendChild(theElement);
}

//   include("/js/function.string-explode.js");
//   include("/js/function.load-image.js");
//   include("/js/function.string-compare.js");
//   include("/js/function.do-when.js");
   include("/js/function.register-timeouts.js");
//   include("/js/function.clear-timeouts.js");
//   include("/js/function.get-attribute-value-from-style-string.js");
//   include("/js/function.do-when-style-is.js");
//   include("/js/function.node-clone.js");
   include("/js/function.element-set-opacity.js");
   include("/js/function.trace.js");
//   include("/js/function.trace-clear.js");
   include("/js/function.element-dim.js");
//   include("/js/function.data-load.js");
//  include("/js/function.insert-data.js");

//position:absolute;z-index:10;left:555px;top:250px;width:162px;height:146px;margin:0;padding:0;left:0;

function init()   {
   var theString = "SWISS SHAPES / ACHT PLUS N v1.1 - zuletzt aktualisiert: 21. November 2007";
   window.status = theString;
   window.defaultStatus = theString;
   //delay the display of footnotes for netscape family browsers
   
   if(navigator.appName == "Netscape") {
      //fixFootnotes(false);
      //window.setTimeout("fixFootnotes(true)",1000);
      //window.setTimeout("fixFootnotes(false)",2000);
      //window.setTimeout("fixFootnotes(true)",3000);
   }
   var theInnerWidth = 800;
   if(is_internet_explorer()) {
      theWidth = theInnerWidth + 75;
      if(is_windows())  {
         theWidth += 10;
      }
   }  else  {
      theWidth = theInnerWidth + 55;
   }
   var theHeight = screen.availHeight - 40;
   //alert(theHeight);
   window.resizeTo(theWidth,theHeight);
   //window.resizeTo(screen.availWidth,screen.availHeight);
   /*if(!is_internet_explorer())   {
      centerContent();
   }*/
   
   
   
   //for the sake of safari, don't start at zero!
   dim("container",0.05,1.0);
   window.setTimeout("fixHoverAnchors();",500);
}
function fixFootnotes(theStatus)   {
   theDivs=document.getElementsByTagName("div");
   for(theIndex=0;theIndex<theDivs.length;theIndex++)   {
      //alert(theDivs[theIndex].getAttribute("class"));
      if(theDivs[theIndex].getAttribute("class")
         && theDivs[theIndex].getAttribute("class") == "footnotes"
      )  {
         if(theStatus == false)   {
            theDisplay = "none";
         }  else  {
            theDisplay = "block";
         }
         theDivs[theIndex].style.display=theDisplay;
      }
   }
}

function centerContent() {
   theDivs=document.getElementsByTagName("div");
   for(theIndex=0;theIndex<theDivs.length;theIndex++)   {
      //alert(theDivs[theIndex].getAttribute("class"));
      if(theDivs[theIndex].getAttribute("id")
         && ( 
            theDivs[theIndex].getAttribute("id") == "content"
         || theDivs[theIndex].getAttribute("id") == "navigation"
         || theDivs[theIndex].getAttribute("id") == "navigationprojects"
         )
      )  {
         theDivs[theIndex].style.margin="0 auto";
      }
   }
}

function fixHoverAnchors() {
   
   var d=document.getElementsByTagName("a");
   
   for(var i=0;i < d.length;i++) {
   //for(i in d) { not supported by safari!
      if(d[i].getAttribute &&
         (  !d[i].getAttribute("href")
         || d[i].getAttribute("href") == null   //safari
         )
      ) {
         d[i].style.color = "rgb(255,255,255)";
         //for safari that's not enough
         var theAttribute = document.createAttribute("onmouseover");
         theAttribute.nodeValue = "this.firstChild.style.background='rgb(255,255,255);'";
         d[i].setAttributeNode(theAttribute);
         
      }
      
   }
   
}


