

/***********************************************************************************/

//---------- Software Popupmenue! -----------

function openNewPage () {
window.location.href=("index.php?artikel="+document.TOCNavigator.artikel.options
[document.TOCNavigator.artikel.selectedIndex].value);
document.TOCNavigator.artikel.selectedIndex="0";
}



/***********************************************************************************/

//---------- Software Popupmenue Bilder bearbeiten! -----------

function openNewPage2 () {
window.location.href=("bilder.php?artikel="+document.TOCNavigator.artikel.options
[document.TOCNavigator.artikel.selectedIndex].value);
document.TOCNavigator.artikel.selectedIndex="0";
}





/***********************************************************************************/

//---------- Software Popupmenue Software bearbeiten! -----------

function openNewPage3 () {
window.location.href=("software.php?page="+document.TOCNavigator.artikel.options
[document.TOCNavigator.artikel.selectedIndex].value);
document.TOCNavigator.artikel.selectedIndex="0";
}


/***********************************************************************************/
//---------- Standard Popup Fenster -----------

var win = null;
function newwindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',toolbar=no,status=no,resizable=yes'
win = window.open(mypage,myname,settings)
if(win.window.focus){win.window.focus();}
}

      

/***********************************************************************************/
//---------- Login Form sichtbar machen -----------

function show() {
if(document.getElementById) document.getElementById("zeige").
style.visibility = "visible"; }

      

/***********************************************************************************/
//---------- Keynote Countdown -----------

//hier das Datum und die Zeit eingeben. Normalzeit ist GMT-1 (im Juni Sommerzeit -2 also hier 17 GMT = 19:00 Uhr Sommerzeit)
var eventdate = new Date("June 7, 2010 17:00:00 GMT");

 function toSt(n)
 {s=""
  if(n<10) s+="0"
  return s+n.toString();
 }
 
 function countdown()
 {cl=document.clock;
  d=new Date();
  count=Math.floor((eventdate.getTime()-d.getTime())/1000);
  if(count<=0)
    {cl.days.value="--";
     cl.hours.value="--";
     cl.mins.value="--";
     cl.secs.value="--";
     return;
    }
  cl.secs.value=toSt(count%60);
  count=Math.floor(count/60);
  cl.mins.value=toSt(count%60);
  count=Math.floor(count/60);
  cl.hours.value=toSt(count%24);
  count=Math.floor(count/24);
  cl.days.value=count;    
  
  setTimeout("countdown()",500);
 }

      

/***********************************************************************************/
//---------- Versteckten Text aufklappen -----------

function toggledisplay (id, indicator){ 
	if (document.getElementById) { 
		var obj = document.getElementById(id);
		var pic = document.getElementsByName(indicator);
		obj.style.display = (obj.style.display=='block'?'none':'block');
		pic[0].src = (obj.style.display=='block'?'a_dateien/hide.gif':'a_dateien/show.gif');
	} else if(document.all) { // IE
		id.style.display = (id.style.display=='block'?'none':'block');
		indicator.src = (id.style.display=='block'?'a_dateien/hide.gif':'bilder/show.gif');
	} else if (document.layers) { // Netscape 4.x
		document.id.style.display = (document.id.style.display=='block'?'none':'block');
		document.indicator.src = (document.id.style.display=='block'?'a_dateien/hide.gif':'a_dateien/show.gif');
	}
}

/***********************************************************************************/
//---------- onmouseover info-layer -----------


function nebox(derinhalt) {
if (document.getElementById) {
pop = document.getElementById('popupinfo');
//screen width
if (document.all) { var breite = document.body.clientWidth; var hoehe = document.body.clientHeight; }
else { var breite = window.innerWidth; var hoehe = window.innerHeight; }
if (document.all) {
var ieBox = document.compatMode != "CSS1Compat";
var cont = ieBox ? document.body : document.documentElement;
mouseY += cont.scrollTop;
}
var coordx = mouseX + 10;
var coordy = mouseY + 10;
if((coordx + pop.offsetWidth) > breite) { coordx = breite - pop.offsetWidth - 10; }
pop.style.left= coordx + 'px'; pop.style.top= coordy + 'px';
pop.innerHTML=derinhalt;
pop.style.display='block';
}
}

function saveMouseCoords (e) {
if (window.Event) { // Netscape
mouseX = e.pageX; mouseY = e.pageY;
} else { // MSIE
mouseX = window.event.clientX; mouseY = window.event.clientY;
}
}

if (document.captureEvents) {
document.captureEvents (Event.MOUSEMOVE);
document.onmousemove = saveMouseCoords;
}

function boxwech() {
if(document.getElementById) {
document.getElementById('popupinfo').style.display='none';
document.getElementById('popupinfo').innerHTML='';
}
}





/***********************************************************************************/
//---------- Focus ins Textfeld -----------

function placeFocus() {
if (document.forms.length > 0) {
var field = document.forms[0];
for (i = 0; i < field.length; i++) {
if ((field.elements[i].type == "text") || (field.elements[i].type == "password") || (field.elements[i].type == "textarea") || (field.elements[i].type.toString().charAt(0) == "s")) {
document.forms[0].elements[i].focus();
break;
         }
      }
   }
}

