showanalysis=false;
docnumber=0;


function analysis () {
	stoptime();
	trying='analysis.asp?sortby='+defaultsort+analysis_string;
	top10(7);
}

analysis_string='';
defaultsort='speed1';

function benchmark(val) {

	pnghelp=true;

//	checkextras();
//	showdocs=false;
//if (val!=1) {showhelp=true;}
//else
//{showhelp=false;}
//trying='analysis.asp?sortby=';


	maintext='<table id="benchmark" cellpadding=0 cellspacing=0 height='+(available_height-(2*blockhgt))+' width='+(available_width-(1.5*blockwid))+' border=0><tr><td bgcolor=#F2E561 valign=top><img src='+image5.src+'></td><td bgcolor=#F2E561 valign=top align=right><img src='+image6.src+'></td></tr><tr><td '+(pngtrans&&!document.all?'background='+screen5.src:'bgcolor=#F2E561')+' colspan=2 valign=top><blockquote>'+fontvalue+'<font color=black><b>Benchmark Tests.<ul><br>';

if (val==1) {
showanalysis=true;
analysisLyr.visibility='hidden';
analysis_string='';
bench_selection='';
defaultsort='speed1';
resultsLyr.left=10;
maintext=maintext+'This page allows you to view the <a href=# onclick="textloader(6);return false;"><font color=red>benchmark test</font></a><br>results for the entire sonik-systems.com domain.<br><br>Please select from the following:<ul><br><a href=# onclick="benchmark(2);return false;"><font color=red>Select all results?</font></a> <font class=lesser>nb this will flow off the page.</font></ul><br>Or refine your search:<ul><br><a href=# onclick="benchmark(3);return false;"><font color=red>Select results by platform?</font></a><br><a href=# onclick="benchmark(4);return false;"><font color=red>Select results by operating system?</font></a><br><a href=# onclick="benchmark(5);return false;"><font color=red>Select results by browser?</font></a><br><a href=# onclick="benchmark(6);return false;"><font color=red>Select results by benchmark speed?</font></a><br><a href=# onclick="benchmark(25);return false;"><font color=red>Select only the "perfect" browsers?</font></a><font class=lesser> - browsers in which all sites work.</font><br>';}

if (val==2) {analysis_string='&osver=all';bench_selection='All';}

if (val==3) {maintext=maintext+'The sonik-systems domain has been tested on three separate platforms:<ul><br><a href=# onclick="benchmark(10);return false;"><font color=red>Select results for Windows?</font></a><br><a href=# onclick="benchmark(11);return false;"><font color=red>Select results for Linux?</font></a><br><a href=# onclick="benchmark(12);return false;"><font color=red>Select results for Macintosh?</font></a></ul><br>';} 

if (val==4) {maintext=maintext+'The sonik-systems domain has been tested on five major operating systems:<ul><br><a href=# onclick="benchmark(13);return false;"><font color=red>Select results for Windows 98?</font></a><br><a href=# onclick="benchmark(14);return false;"><font color=red>Select results for Windows ME?</font></a><br><a href=# onclick="benchmark(15);return false;"><font color=red>Select results for Windows XP?</font></a><br><a href=# onclick="benchmark(11);return false;"><font color=red>Select results for Slackware?</font></a><br><a href=# onclick="benchmark(12);return false;"><font color=red>Select results for OS9?</font></a></ul><br>';}

if (val==5) {maintext=maintext+'The sonik-systems domain has been tested on the following browsers:<ul><br><a href=# onclick="benchmark(16);return false;"><font color=red>Select results for Micosoft Internet Explorer?</font></a><br><a href=# onclick="benchmark(17);return false;"><font color=red>Select results for Netscape?</font></a><br><a href=# onclick="benchmark(18);return false;"><font color=red>Select results for Firefox?</font></a><br><a href=# onclick="benchmark(19);return false;"><font color=red>Select results for Mozilla?</font></a><br><a href=# onclick="benchmark(20);return false;"><font color=red>Select results for Opera?</font></a><br><a href=# onclick="benchmark(21);return false;"><font color=red>Select results for K-Meleon?</font></a><br><a href=# onclick="benchmark(22);return false;"><font color=red>Select results for Ace Explorer?</font></a><br><a href=# onclick="benchmark(23);return false;"><font color=red>Select results for Konqueror?</font></a><br>';}

if (val==6) {bench_selection='Speed Selection:';
		maintext=maintext+'There are three ranges of response times:<ul><br><a href=# onclick="benchmark(27);return false;"><font color=red>Select the fastest (0-60 secs)?</font></a><br><a href=# onclick="benchmark(28);return false;"><font color=red>Select the "also-rans" (60-120 secs)?</font></a><br><a href=# onclick="benchmark(29);return false;"><font color=red>Select the slowest (120+ secs)?</font></a></ul><br>';}

if (val==7) {defaultsort='osver';}
if (val==8) {defaultsort='browver';}
if (val==9) {defaultsort='speed1';}

if (val==10) {analysis_string='&osver=windows';bench_selection='Windows';}
if (val==11) {analysis_string='&osver=slackware';bench_selection='Linux - slackware';}
if (val==12) {analysis_string='&osver=OS9';bench_selection='Mac - OS9';}
if (val==25) {analysis_string='&osver=perfect';bench_selection='Perfect Browsers';}

if (val==13) {analysis_string='&osver=98';bench_selection='Windows 98';}
if (val==14) {analysis_string='&osver=ME';bench_selection='Windows ME';}
if (val==15) {analysis_string='&osver=XP';bench_selection='Windows XP';}

if (val==16) {analysis_string='&browver=MSIE';bench_selection='MSIE';}
if (val==17) {analysis_string='&browver=ns';bench_selection='Netscape';}
if (val==18) {analysis_string='&browver=ff';bench_selection='Firefox';}
if (val==19) {analysis_string='&browver=moz';bench_selection='Mozilla';}
if (val==20) {analysis_string='&browver=op';bench_selection='Opera';}
if (val==21) {analysis_string='&browver=km';bench_selection='K-Meleon';}
if (val==22) {analysis_string='&browver=AE';bench_selection='Ace Explorer';}
if (val==23) {analysis_string='&browver=kd';bench_selection='Konqueror';}

if (val==27) {analysis_string='&osver=fast';bench_selection='Quick browsers';}
if (val==28) {analysis_string='&osver=medium';bench_selection='Medium-paced browsers';}
if (val==29) {analysis_string='&osver=slow';bench_selection='Slow browsers';}

if (val==2||val>6) {maintext=maintext+'Your selection: <font color=blue>'+bench_selection+'.</font><ul><br>The sort is by <font color=blue>';
	if (defaultsort=='osver') {maintext=maintext+'operating system';}
	if (defaultsort=='browver') {maintext=maintext+'browser';}
	if (defaultsort=='speed1') {maintext=maintext+'speed';}
maintext=maintext+'.</font><br><br><a href=# onclick="benchmark(7);return false;"><font color=red>Sort by operating system?</font></a><br><a href=# onclick="benchmark(8);return false;"><font color=red>Sort by browser?</font></a><br><a href=# onclick="benchmark(9);return false;"><font color=red>Sort by speed?</font></a></ul><br><font class=lesser>Click on the individual browsers\' names<br>within the table for in-depth analysis.</font><br>';

//maintext=maintext+'<br><a href=# onclick="analysis();return false;"><font color=red>Click here to send request?</font></a>';
}

if (val!=1) {maintext=maintext+'<br><a href=# onclick="benchmark(1);return false;"><font color=red>Click here to start again?</font></a>';}


maintext=maintext+'</font></font></b>';
	show_results();
if (val==2||val>6) {testtimer = setTimeout("analysis()",20);}
//if (val==2||val>6) {analysis();}
}


