var browser = "unknown";
var RedirectLocation ="http://www.talentsplace.com/syndication1/siemenssandbox/"; // Include the forward slash /
var PageName="nosupport.html";
var RedirectPage=0; // Select 0 for just a popup.

var confirmmsg = ''; // For General Application

//Start of browsercheck 
    if (navigator.platform.indexOf('Win')==0) {
      if (navigator.appName=="Netscape") {
        if (parseInt(navigator.appVersion) < 5) {
          //alert("Netscape 4 Windows");
          browser = "NOK";
        }
        if (parseInt(navigator.appVersion) > 4) {
          //alert("Netscape 6 Windows");
          browser = "OK";
        }
      }
      if (navigator.appName.indexOf("Microsoft")!=-1) {
        var versionIndex = navigator.appVersion.indexOf("MSIE ") + 5;
        if (parseInt(navigator.appVersion.substr(versionIndex, 5)) == 4) {
          //alert("IE4 Windows");
          browser = "OK";
        }
        if (parseInt(navigator.appVersion.substr(versionIndex, 5)) >= 5) {
          //alert("IE5 Windows");
          browser = "OK";
        }
      }
    }

    if (navigator.platform.indexOf('Mac')==0) {
      if (navigator.appName=="Netscape") {
        if (parseInt(navigator.appVersion) < 5) {
          //alert("Netscape 4 Mac");
          browser = "NOK";
        }
        if (parseInt(navigator.appVersion) > 4) {
          //alert("Netscape 6 Mac");
          browser = "NOK";
        }
      }
      if (navigator.appName.indexOf("Microsoft")!=-1) {
        var versionIndex = navigator.appVersion.indexOf("MSIE ") + 5;
        if (parseInt(navigator.appVersion.substr(versionIndex, 5)) == 4) {
          //alert("IE4 Mac");
          browser = "NOK";
        }
        if (parseInt(navigator.appVersion.substr(versionIndex, 5)) == 5) {
          //alert("IE5 Mac");
          browser = "OK";
        }
      }
    }
    if (navigator.platform.indexOf('Linux')==0) {
          if (navigator.appName=="Netscape") {
            if (parseInt(navigator.appVersion) < 5) {
              browser = "NOK";
            }
            if (parseInt(navigator.appVersion) > 4) {
              browser = "NOK";
            }
          }
    }
