function createWindow(strLink, strWindowName, intWidth, intHeight, bolScrollbars) {
	window.open(
		strLink,
		strWindowName,
		'width=' + intWidth + 
		',height=' + intHeight + 
		',directories=no' + 
		',location=no' +
		',menubar=no' +
		',scrollbars=' + bolScrollbars + 
		',status=no' + 
		',toolbar=no' + 
		',resizable=yes'
	);
}

function mailpage()
{
  mail_str = "mailto:?subject= Take a look at " + document.title;
  mail_str += "&body= I recommend you take a look at this, " + document.title;
  mail_str += ". You should check this out at http://www.holmesfarmcottage.co.uk/ ";// + location.href; 
  location.href = mail_str;
}



function checkContactForm() {
	if (document.contactus.email.value != "" && document.contactus.query.value.length > 0) {
		return true;
	} else {
		alert("Please fill in both fields.");
		return false;
	}
}

// Title: Tigra Hints
// URL: http://www.softcomplex.com/products/tigra_hints/
// Version: 1.4
// Date: 04/16/2006
// Note: Permission given to use this script in ANY kind of applications if
//    header lines are left unchanged.

var THintsS = [];
function THints (o_cfg, items) {
	this.n_id = THintsS.length;
	THintsS[this.n_id] = this;
	this.top = o_cfg.top ? o_cfg.top : 0;
	this.left = o_cfg.left ? o_cfg.left : 0;
	this.n_dl_show = o_cfg.show_delay;
	this.n_dl_hide = o_cfg.hide_delay;
	this.b_wise = o_cfg.wise;
	this.b_follow = o_cfg.follow;
	this.x = 0;
	this.y = 0;
	this.divs = [];
	this.iframes = [];
	this.show  = TTipShow;
	this.showD = TTipShowD;
	this.hide = TTipHide;
	this.move = TTipMove;
	// register the object in global collection
	this.n_id = THintsS.length;
	THintsS[this.n_id] = this;
	// filter Netscape 4.x out
	if (document.layers) return;
	var b_IE = navigator.userAgent.indexOf('MSIE') > -1,
	s_tag = ['<iframe frameborder="0" scrolling="No" id="TTifip%name%" style="visibility:hidden;position:absolute;top:0px;left:0px;',   b_IE ? 'width:1px;height:1px;' : '', o_cfg['z-index'] != null ? 'z-index:' + o_cfg['z-index'] : '', '" width=1 height=1></iframe><div id="TTip%name%" style="visibility:hidden;position:absolute;top:0px;left:0px;',   b_IE ? 'width:1px;height:1px;' : '', o_cfg['z-index'] != null ? 'z-index:' + o_cfg['z-index'] : '', '"><table cellpadding="0" cellspacing="0" border="0"><tr><td class="', o_cfg.css, '" nowrap>%text%</td></tr></table></div>'].join('');


	this.getElem = 
		function (id) { return document.all ? document.all[id] : document.getElementById(id); };
	this.showElem = 
		function (id, hide) { 
		this.divs[id].o_css.visibility = hide ? 'hidden' : 'visible'; 
		this.iframes[id].o_css.visibility = hide ? 'hidden' : 'visible'; 
		};
	
	document.onmousemove = f_onMouseMove;
	
	if (window.opera)
		this.getSize = function (id, b_hight) { 
			return this.divs[id].o_css[b_hight ? 'pixelHeight' : 'pixelWidth']
		};
	else
		this.getSize = function (id, b_hight) { 
			return this.divs[id].o_obj[b_hight ? 'offsetHeight' : 'offsetWidth'] 
		};
	for (i in items) {
		document.write (s_tag.replace(/%text%/g, items[i]).replace(/%name%/g, i));
		this.divs[i] = { 'o_obj' : this.getElem('TTip' + i) };
		this.divs[i].o_css = this.divs[i].o_obj.style;
		this.iframes[i] = { 'o_obj' : this.getElem('TTifip' + i) };
		this.iframes[i].o_css = this.iframes[i].o_obj.style;
		
	}
}
function TTipShow (id) {
	if (document.layers) return;
	this.hide();
	if (this.divs[id]) {
		if (this.n_dl_show) this.divs[id].timer = setTimeout('THintsS[' + this.n_id + '].showD("' + id + '")', this.n_dl_show);
		else this.showD(id);
		this.visible = id;
	}
}

function TTipShowD (id) {
	this.move(id);
	this.showElem(id);
	if (this.n_dl_hide) this.timer = setTimeout("THintsS[" + this.n_id + "].hide()", this.n_dl_hide);
}

