

var PositionX = 100;
var PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

var defaultWidth  = 620;
var defaultHeight = 420;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = false;

if (parseInt(navigator.appVersion.charAt(0))>=4)
{
	var isNN=(navigator.appName=="Netscape")?1:0;
	var isIE=(navigator.appName.indexOf("Microsoft")!=-1 || navigator.appName.indexOf("Opera")!=-1 || navigator.appName.indexOf("Firefox")!=-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;
var thisYear = 2009;

// This function should be present on the "onload" area of the <body> tag on _all_ pages.

function loaded()
	{
	//alert('Page Loaded');
	}
	

	
// ----- auto-caption script (John Mounsey 2008) --------------------------------------

function cap(obj)
	{
	if (obj.accessKey)
		{
		obj.title=obj.innerText;
		//obj.title=obj.innerText + " (shortcut = alt+" +obj.accessKey+ " then Enter)";
		}
	
	else
		{
		obj.title=obj.innerText;
		}
	}
	
	


// The slideshow code bit

// configure seconds delay between changing (1000 = 1 second) //

var changeDelay = 3000

images=new Array();
images_pop=new Array();
index = 0;
currentindex = 0;

function changer()
{
	if(document.billboard)
	{
		currentindex = index;
		document.billboard.src = images[index].src;
		index++;
		if (index == images.length)
		{
			index = 0;
		}
		setTimeout("changer()",changeDelay);
		return;
	}
}





function popImage(imageURL,imageTitle)
{
	if (isNN){imgWin=window.open('about:blank','',optNN);}
	if (isIE){imgWin=window.open('about:blank','',optIE);}
	
	with (imgWin.document)
	{
		writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');
		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 || navigator.appName.indexOf("Opera")!=-1 || navigator.appName.indexOf("Firefox")!=-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["onlyone"].width;');
		writeln('window.innerHeight=document.images["onlyone"].height;}}');
		
		writeln('function doTitle(){document.title="'+imageTitle+'";}');
		writeln('</sc'+'ript>');
		
		writeln('</head><body bgcolor=000000 scroll="no">');
		
		writeln('<img name="onlyone" src='+imageURL+' style="display:block">');
		writeln('<sc'+'ript>reSizeToImage();doTitle();self.focus();</sc'+'ript>')
		writeln('</body></html>');
		close();
	}
}



function hide(pagePart)
{
document.getElementById(pagePart).style.display='none';
}

function show(pagePart)
{
document.getElementById(pagePart).style.display='block';
}



// ----- Literature access! (June 2009) -----
// Unlocks the Literature Download links upon entering a "valid" Email address.
// Jnm 16-06-2009

function fieldCheck(addressEntered,productInQuestion)
	{
	if (addressEntered == 0 || addressEntered.search('@') == -1 || addressEntered.search('.') == -1 || addressEntered.length < 10)
		{
		alert('Please enter a valid Email address.');
		return false;
		}
		
	else
	
	alert('Thanks. Click OK to reveal the free literature download links.\n\nEmail entered: '+addressEntered);
	document.getElementById('fileLinks').className='on';
	//document.getElementById('proceed').disabled=false;
	pageTracker._trackPageview('Trackr : Literature unlocked : '+addressEntered+ ' (' +productInQuestion+ ')');	
	}