
	function ShowLayer(id, action){
		if (type=="IE") eval("document.all." + id + ".style.visibility='" + action + "'");
		if (type=="NN") eval("document." + id + ".visibility='" + action + "'");
		if (type=="MO" || type=="OP") eval("document.getElementById('" + id + "').style.visibility='" + action + "'");
	}
	function ShowRow(id, action){
		if (type=="IE") eval("document.all." + id + ".style.display='block'");
		if (type=="NN") eval("document." + id + ".visibility='table-row'");
		//if (type=="MO" || type=="OP") eval("document.getElementById('" + id + "').style.visibility='visible'");
		if (type=="MO" || type=="OP") eval("document.getElementById('" + id + "').style.display='table-row'");
	}
	function HideRow(id, action){
		if (type=="IE") eval("document.all." + id + ".style.display='none'");
		if (type=="NN") eval("document." + id + ".visibility=''");
		if (type=="MO" || type=="OP") eval("document.getElementById('" + id + "').style.display=''");
	}
	function show(obj) {
		ShowRow(obj,'block');
		//eval("document.all." + obj + ".style.display='" + canSee + "'");
	}
	function unshow(obj) {
		HideRow(obj,'none');
	//	  eval("document.all." + obj + ".style.display='" + canSee + "'");
	}
	function showprevioussearches()
	{
		show('previoussearches');
		document.getElementById('savedsearches').innerHTML="<a href='javascript:hideprevioussearches();'>hide previous searches</a>";			
	}

	function hideprevioussearches()
	{
		unshow('previoussearches');
		document.getElementById('savedsearches').innerHTML="<a href='javascript:showprevioussearches();'>show previous searches</a>";			
	}

	function showadv()
	{
		show('advancedoptions');
		document.getElementById('searchtype').innerHTML="<a href='javascript:showsimple();'>less options</a>";			
	}
	function showsimple()
	{
		unshow('advancedoptions');
		document.getElementById('searchtype').innerHTML="<a href='javascript:showadv();'>more options</a>";			
	}
	function appenddiv(div,text)
	{
		document.getElementById(div).innerHTML=document.getElementById(div).innerHTML+text;			
	}
	function writediv(div,text)
	{
		document.getElementById(div).innerHTML=text;			
	}	
	function deepmatch(id,p,t)
	{
		identity=document.getElementById('result'+id);
		identity.className='deephit';
		show('result'+id);
		eval('totalp'+t+'=totalp'+t+'+'+p+';');
		//alert(eval('totalp'+t));
		document.getElementById('total'+t).innerHTML=text = eval('totalp'+t);			
		document.getElementById('total2'+t).innerHTML=text = eval('totalp'+t);			
		document.getElementById('gu'+id).innerHTML="&nbsp;probable match (<a href='faq.php#deepsearch'>deep search</a>) gets you <a href='faq.php#egopoints'>" + p + " egopoints</a>";			

	}
	function updatepb()
	{
		// calc progress bar
		currentsr++;
		progress = (currentsr / totalsr) * 100;
		//alert('cur:'+currentsr+' tot:'+totalsr);
		document.getElementById('progressbar').innerHTML='<table class=\'progressbar\' cellpadding=0><tr><td><img src="images/fill.gif" width="' + progress + '%"  height="10"/></td></tr></table>';
		//document.getElementById('progress').innerHTML=progress + ' %';
		
	}
	function writegauge(points,engine)
	{
		var d = new Date();
		var url = escape('?points=' + points + '&engine=' + engine + '&t=' + d.getTime());
		var op = "";
		op = op + '<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ';
		op = op + 'codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" ';
		op = op + 'WIDTH=\"270\" HEIGHT=\"260\" id=\"gauge\"> <PARAM NAME=movie ';
		op = op + 'VALUE=\"gauge.swf?license=GMKRZ5JF5DPNO43YL.09QPV2QH0DLK&xml_source=gauge.php' + url+ '\"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#ffffff> ';
		op = op + '<EMBED src=\"gauge.swf?license=GMKRZ5JF5DPNO43YL.09QPV2QH0DLK&xml_source=gauge.php' + url + '\" quality=high bgcolor=#ffffff WIDTH=\"270\" 	HEIGHT=\"260\" 	NAME=\"gauge\" ';
		op = op + 'ALIGN=\"\" 	TYPE=\"application/x-shockwave-flash\" 	PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"> </EMBED></OBJECT>';
		return op;
		
	}