

function breakout_of_frame()
{
  // Break out of frame automatically

  if (top.location != location) {
    top.location.href = document.location.href ;
  }
}

/* openDir used with dropdown menu on startup page */
function openDir( form ) { 

	var newIndex = form.fieldname.selectedIndex; 

	if ( newIndex == 0 ) { 

		alert( "Please select a location!" ); 

	} else { 

		cururl = form.fieldname.options[ newIndex ].value; 

		window.location.assign( cururl ); 

	} 

}
/* END openDir  */


function CheckedDate(){
   var oDate = new Date();
   var sDate = oDate.getMonth() + "/" + 
      oDate.getDate() + "/" + oDate.getYear()
   document.forms[0].checkdate=sDate;
}

<!--<script type="text/javascript">-->
<!--
/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: CodeLifter.com :: http://www.codelifter.com */

var good;
function checkEmailAddress(field) {
// the following expression must be all on one line...
var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
  if (goodEmail) {
    good = true;
  } else {
    alert('Please enter a valid e-mail address.');
    field.focus();
    field.select();
    good = false;
  }
}

u = window.location;
m = "I thought this might interest you...";

function mailThisUrl() {
  good = false
  checkEmailAddress(document.eMailer.address);
  if (good) {
    // the following expression must be all on one line...
    window.location = "mailto:"+document.eMailer.address.value+"?subject="+m+"&body="+document.title+" "+u;
  }
}
//-->
<!--</script>-->



// Place focus on a form field on page load //-->
function placeFocus() {
if (document.forms.length > 0) {
var field = document.forms[0];
for (i = 0; i < field.length; i++) {
if ((field.elements[i].type == "text") || (field.elements[i].type == "textarea") || (field.elements[i].type.toString().charAt(0) == "s")) {
document.forms[0].elements[i].focus();
break;
         }
      }
   }
}


// Text Print Page script
// needs to have div id="printready" at start of area to be printed.
// ends with a <div> of course //-->

var gAutoPrint = true; // Flag for whether or not to automatically call the print function
function printSpecial()
{
	if (document.getElementById != null)
	{
		var html = '<HTML>\n<HEAD>\n';
		if (document.getElementsByTagName != null)
		{
			var headTags = document.getElementsByTagName("head");
			if (headTags.length > 0)
				html += headTags[0].innerHTML;
		}
		html += '\n</HE' + 'AD>\n<BODY>\n';
		var printReadyElem = document.getElementById("printReady");
		if (printReadyElem != null)
		{
				html += printReadyElem.innerHTML;
		}
		else
		{
			alert("Could not find the printReady section in the HTML. PRINT not enabled for this page.");
			return;
		}	
		html += '\n</BO' + 'DY>\n</HT' + 'ML>';
		var printWin = window.open("","printSpecial");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint)
			printWin.print();
	}
	else
	{
		alert("Sorry, the print ready feature is only available in modern browsers.");
	}
}

//Disable select-text script (IE4+, NS6+)- By Andy Scott
function disableselect(e){
return false
}
function reEnable(){
return true
}
//if IE4+
document.onselectstart=new Function ("return false")
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}

<!--
var agt = navigator.userAgent.toUpperCase();
var IsIE   = (navigator.appName.indexOf('Microsoft') != -1);
var IsAOL  = (agt.indexOf('AOL') != -1);
var IsIE5  = (IsIE && (agt.indexOf('MSIE 5') != -1));
var IsNS4  = ((navigator.appName.indexOf('Netscape') != -1) && (parseInt(navigator.appVersion) >= 4));
var IsIEMac = IsIE && agt.indexOf('MAC')!=-1;
var CtrlTxt = (IsIEMac) ? "Command" : "CTRL";

function PrintPage() {
  if (((IsNS4 || IsIE5)) && (window.print))
  {
    window.print();
  }
  else
  {
    alert('You may print this page using '+CtrlTxt+'-P.');
  }
}
// -->




   // Jimco Add-ins Spawn JavaScript
   // This script is freely redistributable. //-->