function TTipMove (id) {
	var	n_win_l = f_scrollLeft(),
		n_win_t = f_scrollTop();

	var n_x = window.n_mouseX + n_win_l + this.left,
		n_y = window.n_mouseY + n_win_t + this.top;
		
	window.status = n_x;
	if (this.b_wise) {
		var n_w = this.getSize(id), n_h = this.getSize(id, true),
		n_win_w = f_clientWidth(), n_win_h = f_clientHeight();

		if (n_x + n_w > n_win_w + n_win_l) n_x = n_win_w + n_win_l - n_w;
		if (n_x < n_win_l) n_x = n_win_l;
		if (n_y + n_h > n_win_h + n_win_t) n_y = n_win_h + n_win_t - n_h;
		if (n_y < n_win_t) n_y = n_win_t;
	}
	this.divs[id].o_css.left = n_x + 'px';
	this.divs[id].o_css.top = n_y + 'px';
	this.iframes[id].o_css.left = n_x + 'px';
	this.iframes[id].o_css.top = n_y + 'px';
	
	if(this.top < n_h)
	    this.iframes[id].o_css.height = (n_h-this.top) + 'px';

	if(this.left < this.getSize(id, false))
	    this.iframes[id].o_css.width = (this.getSize(id, false)-this.left) + 'px';
}

function TTipHide () {
	if (this.timer) clearTimeout(this.timer);
	if (this.visible != null) {
		if (this.divs[this.visible].timer) clearTimeout(this.divs[this.visible].timer);
		setTimeout('THintsS[' + this.n_id + '].showElem("' + this.visible + '", true)', 10);
		this.visible = null;
	}
}

function f_onMouseMove(e_event) {

if (enabletip){
var nondefaultpos=false
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20

var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX
var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY

var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<tipobj.offsetWidth){
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=curX-tipobj.offsetWidth+"px"
nondefaultpos=true
}
else if (curX<leftedge)
tipobj.style.left="5px"
else{
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
pointerobj.style.left=curX+offsetfromcursorX+"px"
}

//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight){
tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
nondefaultpos=true
}
else{
tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
pointerobj.style.top=curY+offsetfromcursorY+"px"
}
tipobj.style.visibility="visible"
if (!nondefaultpos)
pointerobj.style.visibility="visible"
else
pointerobj.style.visibility="hidden"
}

	if (!e_event && window.event) e_event = window.event;
	if (e_event) {
		window.n_mouseX = e_event.clientX;
		window.n_mouseY = e_event.clientY;
	}
	return true;
}
function f_clientWidth() {
	if (typeof(window.innerWidth) == 'number')
		return window.innerWidth;
	if (document.documentElement && document.documentElement.clientWidth)
		return document.documentElement.clientWidth;
	if (document.body && document.body.clientWidth)
		return document.body.clientWidth;
	return null;
}
function f_clientHeight() {
	if (typeof(window.innerHeight) == 'number')
		return window.innerHeight;
	if (document.documentElement && document.documentElement.clientHeight)
		return document.documentElement.clientHeight;
	if (document.body && document.body.clientHeight)
		return document.body.clientHeight;
	return null;
}
function f_scrollLeft() {
	if (typeof(window.pageXOffset) == 'number')
		return window.pageXOffset;
	if (document.body && document.body.scrollLeft)
		return document.body.scrollLeft;
	if (document.documentElement && document.documentElement.scrollLeft)
		return document.documentElement.scrollLeft;
	return 0;
}
function f_scrollTop() {
	if (typeof(window.pageYOffset) == 'number')
		return window.pageYOffset;
	if (document.body && document.body.scrollTop)
		return document.body.scrollTop;
	if (document.documentElement && document.documentElement.scrollTop)
		return document.documentElement.scrollTop;
	return 0;
}
var HINTS_CFG = {
	'top'        : 5, // a vertical offset of a hint from mouse pointer
	'left'       : 5, // a horizontal offset of a hint from mouse pointer
	'css'        : 'hintsClass', // a style class name for all hints, TD object
	'show_delay' : 500, // a delay between object mouseover and hint appearing
	'hide_delay' : 2000, // a delay between hint appearing and hint hiding
	'wise'       : true,
	'follow'     : true,
	'z-index'    : 0 // a z-index for all hint layers
},

