// (c) 2000, 2003 by Volker Siever t. Ein Javascript, das Rollover-Menues bereit stellt */
//vielleicht hilfts ja: Funktionen vordfinieren, damit sie definiert sind auch
//wenn das Script noch nicht fertig geladen ist.

 function hilight_on(l)
 {
 };
 function hilight_off(l)
 {
 };


function hilightBtn_on(l)
 {
 };
 function hilightBtn_off(l)
 {
 };
 function load_pix()
 {
 };

function getXpercentage(percent)
{
return percent;
};

function getYpercentage(percent)
{
return percent;
};

function openpopup(der_url)
{
};

function openlinklist(url, subtag)
{
};

//function showscull(thename)
//{
//};

//function hidescull(thename, thesuffix)
//{
//};

   //////////////ZEUCH ///////////////////////////
   mylinknames = new Array(
"whatwedo",
"publications",
"people",
"orfer",
"hex1",
"linklist",
"tp3home",
"home",
"status",
"aboutus",
"concept",
"news",
"linx",
"jobs",
"internal",
"vectors",
"strains",
"overview",
"projectStructure",
"cloningExpression",
"publications",
"medienecho",
"contact",
"software",
"cloning",
"crystallisation",
"NMR",
"xray");

   mylonglinks = new Array(
   "What we do",
   "PSF Publications",
   "The people doing cloning and protein expression - TP3",
   "ORFer - Open Reading Frame Retrieval Program",
   "The hEx1 library",
   "Protein structure hyperlinks",
   "Go back to the E. coli cloning and expression entry page", 
   "Go back to the PSF entry page",
   "PSF status page - the proteins we are working on",
   "about us - what we are and how to contact us",
   "Scientific concept",
    "PSF news",
    "Surfin the net",
    "Open positions at the PSF",
    "PSF internal pages - members only!",
    "Description of E. coli vectors we use",
    "E. coli strains useful for cloning protein expression",
    "PSF - project Overview",
    "PSF - project structure",
    "Cloning and protein expression",
    "PSF Publications",
    "PSF in the press",
		"Contact or visit to the PSF",
		"PSF Software development",
		"Cloning and protein expression at the PSF",
		"Biophysical protein analysis, protein crystallisation at the PSF",
		"Protein structure determination by NMR at the PSF",
		"Protein structure determination by X-ray at the PSF");
   //////////////////////////////////////////////////////////////////////////////
var j =  null;
var popup = null;
var linklist = null;
var linklistfile = "links.shtml"
var totfile="tot.gif"

   function load_pix() /*Laedt alle Grafiken, damit die nicht "unterwegs"
   nachgeladen werden müssen */
   { if (document.images)
     {
         for (i=0;i<mylinknames.length;i++)
         {
             j = new Image();
             j.src = mylinknames[i]+"_on.jpg";
         };
         //document.ff.src = "ff_off.gif";
        //document.rew.src = "rew_off.gif";

     };
    return true;
   };



   function switch1(alinkname,suffixname)
   {
    if (document.images)
      {
         for (i=0;i<document.images.length;i++)
         {
           if (document.images[i].name == alinkname)
           {
             document.images[i].src = alinkname+suffixname;
             return true;
           };
         };

      };
   };


   function switch3(alinkname,apicname)
   {
    if (document.images)
      {
         for (i=0;i<document.images.length;i++)
         {
           if (document.images[i].name == alinkname)
           {
             document.images[i].src = apicname;
        
      
             return true;
           };
         };

      };
   };



function  showscull(thename)
   {
    if (document.images)
      {
         for (i=0;i<document.images.length;i++)
         {
           if (document.images[i].name == thename)
           {
             document.images[i].src=totfile;

             return true;
           };
         };
         
      };
   };
   

 function hidescull(thename,thesuffix)
   {
    if (document.images)
      {
         for (i=0;i<document.images.length;i++)
         { 
           if (document.images[i].name == thename)
           {
             document.images[i].src = thename+thesuffix;
             return true;
           };
         };
         
      };
   };
   
function display_statustext(linkname)
   {
   if (mylonglinks)
      { if (mylinknames)
        {
          for (i=0;i<mylinknames.length;i++)
          {
            if (mylinknames[i] == linkname)
            {
               //if (window.statusbar)
               { 
                 return mylonglinks[i];
                //return = "Fickpisse";
                 
                         };   
            };
          };
        };
      };
     return "Nicht definiert - das soll nicht sein!";
   };
   
   function hilight_on(linkname)
   {
     switch1(linkname,"_on.jpg");
    return display_statustext(linkname);
     
     
   };
   

   function hilightBtn_on(linkname)
   {
     switch3(linkname,"/images/butt_on.jpg");
//     alert(display_statustext(linkname));
 window.status=display_statustext(linkname);
 
   };


   function hilight_off(linkname)
   {
     switch1(linkname,"_off.jpg");
  
     return display_statustext(linkname);
   };

   function hilightBtn_off(linkname)
   {
     switch3(linkname,"/images/butt_off.jpg");
     window.status="";
   
   };

function getXpercentage(percent)
{
if (screen.width)
    {
      return (percent / 100) * screen.width
    } else
      return (percent / 100) * 1024;
//assumption if resolution cant be retrieved
};

function getYpercentage(percent)
{
if (screen.height)
    {
      return (percent / 100) * screen.height
    } else
      return (percent / 100) * 768;
};

function openpopup(der_url)
{
  if (popup != null)
   {if (navigator.appName=="Microsoft Internet Explorer")
  {
     popup.close();
     popup = null;
  };
};
  popup = window.open(der_url,"popup","menubar=no,locationbar=no,status=no,dependent=yes,height="+getYpercentage(60)+",width="+getXpercentage(50)+",screenY="+getYpercentage(10)+",screenX="+getYpercentage(15)+",scrollbars=yes");
  popup.focus();
};

function openlinklist(subtag)
{
  if (linklist != null)
   {if (navigator.appName=="Microsoft Internet Explorer")
  {
     linklist.close();
     linklist = null;
  };
};
  linklist =
window.open(linklistfile+"#"+subtag,"linklist","menubar=yes,locationbar=no,status=no,dependent=yes,height="+getYpercentage(60)+",width="+getXpercentage(75)+",screenY="+getYpercentage(10)+",screenX="+getYpercentage(15)+",scrollbars=yes");
  linklist.focus();
};
