//11.3.06 funktion zum wechseln der bilder der bildergalerie1
/* geändert 12.03.2006 function change_pics(picsrc,newpic,width,height,kunde)
{
    var newpic2 = '<a href="javascript:newwin(\'php/show_pic.php?file_path=../' + newpic + '\',\'bild_grossdarstellung\',\'' + width + '\',\'' + height + '\')" alt="Klick: Maximaldarstellung" title="Klick: Maximaldarstellung">';
    newpic2     = newpic2 + '<img src="' + newpic + '" border="0"></a>';
    div = document.getElementById('gal1_bild_gross');
    div.innerHTML = newpic2;
}
*/

function change_pics(picsrc,url,width_grossdarst,height_grossdarst,width_maxdarst,height_maxdarst)
{
    var newpic2 = '<a href="javascript:newwin(\'php/show_pic.php?file_path=../' + url + '\',\'bild_grossdarstellung\',\'' + width_maxdarst + '\',\'' + height_maxdarst + '\')" alt="Klick: Maximaldarstellung" title="Klick: Maximaldarstellung">';
    newpic2     = newpic2 + '<img src="' + url + '" border="0" width="' + width_grossdarst + '" height="' + height_grossdarst + '"></a>';
    div = document.getElementById(picsrc);
    div.innerHTML = newpic2;
}

function animation(bildname, dateiname)
{
    if (document.images)
	{
        document.images[bildname].src = dateiname
	}
}


function newwin(wurl,wname,width,height)
{
    fenster=window.open(wurl,wname,
    "status=no,"+
    "toolbar=no,"+
    "resizable=no,"+
    "scrollbars=no,"+
    "menubar=no,"+
    "width="+width+","+
    "top=10,"+
    "left=10,"+
    "height="+height+"");
    fenster.focus();
}


function newwin_scroll(wurl,wname,width,height)
{
    fenster=window.open(wurl,wname,
    "status=no,"+
    "toolbar=no,"+
    "resizable=no,"+
    "scrollbars=yes,"+
    "menubar=no,"+
    "width="+width+","+
    "top=10,"+
    "left=10,"+
    "height="+height+"");
    fenster.focus();
}


function fenster_route()
{
    fenster_neu =
    window.open("php/route.php", "zweitfenster", "width=470,height=270,scrollbars");
    fenster_neu.focus();
}



var Initialisierung = 0
var Ex, Ey, TitelFarbe, TextFarbe, ContentInfo;

TitelFarbe = "#808080"
TextFarbe = "white"


function ToolTipBewegen(layerName, FromTop, FromLeft, e)
{
	document.getElementById(layerName).style.top = FromTop;
	document.getElementById(layerName).style.left = FromLeft + 15;
}

function Aktivieren()
{
	Initialisierung=1;
}

function Deaktivieren()
{
	Initialisierung=0;
}

function Starten(e)
{
	if(Initialisierung)
	{

        /*Ex = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
	    Ey = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY*/
	
		/*Ex = document.all ? window.event.x : e.pageX;
		Ey = document.all ? window.event.y : e.pageY;*/

        Ex = document.all ? document.body.scrollLeft+event.clientX : e.pageX;
		Ey = document.all ? document.body.scrollTop+event.clientY : e.pageY;

        ToolTipBewegen("ToolTip", Ey, Ex, e);
		document.getElementById('ToolTip').style.visibility = "visible";
	}
	else
	{
		ToolTipBewegen("ToolTip", 0, 0);
		document.getElementById('ToolTip').style.visibility = "hidden";
	}
}

function ToolTip(layerName, TTitel, TInhalt)
{
	ContentInfo = '<table border="0" width="112" cellspacing="0" cellpadding="0">'+'<tr><td width="100%" bgcolor="#AAAAAA">'+'<table border="0" width="100%" cellspacing="1" cellpadding="0">'+'<tr><td width="100%" bgcolor='+TitelFarbe+'>'+'<table border="0" width="90%" cellspacing="0" cellpadding="0" align="center">'+'<tr><td width="100%">'+'<font class="ToolTipTitel"> '+TTitel+'</font>'+'</td></tr>'+'</table>'+'</td></tr>'+'<tr><td width="100%" bgcolor='+TextFarbe+'>'+'<table border="0" width="90%" cellpadding="0" cellspacing="1" align="center">'+'<tr><td width="100%">'+'<font class="ToolTipInhalt">'+TInhalt+'</font>'+'</td></tr>'+'</table>'+'</td></tr>'+'</table>'+'</td></tr>'+'</table>';
	document.getElementById(layerName).innerHTML = ContentInfo;
}

