function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i = 0; i < vars.length; i++) { var pair = vars[i].split("="); if (pair[0] == variable) { return pair[1]; } } } function goStationStart(typ) { var stationlink = getQueryVariable("path"); if (typ == "MIO.lon" || typ == "mio.net" || typ == "mio.net V2" ) { window.location.href = "StationMioNet.aspx?path=" + stationlink; } else if (typ == "Pumpe") { window.location.href = "StationPumpe.aspx?path=" + stationlink; } else if (typ == "Bruecke") { window.location.href = "StationBruecke.aspx?path=" + stationlink; } else if (typ == "Wago") { window.location.href = "StationWago.aspx?path=" + stationlink; } else if (typ == "ICL8") { window.location.href = "StationICL.aspx?DE=8&path=" + stationlink; } else if (typ == "ICL16") { window.location.href = "StationICL.aspx?DE=16&path=" + stationlink; } else if (typ == "ICL24") { window.location.href = "StationICL.aspx?DE=24&path=" + stationlink; } else if (typ == "BrueckeMioNetII") { window.location.href = "StationMioIIBruecke.aspx?path=" + stationlink; } else { window.location.href = "Station.aspx?path=" + stationlink+"&info=Standard"; } } function makeWorkTask(path, backLink) { window.location.href = "WorkTasks/NewOrder.aspx?path=" + path + "&link=" + backLink+".aspx"; } function makeWorkTaskStation(path, backLink) { var station = getQueryVariable("path"); window.location.href = "../WorkTasks/NewOrder.aspx?path=" + path + "&link=station&station="+station; } function getViewport() { var viewPortWidth; var viewPortHeight; // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight if (typeof window.innerWidth != 'undefined') { viewPortWidth = window.innerWidth, viewPortHeight = window.innerHeight } // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document) else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0) { viewPortWidth = document.documentElement.clientWidth, viewPortHeight = document.documentElement.clientHeight } // older versions of IE else { viewPortWidth = document.getElementsByTagName('body')[0].clientWidth, viewPortHeight = document.getElementsByTagName('body')[0].clientHeight } return [viewPortWidth, viewPortHeight]; } function isMobileDevice() { return (typeof window.orientation !== "undefined") || (navigator.userAgent.indexOf('IEMobile') !== -1); };