//  <script language="javascript" src="/carryover/js/switchboard.js"></script>

function uriHasUpperCase( u ) {
    var regex = /[A-Z]/
	if ( regex.test( u ) ) {
      return true;
    } else {
	  return false;
    }
}

//Fire up the switchboard if necessary
var tmp_qs = document.location.search;
var tmp_uri ="";
var ad_tracking = "";

if (tmp_qs.indexOf("adid")>=0) {
	ad_tracking = tmp_qs;
}

if (tmp_qs != "" && tmp_qs != "undefined" && ad_tracking == "") {
	tmp_uri = document.location.pathname + tmp_qs;
} else {
	tmp_uri = document.location.pathname;
}

//for any page redirected to /en/business/... from teh old commercial site
if(tmp_uri.toLowerCase().indexOf('/en/business') >= 0){
	location.replace('/en/business/');
}

//for any page called from the old autoshow /autoshow/ send it to the new autoshow dir /en/autoshow/.
if(tmp_uri.toLowerCase().indexOf('/autoshow') == 0){
	location.replace('/en/autoshow/');
}

if ( uriHasUpperCase( document.location.pathname ) ) {
	location.replace(document.location.pathname.toLowerCase() + document.location.search );
}


