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

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

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

// Site specific settings

siteUrl		= 'www.theclearboxamerica.com'
siteName		= 'The Clear Box Co.'
siteBase		= 'USA'
siteLang		= 'American'
siteCurr		= '$'
currencies		= 'USA Dollars $ [USD]'
minCarriage	= '??'
telePhone		= 'coming soon!'
fax			= ''
Zip			= ''
vatNo		= '000'
eMail			= 'info@theclearboxamerica.com'
mailTo		= '<A HREF="mailto:' + eMail + '?subject=message from ' + siteUrl + '" title="Email us ..">click here</A>'
air			= ' '
wardrobe		= 'closet'
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="enter our secure online shop!" HREF="/shop.html">Shop</A> | <a href="#" onclick=\'window.open("/business_terms.html","terms","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,height=600,width=600");\'>Terms</A> | <A title="How to build our boxes.." HREF="/build-our-boxes.html">How to build our boxes</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</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@theclearboxamerica.com?subject=message from: ')
document.write(siteUrl + ' site..')
document.write('"><IMG src="gfx/olivia-rocca.gif" alt="Email Clearbox America" 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='select your nearest clear box distributor';
}



/* ====================================================
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='';
}