//****************************************************************************
//Allgemeine Browserfuntkionen
//****************************************************************************
function Intern_IsHTMLSetup()
{	
	var bReturn=0;
	//jetzt testen, ob wird der "HTMLSetup-Browser" sind
	//oder doch Internet Explorer, Mozilla...
	if(window.external.Setup_IsHTMLSetup!=null)
	{
		bReturn=1;
	}
	else
	{
		bReturn=0;
	}
	return bReturn;
}

//////////////////////////////////////////////////////////////////
//merkt sich ob wird das HTMLSetup sind oder ein anderer Browser
//////////////////////////////////////////////////////////////////
var bIsHTMLSetup = 0;
bIsHTMLSetup=Intern_IsHTMLSetup();


function IsHTMLSetup()
{	
	return bIsHTMLSetup;
}

//////////////////////////////////////////////////////////////////
//startet eine exe, dessen Pfad übergeben wurde
//es wird keine "wollen sie die exe starten"-Abfrage angezeigt
//////////////////////////////////////////////////////////////////
function StartExe(strString)
{
	if(bIsHTMLSetup)
	{
		window.external.Setup_StartExe(strString);
	}
	else
	{
		//vielleicht eine Nachricht für den Benutzer anzeigen?:
		//"Bitte starten Sie HTMLSetup.exe, von ihrer Installations-CD."
	}
}
function StartFile(strString)
{
	if(bIsHTMLSetup)
	{
		window.external.Setup_StartFile(strString);
	}
	else
	{
		//vielleicht eine Nachricht für den Benutzer anzeigen?:
		//"Bitte starten Sie HTMLSetup.exe, von ihrer Installations-CD."
	}
}
function StartExeWithParams(strString,szParams)
{
	if(bIsHTMLSetup)
	{
		window.external.Setup_StartExeWithParams(strString,szParams);
	}
	else
	{
		//wie soll ich hier reagieren?
		//vielleicht eine Nachricht für den Benutzer anzeigen:
		//"Bitte starten Sie HTMLSetup.exe, von ihrer Installations-CD."
	}
}
function StartUrl(url)
{
	StartExeWithParams("explorer.exe",url);
}

function ReSetIniFile(strPath)
{
	if(bIsHTMLSetup)
	{
		window.external.Setup_ReSetIniFile(strPath);
	}
	else
	{
		//wie soll ich hier reagieren?
		//vielleicht eine Nachricht für den Benutzer anzeigen:
		//"Bitte starten Sie HTMLSetup.exe, von ihrer Installations-CD."
	}
}
//////////////////////////////////////////////////////////////////
//schliesst das HTML-Setup....dafür kann eigentlich window.close genutzt werden
//////////////////////////////////////////////////////////////////
function Setup_CloseHTMLSetup()
{
	//beenden
	if(bIsHTMLSetup)
	{
		window.external.Setup_CloseHTMLSetup();
	}
	else
	{
		//das funktioniert für IE
		window.close();
	}
}

function OpenModalURL(szURL,szHTTPPost,Width,Height,nX,nY)
{
	var bReturn=0;
	if(bIsHTMLSetup)
	{
		bReturn=window.external.Setup_OpenModalURL(szURL,szHTTPPost,Width,Height,nX,nY);
	}
	else
	{
	}
	return bReturn;
}


function ResizeWindow(iWidth,iHeight)
{
	var bReturn=0;
	if(bIsHTMLSetup)
	{
		//für das HTMLSetup die angegebene Grösse verwenden
		bReturn=window.external.Setup_IntroResizeWindow(iWidth,iHeight);
	}
	else
	{
		//für IE und andere Browser: etwas höher
		window.resizeTo(iWidth,iHeight+140);
	}
	return bReturn;
}
function StartInstalledFRITZDsl()
{
	//bool
	value=0;
	//FRITZ!DSL starten
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_StartInstalledFRITZDsl();
	}
	else
	{
		
	}
	return value;
}
function StartInstalledProg(dwIndex)
{
	//bool
	value=0;
	//FRITZ!DSL starten
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_StartInstalledProg(dwIndex);
	}
	else
	{
		
	}
	return value;
}
function IsFDSLInstalled()
{
	//bool
	value=0;
	
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsFDSLInstalled();
	}
	else
	{
		
	}
	return value;
}
function IsAVMFBoxHBInstalled()
{
	//bool
	value=0;
	
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsAVMFBoxHBInstalled();
	}
	else
	{
		
	}
	return value;
}
function GetLastPageNotFoundErrorCode()
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetLastPageNotFoundErrorCode();
	}
	else
	{
		
	}
	return value;
}

