/* Copyright  c 1999 - 2005 - Contact designer @ digitalidiom.co.uk */
/* www.digitalidiom.co.uk for professional web design to W3C standards */
/* NO copy or use of original material by Digital:Idiom without permission */


/* =======  bug fix for Netscape 4: reloads styles if Nav4 resized===== */
function DC_reloadPage(init) {
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.DC_pgW=innerWidth; document.DC_pgH=innerHeight; onresize=DC_reloadPage; }}
else if (innerWidth!=document.DC_pgW || innerHeight!=document.DC_pgH) location.reload();
}
DC_reloadPage(true);


/* BROWSER CHECKS */
var ns4 = (document.layers);
var ie4 = (document.all && !document.getElementById);
var ie5 = (document.all && document.getElementById);
var ns6 = (!document.all && document.getElementById);


/* ====================================================== */
/* MENU HIGHLIGHTER Changes appearance of selected menu   */
/* item to indicate which page is being viewed */

function chgNavBar(id){
	// Netscape 4
	if(ns4){
		document.layers[id].color ="#930";
	}
	// Explorer 4
	else if(ie4){
		document.all[id].style.color ="#930";
	}
	// W3C - Explorer 5+ and Netscape 6+
	else if(ie5 || ns6){
		document.getElementById(id).style.color ="#930";
	}
}


/* ====================================================== */
/* Dynamically Write Email or Address so spam spiders do not        */
/*  pick up email or address details */
function writeAddr()
{
	document.write("<address>");
	document.write("Sanata Barbera Apartment Information,<br>");
	document.write("Address Line 1<br>");
	document.write("Address Line 2<br>");
	document.write("County, Postcode<br>");
	document.write("U.K.<br>");
	document.write("<b>Mobile: 1111 0000 1111</b>");
	document.write("</address>");
}

function writeEmail(who)
{
	document.write("<a href='mailto:"+who+"@conil-apartment.co.uk'>");
	document.write(who+"@conil-apartment.co.uk");
	document.write("</a>");
}

/* ====================================================== */
/* COUNTER ROLLOVER (hide or show) */
function showStats(state)
{
	if (ie5) {
		document.all.stats.style.visibility = state;
	}
}



/* ====================================================== */
/* STYLE COOKIE (hide or show text link) */

	function cookieFunc(name,value,days,path,domain,sec)
	{
		var expiration;
		if (days) // how long cookie is to last
			{ expiration = (new Date().getTime() + days*24*60*60*1000) }
			else {expiration = null }
		if (path) // specify URL
			{ path = path }
			else {path = null }
		if (domain) // specify domain name
			{ domain = domain }
			else {domain = null }
		if (sec) // boolean
			{sec = "secure" }
			else {sec = null }
		document.cookie = name+"="+value;
						//+"; expires="+expiration;
						//+"; path="+path
						//+"; domain="+domain
						//+"; "+sec;
		//alert("ALERT STOP");
	}
