
var isSet_timerID=0;

var timerID=1;
var timeSr=1;
var subNavActive=0;
var subNavPosActive=0;

var timerID2=1;

/*
if (document.all){
	var IE = document.all?true:false

	// If NS -- that is, !IE -- then set up for mouse capture
	if (!IE) document.captureEvents(Event.MOUSEMOVE)

	// Set-up to use getMouseXY function onMouseMove
	document.onmousemove = getMouseXY;

	// Temporary variables to hold mouse x-y pos.s
	var tempX = 0
	var tempY = 0
}
*/

// Main function to retrieve mouse x-y pos.s

function getMouseXY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY
  }  
  // catch possible negative values in NS4
  // show the position values in the form named Show
  // in the text fields named MouseX and MouseY
  //document.Show.MouseX.value = tempX
  //document.Show.MouseY.value = tempY
  return true
}

function resize_me(n)
{
    d=5;ifObj=document.getElementsByName(n)[0];p=(document.all)?'scroll':'offset';
    
    if (window.frames[n]){
	    eval("ifObj.style.width=window.frames[n].document.getElementsByTagName('body')[0]."+p+"Width+"+d);
	    eval("ifObj.style.height=window.frames[n].document.getElementsByTagName('body')[0]."+p+"Height+"+d);
    }
}


function lesezeichen_moeglich()
{
  if(!window.external)
    return false
  return true
}

function addfavourite(verweis, name)
{
  if(!lesezeichen_moeglich())
  {
    alert("Diese Funktion wird von Ihrem Browser nicht unterstuetzt!")
    return
  }
  window.external.AddFavorite(verweis, name)
}

 function ImageBook(){
 }



function openDoc(doc)
{
  popup_window = open(doc,"","width=700,height=600,screenX=0,screenY=0, resizable=yes");
  popup_window.focus();
}

function openDocxy(doc,name,x,y)
{
  popup_window = open(doc,name,"width="+x+",height="+y+",screenX=0,screenY=0, resizable=yes scrollbars=yes");
  popup_window.focus();
}

function openDocxy2(doc,name,x,y)
{
  popup_window = open(doc,name,"width="+x+",height="+y+",screenX=0,screenY=0, resizable=yes scrollbars=no");
  popup_window.focus();
}


function swappic(origpic,picobject) {
 origpic.src = picobject.src;
}

    savebutton_f = new Image();
    savebutton_f.src = ""+server_js+"/img/system/save_f."+picformat_icons; 
    savebutton_t = new Image();
    savebutton_t.src = ""+server_js+"/img/system/save_t."+picformat_icons; 

    editorbutton_f = new Image();
    editorbutton_f.src = ""+server_js+"/img/system/editor_f."+picformat_icons; 
    editorbutton_t = new Image();
    editorbutton_t.src = ""+server_js+"/img/system/editor_t."+picformat_icons;

    uploadbutton_f = new Image();
    uploadbutton_f.src = ""+server_js+"/img/system/upload_f."+picformat_icons; 
    uploadbutton_t = new Image();
    uploadbutton_t.src = ""+server_js+"/img/system/upload_t."+picformat_icons; 


function visi_hide(nr)
{

	if (document.layers)
	{
		vista = 'hidden';
		document.layers[nr].visibility = vista;
	}
	else if (document.getElementById)
	{
		vista = 'hidden';		
		document.getElementById(nr).style.visibility = vista;
	}
	else if (document.all)
	{

		vista = 'hidden';
		document.all[nr].style.visibility = vista;
	}
}

function visi_show(nr)
{

	if (document.layers)
	{
		vista = 'visible';
		document.layers[nr].visibility = vista;
	}
	else if (document.getElementById)
	{
		vista = 'visible';		
		document.getElementById(nr).style.visibility = vista;
	}
	else if (document.all)
	{

		vista = 'visible';
		document.all[nr].style.visibility = vista;
	}

}

function visi_show_m(nr)
{

	if (document.layers)
	{
		vista = 'visible';
		document.layers[nr].visibility = vista;
		document.layers[nr].style.left= tempX;
		document.layers[nr].style.top= tempY;
	}
	else if (document.getElementById)
	{
		vista = 'visible';		
		document.getElementById(nr).style.visibility = vista;	
		document.getElementById(nr).style.left = tempX-220+"px";
		document.getElementById(nr).style.top  = tempY+"px";

	}
	else if (document.all)
	{
		vista = 'visible';
		document.all[nr].style.visibility = vista;
		document.all[nr].style.left = tempX;
		document.all[nr].style.top = tempY;
	}

}


function visi(nr)
{

	if (document.layers)
	{
		if (document.layers[nr].visibility == ''
			|| document.layers[nr].visibility == 'hidden')
			vista = 'visible'
		else
			vista = 'hidden';

		document.layers[nr].visibility = vista;
	}
	else if (document.getElementById)
	{
		if (document.getElementById(nr).style.visibility == ''
			|| document.getElementById(nr).style.visibility == 'hidden')
			vista = 'visible'
		else
			vista = 'hidden';
			
		document.getElementById(nr).style.visibility = vista;
	}
	else if (document.all)
	{

		if (document.all[nr].style.visibility == ''
			|| document.all[nr].style.visibility == 'hidden')
			vista = 'visible'
		else
			vista = 'hidden';

		document.all[nr].style.visibility = vista;
	}

}

function blocking(nr)
{

	if (document.layers)
	{
		if (document.layers[nr].display == ''
			|| document.layers[nr].display == 'none')
			current = 'block'
		else
			current = 'none';

		document.layers[nr].display = current;
	}
	else if (document.getElementById)
	{
		if (document.getElementById(nr).style.display == ''
			|| document.getElementById(nr).style.display == 'none')
			vista = 'block'
		else
			vista = 'none';
	
		document.getElementById(nr).style.display = vista;
	}
	else if (document.all)
	{

		if (document.all[nr].style.display == ''
			|| document.all[nr].style.display == 'none')
			current = 'block'
		else
			current = 'none';

		document.all[nr].style.display = current;
	}

}

function setCheckedValue(radioObj, newValue) {
	if(!radioObj)
		return;
	var radioLength = radioObj.length;
	if(radioLength == undefined) {
		radioObj.checked = (radioObj.value == newValue.toString());
		return;
	}
	for(var i = 0; i < radioLength; i++) {
		radioObj[i].checked = false;
		if(radioObj[i].value == newValue.toString()) {
			radioObj[i].checked = true;
		}
	}
}