function GetLastPageNotFoundURL()
{
	//char
	value="";
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetLastPageNotFoundURL();
	}
	else
	{
		
	}
	return value;
}
function GetIntroCDDrive()
{
	//char
	value="";
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetIntroCDDrive();
	}
	else
	{
		
	}
	return value;
}
function TryContactFBoxURL(szUrl)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_TryContactFBoxURL(szUrl);
	}
	else
	{
		
	}
	return value;
}
function IsInScreen(dwHeight,dwWidth)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsInScreen(dwHeight,dwWidth);
	}
	else
	{
		
	}
	return value;
}
//
//
//
function IESetOnline()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IESetOnline();
	}
	else{	}
	return value;
}
function IsIEOffline()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsIEOffline();
	}
	else{	}
	return value;
}
//********************************************************
//DFUE
//********************************************************
function IsDUN_AutoConnect()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsDUN_AutoConnect();
	}
	else{	}
	return value;
}
function SetDUN_ToNoAutoConnect()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_SetDUN_ToNoAutoConnect();
	}
	else{	}
	return value;
}
//********************************************************
//Proxy
//********************************************************
function SetUseNoProxy()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_SetUseNoProxy();
	}
	else{	}
	return value;
}
function IsProxyEnabled()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsProxyEnabled();
	}
	else{	}
	return value;
}
function SetProxyOverride()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_SetProxyOverride();
	}
	else{	}
	return value;
}
//********************************************************
//Internet allgemein
//********************************************************
function LaunchInternetSettings()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_LaunchInternetSettings();
	}
	else{	}
	return value;
}
function IsNetCardInfoAccessPossible()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsNetCardInfoAccessPossible();
	}
	else{	}
	return value;
}
function IsAvmWlanConnectPossible()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsAvmWlanConnectPossible();
	}
	else{	}
	return value;
}
//********************************************************
//USB
//********************************************************
function IsFreeUsbPortPresent()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsFreeUsbPortPresent();
	}
	else{	}
	return value;
}
function GetNumOfFreeUsbPort()
{
	//dword
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetNumOfFreeUsbPort();
	}
	else{	}
	return value;
}
function GetNumOfUsbPort()
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetNumOfUsbPort();
	}
	else{	}
	return value;
}
//********************************************************
//LAN und WLAN
//********************************************************
function InitSystem()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_InitSystem();
	}
	else{	}
	return value;
}
function InitUPnPDll()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_InitUPnPDll();
	}
	else{	}
	return value;
}
function ReadInfos()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_ReadInfos();
	}
	else{	}
	return value;
}
function ReadUpdateInfos()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_ReadUpdateInfos();
	}
	else{	}
	return value;
}
function UpdateInfos()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_UpdateInfos();
	}
	else{	}
	return value;
}
function GetNwCardCount()
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetNwCardCount();
	}
	else{	}
	return value;
}
function GetNwCardIP(nCardIndex)
{
	//char
	value="";
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetNwCardIP(nCardIndex);
	}
	else{	}
	return value;
}
function GetNwCardSubnet(nCardIndex)
{
	//char
	value="";
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetNwCardSubnet(nCardIndex);
	}
	else{	}
	return value;
}
function GetNwCardName(nCardIndex)
{
	//char
	value="";
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetNwCardName(nCardIndex);
	}
	else{	}
	return value;
}
function GetNwCardNetConnectName(nCardIndex)
{
	//char
	value="";
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetNwCardNetConnectName(nCardIndex);
	}
	else{	}
	return value;
}
function IsLanCard(nCardIndex)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsLanCard(nCardIndex);
	}
	else{	}
	return value;
}
function IsConnected(nCardIndex)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsConnected(nCardIndex);
	}
	else{	}
	return value;
}
function IsFWLANUSB(nCardIndex)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsFWLANUSB(nCardIndex);
	}
	else{	}
	return value;
}
function IsFBOXUSBDevice(nCardIndex)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsFBOXUSBDevice(nCardIndex);
	}
	else{	}
	return value;
}
function IsFBOXUSBDevicePresent()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsFBOXUSBDevicePresent();
	}
	else{	}
	return value;
}
function GetCurrentConnectedSSID(nCardIndex)
{
	//char
	value="";
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetCurrentConnectedSSID(nCardIndex);
	}
	else{	}
	return value;
}
function IsWLanCard(nCardIndex)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsWLanCard(nCardIndex);
	}
	else{	}
	return value;
}
function IsIPInFboxDHCPRegion(nCardIndex)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsIPInFboxDHCPRegion(nCardIndex);
	}
	else{	}
	return value;
}
function RenewDHCPIP(nCardIndex)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_RenewDHCPIP(nCardIndex);
	}
	else{	}
	return value;
}
function IsDHCPEnabled(nCardIndex)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsDHCPEnabled(nCardIndex);
	}
	else{	}
	return value;
}
function HasValidDHCPIP(nCardIndex)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_HasValidDHCPIP(nCardIndex);
	}
	else{	}
	return value;
}
function EnableDHCP(nCardIndex)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_EnableDHCP(nCardIndex);
	}
	else{	}
	return value;
}
function SendArpTest(nCardIndex)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_SendArpTest(nCardIndex);
	}
	else{	}
	return value;
}
function ContactHttpFBOX_DNS()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_ContactHttpFBOX_DNS();
	}
	else{	}
	return value;
}
function ContactHttpFBOX_IP()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_ContactHttpFBOX_IP();
	}
	else{	}
	return value;
}
function RunContactHttpFBox_DNS()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_RunContactHttpFBox_DNS();
	}
	else{	}
	return value;
}
function RunContactHttpFBox_IP()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_RunContactHttpFBox_IP();
	}
	else{	}
	return value;
}
function RunIEContactHttpFBox_IP()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_RunIEContactHttpFBox_IP();
	}
	else{	}
	return value;
}
function RunIEContactHttpFBox_DNS()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_RunIEContactHttpFBox_DNS();
	}
	else{	}
	return value;
}
function RunWlanStartWZCS()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_RunWlanStartWZCS();
	}
	else{	}
	return value;
}
function ContactPingFBOX()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_ContactPingFBOX();
	}
	else{	}
	return value;
}
//********************************************************
//weitere LAN/WLAN
//********************************************************
function SetDHCPServer(nCardIndex,szDHCPServer)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_SetDHCPServer(nCardIndex,szDHCPServer);
	}
	else{	}
	return value;
}
function GetDHCPServer(nCardIndex)
{
	//char
	value="";
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetDHCPServer(nCardIndex);
	}
	else{	}
	return value;
}
function SaveStaticIpSettings(nCardIndex)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_SaveStaticIpSettings(nCardIndex);
	}
	else{	}
	return value;
}
function Setup_ResetStaticIpSettings(nCardIndex)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_ResetStaticIpSettings(nCardIndex);
	}
	else{	}
	return value;
}
function GetDnsServerIP()
{
	//char
	value="";
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetDnsServerIP();
	}
	else{	}
	return value;
}
function GetDnsServerName()
{
	//char
	value="";
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetDnsServerName();
	}
	else{	}
	return value;
}
//********************************************************
//WLAN-Funktionen - etwa "bau wlan Verbindung auf"
//********************************************************
function IsWlanFBox()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsWlanFBox();
	}
	else{	}
	return value;
}
function IsLanFBox()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsLanFBox();
	}
	else{	}
	return value;
}

