function showDIV(nameDIV) {
document.getElementById(nameDIV).style.visibility = "visible";
}

function hideDIV(nameDIV) {
document.getElementById(nameDIV).style.visibility = "hidden";
}

function sliderNav(FlashVars) {
var strString = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="250" height="50" align="middle"><param name="FlashVars" value="' + FlashVars + '" /><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="images/slider.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="images/slider.swf" quality="high" FlashVars="' + FlashVars + '" bgcolor="#ffffff" width="250" height="50" name="slider" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
document.write (strString);
}

function doSuperCatColours(superCatNo,display) {
	if (display == "active") {
		document.getElementById(superCatNo + 'Text').style.color = "#ffffff";
		document.getElementById(superCatNo + 'Bg').style.backgroundColor = "#405d8d";
	} else {
		document.getElementById(superCatNo + 'Text').style.color = "#405d8d";
		document.getElementById(superCatNo + 'Bg').style.backgroundColor = "#d2d2d2";
	}
}

function doPostBack(id,val)
{
	var commsfra;
	commsfra = parent.document.getElementById('commsframe');
	commsfra.src = 'QTree.asp?view=getquiz&id=DD' + id + '&AnsID=' + val + '&rnd=' + Math.random();
	var prdFra;
	prdFra = parent.document.getElementById('fraproducts');
	prdFra.src = 'QTree.asp?view=listProducts&AnsID=' + val + '&rnd=' + Math.random();
}

function addCommas(nStr)
{
	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ',' + '$2');
	}
	return x1 + x2;
}


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_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

var timerID = "global";
function hidemenus() { MM_showHideLayers('Layer1','','hide') }
function startTimer() { stopTimer(); timerID = setTimeout("hidemenus()", 2000); }
function startTimer2() { stopTimer(); timerID = setTimeout("hidemenus()", 1); }
function stopTimer() { clearTimeout(timerID); }

function MM_callJS(jsStr) { return eval(jsStr) }