function help(val) {

	checkextras();
	pnghelp=true;
	showdocs=false;
if (val!=1) {showhelp=true;}
else
{showhelp=false;}

	maintext='<table id="help" cellpadding=0 cellspacing=0 height='+(available_height-(2*blockhgt))+' width='+(available_width-(1.5*blockwid))+' border=0><tr><td bgcolor=#F2E561 valign=top><img src='+image5.src+'></td><td bgcolor=#F2E561 valign=top align=right><img src='+image6.src+'></td></tr><tr><td '+(pngtrans&&!document.all?'background='+screen5.src:'bgcolor=#F2E561')+' colspan=2 valign=top><blockquote>'+fontvalue+'<font color=black><b>';

if (val==1) {maintext=maintext+'Documentation:</b><ul>1.  <a href=# onclick="textloader(1);return false;"><font color=red>Overview and Instructions.</font></a><br>2.  <a href=# onclick="textloader(2);return false;"><font color=red>Testing Environment.</font></a><br>3.  <a href=# onclick="textloader(3);return false;"><font color=red>Error Messages.</font></a><br>4.  <a href=# onclick="textloader(4);return false;"><font color=red>Browser Issues.</font></a><br>5.  <a href=# onclick="textloader(5);return false;"><font color=red>Browser Management.</font></a><br>6.  <a href=# onclick="textloader(6);return false;"><font color=red>A Brief Note Regarding the Benchmark Tests.</font></a><br>7.  <a href=# onclick="textloader(7);return false;"><font color=red>The Future.</font></a><br>8.  <a href=# onclick="textloader(8);return false;"><font color=red>Contact Details and Contributions.</font></a></ul><br><a href=# onclick="textloader(9);return false;"><font color=red>I am sorry, but is there any significance to all of this?</font></a><br><br><br><b>Help is available for the following:</b><ul><b>Settings:</b><ul><br>1.  <a href=# onclick="help(2);return false;"><font color=red>The site appears to be running very slowly - are there any ways of speeding it up?</font></a><br>2.  <a href=# onclick="help(3);return false;"><font color=red>I am experiencing difficulties using the front-end - are there any alternatives?</font></a></ul></ul><br><a href=# onclick="benchmark(1);return false;"><font color=black><b>Click <font color=red>here</font> for the Benchmark Tests.</b></font></a>';}


if (val==2) {maintext=maintext+'Speeding up the site:</b><ul>This site employs some semi-transparent png images. At present the work-around to process these images correctly within Microsoft\'s Internet Explorer (and clones such as Ace Explorer) can be quite a time consuming process.<br><br>As a consequence, to improve response speeds for these browsers, you can <a href=# onclick="transparens();help(2);return false;"><font color=red>control the png transparency feature by clicking <u>here</u> </font></a>: (png transparency is <font color=red>'+(pngtrans?'now on':'currently off')+').</font><br><br>Alpha transparency is by default switched "on" for the majority of modern browsers viewing this site, bar certain early versions of Netscape which predate the development of the portable network graphic standard (.png) and hence do not support these types of images. If you are using an old browser of almost any description, then turning "on" alpha transparency make well make the Performance Assessment site difficult to read.<br><br>If you find that the site still continues to be slow or unresponsive after you have made this adjustment, then please read the section on <a href=# onclick="textloader(4);return false;"><font color=red>Browser Issues.</font></ul>';}

if (val==3) {
maintext=maintext+'Front-end versions:</b><ul>There are two front-ends available for this site - a text-based version, and a graphic user interface (or GUI for short).<br><ul>You are currently using the '+(textversion?'text-based':'GUI-based')+' interface.<br><ul>If you wish to switch to using the alternative interface, then please <a href=# onclick="'+(textversion&&!document.layers?'reset_page();':'textversion=true;txtversion(1);')+'return false;"><font color=red>click <u>here</u></font></a>.<br><br>The text-based version, despite not being nearly as nice to look at, has a small advantage over the GUI-based version in most browsers which experience difficulties managing large numbers of layers. This is only really of significance if you are running a version or clone of Microsoft\'s Internet Explorer.'+(document.layers?'<br><br>Please note that for users of Netscape versions 4.x, you are always defaulted to the text-based version, as the GUI-version is not compatible with your browser.':'')+'</font></ul>';}

maintext=maintext+'</font></font></b>';
	show_results();
}


