var root = "http://www.albioncaff.co.uk/";

function openWin(){
 window.open(root+'print.php', 'myWin', 'width=700,height=550,screenX=250,screenY=100,directories=0,fullscreen=0,location=0,menubar=0,scrollbars=1,status=0,toolbar=0');
}



function openMAP(){
  window.open(root+'map.html', 'myWin', 'width=794,height=581,screenX=250,screenY=100,directories=0,fullscreen=0,location=0,menubar=0,scrollbars=1,status=0,toolbar=0');
}




function openDIV(id){
 document.getElementById(id).style.display='block';
}

function closeDIV(id){
 document.getElementById(id).style.display='none';
}



function liteOff(id,img_path)
{
 document.getElementById(id).src = root+"images/navigation/"+img_path;
}


function liteOn(id,img_path)
{
 document.getElementById(id).src = root+"images/navigation/"+img_path;
}



function back_black(){
 document.getElementById('back').src = root+"images/back_black.bmp";
}


function back_red(){
 document.getElementById('back').src = root+"images/back_red.bmp";
}




function openSUB(id){

 var str = document.getElementById(id).style.display;
 
 if(id=='res_sub_nav'){
  document.getElementById('rooms_sub_nav').style.display='none';
 }else{
  document.getElementById('res_sub_nav').style.display='none';
 }
 
 if(str=='none'){
  document.getElementById(id).style.display='block';
 }else{
  document.getElementById(id).style.display='none';
 }
 
 
}



function submitForm(){

  if(subscribe.name.value==''){ 
    alert('Please enter name') 
	subscribe.name.focus(); 	
	return false; 
  }
  
  if(subscribe.email.value==''){ 
    alert('Please enter email') 
	subscribe.email.focus(); 	
	return false; 
  }

 document.subscribe.submit();
 
}




function checkEmpty(form){
 
  if(form.name.value==''){
 
    alert('Please enter name') 
	form.name.focus(); 	
	return false;
   }
  
   if(form.email.value==''){
    alert('Please enter email')  	
	form.email.focus();
	return false;
   }
 
}


function whichBrs() {
var agt=navigator.userAgent.toLowerCase();
if (agt.indexOf("opera") != -1) return 'Opera';
if (agt.indexOf("staroffice") != -1) return 'Star Office';
if (agt.indexOf("webtv") != -1) return 'WebTV';
if (agt.indexOf("beonex") != -1) return 'Beonex';
if (agt.indexOf("chimera") != -1) return 'Chimera';
if (agt.indexOf("netpositive") != -1) return 'NetPositive';
if (agt.indexOf("phoenix") != -1) return 'Phoenix';
if (agt.indexOf("firefox") != -1) return 'Firefox';
if (agt.indexOf("safari") != -1) return 'Safari';
if (agt.indexOf("skipstone") != -1) return 'SkipStone';
if (agt.indexOf("msie") != -1) return 'Internet Explorer';
if (agt.indexOf("netscape") != -1) return 'Netscape';
if (agt.indexOf("mozilla/5.0") != -1) return 'Mozilla';
if (agt.indexOf('\/') != -1) {
if (agt.substr(0,agt.indexOf('\/')) != 'mozilla') {
return navigator.userAgent.substr(0,agt.indexOf('\/'));}
else return 'Netscape';} else if (agt.indexOf(' ') != -1)
return navigator.userAgent.substr(0,agt.indexOf(' '));
else return navigator.userAgent;
}
