<!--
// begin Flash Detection

var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
	var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	    }
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}

// end Flash Detection




function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


// Functions to validate enquiry form
function Validate(formname){
	var valid = false;
	var dstrg = "";
	var i = 0;

if (formname == "enquiry"){
    with (document.enquiry) {
		if (Name.value == "")
			dstrg = dstrg + "Name\n";
		if (Company.value == "")
			dstrg = dstrg + "Company\n";
		if (Telephone.value == "")
			dstrg = dstrg + "Telephone\n";
		if (Email.value == "" || CheckEmail(Email.value) == false)
			dstrg = dstrg + "Email Address\n";
		if (Enquiry.value == "")
			dstrg = dstrg + "Enquiry\n";
}
}

// end of validate function

	if (dstrg.length > 0 ) {
//		dstrg = dstrg.substr(2);
		dstrg = "Please give valid input for the following:\n\n" + dstrg;
		alert(dstrg);
		return false;
		}
	else  
		{
		return true;
		}
	
} // end of function

function CheckEmail(Email){
	//Check for Valid Email Address
	//Variable Declration		
	var i = 0;
	var FlagAtSign = "False";
	var FlagDotSign = "False";
	var StrLen = 0;
	var EmailTxt = "";
	
	EmailTxt=Email;
	StrLen = EmailTxt.length;
	//Check for @ and . in Email given
	for(i=0; i<=StrLen-1; i++)
	{
		StrCurrentChar = EmailTxt.substring(i,i+1);
		if (StrCurrentChar=='@')
		{
			FlagAtSign="Ok";
		}
		if (StrCurrentChar=='.')
		{
			FlagDotSign="Ok";
		}
	}
	if (FlagAtSign!="Ok"  || FlagDotSign!="Ok")
	{  
		return false
	}
	else 
	{
		return true
	}
	//Email validation finished
}


function changeName(name) {
	document.getElementById('staffname').innerHTML = name;
}

//Gallery Enlargement function
function Enlarge(image){

	scrollTo(0,0);
	
	document.getElementById('galleryPic').innerHTML="<img id='photo' src='" + image + "' class='image'><\/span>";

	imageid = 'photo';
	image = document.getElementById(imageid);
	setOpacity(image,0);

	image.style.visibility = 'visible';
	fadeIn(imageid,0);
}
			
function setOpacity(obj,opacity) {
	opacity = (opacity == 100)?99.999:opacity;
		  
	// ieWin
	obj.style.filter = "alpha(opacity:"+opacity+")";
	// safari<1.2, konqueror
	obj.style.KHTMLOpacity = opacity/100;
	// older Mozilla and firefox
	obj.style.MozOpacity = opacity/100;
	// safari 1.2, newer firefox and mozilla, CSS3
	obj.style.opacity = opacity/100;
}

function fadeIn(objId,opacity) {
	if (document.getElementById) {
		obj = document.getElementById(objId);
		if (opacity <= 100) {
			setOpacity(obj, opacity);
			opacity += 10;
			window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100);
		}
	}
}


//-->