

function PANSITEONLOAD() 
{

	//inithover();
	inittrhover();
	initautolinkclass();
	initwaescheleine();
	//changeAllLinks();

	if  (window.checkAutoVisNULL)
	{
		checkAutoVisNULL();
	}

	if  (window.PANSITEONLOADMAIN)
	{
		PANSITEONLOADMAIN();
	}

}

if (document.all)
{
	document.body.onload=PANSITEONLOAD;

} 
else 
{
	window.captureEvents(Event.ONLOAD);
	window.onload=PANSITEONLOAD;

}


function getAbsolutePosition(obj,dir)
{
	var sum;
	var el;
	sum=0;
	el=obj;

	
	var comp;
	if (document.documentElement)
	{
		comp=document.documentElement;
	}
	else
	{
		comp=document.body
	};
	
	while(el && (el.tagName!=comp.tagName))
	{
		if (dir=="x")
		{
			sum += el.offsetLeft;
		}
		else
		{
			sum += el.offsetTop;
		};
		el = el.offsetParent;
	};

	return sum;
}

var objArrA=new Array();

function inittrhover()
{
	try
	{
		var trArr=document.getElementsByTagName("TR")
		for (var i=0;i<trArr.length;i++)
		{
			if (trArr[i].className=='nohover')
			{
				//Nichts tun
			}
			else
			{
				trArr[i].onmouseover=new Function("hover","this.bgColor='#DFE7F4'")
				trArr[i].onmouseout=new Function("hout","this.bgColor='#FFFFFF'")
			}
		}
	}
	catch(e){};
};


function inithover()
{
	try
	{
	var imgArr=document.getElementsByTagName("IMG")
	var aArr=document.getElementsByTagName("A")
	for (var i=0;imgArr.length>i;i++)
	{
		var ileft=getAbsolutePosition(imgArr[i],'x');
		var itop=getAbsolutePosition(imgArr[i],'y');
		var iright=ileft+imgArr[i].offsetWidth;
		var ibottom=itop+imgArr[i].offsetHeight;
		if (iright<760)
		{
			for (var j=0;aArr.length>j;j++)
			{
				if ((aArr[j].className=="service")||(aArr[j].className=="servicewhite"))
				{
					var aleft=getAbsolutePosition(aArr[j],'x');
					var atop=getAbsolutePosition(aArr[j],'y');
					var aright=aleft+aArr[j].offsetWidth;
					var abottom=atop+aArr[j].offsetHeight;
					if ((aleft>ileft)&&(atop>itop)&&(aright<iright)&&(abottom<ibottom))
					{
						objArrA[i]=aArr[j];
						imgArr[i].onmouseover=new Function("hover"+i,"return hover(objArrA["+i+"]);")
						imgArr[i].onmouseout=new Function("hout"+i,"return hout(objArrA["+i+"]);")
						var containerObj=aArr[j];
						while ((containerObj.parentNode)&&((containerObj.tagName!="DIV")||((containerObj.className)&&(containerObj.className!='pansiteRahmen') )))
						{
							containerObj=containerObj.parentNode;
						}
						if (containerObj)
						{
							containerObj.onmouseover=new Function("hover"+i,"return hover(objArrA["+i+"]);")
							containerObj.onmouseout=new Function("hout"+i,"return hout(objArrA["+i+"]);")
							var childArr=containerObj.getElementsByTagName("*")
							for (var k=0;k<childArr.length;k++)
							{
								childArr[k].onmouseover=new Function("hover"+i,"return hover(objArrA["+i+"]);")
								childArr[k].onmouseout=new Function("hout"+i,"return hout(objArrA["+i+"]);")
							};
						};
					};
				};
			};
		};
	};
	}
	catch(e){};

};

function hover(obj)
{
	if (obj.className=="servicewhite")
	{
		obj.className="hoverservicewhite"
	}
	else if (obj.className=="hoverservicewhite")
	{
		//Nichts tun
	}
	else
	{
		obj.className="hoverservice"
	};
}

function hout(obj)
{
	if (obj.className=="hoverservicewhite")
	{
		obj.className="servicewhite"
	}
	else if (obj.className=="servicewhite")
	{
		//Nichts tun
	}
	else
	{
		obj.className="service"
	};
};

function initautolinkclass()
{
	try
	{
		var aArr=document.getElementsByTagName("A")
		for (var j=0;j<aArr.length;j++)
		{
			try
			{	if (!aArr[j].id)
				{
					var oneArr=aArr[j].href.split("?");
					var twoArr=location.href.split("?");

					if ((oneArr[0]==twoArr[0])||(oneArr[0]+"#"==twoArr[0])||(oneArr[0]==twoArr[0]+"#"))
					{
						aArr[j].id="currentlink";
					};
				};
			}
			catch(e){};
		};
	}
	catch(e){};
};

function showselector()
{

	try
	{
		document.getElementById("fontselect").className="fontselect1"
		document.getElementById("fontselector").className="fontselector1"
	}
	catch(e){};

};
function hideselector()
{

	try
	{
		document.getElementById("fontselect").className="fontselect0"
		document.getElementById("fontselector").className="fontselector0"
	}
	catch(e){};

};

function initwaescheleine()
{
	window.setInterval("waescheleine()",1000)
};

function waescheleine()
{
	try
	{
		document.getElementById("bl1").style.width=""+document.documentElement.scrollWidth+"px";
	}
	catch(e){};
}

