// JavaScript Document
function pixelway() {
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-17532312-4']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
}

function betscha() {
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-17532312-2']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
}

function visualbasic() {
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-17532312-3']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
}

function redirect() {

  var url = location.href
  var url1 = "http://www.betscha.ch/priv/"
  var url3 = "http://www.pixelway.ch/support/"
  var url4 = "http://www.pixelway.ch/support/"
  var url5 = "https://www.pixelway.ch/support/"
  var url6 = "http://www.betscha.ch/cvonline/"

  switch (url) {
    // *.betscha.ch
    case "http://www.betscha.ch/" :
		betscha();
		window.location.replace(url1);
    	break;
    case "http://www.betscha.ch" :
		betscha();
		window.location.replace(url1);
    	break;
    case "http://betscha.ch/" :
		betscha();
		window.location.replace(url1);
    	break;
    case "http://betscha.ch" :
		betscha();
		window.location.replace(url1);
    	break;
    // *.visualbasic.ch
    case "http://www.visualbasic.ch/" :
		visualbasic();
		window.location.replace(url3);
    	break;
    case "http://www.visualbasic.ch" :
		visualbasic();
		window.location.replace(url3);
    	break;
    case "http://visualbasic.ch/" :
		visualbasic();
		window.location.replace(url3);
    	break;
    case "http://visualbasic.ch" :
		visualbasic();
		window.location.replace(url3);
    	break;
    // *.pixelway.ch
    case "http://www.pixelway.ch/" :
		pixelway();    
		window.location.replace(url4);
    	break;
    case "http://www.pixelway.ch" :
    	pixelway(); 
		window.location.replace(url4);
    	break;
    case "http://pixelway.ch/" :
		pixelway(); 
    	window.location.replace(url4);
    	break;
    case "http://pixelway.ch" :
		pixelway(); 
    	window.location.replace(url4);
    	break;
    // *.dynabiz.ch
    case "http://www.dynabiz.ch/" :
		pixelway();    
		window.location.replace(url4);
    	break;
    case "http://www.dynabiz.ch" :
    	pixelway(); 
		window.location.replace(url4);
    	break;
    case "http://dynabiz.ch/" :
		pixelway(); 
    	window.location.replace(url4);
    	break;
    case "http://dynabiz.ch" :
		pixelway(); 
    	window.location.replace(url4);
    	break;
    default:
    	pixelway();
    	window.location.replace(url5);
    	break;
  }
}

