
/* ====================================================

> General Site variables script - The Clear Box Co.
>
> Created by John Mounsey, Peaknet LTD. for TCB
> john@peaknet.ltd.uk
> June © 2OO6 - please do not steal!

==================================================== */

// Right-click disabling code added 19.06.2006 (JNM)

// Site specific settings

siteUrl			= 'www.theclearbox.com'
siteName		= 'The Clear Box Co.'
siteBase		= 'English'
siteLang		= 'English'
siteCurr		= '£'
currencies		= 'English Pound [£]'
minCarriage		= '??'
telePhone		= '01709 838883'
freePhone		= ''
fax			= ''
Zip			= ''
vatNo			= ''
eMail			= 'info@theclearbox.com'
mailTo			= '<A HREF="mailto:' + eMail + '?subject=message from ' + siteUrl + '" title="Email us ..">click here</A>'
air			= ' '
wardrobe		= 'wardrobe'
optimalRes	= '1024 x 768'

pagelink		= document.location
pageName		= document.title
defaultStatus		= siteUrl
lastPage		= document.referrer
var now			= new Date();
var thisYear		= now.getYear();
pageW			= screen.width
pageH			= screen.height
pageColours		= screen.colorDepth
ns4			= document.layers
ns6			= document.getElementById&&!document.all
ie4			= document.all



var days		= new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
var months		= new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
var monthNos		= new Array('01','02','03','04','05','06','07','08','09','10','11','12');
var date		= ((now.getDate()<10) ? "0" : "")+ now.getDate();
today			= date + '/' + monthNos[now.getMonth()] + '/' + thisYear +"<SPAN class=hidden></SPAN>";
// today		= days[now.getDay()] + ", " + date + air + monthNos[now.getMonth()] + air + thisYear +"<SPAN class=hidden></SPAN>";

// Developer details

dev			= 'Peaknet Limited'
designer		= 'John Mounsey'
devUrl			= 'http://www.peaknet.ltd.uk/'


/* ====================================================
Print the current Date
==================================================== */

function printDate()

{
document.write('<SPAN TITLE="Today\'s date .." class="date">' + today + '</SPAN>');
}


/* ====================================================
Page Greeting
==================================================== */

function greeting()

{
document.write('');
}


/* ====================================================
Hide "Loading" message
==================================================== */

function hideLoad()

{
document.getElementById('loading')
loading.style.display='none';
}


/* ====================================================
Hi-Lite <TR> areas
==================================================== */

function hi(field)	{ field.className = 'trhi' }
function lo(field)	{ field.className = 'trlo' }


/* ====================================================
Things to do when page 100% loaded or resized
==================================================== */

function loaded()

{
window.status		= 'Page Loaded.'
}

function diag()

{
var winW 		= document.body.clientWidth
var winH 		= document.body.clientHeight
window.status		= 'Screen across: ' + winW + ' Screen height: ' + winH
}


/* ====================================================
Show Destination of a url
==================================================== */

function preUrl(goal)	{ goal.title = 'Goes to..\n ' + goal.href; }


/* ====================================================
Bookmark / Add to Favorites script
==================================================== */

function bookmark()

{ 
if (window.external) { external.AddFavorite(pagelink,pageName) }
	
else if (navigator.appName == "Netscape") 	{ alert('press control and D now to bookmark this page') }
else if (navigator.appName == "Opera") 		{ alert('press control and T now to bookmark this page') }
}


/* ====================================================
Recommend a Friend
==================================================== */

function sendPage()
	{
	alert('This opens a blank Email for you to send to friends ..');
	window.location='mailto:?subject=I recommend this site: ' + siteUrl + ' (' + siteName + ')';
	}


/* ====================================================
Previous Pages
==================================================== */

function goBack() { history.go(-1); }
function doubleBack() { history.go(-2); }


/* ====================================================
Go to a page
==================================================== */

function go(destUrl)
{
top.location=destUrl;
}


/* ====================================================
Status Bar Captions [note! does not work on <A> tags]
==================================================== */

function cap(label)
{ 
status=label; return true;
}


/* ====================================================
Change text within an ID'd <P> or <TD> tag
==================================================== */

function change(part,msg)
{
document.getElementById(part).innerText = msg;
}


/* ====================================================
Footer Tools
==================================================== */

function footerTools()
{
document.write('<P><A title="Our secure online shop.." HREF="/shop.htm">Shop</A> | <A title="Please read.." href="/privacy.html">Privacy Policy</A> | <A title="Please read.." href="/terms.html">Terms & Conditions of Sales</A> | <A HREF="/usage.html" target="_top" title="Please read..">Website Usage</A> | <A title="return to the Home page of this site.." HREF="/">Home</A></P>');
}

function credit()
{
document.write('<P TITLE="copyright message">Copyright of all images and content owned by The Clear Box Company Worldwide Limited.<br>Reproduction without prior permission is forbidden.<BR>' + siteName + ' is an authorized distributor for <A HREF="http://www.theclearbox.com/">The Clear Box Co. Worldwide Ltd.</A> [UK]');
document.write('<BR>ABN number: ' + vatNo + '. Products and site content © ' + thisYear);
document.write('</P>');
}


/* ====================================================
Group menu controller
==================================================== */

function fusionGroup(targ,chosen,restore)
	{
	eval(targ+".location='"+chosen.options[chosen.selectedIndex].value+"'");
	if (restore) chosen.selectedIndex=0;
	}


/* ====================================================
Top right promotional area [default = off]
==================================================== */

function promo()

{
document.write('&nbsp;');
}


/* ====================================================
Menu rollover code
==================================================== */

function mOn(slot)

{
slot.className = 'menuitemon';
}

function mOff(slot)

{
slot.className = 'menuitem';
}

function mHi(slot)

{
slot.className = 'menuhi';
}



/* ====================================================
Generic image roller
==================================================== */

function roll(obj,src)
{
obj.src = src;
}

/* ====================================================
Email Olivia Rocca "Badge"
==================================================== */

function emailOR()
{
document.write('<A HREF="mailto:info@theclearbox.com?subject=message from: ')
document.write(siteUrl + ' site..')
document.write('"><IMG src="gfx/olivia-rocca.gif" alt="Email Clearbox" class="gfx">')
document.write('</A>')
}

/* ====================================================
Generic Pop-Up opener
==================================================== */

function MM_openBrWindow(theURL,winName,features)
{
window.open(theURL,winName,features);
}

/* ====================================================
Home Page Map Captioner
==================================================== */

function nuLabel(msg)
{
document.getElementById('label').innerText=msg;
}

function defLabel()
{
document.getElementById('label').innerText='United Kingdom – Head Office';
}

/* ====================================================
start of Right-click blocker
==================================================== */

function stopRightClick() {
	if (event.button==2) {
		alert('Copyright of all images and content is owned by The Clear Box Company Worldwide Limited.\n\n\Reproduction withour prior permission from The Clear Box Company is FORBIDDEN.');
	}
}
document.onmousedown=stopRightClick
/* ====================================================
end of Right-click blocker
==================================================== */

/* remove a class from a page object */

function deClass(targCell)
{
targCell.className='';
}