function isSmartPhone() {
  //Initialize our user agent string to lower case.
  var uagent = navigator.userAgent.toLowerCase();
  
  var deviceBB = "blackberry";
  var deviceAndroid = "android";
  var deviceIphone = "iphone";
  var deviceIpod = "ipod";
  var deviceIpad = "ipad";

  if (  uagent.search(deviceIpod) > -1 ||
        uagent.search(deviceIpad) > -1 ||
        uagent.search(deviceIphone) > -1 ||
        uagent.search(deviceAndroid) > -1 ||
        uagent.search(deviceBB) > -1 )
      return true;
  else return false;
} 

function show(url){

    var h, w, x, y, par, temp;

    // Check smart phones
    if (isSmartPhone()) {
       temp=window.open(url,"Booker");
       return;
    }
    
    
    if (screen.height <= 480 || screen.width <= 640) {

                         alert("The resolution of your screen is low! Minimum require resolution of screen is 800x600.");

                return;

    }


    if (screen.width <= 1024 || screen.height <= 768) {

      h = screen.availHeight-24;

      w = screen.availWidth-10;

      par=",top=0,left=0,width="+w+",height="+h;

    } else {

      w=1024;

      h=768;

      x = (screen.availWidth - w)/2;

      y = (screen.availHeight - h)/2;

      par=",top="+x+",left="+y+",width="+w+",height="+h;

    }

          temp=window.open(url,"Booker","scrollbars=yes,resizable=yes,status=yes"+par);
}