HINTS_ITEMS = {
	'TT1':wrap("See a Picture of the Cottage Plan"), 
	'TT2':wrap("SoftComplex Download Page"), 
	'TT3':wrap("Tigra Hints Forum"), 
	'TT4':wrap_img("dsc03579_thumbnail", "A Picture of the Cottage from the back Garden","images/Garden/smallnails/"),
	'TT5':wrap_img("dsc03061_thumbnail", "A Picture of the Garden","images/Garden/smallnails/"), 
	'TT6':wrap_img("dsc03069_thumbnail", "A Picture of the Garden","images/Garden/smallnails/"),  
	'TT7':wrap_img("dsc03531_thumbnail", "A Picture of the Garden","images/Garden/smallnails/"),
    'TT8':wrap_img("dsc03550_thumbnail", "A Picture of the Garden","images/Garden/smallnails/"),
  'TT9':wrap_img("dsc03555_thumbnail", "A Picture of the Garden","images/Garden/smallnails/"),    
  'TT10':wrap_img("dsc03564_thumbnail", "A Picture of the Garden","images/Garden/smallnails/"),  
 'TT11':wrap_img("dsc03576_thumbnail", "A Picture of the Garden","images/Garden/smallnails/"),    
  'TT12':wrap_img("dsc03565_thumbnail", "A Picture of the Garden","images/Garden/smallnails/"),  
'TT13':wrap_img("dsc03587_thumbnail", "A Picture of the Garden","images/Garden/smallnails/"),      
'TT14':wrap_img("dsc03590_thumbnail", "A Picture of the Garden","images/Garden/smallnails/"), 
'TT15':wrap_img("dsc03592_thumbnail", "A Picture of the Garden","images/Garden/smallnails/"), 
'HF1':wrap_img("100_0496_thumbnail", "A Picture of the woods","images/holmesfarm/smallnails/"), 
'HF2':wrap_img("100_0504_thumbnail", "A Picture of the Garden","images/holmesfarm/smallnails/"), 
'HF3':wrap_img("100_0709_thumbnail", "A Picture of the Garden","images/holmesfarm/smallnails/"), 
'HF4':wrap_img("100_0727_thumbnail", "A Picture of the Garden","images/holmesfarm/smallnails/"), 

	  
	6:'<table border="0" cellspacing="0" cellpadding="0" bgcolor="#4682B4"><tr><td><table border="0" cellspacing="1" cellpadding="3"><tr class="row"><td nowrap><b>currentStyle</b></td><td align="center">supported</td></tr><tr class="row"><td nowrap><b>getComputedStyle()</b></td><td align="center">unsupported</td></tr><tr class="row"><td nowrap><b>style</b></td><td align="center">supported</td></tr></table></td></tr></table>',
	7:'<table border="0" cellspacing="0" cellpadding="0" bgcolor="#4682B4"><tr><td><table border="0" cellspacing="1" cellpadding="3"><tr class="row"><td><b>currentStyle</b></td><td align="center">unsupported</td></tr><tr class="row"><td nowrap><b>getComputedStyle()</b></td><td align="center">supported</td></tr><tr class="row"><td><b>style</b></td><td align="center">supported</td></tr></table></td></tr></table>',
	8:'<table border="0" cellspacing="0" cellpadding="0" bgcolor="#4682B4"><tr><td><table border="0" cellspacing="1" cellpadding="3"><tr class="row"><td><b>currentStyle</b></td><td align="center">unsupported</td></tr><tr class="row"><td nowrap><b>getComputedStyle()</b></td><td align="center">unsupported</td></tr><tr class="row"><td><b>style</b></td><td align="center">supported</td></tr></table></td></tr></table>',
	9:'<table border="0" cellspacing="0" cellpadding="0" bgcolor="#4682B4"><tr><td><table border="0" cellspacing="1" cellpadding="3"><tr class="row"><td><b>cssRules[] </b></td><td align="center">unsupported</td></tr><tr class="row"><td><b>rules[] </b></td><td align="center">supported</td></tr><tr class="row"><td nowrap><b>styleSheets[] </b></td><td align="center">supported</td></tr></table></td></tr></table>',
	10:'<table border="0" cellspacing="0" cellpadding="0" bgcolor="#4682B4"><tr><td><table border="0" cellspacing="1" cellpadding="3"><tr class="row"><td><b>cssRules[] </b></td><td align="center">supported</td></tr><tr class="row"><td><b>rules[]</b></td><td align="center">unsupported</td></tr><tr class="row"><td nowrap><b>styleSheets[]</b></td><td align="center">supported</td></tr></table></td></tr></table>',
	11:'<table border="0" cellspacing="0" cellpadding="0" bgcolor="#4682B4"><tr><td><table border="0" cellspacing="1" cellpadding="3"><tr class="row"><td><b>addRule() </b></td><td align="center">supported</td></tr><tr class="row"><td nowrap><b>deleteRule() </b></td><td align="center">unsupported</td></tr><tr class="row"><td nowrap><b>insertRule() </b></td><td align="center">unsupported</td></tr><tr class="row"><td nowrap><b>removeRule()</b></td><td align="center">supported</td></tr></table></td></tr></table>',
	12:'<table border="0" cellspacing="0" cellpadding="0" bgcolor="#4682B4"><tr><td><table border="0" cellspacing="1" cellpadding="3"><tr class="row"><td><b>addRule()</b></td><td align="center">unsupported</td></tr><tr class="row"><td nowrap><b>deleteRule()</b></td><td align="center">supported</td></tr><tr class="row"><td nowrap><b>insertRule() </b></td><td align="center">supported</td></tr><tr class="row"><td nowrap><b>removeRule()</b></td><td align="center">unsupported</td></tr></table></td></tr></table>',
	13:'<table border="0" cellspacing="0" cellpadding="0" bgcolor="#4682B4"><tr><td><table border="0" cellspacing="1" cellpadding="3"><tr class="row"><td nowrap><b>createCSS StyleSheet()</b></td><td align="center">unsupported</td></tr><tr class="row"><td nowrap><b>createStyleSheet() </b></td><td align="center">supported</td></tr><tr class="row"><td nowrap><b>getOverrideStyle() </b></td><td align="center">unsupported</td></tr><tr class="row"><td nowrap><b>getPropertyPriority()</b></td><td align="center">unsupported</td></tr></table></td></tr></table>',
	14:'<table border="0" cellspacing="0" cellpadding="0" bgcolor="#4682B4"><tr><td><table border="0" cellspacing="1" cellpadding="3"><tr class="row"><td nowrap><b>createCSS StyleSheet() </b></td><td align="center">unsupported</td></tr><tr class="row"><td nowrap><b>createStyleSheet() </b></td><td align="center">supported</td></tr><tr class="row"><td nowrap><b>getOverrideStyle() </b></td><td align="center">unsupported</td></tr><tr class="row"><td nowrap><b>getPropertyPriority()</b></td><td align="center">supported</td></tr></table></td></tr></table>',
	15:'<table border="0" cellspacing="0" cellpadding="0" bgcolor="#4682B4"><tr><td><table border="0" cellspacing="1" cellpadding="3"><tr class="row"><td nowrap><b>createCSS StyleSheet() </b></td><td align="center">unsupported</td></tr><tr class="row"><td nowrap><b>createStyleSheet() </b></td><td align="center">unsupported</td></tr><tr class="row"><td nowrap><b>getOverrideStyle() </b></td><td align="center">unsupported</td></tr><tr class="row"><td nowrap><b>getPropertyPriority()</b></td><td align="center">supported</td></tr></table></td></tr></table>',
	16:'Softcomplex Inc. is rapidly growing<br>US/Ukrainian company providing high quality <br>software development and IT consulting services.',
	17:wrap("Tigra Hints Documentation", true)
};