function spawnJimcoPopup(url, name, options, h, w, x, y, scaleType)
{
   var windowOptions;
   if (scaleType == 'percent')
   {
     w = (w * screen.availWidth) / 100;
     h = (h * screen.availHeight) / 100;
   }
   if (x == 'center')
   {
     x = (screen.availWidth - w) / 2;
     y = (screen.availHeight - h) / 2;
   }
   windowOptions = options + ',width=' + w + ',height=' + h + ',left=' + x + ',top=' + y;
   newWindow = window.open(url, name, windowOptions);
   newWindow.focus();
}

// Zoom Picture Script
function demoScript(sid, pwidth, pheight)
{
	
	var demoWin = window.open(sid, 'demoWin', 'toolbars=no,directory=no,scrollbars=yes,scrolling=auto,width='+pwidth+',height='+pheight+'top=100,left=80');
	demoWin.focus();
}


// Image Larger or smaller 
var zoomfactor=0.05 //Enter factor (0.05=5%)

function zoomhelper(){
if (parseInt(whatcache.style.width)>10&&parseInt(whatcache.style.height)>10){
whatcache.style.width=parseInt(whatcache.style.width)+parseInt(whatcache.style.width)*zoomfactor*prefix
whatcache.style.height=parseInt(whatcache.style.height)+parseInt(whatcache.style.height)*zoomfactor*prefix
}
}

function zoom(originalW, originalH, what, state){
if (!document.all&&!document.getElementById)
return
whatcache=eval("document.images."+what)
prefix=(state=="in")? 1 : -1
if (whatcache.style.width==""||state=="restore"){
whatcache.style.width=originalW
whatcache.style.height=originalH
if (state=="restore")
return
}
else{
zoomhelper()
}
beginzoom=setInterval("zoomhelper()",100)
}

function clearzoom(){
if (window.beginzoom)
clearInterval(beginzoom)
}
/* End of Image Zoom */

<!--
/*By George Chiang (JK's JavaScript tutorial)
http://www.javascriptkit.com
Credit MUST stay intact for use*/
/*This script displays Digital Clock using images.*/
/*This started with onload run3 */
/*This script displays Digital Clock using images.*/
var dn
c1=new Image(); c1.src="../images/clocknumbers/c1.gif"
c2=new Image(); c2.src="../images/clocknumbers/c2.gif"
c3=new Image(); c3.src="../images/clocknumbers/c3.gif"
c4=new Image(); c4.src="../images/clocknumbers/c4.gif"
c5=new Image(); c5.src="../images/clocknumbers/c5.gif"
c6=new Image(); c6.src="../images/clocknumbers/c6.gif"
c7=new Image(); c7.src="../images/clocknumbers/c7.gif"
c8=new Image(); c8.src="../images/clocknumbers/c8.gif"
c9=new Image(); c9.src="../images/clocknumbers/c9.gif"
c0=new Image(); c0.src="../images/clocknumbers/c0.gif"
cb=new Image(); cb.src="../images/clocknumbers/cb.gif"
cam=new Image(); cam.src="../images/clocknumbers/cam.gif"
cpm=new Image(); cpm.src="../images/clocknumbers/cpm.gif"
ctransp=new Image(); ctransp.src="../images/clocknumbers/ctransp.gif"
function extract(h,m,s,type){
if (!document.images)
return
if (h<=9){
document.images.a.src=ctransp.src
document.images.b.src=eval("c"+h+".src")
}
else {
document.images.a.src=eval("c"+Math.floor(h/10)+".src")
document.images.b.src=eval("c"+(h%10)+".src")
}
if (m<=9){
document.images.d.src=c0.src
document.images.e.src=eval("c"+m+".src")
}
else {
document.images.d.src=eval("c"+Math.floor(m/10)+".src")
document.images.e.src=eval("c"+(m%10)+".src")
}
if (s<=9){
document.g.src=c0.src
document.images.h.src=eval("c"+s+".src")
}
else {
document.images.g.src=eval("c"+Math.floor(s/10)+".src")
document.images.h.src=eval("c"+(s%10)+".src")
}
if (dn=="AM") document.j.src=cam.src
else document.images.j.src=cpm.src
}
function show3(){
if (!document.images)
return
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()
dn="AM"
if ((hours>=12)&&(minutes>=1)||(hours>=13)){
dn="PM"
hours=hours-12
}
if (hours==0)
hours=12
extract(hours,minutes,seconds,dn)
setTimeout("show3()",1000)
}
/*End show3.*/
//-->