function IsFBoxHostUSB()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsFBoxHostUSB();
	}
	else{	}
	return value;
}
function WlanConnect(nCardIndex, szSSID,szWEP)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_WlanConnect(nCardIndex,szSSID,szWEP);
	}
	else{	}
	return value;
}
function ExistsWlanConnectProfile(nCardIndex, szSSID)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_ExistsWlanConnectProfile(nCardIndex,szSSID);
	}
	else{	}
	return value;
}
function WlanSetConnectSettings(szSSID, szWEP,dwWLANAPIndex)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_WlanSetConnectSettings(szSSID,szWEP,dwWLANAPIndex);
	}
	else{	}
	return value;
}
function WlanGetWLANAPIndex()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_WlanGetWLANAPIndex();
	}
	else{	}
	return value;
}
function WlanGetSSIDConnectSetting()
{
	//Char
	value="";
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_WlanGetSSIDConnectSetting();
	}
	else{	}
	return value;
}
function WlanGetWEPConnectSetting()
{
	//Char
	value="";
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_WlanGetWEPConnectSetting();
	}
	else{	}
	return value;
}
function WlanGetErrorNumber()
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_WlanGetErrorNumber();
	}
	else{	}
	return value;
}
//********************************************************
//weitere Select
//********************************************************
function SelectUSBConnect()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_SelectUSBConnect();
	}
	else{	}
	return value;
}
function IsUSBConnectSelected()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsUSBConnectSelected();
	}
	else{	}
	return value;
}
function SelectWLANInstallConnect()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_SelectWLANInstallConnect();
	}
	else{	}
	return value;
}
function IsWLANInstallConnect()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsWLANInstallConnect();
	}
	else{	}
	return value;
}
function GetNetSelection()
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetNetSelection();
	}
	else{	}
	return value;
}
function SelectNetConnect(nCardIndex)
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_SelectNetConnect(nCardIndex);
	}
	else{	}
	return value;
}
function DoNotTryToConnectWith(nCardIndex)
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_DoNotTryToConnectWith(nCardIndex);
	}
	else{	}
	return value;
}
function CanTryToConnectWith(nCardIndex)
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_CanTryToConnectWith(nCardIndex);
	}
	else{	}
	return value;
}
function SolveNextProblem()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_SolveNextProblem();
	}
	else{	}
	return value;
}
function DoWlanConnect()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_DoWlanConnect();
	}
	else{	}
	return value;
}
function GetFBOXRootURL()
{
	//char
	value="http:\\fritz.box";
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetFBOXRootURL();
	}
	else{	}
	return value;
}

