//bookmark
//Insert "javascript:Bookmark()" as href
var title="Square Meal - London's Most Comprehensive Guide to Restaurants and Bars"

function Bookmark(){
if (document.all)
window.external.AddFavorite(location.href,title)
}

//Make homepage
// use onClick="makeHome(this)"

function makeHome(arg){
 	
if(navigator.appVersion.charAt(navigator.appVersion.indexOf("MSIE") + 5) >= 5 && navigator.platform.indexOf("Win16") == -1 
 && navigator.platform.indexOf("Mac") == -1){
 		arg.style.behavior='url(#default#homepage)';
 		arg.setHomePage('http://www.squaremeal.co.uk/');
 		arg.href="#";
 		return true;
 	}
 	else {return false}
}



//status bar
function msg(msgStr) {
  status=msgStr
}

//pop-up window
//Attach onClick="Window(this.href,'name','width','height','yes/no');return false;" to <a>
function Window(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}


//image protection
//Attach onMouseDown="Protect()" to <img>
function Protect(){ 
alert ("This image is copyright protected.");}


//check box control
function Check(field, i) {
if (i == 0) { // "All" checkbox selected.
for (i = 1; i < field.length; i++)
field[i].checked = field[0].checked;
       }
}

//window timer
//Attach onLoad="Timer('5000') event to <body>
function Timer(thetime) {
    setTimeout("window.open('http://www.bradmans.com')", thetime);
}

	
// Script that generates an random number
// Used with Live Booking
	var time = new Date();
	ordval= (time.getTime());