// put Focus on field of a form. Fields numbered from 0
// i.e  onLoad="putFocus(0,1); puts focus on first field, 2 on 2nd etc
<!-- Begin
 function putFocus(formInst, elementInst) {
  if (document.forms.length > 0) {
   document.forms[formInst].elements[elementInst].focus();
  }
 }
// The second number in the "onLoad" command in the body
// tag determines the form's focus. Counting starts with '0'
//  End -->


// Picture new window popup
// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.
// SETUPS:
// ===============================
// Set the horizontal and vertical position for the popup
PositionX = 100;

PositionY = 100;



// Set these value approximately 20 pixels greater than the

// size of the largest image to be used (needed for Netscape)


// defaultWidth was 170 defaultHeight was 158
defaultWidth  = 600;

defaultHeight = 700;



// Set autoclose true to have the window close automatically

// Set autoclose false to allow multiple popup windows



var AutoClose = true;



// Do not edit below this line...

// ================================

if (parseInt(navigator.appVersion.charAt(0))>=4){

var isNN=(navigator.appName=="Netscape")?1:0;

var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}

var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;

var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;

function popImage(imageURL,imageTitle){

if (isNN){imgWin=window.open('about:blank','',optNN);}

if (isIE){imgWin=window.open('about:blank','',optIE);}

with (imgWin.document){

writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');

writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');

writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');

writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');

writeln('width=100-(document.body.clientWidth-document.images[0].width);');

writeln('height=100-(document.body.clientHeight-document.images[0].height);');

writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       

writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');

writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');

if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')

else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');

writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');

close();		

}}
<!-- Email addresses for contact buttons -->

function peacefam(){
open(href="mailto:peacefam@bed-and-breakfast-travel.com?subject=submit Peace Clan Photo/Information");
}

function peacefam_errpt(){
open(href="mailto:peacefam@bed-and-breakfast-travel.com?subject=submit Peace Clan Information Error Report");
}

function bnbweb(){
open(href="mailto:webmeister@bed-and-breakfast-travel.com?subject=Website Information Request");
}

function bnbwebservices(){
open(href="mailto:webmeister@bed-and-breakfast-travel.com?subject=Website Services Information Request");
}

function peacewebservicesinfo(){
open(href="mailto:webmeister@bed-and-breakfast-travel.com?subject=Peaceweb Website Services Information Request");
}

function info(){
open(href="mailto:info@bed-and-breakfast-travel.com?subject=Information Request");
}

function sales(){
open(href="mailto:sales@bed-and-breakfast-travel.com?subject=Sales/Marketing Information");
}

function support(){
open(href="mailto:support@bed-and-breakfast-travel.com?subject=Site Review/Update Information");
}

function breadcrumb(){
<!-- Original:  Kevin Lynn Brown  -->

<!-- Breadcrumb Navigation script -->

<!-- Begin
var path = "";
var href = document.location.href;
var s = href.split("/"); 
for (var i=2;i<(s.length-1);i++) {
path+="<A HREF=\""+href.substring(0,href.indexOf(s[i])+s[i].length)+"/\">"+s[i]+"</A> / ";
}
i=s.length-1;
path+="<A HREF=\""+href.substring(0,href.indexOf(s[i])+s[i].length)+"\">"+s[i]+"</A>";
var url = window.location.protocol + "//" + path;
document.writeln(url);
// End -->
}

<!-- Original:  Quak Zhixuan (zhixuan@email.com) -->
<!-- Web Site:  http://www.chs.edu.sg/~991b20 -->

<!-- Modifications:  Jim Cairo (jcairo@mediaone.net) -->
<!-- Result:  Improves color selection, better results -->

<!-- Rainbow Text generator -->
function createHexArray(n) {
this.length = n;
for (var i = 1; i <= n; i++)
this[i] = i - 1;

this[11] = "A";
this[12] = "B";
this[13] = "C";
this[14] = "D";
this[15] = "E";
this[16] = "F";
return this;
}
hx = new createHexArray(16);

function convertToHex(x) {
if (x < 17) x = 16;
var high = x / 16;
var s = high+"";
s = s.substring(0, 2);
high = parseInt(s, 10);
var left = hx[high + 1];
var low = x - high * 16;
if (low < 1) low = 1;
s = low + "";
s = s.substring(0, 2);
low = parseInt(s, 10);
var right = hx[low + 1];
var string = left + "" + right;
return string;
}