function changeAllLinksThisTag(tg)
{

	try
	{
		var i;
		var st;
		var newlink;
		var j;
		var oa;

		if (document.getElementsByTagName(tg).length>0)
		{
 			for (i=0;i<document.getElementsByTagName(tg).length;i++)
			{
 				st=document.getElementsByTagName(tg)[i].getAttribute('target',false);
				if (!st)
				{
					st=""
				};
				linkinhalt=document.getElementsByTagName(tg)[i].getAttribute('href',false);
				if (!linkinhalt)
				{
					linkinhalt=""
				};

				if ((st.toLowerCase()=="_blank")&&(linkinhalt.toLowerCase().indexOf(".pdf")==-1))
				{

					try
					{
						oa=document.getElementsByTagName(tg)[i].innerHTML;
					}
					catch(e){};

					if (linkinhalt.toLowerCase().indexOf("sib_onlineversicherung.php")!=-1)
					{
						try
						{
							document.getElementsByTagName(tg)[i].setAttribute('target',"_self",false);
						}
						catch(e){};
						
						dopopup=false;
						
						try
						{
							currloc=self.location.href.toLowerCase();
							if (currloc.indexOf("www.signal-iduna.de")!=-1)
							{
								currloc=currloc.substr(currloc.indexOf("www.signal-iduna.de"))
								currloc=currloc.substr(currloc.indexOf("/")+1)
								currloc=(currloc.split("/"))[0]
								if (currloc.indexOf(".")!=-1)
								{
									dopopup=true;
								}
							};
						}catch(e){};
					
						if (dopopup)
						{
							//newlink="#";
							//document.getElementsByTagName(tg)[i].onclick = new Function("sipopup","window.open('"+linkinhalt+"','','height="+screen.availHeight+",width="+screen.availWidth+",left=0,top=0,resizable=yes,scrollbars=yes,status=no')")
							newlink="http://www.signal-iduna.de/Finanzen/Onlineabschluss/indexADP.php?highmain=5&highsub=0&highsubsub=0";
						}
						else
						{
							//newlink=linkinhalt;
							newlink="http://www.signal-iduna.de/adp_suche_onlineabschluss.php?highmain=5&highsub=0&highsubsub=0";
						};
					
					}
					else if (linkinhalt.toLowerCase().indexOf("sib_reiseonlineversicherung.php")!=-1)
					{
						try
						{
							document.getElementsByTagName(tg)[i].setAttribute('target',"_self",false);
						}
						catch(e){};
						
						dopopup=false;
						
						try
						{
							currloc=self.location.href.toLowerCase();
							if (currloc.indexOf("www.signal-iduna.de")!=-1)
							{
								currloc=currloc.substr(currloc.indexOf("www.signal-iduna.de"))
								currloc=currloc.substr(currloc.indexOf("/")+1)
								currloc=(currloc.split("/"))[0]
								if (currloc.indexOf(".")!=-1)
								{
									dopopup=true;
								}
							};
						}catch(e){};
					
						if (dopopup)
						{
							newlink="#";
							document.getElementsByTagName(tg)[i].onclick = new Function("sipopup","window.open('"+linkinhalt+"','','height="+screen.availHeight+",width="+screen.availWidth+",left=0,top=0,resizable=yes,scrollbars=yes,status=no')")
							//newlink="http://www.signal-iduna.de/Finanzen/Onlineabschluss/indexADP.php";
						}
						else
						{
							newlink=linkinhalt;
							//newlink="http://www.signal-iduna.de/Finanzen/Onlineabschluss/index.php";
						};
					
					}
					else if ((linkinhalt.toLowerCase().indexOf("versichern.")!=-1)||(linkinhalt.toLowerCase().indexOf("reiseonlineversicherung.php")!=-1))
					{
						try
						{
							document.getElementsByTagName(tg)[i].setAttribute('target',"_self",false);
						}
						catch(e){};
						newlink="#";
						document.getElementsByTagName(tg)[i].onclick = new Function("sipopup","window.open('"+linkinhalt+"','','height="+screen.availHeight+",width="+screen.availWidth+",left=0,top=0,resizable=yes,scrollbars=yes,status=no')")
					}
					else
					{
						if (linkinhalt.toLowerCase().indexOf("formularcenter.signal-iduna")!=-1)
						{
							linkinhalt=linkinhalt.replace("http:","https:")	
						}

						if (linkinhalt.toLowerCase().indexOf("signal-iduna")!=-1)
						{
							newlink="/site/seiten/showseite.asp?ID=?ori="
							newlink+=encodeURIComponent(linkinhalt.replace(":/","DOPSLA"))
						}
						else
						{
							newlink="/site/seiten/showseite.asp?ID=?ori="
							newlink+=encodeURIComponent(linkinhalt.replace(":/","DOPSLA"))
						}
					}
					

					try
					{
						document.getElementsByTagName(tg)[i].setAttribute('href',newlink,false);
					}
					catch(e){};

					try
					{
						document.getElementsByTagName(tg)[i].innerHTML=oa;
					}
					catch(e){};

				};
  			};
 		};
	}
	catch(e){};

};

function changeAllLinks() {

	changeAllLinksThisTag('a')
	changeAllLinksThisTag('area')
	changeAllLinksThisTag('link')
	changeAllLinksThisTag('base')

};


