var isIe4=false, isDom=false, isMac=false, isWin=false, isNs=false, isNs4=false, isFlash=-1, isLoaded=false;
var isIe=false, isIe50=false

function init()
{
	if (isDom)
	{
		isLoaded=true;
		//imgPreload("/_resources/client/images/windows/window-1.jpg","/_resources/client/images/windows/window-2.jpg","/_resources/client/images/windows/window-3.jpg","/_resources/client/images/windows/window-4.jpg","/_resources/client/images/windows/window-5.jpg","/_resources/client/images/windows/window-6.jpg","/_resources/client/images/windows/window-7.jpg","/_resources/client/images/windows/window-8.jpg","/_resources/client/images/windows/window-9.jpg","/_resources/client/images/windows/window-10.jpg","/_resources/client/images/windows/window-11.jpg","/_resources/client/images/windows/window-12.jpg");
	}
}


function imgPreload()
{
	var imageURL = "";
	var aLength=imgPreload.arguments.length, i;
	for (i=0; i<aLength; i++)
	{
		preLoad[i]=new Image();
		preLoad[i].src=imgPreload.arguments[i];
	}
}

function writeMe(divID,divText)
{
	if (isLoaded)
	{
		document.getElementById(divID).innerHTML=divText;
	}
	if (isNs4)
	{
		document.layers[divID].document.open()
		document.layers[divID].document.write(divtext)
		document.layers[divID].document.close()
	}
}

function showImageedw(imgRef)
{
	imgString="<img src="+imgRef+" height=\"484\" width=\"485\" />";
	writeMe('mainImage',imgString);
}

function showImagewin(imgRef)
{
	imgString="<img src="+imgRef+" height=\"380\" width=\"500\" />";
	writeMe('mainImage',imgString);
}

function showImagepvcu(imgRef)
{
	imgString="<img src="+imgRef+" height=\"366\" width=\"267\" />";
	writeMe('mainImage',imgString);
}

function showImagevic(imgRef)
{
	imgString="<img src="+imgRef+" height=\"649\" width=\"485\" />";
	writeMe('mainImage',imgString);
}

function showImagegbl(imgRef)
{
	imgString="<img src="+imgRef+" height=\"531\" width=\"485\" />";
	writeMe('mainImage',imgString);
}

function showImagelnto(imgRef)
{
	imgString="<img src="+imgRef+" height=\"399\" width=\"485\" />";
	writeMe('mainImage',imgString);
}

isMac=(navigator.platform=="MacPPC")? true:false;
isWin=(navigator.appVersion.indexOf("Win")!=-1)? true:false;
isIe=(navigator.appName=="Microsoft Internet Explorer")? true:false;
isIe4=(document.all)? true:false;
isDom=(document.getElementById)? true:false;
if ((parseInt(navigator.appVersion)==4) && (navigator.appName=="Netscape"))
{
	isNs4 = true;
	isImg = true;
}
window.onload=init;



function ValidateForm(){
	var emailID=document.contactform.Email;
	if (document.contactform.surname.value == "")
		{
		alert ("You must enter your surname.")
		document.contactform.surname.focus();
		return false;
		}
	if (document.contactform.address.value == "")
		{
		alert ("You must enter your postal address.")
		document.contactform.address.focus();
		return false;
		}
	if (document.contactform.postcode.value == "")
		{
		alert ("You must enter your postcode.")
		document.contactform.postcode.focus();
		return false;
		}
	if (document.contactform.daytime.value == "")
		{
		alert ("You must enter your daytime phone.")
		document.contactform.daytime.focus();
		return false;
		}
return true
}