

function requestJsonObject( url, callback) {
  var xmlHttp = false;
  
  // Mozilla, Opera, Safari sowie Internet Explorer 7
  if( typeof( XMLHttpRequest) != 'undefined') {
    xmlHttp = new XMLHttpRequest();
  }
  if( !xmlHttp) {
    // Internet Explorer 6 und älter
    try {
      xmlHttp  = new ActiveXObject( "Msxml2.XMLHTTP");
    } catch( e) {
      try {
        xmlHttp  = new ActiveXObject( "Microsoft.XMLHTTP");
      } catch( e) {
        xmlHttp  = false;
      }
    }
  }
  
  if( xmlHttp) {
    xmlHttp.open('GET', url, true);
    xmlHttp.onreadystatechange = function () {
      if (xmlHttp.readyState == 4) {
        callback( eval( xmlHttp.responseText));
      }
    };
    xmlHttp.send( null);
  }
}

function pnSwitchCSS() {
  var ua = navigator.userAgent;
  if (ua.indexOf('Mobile') !== -1 && ua.indexOf('Safari') !== -1 && ua.indexOf('iPad') === -1) {
    var link = document.getElementById('pn_main_css');
    link.href = '/css/perlinet-mobile.css?nocache=20111104';
  }
}


