
// Funktion für FAQ
function FaqNumberOverCssClass(id)
{
	document.getElementById("a"+id).className = "faqLinkCounterHover";
}
function FaqNumberOutCssClass(id)
{
	document.getElementById("a"+id).className = "faqLinkCounter";
}



//-----------------------------------------------------------------------------------
//###################################################################################
//Funktionen für die Specials--------------------------------------------------------

// dashboard in use
function dashboard()
{
	var newWin = window.open("Specials/dashboard/default.htm","Dashboard","width=650,height=480,resizable=no");
}

// audioLaunch in use
function audioLaunch()
{
	var newWin = window.open("Specials/AudioLaunch/showFlash.aspx","AudioLaunch","fullscreen=yes");
	newWin.focus();
}

// naviLaunch in use
function naviLaunch()
{
	var newWin = window.open("Specials/NaviLaunch/showFlash.aspx","NaviLaunch","fullscreen=yes");
	newWin.focus();
}

// fleetnavigation in use
function fleetnavigation()
{
	win('Promos/fleetnavigation/PopupNaviWorks.aspx','Fleetnavigation','no','no','no','no','no','490','570');
}

// Glossary in use
function Glossary(letter)
{
	win('PopUpGlossary.aspx?letter='+letter,'Glossary','no','no','no','yes','no','400','545');
}
//-----------------------------------------------------------------------------------

// DashBoard in use
function DashBoard(category, system, product)
{
	javascript:win('PopUpDashboard.aspx?catID='+category+'&sysID='+system+'&prodID='+product,'DashBoard','no','no','no','no','no','745','560')
}

// CompareFeatures in use
function CompareFeatures(docID, QuantityFeatures, QuantityProducts)
{
	var width;
	var height;
	var RowTopAndBottom = 200;
	var RowFeatures = 20;
	var CellProduct = 120;
	var CellFeature = 250;
	var CellLeftAndRight = 48;
	
	QuantityFeatures = Number(QuantityFeatures);
	QuantityProducts = Number(QuantityProducts)-1;
	
	height = (QuantityFeatures*RowFeatures)+RowTopAndBottom;
	width = (QuantityProducts*CellProduct)+CellFeature+CellLeftAndRight;
	
	javascript:win('PopUpCompareFeatures.aspx?docID='+docID,QuantityProducts,'no','no','no','1','no',width,height)
}
//-----------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------
//###################################################################################
//MouseOvers-------------------------------------------------------------------------
function showImage(value)
	{
		//alert(value);
		var oElement = document.getElementById(value);
		var oldString = oElement.src;
		//alert(oldString);
		var newString = oldString.replace("_lo.","_hi.");
		oElement.src = newString;
	}
	
function hideImage(value)
	{
		var oElement = document.getElementById(value);
		var oldString = oElement.src;
		var newString = oldString.replace("_hi.","_lo.");
		oElement.src = newString;
	}
//-----------------------------------------------------------------------------------
			
			
//-----------------------------------------------------------------------------------
//###################################################################################
//Divs an- und ausschalten und ClassNames wechseln-----------------------------------
function showDiv(ID,ID2,CountDivs)
	{
		var reg = /_clicked/;
		var searchString = document.getElementById("linkID"+ID+ID2).className;
		//sicher stellen das "_clicked" nicht im ClassName vorkommt
		if (!reg.exec(searchString))
		{	
			//alert(document.getElementById("linkID"+ID).className);
			//schaltet die Divs erst mal alle aus
			hideAllDivs(CountDivs, ID2, document.getElementById("linkID"+ID+ID2).className, document.getElementById("tdID"+ID+ID2).className, document.getElementById("tdLeftID"+ID+ID2).className, document.getElementById("tdRightID"+ID+ID2).className);
			
			//alert("divID"+ID+ID2);
			//Div anschalten
			document.getElementById("divID"+ID+ID2).style.display='block';

			//Link Class wechseln
			document.getElementById("linkID"+ID+ID2).className = document.getElementById("linkID"+ID+ID2).className+'_clicked';
			
			//TD BackGround wechseln
			document.getElementById("tdID"+ID+ID2).className = document.getElementById("tdID"+ID+ID2).className+'_clicked';
			document.getElementById("tdLeftID"+ID+ID2).className = document.getElementById("tdLeftID"+ID+ID2).className+'_clicked';
			document.getElementById("tdRightID"+ID+ID2).className = document.getElementById("tdRightID"+ID+ID2).className+'_clicked';
		}
	}
	
function hideAllDivs(value, value2, classNameAnker, classNameTD, classNameTDLeft, classNameTDRight)
	{
		for(i=1;i<=value;i++)
		{
			//alert("divID"+i+value2);
			//Divs ausschalten
			document.getElementById("divID"+i+value2).style.display='none';
			
			//Link Class auf Standard wechseln
			document.getElementById("linkID"+i+value2).className = classNameAnker;
			
			//Link Class auf Standard wechseln
			document.getElementById("tdID"+i+value2).className = classNameTD;
			document.getElementById("tdLeftID"+i+value2).className = classNameTDLeft;
			document.getElementById("tdRightID"+i+value2).className = classNameTDRight;
		}
	}
//-----------------------------------------------------------------------------------