//********************************************************
//weitere Bewertung der Möglichkeiten
//********************************************************
function DoBestConnectOptionTest()
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_DoBestConnectOptionTest();
	}
	else{	}
	return value;
}
function GetEasyUserConnectOption()
{
	//DWORD
	value=1;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetEasyUserConnectOption();
	}
	else{	}
	return value;
}
function DoKnowProblemsTest()
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_DoKnowProblemsTest();
	}
	else{	}
	return value;
}
function DoFWLANConnectTest()
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_DoFWLANConnectTest();
	}
	else{	}
	return value;
}
//********************************************************
//Sonstiges
//********************************************************
function IsFBoxSL()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsFBoxSL();
	}
	else{	}
	return value;
}
function IsWithFWLANUSB()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsWithFWLANUSB();
	}
	else{	}
	return value;
}
function IsAvmWlanConnectPossible()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsAvmWlanConnectPossible();
	}
	else{	}
	return value;
}
function IsUserAdmin()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsUserAdmin();
	}
	else{	}
	return value;
}
function GetCurrentOS()
{
	// 0...nicht definiert
	// 1...98 bis ME
	// 2...NT
	// 3...XP bis XPSP1
	// 4...ab XPSP2
	// 6...2k
	// 7...Vista
  // 8...Windows 7
  // 9...Windows 8
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetCurrentOS();
	}
	else{	}
	return value;
}
function GetCurrentOSAsStr()
{
	//char
	value="";
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetCurrentOSAsStr();
	}
	else{	}
	return value;
}
function IsFirewallPresent()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsFirewallPresent();
	}
	else{	}
	return value;
}
function IsExpConnect()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsExpConnect();
	}
	else{	}
	return value;
}
function SetExpConnect()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_SetExpConnect();
	}
	else{	}
	return value;
}

