function checkBrowser(){
	this.win=(navigator.platform=="Win32")?1:0;
	this.mac=(navigator.platform=="MacPPC")?1:0;
	this.ver=navigator.appVersion;
	this.dom=document.getElementById?1:0;						/* The getElementById method is applicable to 5th generation browsers only. */
	this.ie6=(this.ver.indexOf("MSIE 6")!=-1 && this.dom)?1:0   /* PJM added to handle ie6 */
	this.ie5=(this.ver.indexOf("MSIE 5")!=-1 && this.dom)?1:0; 	/* Will handle both ie5 and ie5.5 */
	this.ie4=(document.all && !this.dom)?1:0;					/* Specifically ie4 */
	this.ns5up=(this.dom && parseInt(this.ver)>=5)?1:0;			/* Netscape 6 (Mozilla) */
	this.ns4=(document.layers && !this.dom)?1:0;				
	this.nucleus=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6)?1:0;		/* Only IE or Navigator */
	this.ie=(this.ie4 || this.ie5 || this.ie6 || this.ns6)?1:0;					/* Allows single test on nucleus.ie */
	this.nav=(this.ns4)?1:0;										/* Allows single test on nucleus.nav */
	return this
}
var nucleus = new checkBrowser();

// Sets the default page status
defaultStatus="Ocean Village Holidays"

// Standard print code
function printIt(){  
	if (window.print) {
		window.print() ;  
	}else{
		var browsername = '<OBJECT ID="browsername1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
		document.body.insertAdjacentHTML('beforeEnd', browsername);
		browsername1.ExecWB(6, 2);
	}
}

// Open Popup
function popupURL(URL,name,width,height, scrollWin){
	var winLeft = (screen.width - width) / 2;
	var winUp = (screen.height - height) / 2;
	win = window.open(URL,name, 'toolbar=no, resizable=yes, scrollbars='+scrollWin+', width='+width+', height='+height+',left='+winLeft+',top='+winUp);
}

function tableStripes(classname)
{
	var inc=0
	var tableclass=document.getElementsByTagName("table")
	var trtag=document.getElementsByTagName("tr")
	var j=tableclass.length
	for (i=0;i<j;i++)
	{ 
		if(tableclass[i].className==classname)
		{
		tableclass[i].className=classname;
			for (i=0; i<trtag.length; i++)
			{
				var l=trtag.length
				for (i=0;i<l;i++)
				{ 
					if (i%2 != 0)
					{
					trtag[i].className="colourOddRows";
					}
				}
			}
		}
	}
}
/*
need to define the following background-color's in stylesheet:
table.stripe {} tr.colourOddRows {} 
*/

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/;domain=oceanvillageholidays.co.uk";
}


function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",30	);
}
