var ua = navigator.userAgent.toLowerCase();
//if (ua.indexOf('safari/') != -1){
//document.write(ua.indexOf);
//alert("You're using Safari, moron!")
//}
//if (navigator.cookieEnabled != 0) {
//  document.write("You need to enable cookies for this site to load properly!");
//  self.location.replace('http://horariodebuses.com/all/cookies.php');
  //alert("You need to enable cookies for this site to load properly!");
//}
  var myWidth = 1200, myHeight = 1000;
  var h = 1200, w = 1000;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
    w=screen.width;
    h=screen.height;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
    w=screen.width;
    h=screen.height;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
    w=screen.width;
    h=screen.height;
  }
//  window.alert( 'Width = ' + myWidth );
//  window.alert( 'Height = ' + myHeight );

var a = new Date();
a = new Date(a.getTime() +1000*60*60*10); //in Milisecunden
document.cookie = "iw="+myWidth+"; expires="+a.toGMTString()+"; path=/"; 
document.cookie = "ih="+myHeight+"; expires="+a.toGMTString()+"; path=/"; 
// B.shirm
//if (window.screen){
//if( typeof( screen.width ) == 'number' ) {
//var w=screen.width;
//var h=screen.height;
//document.write("ss"+w);
document.cookie = "scw="+w+"; expires="+a.toGMTString()+"; path=/";
document.cookie = "sch="+h+"; expires="+a.toGMTString()+"; path=/";
//document.write(ua.indexOf);
//if (ua.indexOf('safari/') != -1 ) {
//self.location.replace('index.php?scw='+w+'&sch='+h+'&wite='+myWidth+'&hige='+myHeight);
//} else {
//self.location.replace('index.php');
//}
//}
//else if (h<=600) {
//self.location.replace('index.php')
//}
//}