var myHint = new THints (HINTS_CFG, HINTS_ITEMS);

function wrap (s_, b_ques) {
	return "<table cellpadding='0' cellspacing='0' border='0' style='-moz-opacity:90%;filter:progid:DXImageTransform.Microsoft.dropShadow(Color=#777777,offX=4,offY=4)'><tr><td rowspan='2'><img src='images/1"+(b_ques?"q":"")+".gif'></td><td><img src='images/pixel.gif' width='1' height='15'></td></tr><tr><td background='images/2.gif' height='28' nowrap>"+s_+"</td><td><img src='images/4.gif'></td></tr></table>"
}

function wrap_img (s_file, s_title,s_path) {
	return "<table cellpadding=5 bgcolor=white style='border:1px solid #777777'><tr><td><img src='"+s_path+s_file+".jpg' class='picI'></td></tr><tr><td align=center>"+s_title+"</td></tr></table>"
}


/***********************************************
* Cool DHTML tooltip script II- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var offsetfromcursorX=12 //Customize x offset of tooltip
var offsetfromcursorY=10 //Customize y offset of tooltip

var offsetdivfrompointerX=10 //Customize x offset of tooltip DIV relative to pointer image
var offsetdivfrompointerY=14 //Customize y offset of tooltip DIV relative to pointer image. Tip: Set it to (height_of_pointer_image-1).

document.write('<div id="dhtmltooltip"></div>') //write out tooltip DIV
document.write('<img id="dhtmlpointer" src="images/arrow2.gif">') //write out pointer image

var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""

var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : ""

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ddrivetip(thetext, thewidth, thecolor){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=thetext
enabletip=true
return false
}
}



function hideddrivetip()
{
    if (ns6||ie)
    {
        enabletip=false
        tipobj.style.visibility="hidden"
        pointerobj.style.visibility="hidden"
        tipobj.style.left="-1000px"
        tipobj.style.backgroundColor=''
        tipobj.style.width=''
    }
}