function makeRainbow(text) {
text = text.substring(0, text.length);
color_d1 = 255;
mul = color_d1 / text.length;
for(var i = 0; i < text.length; i++) {
color_d1 = 255*Math.sin(i / (text.length / 3));
color_h1 = convertToHex(color_d1);
color_d2 = mul * i;
color_h2 = convertToHex(color_d2);

k = text.length;
j = k - i;
if (j < 0) j = 0;
color_d3 = mul * j;
color_h3 = convertToHex(color_d3);

document.write("<FONT COLOR=\"#" + color_h3 + color_h1 + color_h2 + "\">" + text.substring(i, i + 1) + "</FONT>");
   }
}

<!-- Output Header Time display -->
{
 function padout(number) { return (number < 10) ? '0' + number : number; } 

 function updateClocks() {
     now = new Date();
     document.forms[0].timenow.value = padout(now.getHours()) + ':' +
 padout(now.getMinutes()) + ':' + padout(now.getSeconds());
     now.setTime(now.getTime() - (1000*60*60*12));
     setTimeout('updateClocks()',500);
 }

}

<!-- Display Calendar Date -->
function displayDate() { 
var Today=new Date();
var ThisDay=Today.getDay();
var ThisDate=Today.getDate();
var ThisMonth=Today.getMonth()+1;
var ThisYear=Today.getFullYear();  //included if you wish to insert the year
function Day (DayNumber) {
var Day=new Array();
Day[0]="Sunday";
Day[1]="Monday";
Day[2]="Tuesday";
Day[3]="Wednesday";
Day[4]="Thursday";
Day[5]="Friday";
Day[6]="Saturday";
return Day[DayNumber];
}
var DayName=Day(ThisDay);
function MonthTxt (MonthNumber) {
var Month=new Array();
Month[1]="January";
Month[2]="February";
Month[3]="March";
Month[4]="April";
Month[5]="May";
Month[6]="June";
Month[7]="July";
Month[8]="August";
Month[9]="September";
Month[10]="October";
Month[11]="November";
Month[12]="December";
return Month[MonthNumber];
}
var MonthName=MonthTxt(ThisMonth);
var d = new Date();
var h = d.getHours();
document.write("<TABLE BORDER=3 BGCOLOR=WHITE  WIDTH=75 align=center>"+"<TD>"+"<font size=3 >"+"<b>"+DayName+"<br>"+"<font color=red size=+3 >"+ThisDate+"</font>"+"<br>"+"<b>"+MonthName+"</b>"+"</font>"+"</TD>"+"</TR>"+"</TABLE>");
	}

<!-- Display Favorite/Bookmark us prompt -->
 
function displayBookmark() {
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {

 var url = "http://bed-and-breakfast-travel.com/index.html";
 var title = "Bed and Breakfast Travel";


document.write('<A HREF="javascript:window.ext');
document.write('ernal.AddFavorite(url,title);" ');
document.write('onMouseOver=" window.status=');
document.write("'Add our site to your favorites!'; return true ");
document.write('"onMouseOut=" window.status=');
document.write("' '; return true ");
document.write('">Add our site to your favorites!</a>');
}
else {
var msg = "Netscape/Mozilla Users - Please Use Control+D to Bookmark us";
if(navigator.appName == "Netscape") msg += "  (CTRL+D)";
document.write(msg);
}
 }

<!-- launchFull script -->
<!-- unused at moment -->

var str = "left=0,screenX=0,top=0,screenY=0,menubar,toolbar,scrollbars";

if (window.screen) {
  var ah = screen.availHeight - 30;
  var aw = screen.availWidth - 10; 
  str += ",height=" + ah;
  str += ",innerHeight=" + ah;
  str += ",width=" + aw;
  str += ",innerWidth=" + aw;
} else {
  str += ",resizable"; // so the user can resize the window manually
}

function launchFull(url, name, features) {
  return window.open(url, name, str + features);
}

<!-- Display Currency window -->
  function CurrencyPopup(QueryString)
  { 
    CurrencyWindow = window.open ('', 'CurrencyWindow', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,height=170,width=600')
    CurrencyWindow.focus()
    CurrencyWindow.location.href = 'http://www.xe.net/ecc/input.cgi?Template=sw&'+QueryString
  }