function textloader(doval) {       // copys prexisting divs or external html, reformat and rewrite to screen 

	checkextras();
	showdocs=true;
	docnumber=doval;
	if (!document.layers) {
		maintext=eval('outputHTML['+doval+'].innerHTML');
		if (doval==5) {
			var re = /quicktag/gi;
			maintext=maintext.replace(re, fontvalue+"<font class=lesser>");
		}
		maintext='<table '+domcheck+'="documents" cellpadding=0 cellspacing=0 height='+(available_height-(2*blockhgt))+' width='+(available_width-(1.5*blockwid))+' border=0><tr><td bgcolor=#F2E561 valign=top><img src='+image5.src+'></td><td bgcolor=#F2E561 valign=top align=right><img src='+image6.src+'></td></tr><tr><td '+(pngtrans&&!document.all?'background='+screen5.src:'bgcolor=#F2E561')+' colspan=2 valign=top><blockquote>'+fontvalue+'<font color=black>' +maintext;
		show_results();
		}
	else {resultsLyr.load('documents'+doval+'.html', available_width);}
	if (doval==8&&!document.layers) {send_mail();}
}


function transparens() {
	if (pngtrans) {pngtrans=false;}
	else {pngtrans=true;}
}


function show_results() {

	if (showdocs||showhelp) {
		var arrowstring='&nbsp;<a href=# onmouseover="window.status=\'back to the main help menu\';return true;" onmouseout="window.status=\'\';return true;" onclick="help(1);return false;"><img src='+arrow_u.src+' border=0 alt="back to the main help screen" align=top></a>&nbsp;';}
	else {
		var arrowstring='';}

	if (showdocs) {
		if (docnumber>1) {
			arrowstring=arrowstring+'<a href=# onmouseover="window.status=\'back one page\';return true;" onmouseout="window.status=\'\';return true;" onclick="textloader('+(docnumber-1)+');return false;"><img src='+arrow_l.src+' border=0 align=top alt="back one page"></a>&nbsp;';}
		else {
			arrowstring=arrowstring+'<img src='+arrow_lg.src+' border=0 align=top alt="dead link">&nbsp;';}

		if (docnumber<(no_pages-1)) {
			arrowstring=arrowstring+'<a href=# onmouseover="window.status=\'forward one page\';return true;" onmouseout="window.status=\'\';return true;" onclick="textloader('+(docnumber+1)+');return false;"><img src='+arrow_r.src+' border=0 align=top alt="forward one page"></a>&nbsp;';}
		else{
			arrowstring=arrowstring+'<img src='+arrow_rg.src+' border=0 align=top alt="no more pages">&nbsp;';}
	}

	maintext=maintext+'</td></tr><tr><td colspan=2><img src='+strip.src+' width='+(available_width-(blockwid)-40)+' height=3 align=top></td></tr><tr>';

	if (direction=='left'&&!textversion&&!showanalysis) {
		maintext=maintext+'<td valign=top align=right colspan=2>'+(showdocs||showhelp?arrowstring:'')+closestring;}
	else{
		maintext=maintext+'<td valign=top align=left>'+closestring+(showhelp||showdocs?arrowstring:'');}
	
	maintext=maintext+'</td></tr></table>';
	destination=resultsHTML;
	magiccontents();
	resultsLyr.visibility='visible';
	if (!pnghelp&&!showdocs&&pngtrans&&navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer") {alphaBackgrounds();}

//if (textversion) {txtversion(1);}
}

function closedown() {
	showdocs=false;
	showhelp=false;
	showanalysis=false;
	pnghelp=false;
	resultsLyr.visibility='hidden';
	keyLyr.visibility='hidden';
	checkextras();
}

function checkextras() {
	analysisLyr.visibility="hidden";
	theformLyr.visibility="hidden";
}

