
 //window.onload=initNews;

// Formular-Buttons Rollover

function butover(x)
	{
//document.getElementById(x).style.color = '#ffffff';
document.getElementById(x).className = 'submit_hover';

	}
	
function butout(x)
	{
 //document.getElementById(x).style.color = '#666666';

document.getElementById(x).className = 'submit';

	}

function butoverstart(x)
	{

//document.getElementById(x).style.color = '#ffffff';
document.getElementById(x).className = 'submit_start_hover';

	}
	
function butoutstart(x)
	{
 //document.getElementById(x).style.color = '#666666';

document.getElementById(x).className = 'submit_start';

	}

function butoverkontakt(x)
	{

document.getElementById(x).className = 'submit_kontakt_hover';

	}
	
function butoutkontakt(x)
	{

document.getElementById(x).className = 'submit_kontakt';

	}




function registerload(x)
{
	if (x == 1){
	var cellid = 'c'+nummer;
	if (document.getElementById(cellid)){	

	document.getElementById(cellid).className = 'navicellfirst_aktiv';
	}
 	}

}


function registerover(x)
{
if (x.indexOf('aktiv') == -1){
	var i = x.indexOf('-');
	var nummer = x.substring(1,i);
	var bildname = 's'+nummer;
	image_over = new Image(); 
	image_over.src = '/assets/images/navi_images/'+nummer+'-over.jpg';
	if (document.images[bildname]){
	document.images[bildname].src = image_over.src;
	}


	var cellid = 'c'+nummer;
	if (document.getElementById(cellid)){	
	if (nummer == 1){
	document.getElementById(cellid).className = 'navicellfirst_over';

 	} else {
	document.getElementById(cellid).className = 'navicell_over';
	}
	}
}
}
	
function registerout(x){

if (x.indexOf('aktiv') == -1){
	var i = x.indexOf('-');
	var nummer = x.substring(1,i);
	var bildname = 's'+nummer;
	image = new Image(); 
	image.src = '/assets/images/navi_images/'+nummer+'.jpg';
	if (document.images[bildname]){
	document.images[bildname].src = image.src;
	}
	var cellid = 'c'+nummer;
	if (document.getElementById(cellid)){	
	if (nummer == 1){
	document.getElementById(cellid).className = 'navicellfirst';

 	} else {
	document.getElementById(cellid).className = 'navicell';
	}
	}
}
}



function subnaviover(x) // x=Bildnummer 
	{

if (x.indexOf('aktiv') == -1){
	var i = x.indexOf('-');
	var nummer = x.substring(1,i);
	var bildname = 's'+nummer;
	image_over = new Image(); 
	image_over.src = '/assets/images/navi_images/'+nummer+'-over.jpg';
	if (document.images[bildname]){
		document.images[bildname].src = image_over.src;
	}
	}
}

function subnaviout(x)
	{
if (x.indexOf('aktiv') == -1){
	//var nummer = x.substring(1);
	var i = x.indexOf('-');
	var nummer = x.substring(1,i);
	var bildname = 's'+nummer;
	image = new Image(); 
	image.src = '/assets/images/navi_images/'+nummer+'.jpg';
if (document.images[bildname]){
	document.images[bildname].src = image.src;
	}
}
}



function rightnaviover(x) // x=Bildnummer 
	{
if (x.indexOf('aktiv') == -1){

	//var i = (haystack+'').indexOf(needle, (offset ? offset : 0));
	var i = x.indexOf('-');

	var nummer = x.substring(1,i);
	//alert ('i'+i+' '+'nummer'+nummer+'');

	var bildname = 's'+nummer;

	image_over = new Image(); 
	image_over.src = '/assets/images/navi_images/'+nummer+'-over.jpg';
	if (document.images[bildname]){
	document.images[bildname].src = image_over.src;
	}
	}

}


function rightnaviout(x)
	{
if (x.indexOf('aktiv') == -1){

	var i = x.indexOf('-');

	var nummer = x.substring(1,i);
	//alert ('i'+i+' '+'nummer'+nummer+'');

	var bildname = 's'+nummer;
	image = new Image(); 
	image.src = '/assets/images/navi_images/'+nummer+'.jpg';
if (document.images[bildname]){
	document.images[bildname].src = image.src;
	}
}
}






var ioWindow;

function openWindow(url,x,y)
	{
	if (ioWindow) {if (!ioWindow.closed) ioWindow.close()}
	//t=30;
	//u=30;

	h=screen.availHeight-30;
	w=screen.availWidth-30;
	t=(h-y)/2; if (t<0) t=0;
	u=(w-x)/2; if (w<0) w=0;

	ioWindow = window.open(url,"popup",'width='+x+',height='+y+',left='+u+',top='+t+',scrollbars=no');
	ioWindow.focus();
	}


function nix(x)
	{
	if(x.blur)x.blur();
	}
	


function getWindowWidth() {

			var windowWidth = 0;

			if (typeof(window.innerWidth) == 'number') {

				windowWidth = window.innerWidth;

			}

			else {

				if (document.documentElement && document.documentElement.clientWidth) {

					windowWidth = document.documentElement.clientWidth;

				}

				else {

					if (document.body && document.body.clientWidth) {

						windowWidth = document.body.clientWidth;

					}

				}

			}

                          if (windowWidth == 0){

                           windowWidth = screen.width;

                          }

			return windowWidth;

		}





var windowWidth=getWindowWidth();
