// JavaScript Document für SPÖ




function gotolink(form) 
{
	var index=form.select.selectedIndex;
	if (form.select.options[index].value != "0") 
	{
		location=form.select.options[index].value;
	}
}



function o_focus(a) {
  if (a.value == "Suche" ) {
     a.value=""
  }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  fensterNew = window.open(theURL,winName,features);
  fensterNew.focus();
}

var timeNow = new Date();
var h = timeNow.getHours();
var m = timeNow.getMinutes();
var s = timeNow.getSeconds();
var d = timeNow.getDay();
var y = timeNow.getDate();

if (h < 10)
    h = "0" + h;
if (m < 10)
    m = "0" + m;
if (s < 10)
    s = "0" + s;

if (d==0)
    d = "So";
else if (d==1)
    d = "Mo";
else if (d==2)
    d = "Di";
else if (d==3)
    d = "Mi";
else if (d==4)
    d = "Do";
else if (d==5)
    d = "Fr";
else if (d==6)
    d = "Sa";

var x = timeNow.getMonth();
if (x==0)
    x = "01";
else if (x==1)
    x = "02";
else if (x==2)
    x = "03";
else if(x==3)
    x = "04";
else if(x==4)
    x = "05";
else if(x==5)
    x = "06";
else if(x==6)
    x = "07";
else if(x==7)
    x = "08";
else if(x==8)
    x = "09";
else if(x==9)
    x = "10";
else if(x==10)
    x = "11";
else if(x==11)
    x = "12";

//var j = timeNow.getYear();

if (timeNow.getYear()<2000) j=timeNow.getYear()+1900; else j=timeNow.getYear();
if (timeNow.getYear()<10) j=timeNow.getYear()+2000;

var tyd =""+" " + d + ", " + y + "." + x + "." + j; 








// STYLE SHEET WECHSLER 
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Pascal Vyncke :: http://www.SeniorenNet.be */

// These are the variables; you can change these if you want
var expDays = 9999;  // How many days to remember the setting
var standardStyle = '2'; // This is the number of your standard style sheet; this will be used when the user did not do anything.
var nameOfCookie = 'switchstyle'; // This is the name of the cookie that is used.
var urlToCSSDirectory = ''; // This is the URL to your directory where your .css files are placed on your site.  For example: http://www.seniorennet.be/URL_TO_STYLESHEET_DIRECTORY_OF_YOUR_SITE/

// These are the names of your different .css files; use the name exactly as on your Web site
var ScreenCSS_1 = '../bilder/d252/_default_s.css';
var ScreenCSS_2 = '../bilder/d250/_default.css';
var ScreenCSS_3 = '../bilder/d252/_default_m.css';


/***********************************************************************************************

	DO NOT CHANGE ANYTHING UNDER THIS LINE, UNLESS YOU KNOW WHAT YOU ARE DOING

***********************************************************************************************/

// This is the main function that does all the work
function switchStyleOfUser(){
	var fontSize = GetCookie(nameOfCookie);

	if (fontSize == null) {
		fontSize = standardStyle;
	}
	if (fontSize == '') {
		fontSize = standardStyle;
	}

	if (fontSize == "1") { document.write('<link rel="stylesheet" type"text/css" href="' + ScreenCSS_1 + '" media="screen">'); }
	if (fontSize == "2") { document.write('<link rel="stylesheet" type"text/css" href="' + ScreenCSS_2 + '" media="screen">'); }
	if (fontSize == "3") { document.write('<link rel="stylesheet" type"text/css" href="' + ScreenCSS_3 + '" media="screen">'); }

	var fontSize = "";
	return fontSize;
}

var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

// Function to get the settings of the user
function getCookieVal (offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
	endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

// Function to get the settings of the user
function GetCookie (name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
		return getCookieVal (j);
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break;
	}
	return null;
}

// Function to remember the settings
function SetCookie (name, value) {
	var argv = SetCookie.arguments;
	var argc = SetCookie.arguments.length;
	var expires = (argc > 2) ? argv[2] : null;
	var path = (argc > 3) ? argv[3] : null;
	var domain = (argc > 4) ? argv[4] : null;
	var secure = (argc > 5) ? argv[5] : false;
	document.cookie = name + "=" + escape (value) +
	((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
	((path == null) ? "" : ("; path=" + path)) +
	((domain == null) ? "" : ("; domain=" + domain)) +
	((secure == true) ? "; secure" : "");
}

// Function to remove the settings
function DeleteCookie (name) {
	var exp = new Date();
	exp.setTime (exp.getTime() - 1);
	var cval = GetCookie (name);
	document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

// This function is used when the user gives his selection
function doRefresh(){
	location.reload();
}

// This will call the main function.  Do not remove this, because otherwise this script will do nothing...
document.write(switchStyleOfUser());

