
function bookmarksite(title,url){
 if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function"))
	window.sidebar.addPanel(title, url, "");
else if(window.opera){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url,title);
else 
alert('To Bookmark Sugarvine Press control and d');

}


//<![CDATA[
		   	   

			var mobi = ['opera', 'iemobile', 'safari'];
			var midp = ['blackberry', 'symbian'];
			var ua = navigator.userAgent.toLowerCase();
			var desktop = '<link rel="stylesheet" href="/css/all.css" type="text/css" media="all"/>';
			if ((ua.indexOf('midp') != -1) || (ua.indexOf('mobi') != -1) || ((ua.indexOf('ppc') != -1) && (ua.indexOf('mac') == -1))) {
				document.write('<link rel="stylesheet" href="/css/allmobile.css" type="text/css" media="all"/>');
				if (ua.indexOf('midp') != -1) {
					for (var i = 0; i < midp.length; i++) {
						if (ua.indexOf(midp[i]) != -1) {
							document.write('<link rel="stylesheet" href="/css/' + midp[i] + '.css" type="text/css"/>');
							document.write('<meta name="viewport" content="width=320,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>');
						}
					}
				}
				else {
					if ((ua.indexOf('mobi') != -1) || (ua.indexOf('ppc') != -1)) {
						for (var i = 0; i < mobi.length; i++) {
							if (ua.indexOf(mobi[i]) != -1) {
								document.write('<link rel="stylesheet" href="/css/' + mobi[i] + '.css" type="text/css"/>');
								document.write('<meta name="viewport" content="width=240"/>');
							}
						}
					}
				}
			}
			else {
				document.write(desktop);
			}
	
            
		
		
		var theImages = [];
		var whichImage = [];
		
		theImages[0] = '"/images/home/home-pic-01.jpg" title="Sugarvine.com - UK Restaurant guide. Picture of Nino\'s Rawtenstall"'
		theImages[1] = '"/images/home/home-pic-02.jpg" title="Sugarvine.com - UK Restaurant guide. Picture of Trattoria San Marco, Much Hoole"'
		theImages[2] = '"/images/home/home-pic-03.jpg" title="Sugarvine.com - UK Restaurant guide. Picture of The Bald Faced Stag | realpubs.co.uk"'
		theImages[3] = '"/images/home/home-pic-04.jpg" title="Sugarvine.com - UK Restaurant guide. Picture of The Swissotel The Howard, London"'
		theImages[4] = '"/images/home/home-pic-05.jpg" title="Sugarvine.com - UK Restaurant guide."'
		
		
		
		var j = 0
		var p = theImages.length;
		var preBuffer = new Array()
		for (i = 0; i < p; i++){
		preBuffer[i] = new Image()
		preBuffer[i].src = theImages[i]
		}
		var whichImage = Math.round(Math.random()*(p-1));
		function showImage(){
		document.write('<img src='+theImages[whichImage]+' width="450" height="356">');
		}
		

		//]]>