function Toggle(imgPath)
{
	Element.toggle('rightmenu-content');

	if (!Element.visible('rightmenu-content'))
	{
		$('#right-menu').src = imgPath + "pagelayout/rightmenu-einblenden.gif";
	}
	else
	{
		$('#right-menu').src = imgPath + "pagelayout/rightmenu-ausblenden.gif";
	}
}

function ToggleImage(imgName, imgPath) 
{
	var aPictureScale = new Array();
	var oImage = new Image();

	oImage.onload = function()
	{
		$('#img-left').attr('src', oImage.src);
		oImage.onload = function(){};
	}

	oImage.src = imgPath;
}


var oWinAgency = null;

function showAgency(iAgencyID)
{
	var sECPage = window.location.pathname;
	oWinAgency = window.open(iAgencyID,'Zoom','scrollbars=yes, toolbar=no,location=no,directories=no,status=no,resizable=no,copyhistory=noWinAppearance,width=400,height=500');
	
	if (sECPage.search(/ger_de/) != -1) 
	{
		sText = 'Bitte deaktivieren Sie Ihren PopUp-Blocker und wählen Sie die gewünschte Agentur.';
	}
	else  
	{
		sText = 'Please deactivate your pop-up blocker and select a agency.';
	}

	if (!oWinAgency)
	{
		alert(sText);
	}
	
	if (window.focus)
	{
		oWinAgency.focus();
	}
	
	window.onfocus = function ()
	{
		if (!oWinAgency)
		{
			return;
		}

		oWinAgency.close();
		oWinAgency = null;
		window.onfocus = null;
	}
}


function showAgencyExtern(sAgencyLink)
{
	var sPage = '';
	var secPage = window.location.pathname;

	if (sAgencyLink.substr(0,7) == 'http://')
	{
		sPage = sAgencyLink;
	}
	else
	{
		sPage = 'http://' + sAgencyLink;
	}
		
	
	oWinAgencyExtern = window.open(sPage,'_blank','scrollbars=yes,toolbar=yes,location=yes,menubar=yes,directories=yes,status=yes,resizable=yes,copyhistory=noWinAppearance');
		
		if (secPage.search(/ger_de/) != -1) 
		{
			sText = 'Bitte deaktivieren Sie Ihren PopUp-Blocker und wählen Sie die gewünschte Agentur.';
		}
		else  
		{
			sText = 'Please deactivate your pop-up blocker and select a agency.';
		}
	
		if (!oWinAgencyExtern) alert(sText);
		
		close();
}