function ValidateContact_From_ThaiBowl_Website()
{
   var regexp;
   var yourname = document.getElementById('yourname');
   if (!(yourname.disabled || yourname.style.display === 'none' || yourname.style.visibility === 'hidden'))
   {
      regexp = /^[A-Za-zÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ \t\r\n\f]*$/;
      if (!regexp.test(yourname.value))
      {
         alert("Please enter only letter and whitespace characters in the \"Name\" field.");
         yourname.focus();
         return false;
      }
      if (yourname.value == "")
      {
         alert("Please enter a value for the \"Name\" field.");
         yourname.focus();
         return false;
      }
   }
   var youremail = document.getElementById('youremail');
   if (!(youremail.disabled || youremail.style.display === 'none' || youremail.style.visibility === 'hidden'))
   {
      regexp = /^([0-9a-z]([-.\w]*[0-9a-z])*@(([0-9a-z])+([-\w]*[0-9a-z])*\.)+[a-z]{2,6})$/i;
      if (!regexp.test(youremail.value))
      {
         alert("Please enter a valid email address.");
         youremail.focus();
         return false;
      }
      if (youremail.value == "")
      {
         alert("Please enter a value for the \"email\" field.");
         youremail.focus();
         return false;
      }
   }
   var yourphonenumber = document.getElementById('yourphonenumber');
   if (!(yourphonenumber.disabled || yourphonenumber.style.display === 'none' || yourphonenumber.style.visibility === 'hidden'))
   {
      regexp = /^[-+]?\d*\.?\d*$/;
      if (yourphonenumber.value.length != 0 && !regexp.test(yourphonenumber.value))
      {
         alert("Please enter only digit characters in the \"Phone\" field.");
         yourphonenumber.focus();
         return false;
      }
   }
   var yourmessagetext = document.getElementById('yourmessagetext');
   if (!(yourmessagetext.disabled || yourmessagetext.style.display === 'none' || yourmessagetext.style.visibility === 'hidden'))
   {
      regexp = /^[A-Za-zÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ \t\r\n\f0-9-]*$/;
      if (!regexp.test(yourmessagetext.value))
      {
         alert("Please enter only letter, digit and whitespace characters in the \"Main Message\" field.");
         yourmessagetext.focus();
         return false;
      }
      if (yourmessagetext.value == "")
      {
         alert("Please enter a value for the \"Main Message\" field.");
         yourmessagetext.focus();
         return false;
      }
   }
   return true;
}
$(document).ready(function()
{
   $("a[href*='#home']").click(function(event)
   {
      event.preventDefault();
      $('html, body').stop().animate({ scrollTop: $('#wb_home').offset().top-500 }, 600, 'easeOutCubic');
   });
   $("a[href*='#about']").click(function(event)
   {
      event.preventDefault();
      $('html, body').stop().animate({ scrollTop: $('#wb_about').offset().top-105 }, 600, 'easeOutCubic');
   });
   $("a[href*='#services']").click(function(event)
   {
      event.preventDefault();
      $('html, body').stop().animate({ scrollTop: $('#wb_services').offset().top-88 }, 600, 'easeOutCubic');
   });
   $("a[href*='#contact']").click(function(event)
   {
      event.preventDefault();
      $('html, body').stop().animate({ scrollTop: $('#wb_contact').offset().top-88 }, 600, 'easeOutCubic');
   });
   function topScroll()
   {
      var $obj = $("#wb_top");
      if (!$obj.hasClass("in-viewport") && $obj.inViewPort(false))
      {
         $obj.addClass("in-viewport");
         SetStyle('PageHeader', 'NoBackground');
      }
      else
      if ($obj.hasClass("in-viewport") && !$obj.inViewPort(true))
      {
         $obj.removeClass("in-viewport");
         SetStyle('PageHeader', 'GrayBackground');
      }
   }
   if (!$('#wb_top').inViewPort(true))
   {
      $('#wb_top').addClass("in-viewport");
   }
   topScroll();
   $(window).scroll(function(event)
   {
      topScroll();
   });
   $("a[href*='#Bookmark2']").click(function(event)
   {
      event.preventDefault();
      $('html, body').stop().animate({ scrollTop: $('#wb_Bookmark2').offset().top }, 600, 'easeOutCubic');
   });
   function resizeVideo() 
   {
      var ratio = 16/9;
      var widthViewPort = $(window).width();
      var heightViewPort = $(window).height();
      var width, height;
      var $player = $('#thaibowlintrovideo');
      if (widthViewPort / ratio < heightViewPort)
      {
         width = Math.ceil(heightViewPort * ratio);
         $player.width(width).height(heightViewPort).css({left: (widthViewPort - width) / 2, top: 0});
      }
      else
      {
         height = Math.ceil(widthViewPort / ratio);
         $player.width(widthViewPort).height(height).css({left: 0, top: (heightViewPort - height) / 2});
      }
   }
   $(window).on('resize', function() 
   {
      resizeVideo();
   })
   resizeVideo();
   $(document).on('click','.ThemeableMenu1-navbar-collapse.in',function(e)
   {
      if ($(e.target).is('a') && ($(e.target).attr('class') != 'dropdown-toggle')) 
      {
         $(this).collapse('hide');
      }
   });
   $("a[href*='#opening']").click(function(event)
   {
      event.preventDefault();
      $('html, body').stop().animate({ scrollTop: $('#wb_opening').offset().top-88 }, 600, 'easeOutCubic');
   });
   $("a[href*='#header']").click(function(event)
   {
      event.preventDefault();
      $('html, body').stop().animate({ scrollTop: $('#wb_header').offset().top }, 600, 'easeOutCirc');
   });
});
(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));var quoteCount = 0;
var quotes = new Array ();
quotes[0] = "Did you know that Chinese food has 5 Key Flavors that must be balanced according to Traditional Chinese Medicine — sweet, sour, salty, bitter, and spicy? ";
quotes[1] = "Flavors vary considerably across China. For example, Sichuan cuisine is famous for numbing spiciness, Hong Kong cuisine is sweet or savory, northern cuisine is salty, and southern minority cuisine is sour";
quotes[2] = "Chinese eat far more fruit/vegetables than in the West — about twice as much dietary fiber…";
quotes[3] = "So much so is the priority of food for Thai people that whenever you meet some Thai person, the first thing they will say is “Gin Khao Yung” meaning – have you eaten yet!";
quotes[4] = "The whole world knows about Pad Thai but not as much about Pad Mama which is fried noodle with beef and vegetables.";
quotes[5] = "Thai people do not prefer to eat with chopsticks! They use a fork and a spoon to eat.";
quotes[6] = "Thai desserts are unique as they are made of coconut flesh, coconut cream and rice flour rather than cream or wheat flour.";
quotes[7] = "Thai cuisine is a perfect blend of four seasonings – salty, sweet, sour, and spicy. Almost every Thai dish combines all four tastes.";
quotes[8] = "Thai cuisine lays a lot of importance to fresh fruits and vegetables which is very much evident in their curries and every desserts that come loaded with fruits.";
quotes[9] = "Eating alone in Thailand is considered bad luck, so remember to invite your friends and family over next time you order a Thai takeaway.";
for (i=0; i<quotes.length; i++)
{
   if (quotes[i] == "")
      break;
   quoteCount++;  
}
var randomquote = document.getElementById('randomquote');
randomquote.innerHTML = quotes[Math.floor(quoteCount * Math.random())];
var map;
var marker;
var geocoder;
function GoogleMapInit(id, latitude, longitude, address) 
{    
   var latlng = new google.maps.LatLng(latitude, longitude);
   var latlngMarker = new google.maps.LatLng(latitude, longitude);
   var mapOptions = 
   {        
      center: latlng,        
      mapTypeId: google.maps.MapTypeId.ROADMAP,
      mapTypeControl: false,        
      scrollwheel: true,
      streetViewControl: false,        
      zoom: 20,
      zoomControl: true,        
      zoomControlOptions: { style: google.maps.ZoomControlStyle.SMALL }
   }
   element = document.getElementById(id);
   map = new google.maps.Map(element, mapOptions);   
   marker = new google.maps.Marker({ draggable:true, map: map, position: latlngMarker});   
   geocoder = new google.maps.Geocoder();
   geocoder.geocode({'address': address}, function(results, status) 
   {
      if (status == google.maps.GeocoderStatus.OK) 
      {
         map.setCenter(results[0].geometry.location);
         var marker = new google.maps.Marker(
         {
            map: map, 
            position: results[0].geometry.location
         });
      } 
      else 
      {
        //    alert("Geocode was not successful: " + status);
      }
   });
}
GoogleMapInit('GoogleMaps', 53.322710, -0.941469, '15 Grove Street Retford');
   var now = new Date();
   var startYear = "2015";
   var text =  " &copy; ";
   if (startYear != '')
   {
      text = text + startYear + "-";
   }
   text = text + now.getFullYear() + ", Thai Bowl Ltd. Registered Company No. 10496958";
   var copyrightnotice = document.getElementById('copyrightnotice');
   copyrightnotice.innerHTML = text;
(function(d, s, id) 
{
   var js, fjs = d.getElementsByTagName(s)[0];
   if (d.getElementById(id)) return;
   js = d.createElement(s); 
   js.id = id;
   js.src = "https://connect.facebook.net/en_US/all.js#xfbml=1";
   fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
var disabled_message = "";
document.oncontextmenu = function() 
{ 
   return false; 
}
document.onmousedown = function md(e) 
{ 
  try 
  { 
     if (event.button==2||event.button==3) 
     {
        if (disabled_message != '')
           alert(disabled_message);
        return false; 
     }
  }  
  catch (e) 
  { 
     if (e.which == 3) return false; 
  } 
}