//-----------------------------------------------------------------------------------
//###################################################################################
//Window-PopUp-----------------------------------------------------------------------
//Beispiel: <a href="#" onclick="win('http://www.google.de','NewWin','no','no','no','no','no','1024','768')">openWin</a>
function win(url,windowName,menubar,toolbar,status,scrollbars,resizable,width,height)
	{
		nwin=window.open(url,windowName,
						"'menubar="+menubar+
						",toolbar="+toolbar+
						",status="+status+
						",scrollbars="+scrollbars+
						",resizable="+resizable+
						",width="+width+
						",height="+height+
						",top=50,left=50'");
		nwin.focus();
	}
//-----------------------------------------------------------------------------------

//-----------------------------------------------------------------------------------
//###################################################################################
//Window-PopUp-----------------------------------------------------------------------
//Beispiel: <a href="#" onclick="win('http://www.google.de','NewWin','no','no','no','no','no','1024','768')">openWin</a>
/*
function zoomImage(url,windowName,menubar,toolbar,status,scrollbars,resizable,width,height)
	{
		nwin=window.open(url,windowName,
						"'menubar="+menubar+
						",toolbar="+toolbar+
						",status="+status+
						",width="+width+
						",height="+height+
						",scrollbars="+scrollbars+
						",resizable="+resizable+
						",width="+width+
						",height="+height+"'");
		nwin.focus();
	}
*/
//-----------------------------------------------------------------------------------

//-----------------------------------------------------------------------------------
//###################################################################################
//Funktion für den FAQ-Bereich (Divs und Images schalten)----------------------------
function showDivAndImage(ID,CountDivs)
	{
		//schaltet die Divs aus und setzt die Images auf notClicked
		hideAllDivsAndImages(CountDivs);
		
		//Div anschalten 
		document.getElementById("divID"+ID).style.display='block';
		//Image auf clicked wechseln
		document.getElementById("imgID"+ID).src='xt_img/arrows/faqArrow_on.gif';
	}

function hideAllDivsAndImages(ID)
	{	
		for(i=1;i<=ID;i++)
		{
			//Divs ausschalten
			document.getElementById("divID"+i).style.display='none';
			//Images auf notClicked wechseln
			document.getElementById("imgID"+i).src='xt_img/arrows/faqArrow_off.gif';
		}
	}
//-----------------------------------------------------------------------------------


//-----------------------------------------------------------------------------------
//###################################################################################
//Funktion ermittelt die aktuelle Browsergröße (width, height)-----------------------
//Hinweis: wird zur Zeit nicht benutzt OKr 29.09.2005--------------------------------
function getSize() 
	{
		
		var myWidth = 0, myHeight = 0;
		if( typeof( window.innerWidth ) == 'number' ) 
		{
			myWidth = window.innerWidth; 
			myHeight = window.innerHeight;
		} 
		else if( document.documentElement && ( document.documentElement.clientWidth ||document.documentElement.clientHeight ) ) 
		{
			myWidth = document.documentElement.clientWidth; 
			myHeight = document.documentElement.clientHeight;
		} 
		else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
		{
			myWidth = document.body.clientWidth; 
			myHeight = document.body.clientHeight;
		}
		//window.alert( 'Width = ' + myWidth + ' and height = ' + myHeight );
		
		if(myWidth<1000)
		{
			document.getElementById("thirdLevelNavigationModule").style.position = 'absolute';
			document.getElementById("thirdLevelNavigationModule").style.top = '112'; 
			document.getElementById("thirdLevelNavigationModule").style.left = '50%'; 
			//document.getElementById("thirdLevelNavigationModule").style.margin = '-505 0 0 0';
		}
		else
		{
			alert(document.getElementById("thirdLevelNavigationModule").style.top);
			document.getElementById("thirdLevelNavigationModule").style.top = '100px'; 
			document.getElementById("thirdLevelNavigationModule").style.left = '100px'; 
			document.getElementById("thirdLevelNavigationModule").style.display = 'block';
		}
	}

//-----------------------------------------------------------------------------------
//###################################################################################
//Funktionen für FireFox und Opera -Detection welche in SyFlash nicht richtig -------
//gerändert wird --------------------------------------------------------------------
function DetectFlash()
	{
		var lCounter;
		var lFlashVer = 0;
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"])
		{
			for(lCounter = 0; lCounter < navigator.plugins.length; lCounter++)
			{
				if(navigator.plugins[lCounter].description.indexOf("Flash 2") >= 0){lFlashVer = 2;}
				if(navigator.plugins[lCounter].description.indexOf("Flash 3") >= 0){lFlashVer = 3;}
				if(navigator.plugins[lCounter].description.indexOf("Flash 4") >= 0){lFlashVer = 4;}
				if(navigator.plugins[lCounter].description.indexOf("Flash 5") >= 0){lFlashVer = 5;}
				if(navigator.plugins[lCounter].description.indexOf("Flash 6") >= 0){lFlashVer = 6;}
				if(navigator.plugins[lCounter].description.indexOf("Flash 7") >= 0){lFlashVer = 7;}
				if(navigator.plugins[lCounter].description.indexOf("Flash 8") >= 0){lFlashVer = 8;}
				if(navigator.plugins[lCounter].description.indexOf("Flash 9") >= 0){lFlashVer = 9;}
			}
		}
		return lFlashVer;
	}
	
	
	

