var charTime = 60;
var waitTime = 4000;
var art = new Number(0);
var enumr = 0;
var theNews = new Array();
theNews[0]="17 April 2008 : Greenspot announce forthcoming overhaul to Detecion Master.";
theNews[1]="MD Paul Pritchett says version 4.0 will properly bring Detection Master into the forensic market.";
theNews[2]="Improved exif digital photo recovery in version 3.1.";
theNews[3]="Use the Free Trial for up to 21 days.";


function startNews()
{
	actionTicker();
}


function actionTicker()
{
	//Check validity of article
	if (art>theNews.length-1)
	{
		art=0;
	}
	var it;
	if (document.getElementById)
	{
		it=document.getElementById("hotNews");
	}
	else
	{
		it = document.all("hotNews");
	}
	it.innerHTML=theNews[art].substring(0,enumr);
	//Have we come to end of news article
	enumr++;
	if(enumr==theNews[art].length+1)
	{
		enumr=1;
		art++;
		setTimeout('actionTicker()', waitTime);
	}
	else
	{
		setTimeout('actionTicker()', charTime);
	}
}
function isEU(id)
{
	if (id=="AT" || id=="BE" || id=="DK" || id=="FI" || id=="FR" || id=="DE" || id=="GR" || id=="IE" || id=="IT" || id=="LU" || id=="NL" || id=="PT" || id=="ES" || id=="SE" || id=="CY" || id=="CZ" || id=="EE" || id=="HU" || id=="LV" || id=="LT" || id=="MT" || id=="PL" || id=="SI" || id=="SK"){
		return true;
	}
	else{
		return false;
	}
}
function isUK(id)
{
	if(id=="GB"){
		return true;
	}
	else{
		return false;
	}
}
function retPrice(fVer, fEU, fUK, fBus, currencyID, xRate)
{
	var addVAT;
	var retValue;
	var inPrice;
	var outPrice;
	addVAT=false;
	if (fUK==true || (fEU==true && fBus==false)){
		addVAT=true;
	}
	switch (fVer)
	{
	case 1:
		if (addVAT==true){
			inPrice=2115;
		}
		else{
			inPrice=1800;
		}
		break;
	case 2:
		if (addVAT==true){
			inPrice=3407;
		}
		else{
			inPrice=2900;
		}
		break;
	case 3:
		if (addVAT==true){
			inPrice=3995;
		}
		else{
			inPrice=3400;
		}
		break;
	default:
		if (addVAT==true){
			inPrice=3995;
		}
		else{
			inPrice=3400;
		}
		break;
	}
	outPrice=inPrice*xRate;
	outPrice=Math.round(outPrice);
	outPrice=outPrice/100;
	switch (currencyID)
	{
	case 1:
		retValue= "Euro " + formatPrice(outPrice);
		break;
	case 2:
		retValue= "£" + formatPrice(outPrice);
		break;
	case 3:
		retValue= "$" + formatPrice(outPrice);
		break;
	default:
		retValue="error";
		break;
	}
	return retValue;
}
function formatPrice(price)
{
	var tmp;
	var idx;
	var lng;
	var retValue;
	if (price.toFixed){
		retValue=price.toFixed(2);
	}
	else{
		tmp=price.toString();
		idx=tmp.indexOf(".");
		lng=tmp.length;
		if (idx>=0){
			if (lng<idx+3){
				retValue=tmp + "0";
			}
			else{
				retValue=price;
			}
		}
		else{
			retValue=tmp + ".00";
		}
	}
	return retValue;
}
