			
function setImage(imgElement, newURL)
{
	imgElement.src=newURL;
}

function imgSwap(img, newImg){
	var thisImg = eval("document." + img);
	var thisNewImg = eval("'../images/" + newImg + "'");
	thisImg.src = thisNewImg;
	}
			
function openNewWindow(fileName,windowName,theWidth,theHeight) 
{
	if (windowName == "newWindow") 
	{
		windowName = new String(Math.round(Math.random() * 100000));
	}
	window.open(fileName,windowName,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width="+theWidth+",height="+theHeight)
}

function openScrollWindow(fileName,windowName,theWidth,theHeight) 
{
	if (windowName == "newWindow") 
	{
		windowName = new String(Math.round(Math.random() * 100000));
	}
	window.open(fileName,windowName,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width="+theWidth+",height="+theHeight)
}

function openCodeWindow(fileName,windowName,theWidth,theHeight) 
{
	if (windowName == "newWindow") 
	{
		windowName = new String(Math.round(Math.random() * 100000));
	}
	window.open(fileName,windowName,"toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width="+theWidth+",height="+theHeight)
}

function openStandardWindow(fileName,windowName,theWidth,theHeight) {
	if (windowName == "newWindow") 
	{
		windowName = new String(Math.round(Math.random() * 100000));
	}
	window.open(fileName,windowName,"toolbar=1,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width="+theWidth+",height="+theHeight)
}

function selectDiv(divName) 
	{
	var thisbrowser = navigator.appName;
	if (thisbrowser == "Netscape" && document.getElementById){
		var thisDiv = eval("document.getElementById('" + divName + "')");
		document.getElementById('divHelper').style.display='none';
		document.getElementById('divPCA').style.display='none';
		document.getElementById('divDevelopers').style.display='none';
		document.getElementById('divPartners').style.display='none';
		document.getElementById('divCustomer').style.display='none';
		document.getElementById('divContact').style.display='none';
		thisDiv.style.display='block';
		}
	else if (document.all){
		var thisDiv = eval("document.all." + divName);
		document.all.divHelper.style.display='none';
		document.all.divPCA.style.display='none';
		document.all.divDevelopers.style.display='none';
		document.all.divPartners.style.display='none';
		document.all.divCustomer.style.display='none';
		document.all.divContact.style.display='none';
		thisDiv.style.display='block';
		}
	else return false;
	}
	
function lookup() 
{
	if (document.wizard.postcode.value=='')
		{
			window.alert('Please enter a postcode first');
		}
	else
		{
			window.open("../library/popup.asp?postcode=" + escape(document.wizard.postcode.value),"lookup","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=500,height=300");
		}
}

function openHelp() 
{
	window.open("../home/help.asp","help","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=500,height=300");
}

function openCustomerHelp() 
{
	window.open("../home/custhelp.asp","custhelp","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=500,height=300");
}

function openMap() 
{
	window.open("../about/map.asp","map","toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=0,width=750,height=550");
}

function openPrivacy() 
{
	window.open("../home/privacy.asp","privacy","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=500,height=300");
}

function openTAC() 
{
	window.open("../home/tac.asp","tac","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=500,height=300");
}

function showFAQ(id) 
{
	window.open("faq.asp?id=" + id,"faq","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=400,height=300");
}

function showAddress(id) 
{
	window.open("address.asp?id=" + id,"address","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=300,height=310");
}

function doStandard(reportNumber) 
{
	windowName = new String(Math.round(Math.random() * 100000));
	window.open("report.asp?custom=1&id=" + reportNumber,windowName,"toolbar=1,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width=614,height=400")
}

function doCustom() 
{
	windowName = new String(Math.round(Math.random() * 100000));
	
	if (customreport.type[0].checked) {type=1};
	if (customreport.type[1].checked) {type=2};
	
	window.open("report.asp?custom=0&start=" + escape(customreport.report_start.value) + "&end=" + escape(customreport.report_end.value) + "&type=" + escape(type) + "&license=" + escape(customreport.license.value),windowName,"toolbar=1,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width=614,height=400")
}

function openInvoice(id) 
{
	windowName = new String(Math.round(Math.random() * 100000));
		
	window.open("invoice.asp?format=html&id=" + id,windowName,"toolbar=1,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width=614,height=500")
}

