pfad = "http://www.sparkasse-iserlohn.de";
var pfeiln=new Image();
pfeiln.src=pfad+"/images/butpfeilre_n.gif";
var pfeilh=new Image();
pfeilh.src=pfad+"/images/butpfeilre_h.gif";
var buttonn=new Image();
buttonn.src=pfad+"/images/butmail_n.gif";
var buttonh=new Image();
buttonh.src=pfad+"/images/butmail_h.gif";

function getElementsByClassName(class_name)
{
	var all_obj,ret_obj=new Array(),j=0,teststr;
	if(document.all)
	{
		all_obj=document.all;
	}
	else if(document.getElementsByTagName && !document.all)
	{
		all_obj=document.getElementsByTagName("*");
	}
	for(i=0;i<all_obj.length;i++)
	{
		if(all_obj[i].className.indexOf(class_name)!=-1)
		{
			teststr=","+all_obj[i].className.split(" ").join(",")+",";
			if(teststr.indexOf(","+class_name+",")!=-1)
			{
				ret_obj[j]=all_obj[i];
				j++;
			}
		}
	}
	return ret_obj;
}

function rahmen()
{	var all_obj,ret_obj=new Array(),j=0,teststr;
	var class_name = 'abschluss';
	if(document.all)
	{
		all_obj=document.all;
		for(i=0;i<all_obj.length;i++)
		{
			if(all_obj[i].className.indexOf(class_name)!=-1)
			{
				teststr=","+all_obj[i].className.split(" ").join(",")+",";
				if(teststr.indexOf(","+class_name+",")!=-1)
				{
					all_obj[i].style.border='1px solid #F00';
				}
			}
		}
	}
}

function surfto1(formid) {
	var myindex=formid.select1.selectedIndex;
	if ((formid.select1.options[myindex].value !="0")){//&&(formid.select1.options[myindex].value!="http://www.sparkasse-iserlohn.de/download/netviewer.exe")){
		top.location.href=formid.select1.options[myindex].value;
	}
	else if (formid.select1.options[myindex].value!="0"){
		pop1=window.open(formid.select1.options[myindex].value, "popp");
		pop1.focus();
	}
}

function auf(ulid){
	if(document.getElementById){
		document.getElementById(ulid).style.visibility="visible";
	}
	else if(document.all){
		document.all[ulid].style.visibility="visible";
	}
}

function zu(ulid){
	if(document.getElementById){
		document.getElementById(ulid).style.visibility="hidden";
	}
	else if(document.all){
		document.all[ulid].style.visibility="hidden";
	}
}

function highlight(liid){
	liid.style.backgroundColor="#F00";
	liid.firstChild.style.color="#FFF";
}
function downlight(liid){
	liid.style.backgroundColor="#EEE";
	liid.firstChild.style.color="#000";
}

function bildwechsel(bildid, inout){//bildid ist die ID des zu wechselnden Bildes, inout ist true bei MouseOver und false bei MouseOut
	neubild=new Image();
	if (inout){
		neubild.src=buttonh.src;
		//alert(neubild.src);
	}
	else{
		neubild.src=buttonn.src;
		//alert(neubild.src);
	}

	if (typeof(document.getElementById)!='undefined'){
		document.getElementById(bildid).src=neubild.src;
	}
	else if(document.all){
		document.all[bildid].src=neubild.src;
	}
}


window.onload = init;

function init () {
	if (document.getElementById){
		if(suchfeld = document.getElementById('suchfeld')) {
			suchfeld.onfocus = check;
			suchfeld.onblur = check;
		}
		if(konto = document.getElementById('KONTO')){
			konto.onfocus = check;
			konto.onblur = check;
		}
		if(email = document.getElementById('E-Mail')){
			email.onfocus = check;
			email.onblur = check;
		}
	}
}

function check (eventobjekt){
	if (!eventobjekt) eventobjekt = window.event;
	var zielelement;
	if (eventobjekt.srcElement){
		zielelement = eventobjekt.srcElement
	}
	else{
		zielelement = eventobjekt.target;
	}
	if (eventobjekt.type == "focus"){
		if (zielelement.value == zielelement.defaultValue){
			zielelement.value = "";
		}
	}
	else if (eventobjekt.type == "blur"){
		if (zielelement.value == ""){
			zielelement.value = zielelement.defaultValue;
		}
	}
}

var popup = 0;
function neuesfenster (url){
	var scroll = "no";
	if(popup){
	    if(!popup.closed) popup.close();
  	}
	var breite=600;
	var hoehe=355;
	if (document.all && !document.opera){
		//Durch die fetten Scrollbalken muss man beim IE etwas mehr Zugabe geben
		breite=breite+20;
	}
	popup =	eval("window.open(url,'','directories=no,toolbar=no,status=no,resizable=no,scrollbars="+scroll+",width="+breite+",height="+hoehe+"')");
}