function winOpen(theURL,winName,features) 
{ 
  winName = window.open(theURL,winName,features); 
  
  if(winName == null || winName.closed)
    window.open(theURL,winName,features);
  else
    winName.location.href = theURL;

  if (!winName.closed) 
    winName.focus(); 
}

function setHomepage()
{
	var meinewebseite = "http://www.teamwork-germany.com";
	if (document.all)
     {
        document.body.style.behavior='url(#default#homepage)';
  		document.body.setHomePage(meinewebseite);
     }
    else if (window.sidebar)
     {
    	if(window.netscape)
	    {
         try
 		 {  
			netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
         }  
         catch(e)  
         {  
			alert("Diese Aktion wurde von Ihrem Browser geblockt, wenn Sie die Funktion nutzen m?chten&#65292; geben Sie about:config in Ihrer Adresszeile ein und ?ndern den Wert von signed.applets.codebase_principal_support nach true!");  
         }
     } 
    var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
    prefs.setCharPref('browser.startup.homepage',meinewebseite);
 }
}

function formularInNeuemFenster(nameDesFormulars)
{
var fenster = "newWindow" + Math.floor(Math.random() * 99999999);
window.open('about:blank',fenster,'Toolbar=0,Location=1,Directories=1,Status=1,Menubar=1,Scrollbars=1,Resizable=1,width=900,height=700');
document.forms[nameDesFormulars].target = fenster;
document.forms[nameDesFormulars].submit();
return true;
}

function switch2Url(targeturl)
{
  if (targeturl != null)
  {
    var values = targeturl.split(";"); 
    var target = values[0];
    var href = values[1];
    
    switch (target)
    {
      case "_self":
        self.document.location.href = href;
        break;
      case "_top":
        top.document.location.href = href;
        break;
      case "_parent":
        parent.document.location.href = href;
        break;
      case "_blank":
        window.open(href, target, "", "toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=800,height=600");
        break;
      case "_winopen":
        window.open(href, target, "", "toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=800,height=600");
        break;
      default:
        if (document.location.frames == null || document.location.frames[target])
          document.location.href = href;
        else
          document.location.frames[target].href = href;       
    }
  }
}
      function switchSite(dropDown)
      {
        if (dropDown != null)
        {
          var href = dropDown.value;
          if (href == '') {return;}
          
          if (href.indexOf("http://") <= 0)
          {
            document.location.href = href; 
          }
          else
          {
            window.open(dropDown.value,"","toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=800,height=600");
          }
        }
      }   