//********************************************************
//Wlan Ap Search
//********************************************************
function WlanSearchAps(dwIndex)
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_WlanSearchAps(dwIndex);
	}
	else{	}
	return value;
}
function GetFoundAVMWlanSSIDName(dwIndex)
{
	//PTCHAR
	value="";
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetFoundAVMWlanSSIDName(dwIndex);
	}
	else{	}
	return value;
}
function GetFoundAVMWlanSSIDChannel	(dwIndex)
{
	//PTCHAR
	value="";
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetFoundAVMWlanSSIDChannel(dwIndex);
	}
	else{	}
	return value;
}
function HasFoundAVMWlanSSIDChannelProblem	(dwIndex)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_HasFoundAVMWlanSSIDChannelProblem(dwIndex);
	}
	else{	}
	return value;
}
function GetChannelProblemChannel	(dwIndex)
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetChannelProblemChannel(dwIndex);
	}
	else{	}
	return value;
}
function GetChannelProblemSSID	(dwIndex)
{
	//PTCHAR
	value="";
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetChannelProblemSSID(dwIndex);
	}
	else{	}
	return value;
}
function GetFoundAVMWlanSSIDRssi(dwIndex)
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetFoundAVMWlanSSIDRssi(dwIndex);
	}
	else{	}
	return value;
}
function GetDefaultFoundAVMWlanSSID()
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetDefaultFoundAVMWlanSSID();
	}
	else{	}
	return value;
}
function GetFoundAVMWlanSSIDCount()
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetFoundAVMWlanSSIDCount();
	}
	else{	}
	return value;
}
function GetBestChannelForSSID(dwIndex)
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetBestChannelForSSID(dwIndex);
	}
	else{	}
	return value;
}
function IsWlanSecurityEnabled(dwIndex)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsWlanSecurityEnabled(dwIndex);
	}
	else{	}
	return value;
}
function IsFWLANClientPresent()
{
	//BOOL
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsFWLANClientPresent();
	}
	else{	}
	return value;
}
function IsFWLANMiniClientPresent()
{
	//BOOL
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsFWLANMiniClientPresent();
	}
	else{	}
	return value;
}
function DoStartFWLANClientSearch()
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_DoStartFWLANClientSearch();
	}
	else{	}
	return value;
}
function StartCDPresentTest()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_StartCDPresentTest();
	}
	else{	}
	return value;
}
function StopCDPresentTest()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_StopCDPresentTest();
	}
	else{	}
	return value;
}
function DelIntroXPFirewall()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_DelIntroXPFirewall();
	}
	else{	}
	return value;
}

function AddIntroXPFirewall()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_AddIntroXPFirewall();
	}
	else{	}
	return value;
}
function IntroFlashWindow(dwFlashCount)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IntroFlashWindow(dwFlashCount);
	}
	else{	}
	return value;
}
function IsIntroInForeground()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsIntroInForeground();
	}
	else{	}
	return value;
}
function IntroStopForegroundTimer()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IntroStopForegroundTimer();
	}
	else{	}
	return value;
}
function IntroFlashWindowTimer(dwSecondesWaitTimer,dwFlashCount)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IntroFlashWindowTimer(dwSecondesWaitTimer,dwFlashCount);
	}
	else{	}
	return value;
}
function SetWindowTopMost()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_SetWindowTopMost();
	}
	else{	}
	return value;
}
function SetWindowNoTopMost()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_SetWindowNoTopMost();
	}
	else{	}
	return value;
}

function DHCPRenewAll()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_DHCPRenewAll();
	}
	else{	}
	return value;
}
function RunReleaseAndRenew_IP_ALL()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_RunReleaseAndRenew_IP_ALL();
	}
	else{	}
	return value;
}

function DHCPReleaseAll()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_DHCPReleaseAll();
	}
	else{	}
	return value;
}
function SetFBoxWANMode(bFboxInWANMode)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_SetFBoxWANMode(bFboxInWANMode);
	}
	else{	}
	return value;
}