if (browser == "NOK") {
	if (navigator.appName == 'Netscape')
		var BrowserLanguage = navigator.language;
	else
		var BrowserLanguage = navigator.browserLanguage;
	var BrowserLanguage = BrowserLanguage.substr(0,2); // Cut down to first 2 chars of country code
  	// available languages: da,nl,en,fi,fr,de,hu,it,no,pl,pt,ru,es,sv,tr
	if (RedirectPage==1) {
		if (BrowserLanguage=='en') {BrowserLanguage='';}
		document.location.href=RedirectLocation+BrowserLanguage+PageName;
		}
	else {
		switch (BrowserLanguage) {
		case 'de': // German
			message='Ihre Browser Version unterstützt einige Elemente dieser Seite nicht. Es kann deshalb sein dass die Seite nicht komplett angezeigt wird. Bitte installieren Sie eine neuere '+navigator.appName+' Browser Version.';			
			confirmmsg='Um den Bewerbungsprozess zu vervollst\u00E4ndigen wird eine gesicherte Verbindung empfohlen, die von Ihrer Browserversion nicht unterst\u00FCtzt wird.\nKlicken Sie auf ABBRECHEN wenn Sie Ihren Browser updaten wollen, oder auf OK um mit der nicht gesicherten Verbindung fortzufahren.';
		break;
		case 'nl': // Dutch
			message='Deze pagina wordt niet door uw browser ondersteund; sommige onderdelen zijn niet zichtbaar of worden incompleet weergegeven. U dient uw '+navigator.appName+' browser software bij te werken.';
			confirmmsg='To complete the application process a secured connection is suggested. A secured connection is not supported by your browser version.\nClick CANCEL if you want to first upgrade your browser or click OK if you want to continue with a non-secured connection.';
		break;
		case 'fr': // French
			message='Cette page n\'est pas supportée par la version de votre navigateur. Certains de ses éléments ne sont pas disponibles, ou ne sont pas affichés entièrement. Merci de mettre à jour '+navigator.appName+' software.';
			confirmmsg='To complete the application process a secured connection is suggested. A secured connection is not supported by your browser version.\nClick CANCEL if you want to first upgrade your browser or click OK if you want to continue with a non-secured connection.';
		break;
		case 'sv': // Swedish
			message='Denna webbsida är inte byggd för din webbläsare. Vissa element kommer inte att fungera för Dig. Vänligen uppdatera din '+navigator.appName+' webbläsare.';
			confirmmsg='To complete the application process a secured connection is suggested. A secured connection is not supported by your browser version.\nClick CANCEL if you want to first upgrade your browser or click OK if you want to continue with a non-secured connection.';
		break;
		case 'da': // Danish
			message='Din browser version supporterer ikke denne side; hvorfor siden kun vises delvist eller er ufuldstændig. Opdater venligst din '+navigator.appNavn+' browser software.';
			confirmmsg='Vi anbefaler, at du anvender en sikker internetforbindelse under din ans\u00F8gningsregistrering hos os og vil g\u00F8re dig opm\u00E6rksom p\u00E5, at din browser version ikke kan anvendes som sikker internetforbindelse.\nKlik p\u00E5 ANNULLER hvis du \u00F8nsker at opgradere din browser version inden din ans\u00F8gningsregistrering eller klik p\u00E5 OK hvis du \u00F8nsker at forts\u00E6tte uden en sikker internetforbindelse.';
		break;
		case 'pl': // Polish
			message='Ta strona nie moze byc wyswietlona przez biezaca wersje twojej przegladarki; niektóre elementy sa niedostepne, lub moga byc wyswietlone sposób nieprawidlowy. Prosze zainstalowac nowsza wersje przegladarki ' + navigator.appName + '.';
			confirmmsg='To complete the application process a secured connection is suggested. A secured connection is not supported by your browser version.\nClick CANCEL if you want to first upgrade your browser or click OK if you want to continue with a non-secured connection.';
		break;
		case 'ro': // Romanian
			message='Aceasta pagina nu este suportata de versiunea dumneavoastra de navigator; unele elemente nu sunt disponibile sau sunt afisate incomplet. Va rugam sa updatati versiunea dumneavoastra de navigator ' + navigator.appName + '.';
			confirmmsg='To complete the application process a secured connection is suggested. A secured connection is not supported by your browser version.\nClick CANCEL if you want to first upgrade your browser or click OK if you want to continue with a non-secured connection.';
		break;
		default:
			message='This page is not supported by your browser version; some elements are not available, or are displayed incomplete. Please update your '+navigator.appName+' browser software.';
			confirmmsg='To complete the application process a secured connection is suggested. A secured connection is not supported by your browser version.\nClick CANCEL if you want to first upgrade your browser or click OK if you want to continue with a non-secured connection.';
		}
		alert(message);
	}
}

function winhttps(iplatform,itechid,inpostargid,iwidth,iheight,extraparam) {
	var winurlhttps = 'https:/\/' + iplatform + '/syndicated/private/syd_apply.cfm?id=' + itechid + '&nPostingTargetID=' + inpostargid + extraparam;
	var winurlhttp = 'http:/\/' + iplatform + '/syndicated/private/syd_apply.cfm?id=' + itechid + '&nPostingTargetID=' + inpostargid + extraparam;
	if (browser == 'OK') {
	window.open(winurlhttps,'Applyscreen','width='+iwidth+',height='+iheight+',scrollbars=yes,resizable=yes,location=no,directories=no,status=no,left=0,top=0'); void('');
	}
	else {
		var w1 = confirm(confirmmsg);
		if (w1==1) {
	window.open(winurlhttp,'Applyscreen','width='+iwidth+',height='+iheight+',scrollbars=yes,resizable=yes,location=no,directories=no,status=no,left=0,top=0'); void('');}
	}
}