// (c) 2006 Advantage Services (Europe) Limited

/***********************************************
* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

function bookmarksite(title, url){
  url=location.href;
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

function writePopUpLink(theUrl, label)
{
	document.write("<a href=\"javascript:openPopUp('" + theUrl + "')\" class=\"body\">");
	document.write(label);
	document.write("</a> (opens a pop-up window)");
}

function openPopUp(theUrl)
{
	window.open(theUrl,"","width=800,height=600,scrollbars,resizable")
}

function price(priceId, selIndex, priceType, software, softwareSupport, support)
{
	this.priceId = priceId;
	this.selIndex = selIndex;
	this.priceType = priceType;
	this.software = software;
	this.softwareSupport = softwareSupport;
	this.support = support;
}

function changePrices(priceId, companies)
{
	for (i = 1; i < prices.length; i++)
	{
		if (prices[i].priceId == priceId && prices[i].selIndex == companies.selectedIndex)
		{
			if ((prices[i].priceType & 4) > 0)
			{
				document.getElementById('software' + priceId).innerHTML = "&pound;" + prices[i].software;
			}
			if ((prices[i].priceType & 2) > 0)
			{
				document.getElementById('softwareSupport' + priceId).innerHTML = "&pound;" + prices[i].softwareSupport;
			}
			if ((prices[i].priceType & 1) > 0)
			{
				document.getElementById('support' + priceId).innerHTML = "&pound;" + prices[i].support;
			}
			continue;
		}
	}
}

function setQty(varname)
{
	eval("document.forms[0]." + varname + ".value = 1");
}
