var is_major = parseInt(navigator.appVersion);
if (is_major >=4){

button_off = new Image();
button_on = new Image();
button_off.src = "images/button.gif";
button_on.src = "images/button-on.gif";

}

function doBtn(imgID,imgName){
if (is_major >=4){
document.images[imgID].src = eval(imgName + ".src")
}}


var win1 = new Object;
function pop(page,top,left,width,height,resize,scroll,fullscreen){
closepop();
win1 = eval("window.open('" + page + "','popup','top=" + top + ",left=" + left + ",width=" + width + ",height=" + height + ",resizable=" + resize + ",scrollbars=" + scroll + "');")
}
function closepop(){
if (win1.closed == false)
	{win1.close();}
      }



// IMAGE POPUPS

var popwin = new Object;
function popimage(imagesrc,top,left,winwidth,winheight,winsb){
var look='top='+top+',left='+left+',width='+winwidth+',height='+winheight+',scrollbars='+winsb+','
if (popwin) {
     try{
         popwin.close();
     } catch(e) {
         ignore="this error";
     }
}
popwin=window.open("","popup",look) 
popwin.document.open() 
popwin.document.write('<META HTTP-EQUIV="imagetoolbar" CONTENT="no"><title>Farsyde Farm Cottages</title><body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0><img src="'+imagesrc+'"><script type="text/javascript" src="http://www.tilt.uk.net/stattag/scripts/sniffer.js"></script><script type="text/javascript" src="http://www.tilt.uk.net/stattag/scripts/tag.js"></script></body>') 
popwin.document.close() 
}