//*************************************************
//
//Allgemeine Functionen
//
//
//*************************************************


//*************************************************
//
//SubmitForm
//
//
//*************************************************

function submitForm(aNextAction) 
{
	if (aNextAction != null) 
	{
		document.FormName.next_action.value = aNextAction;
	}
	
	document.FormName.submit();
//	return false;
}

//*************************************************
//
//Browser-Check
//
//
//*************************************************

		ns6 = ((document.getElementById) && (!document.all)) ? true : false;
		ns4 = (document.layers) ? true : false;
		ie4 = (document.all) ? true : false;



//*************************************************
//
//Style-Include
//
//
//*************************************************

		if (ns4) {
			if (navigator.platform.indexOf("Win") != -1)
				{
				document.write('<link rel=stylesheet type="text/css" href="ext/style1_ns.css">');
				document.write('<link rel=stylesheet type="text/css" href="ext/style1_ns.css">');
				}
			else
				{
				document.write('<link rel=stylesheet type="text/css" href="ext/style1_ns.css">');
				document.write('<link rel=stylesheet type="text/css" href="ext/style1_ns.css">');
				}
			}
		else
			{
			if (navigator.platform.indexOf("Win") != -1)
				{
				document.write('<link rel=stylesheet type="text/css" href="ext/style1_ie.css">');
				document.write('<link rel=stylesheet type="text/css" href="ext/style1_ie.css">');
				}
			else
				{
				document.write('<link rel=stylesheet type="text/css" href="ext/style1_ie.css">');
				document.write('<link rel=stylesheet type="text/css" href="ext/style1_ie.css">');
				}
			}

//*************************************************
//
//Popup
//
// opens a new window with parameters
// Created: 03.04.2001/sbaenziger (description in know.namics under "generic open window script")
//*************************************************

var win = null;
function NewWindow(thepageurl,thename,w,h,l,t,toolbar,location,directories,statusbar,resize,menubar,scroll,copyhistory)
	{
	LeftPosition = l;
	TopPosition = t;
//	if (l == 'center')
//		{
//		LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
//		}
//	else
//		{
//		LeftPosition = (screen.width) ? (screen.width/2)-LeftPosition : 0;
//		}
//	if (t == 'center')
//		{
//		TopPosition = (screen.height) ? (screen.height-h)/4 : 0;
//		}
	if (w != '') {
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable='+resize+',status='+statusbar+',toolbar='+toolbar+',location='+location+',directories='+directories+',menubar='+menubar+',copyhistory='+copyhistory;
	} else {
	settings = 'height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable='+resize+',status='+statusbar+',toolbar='+toolbar+',location='+location+',directories='+directories+',menubar='+menubar+',copyhistory='+copyhistory;
	}
	win = window.open(thepageurl,thename,settings);
	win.focus();
	}



//*************************************************
//
//Definition der allgemeinen Variablen
//
//*************************************************

var p1 = 'E5E5E5'
var a1 = 'CCCCCC'
var p2 = 'CCCCCC'
var a2 = '999999'

var activetab = '';

var isTab = '';

//*************************************************
//
//Farbwechsel
//
//*************************************************

function chgBg(obj,color){

if(ns6 && obj.tagName != 'TD') {
isTab = 'false';
} else {
isTab = '';
}

if (isTab != 'false') {
	if (obj != 'nav6') {
	
		if (activetab != obj && activetab != "") {
		if (document.all || document.getElementById)
		  activetab.style.backgroundColor='#'+p2;
		else if (document.layers)
		  activetab.bgColor='#'+p2;		
		}
		activetab = obj;

		if (document.all || document.getElementById)
		  obj.style.backgroundColor='#'+eval(color);
		else if (document.layers)
		  obj.bgColor='#'+eval(color);
		
	} else {
	color = 'a2';
		if (document.all || document.getElementById)
		  activetab.style.backgroundColor='#'+eval(color);
		else if (document.layers)
		  activetab.bgColor='#'+eval(color);
	}

}
}




//*************************************************
//
//Preloading Section
//
//*************************************************

var nav_1_pri_0 = new Image();
nav_1_pri_0.src = "../../static/img/nav_1_pri_1.gif";
		
var nav_1_bus_0 = new Image();
nav_1_bus_0.src = "../../static/img/nav_1_bus_1.gif";
		
var nav_1_abu_0 = new Image();
nav_1_abu_0.src = "../../static/img/nav_1_abu_1.gif";
		
var nav_3_pro_0 = new Image();
nav_3_pro_0.src = "../../static/img/nav_3_pro_1.gif";
		
var nav_3_web_0 = new Image();
nav_3_web_0.src = "../../static/img/nav_3_web_1.gif";

var nav_3_ser_0 = new Image();
nav_3_ser_0.src = "../../static/img/nav_3_ser_1.gif";



//*************************************************
//
// picture flipping
//
//*************************************************

function pic_on(strImgObj) {
	if (strImgObj.length > 5)
	{
		var touched = "1.gif";
		crop = strImgObj.substring(0, (strImgObj.length - 1));
		if (document.images)
		{
			document.images[strImgObj].src = './img/' + crop+touched;
		}
	}
}

function pic_off(strImgObj) {
	if (strImgObj.length > 5)
	{
		var untouched = "0.gif";
		crop = strImgObj.substring(0, (strImgObj.length - 1));
		if (document.images)
		{
			document.images[strImgObj].src = './img/' + crop+untouched;
		}
	}
	
}