function IsFBoxWithWANModeConnect()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsFBoxWithWANModeConnect();
	}
	else{	}
	return value;
}
function IsFBoxWithUSB()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsFBoxWithUSB();
	}
	else{	}
	return value;
}
function IsFBoxWithWPA()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsFBoxWithWPA();
	}
	else{	}
	return value;
}
function IsFBoxDSLSyncTest()
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsFBoxDSLSyncTest();
	}
	else{	}
	return value;
}
function StartUPNPThread()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_StartUPNPThread();
	}
	else{	}
	return value;
}
function SetContactConnectTyp(dwContactTyp)
{
	//DWORD
	value=1;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_SetContactConnectTyp(dwContactTyp);
	}
	else{	}
	return value;
}
function SetContactConnectFromIPARP()
{
	//DWORD
	value=1;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_SetContactConnectFromIPARP();
	}
	else{	}
	return value;
}
function GetContactConnectTyp()
{
	//DWORD ... 1,also LAN default
	value=1;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetContactConnectTyp();
	}
	else{	}
	return value;
}
function StopUPNPThread()
{
	//BOOL
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_StopUPNPThread();
	}
	else{	}
	return value;
}
function StartReInitUPnPInfos()
{
	//BOOL
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_StartReInitUPnPInfos();
	}
	else{	}
	return value;
}
function ResetSkipTest()
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_ResetSkipTest();
	}
	else{	}
	return value;
}
function GetSkipTest()
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetSkipTest();
	}
	else{	}
	return value;
}
function BackSetSkipTest(dwSkipTestBitmask)
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_BackSetSkipTest(dwSkipTestBitmask);
	}
	else{	}
	return value;
}
function SetSkipTest(dwSkipTestBitmask)
{
	//DWORD
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_SetSkipTest(dwSkipTestBitmask);
	}
	else{	}
	return value;
}
function DoSkipTest(dwSkipTestBitmask)
{
	//BOOL
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_DoSkipTest(dwSkipTestBitmask);
	}
	else{	}
	return value;
}

function IsUPnPRightFBoxForIntroPresent()
{
	//BOOL
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsUPnPRightFBoxForIntroPresent();
	}
	else{	}
	return value;
}


function IsFBoxForceWLANSec()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsFBoxForceWLANSec();
	}
	else{	}
	return value;
}
function IsFBoxForceWLANWPASec()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsFBoxForceWLANWPASec();
	}
	else{	}
	return value;
}
function IsFBoxForceWLANWEPSec()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsFBoxForceWLANWEPSec();
	}
	else{	}
	return value;
}
function IsWLANAdapterWithWPA		()
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsWLANAdapterWithWPA();
	}
	else{	}
	return value;
}
function IsWPAAP(dwAvmSSIDIndex)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsWPAAP(dwAvmSSIDIndex);
	}
	else{	}
	return value;
}
function StopFDSLWaiting()
{
	//bool
	value=0;
	
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_StopFDSLWaiting();
	}
	else
	{
		
	}
	return value;
}
function RunFDSLWaiting()
{
	//bool
	value=0;
	
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_RunFDSLWaiting();
	}
	else
	{
		
	}
	return value;
}
function SetIntroVar(szVarName,szVarValue)
{
	//ptchar
	value="";
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_SetIntroVar(szVarName,szVarValue);
	}
	else{	}
	return value;
}
function GetIntroVar(szVarName)
{
	//ptchar
	value="";
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_GetIntroVar(szVarName);
	}
	else{	}
	return value;
}
function DelIntroVar(szVarName)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_DelIntroVar(szVarName);
	}
	else{	}
	return value;
}
function IsIntroVarSet(szVarName)
{
	//bool
	value=0;
	if(bIsHTMLSetup)
	{
		value=window.external.Setup_IsIntroVarSet(szVarName);
	}
	else{	}
	return value;
}


