
/* ====================================================

> General Site variables script - The Fusion Group
>
> Created by John Mounsey, Peaknet Limited.
> john@peaknet.ltd.uk
> © 2OO5 - please do not steal!

==================================================== */

// Site specific settings

siteUrl			= 'www.fusiongroup.com/international'
siteName		= 'Fusion International'
findName		= 'search'
menuName		= 'contents'
siteMenuName		= 'useful pages'
telePhone		= '+44 (0)1246 268666'
fax			= '+44 (0)1246 268052'
postCode		= '<A HREF="http://maps.google.co.uk/maps?q=s41+9pz&spn=0.024820,0.058545&hl=en" target="map" title="click to see a map [powered by Google]">S41 9PZ</A>'
postAddress		= 'Fusion Provida Limited<BR>Smeckley Wood Close<BR>Chesterfield Trading Estate<BR>Chesterfield<BR>Derbyshire<BR>' + postCode
eMail			= 'export@fusionprovida.com'
mailTo			= '<A HREF="mailto:' + eMail + '?subject=message from ' + siteUrl + '" title="Email us ..">click here</A>'
air			= ' '
optimalRes		= '1024 x 768'



// Screen environment settings

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

			if (thisYear < 1000) { thisYear += 1900 }

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

developer		= 'Peaknet Limited'
designer		= 'John Mounsey'
developerurl		= '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('<SPAN class="hidden">_</SPAN>Fusiongroup.com');
}


/* ====================================================
Form checker
==================================================== */

function validate(theForm)

{
if (document.forms[theForm].keywords.value == '' || document.forms[theForm].keywords.value == ' ')

	{
	alert('Please enter something to search for..');
	}

else
	{
	document.forms[theForm].submit();
	}

}


/* ====================================================
Hide "Loading" message
==================================================== */

function hideLoad()

{
document.getElementById('loading')
loading.style.display='none';
}


/* ====================================================
Hi-Lite <TR> areas
==================================================== */

function hi(field)	{ field.className = 'demoon' }
function lo(field)	{ field.className = 'demo' }


/* ====================================================
Things to do when page 100% loaded or resized
==================================================== */

function loaded()

{
window.status		= 'Page Loaded.'

if (document.title == 'The Fusion Group - Introduction' && siteName == 'The Fusion Group')
	{
	runSlideShow();
	}
}

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(dest) { 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 CLASS="tools"><A HREF="javascript:print();" title="Take a hard-copy of this page ..">Print</A> / <A HREF="javascript:bookmark();" title="Add this page to your Favourites ..">Save</A> / <A HREF="#top" title="Jump to the top of this page ..">Top</A></P>');
}

function credit()
{
document.write('<P TITLE="copyright message" CLASS="tools">© ' + siteName + ' ' + thisYear + '</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';
}



/* ====================================================
Dropmenu toggler
==================================================== */

function toggle(drop1,drop2)
{
document.getElementById(drop1).style.display='none';
document.getElementById(drop2).style.display='inline';
}


/*
	Image Popup
*/

PositionX = 100;
PositionY = 100;

defaultWidth  = 500;
defaultHeight = 500;

var AutoClose = false;

if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;

function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','car',optNN);}
if (isIE){imgWin=window.open('about:blank','car',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><body bgcolor=000000 scroll="no" topmargin="0" leftmargin="0"></body>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript><?/body>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()" topmargin="0" leftmargin="0">');
writeln('<img name="George" src="'+imageURL+'" style="display:block"></body></html>');
close();
}}