function GoToWlanConnect()
{
	//hier soll wlan verbunden werden, ABER da gibts unterschiedliche
	//Möglichkeiten
	var CurrentOS=GetCurrentOS();
	if(((CurrentOS==4) || (CurrentOS==7)) &&
	IsAvmWlanConnectPossible())
	{
		//XPSP2 und wlan-Connect ist möglich
		document.location.href="wlan_wait_aps.htm";	
	}
	else
	{	
		
		//den "Erklär mal"-Weg gehen
		//hier aber noch nach OS unterscheiden
		if(CurrentOS==6)
		{
			//2k
			GotoWLANHersteller();
				
		}
		else
		{
			//XP sp2
			document.location.href="wlan-anschluss_01.htm";	
		}
		
	}	
}
function GoToWlanOldConnect()
{
	//hier soll wlan verbunden werden, ABER da gibts unterschiedliche
	//Möglichkeiten
	var CurrentOS=GetCurrentOS();
	//den "Erklär mal"-Weg gehen
	//hier aber noch nach OS unterscheiden
	if(CurrentOS==6)
	{
		//2k
		GotoWLANHersteller();	
	}
	else
	{
		document.location.href="wlan-anschluss_01.htm";	
	}
}
function GotoWLANHersteller()
{
	if(IsFBoxWithWPA())
	{
		document.location.href="wlan_hersteller_wpa.htm";					
	}
	else
	{
		document.location.href="wlan_hersteller_wep.htm";					
	}

}

function GotoSetSWHW()
{

		//FDSL wurde schon installiert
		document.location.href='fertig.htm';

	return;
}

  var camelCaseCache = {};

  function cssStrToCamelCase(str) {
    var strArr = str.split("-");
    if (strArr.length < 2) {
      return str;
    }
    if (camelCaseCache[str]) {
      return camelCaseCache[str];
    }
    var result = strArr[0];
    for (var i = 1, len = strArr.length; i < len; i++) {
      result += strArr[i].charAt(0).toUpperCase() + strArr[i].slice(1);
    }
    camelCaseCache[str] = result;
    return result;
  }
/*----------------------------------------------------------------

Style Funktionen aus jxl der FBoxen übernommen

------------------------------------------------------------------*/
  
var doc = window.document;

function get(idOrElement) {
  if (typeof idOrElement == 'string') {
    return doc.getElementById(idOrElement);
  }
  return idOrElement;
};

  var reAlpha = /alpha\(opacity=[^\)]+\)/i;

function setFilterOpacity(elem, val) {
  if (elem.currentStyle && !elem.currentStyle.hasLayout) {
    elem.style.zoom = 1;
  }
  val = Math.round(val * 100);
  var s = elem.style.filter;
  var s2 = 'alpha(opacity=' + val + ')';
  if (reAlpha.test(s)) {
    elem.style.filter = s.replace(reAlpha, s2);
  }
  else {
    elem.style.filter += ' ' + s2;
  }
}

function setStyleOpacity(elem, val) {
  elem.style.opacity = val;
}

function setOpacity(elem, val) {
  if (typeof elem.style.opacity == 'string') {
    setOpacity = setStyleOpacity;
    elem.style.opacity = val;
  }
  else if (typeof elem.style.filter == 'string') {
    setOpacity = setFilterOpacity;
    setFilterOpacity(elem, val);
  }
  else {
    setOpacity = function() {};
  }
}

var strFloat;

function setStyleFloat(elem, val) {
  if (!strFloat) {
    strFloat = typeof elem.style.cssFloat == 'string' ? 'cssFloat' : 'styleFloat';
  }
  elem.style[strFloat] = val;
}

function setStyle(idOrElement, cssName, cssValue) {
  var elem = get(idOrElement);
  if (elem) {
    switch (cssName) {
      case 'opacity':
        setOpacity(elem, cssValue);
        break;
      case 'float':
        setStyleFloat(elem, cssValue);
        break;
      default:
        elem.style[cssStrToCamelCase(cssName)] = cssValue;
        break;
    }
  }
}

  /*
    Die Funktion "display" dient dazu einzelne Knoten anzuzeigen oder zu verstecken via style:display=none
    1 Parameter ist der Knoten als DOM-Objekt oder dessen ID.
    2 Parameter ist ein Boolean der angibt ob der Knoten nun angezeigt (true), oder versteck (false) werden soll.
    Keine Rückgabe.
  */
function display(idOrElement, show) {
  setStyle(idOrElement, "display", show ? "" : "none");
}

function hide (idOrElement) {
  display(idOrElement, false);
}

function show (idOrElement) {
  display(idOrElement, true);
}
