			var data = location.search; //Gets the query string.			var pattern1 = /^\?peak/i;   //Sets pattern to test for "?peak", case insensitive, at start of query string.			var pattern2 = /undefined/i;   //Sets pattern to test for "undefined", case insensitive, in string.			var ref = new Array();			//document.write("Test Values:<br><br>");			//document.write("search = ",data,"<br><br>");			//document.write("<br>");						var data2 = document.referrer;	//Gets the referring url.			if (document.referrer) data2 = document.referrer.toString();			//document.write("referrer = ",data2);			//document.write("<br>");			//if(data2)document.write("exists");else document.write("does not exist");			//document.write("<br>");						ref = data2.split(/\/\/|\/|\?/g,4);			//document.write("0: ",ref[0],"<br>");	//Should be "http:"			//document.write("1: ",ref[1],"<br>");	//Should be, e.g., "www.something.com"			//document.write("2: ",ref[2],"<br>");	//Any subdirectories or specific filename here and below.			//document.write("3: ",ref[3],"<br>");			//document.write("<br>");						//document.write(pattern2.test(ref[1]),"<br>");						var now = new Date();			var thirtydays = new Date(now.valueOf()+1000*60*60*24*30);			var fiveyears = new Date(now.valueOf()+1000*60*60*24*365*5);						if(pattern1.test(data) && !pattern2.test(ref[1])) {document.cookie="source=" + ref[1] + "; expires=" + thirtydays.toGMTString();document.cookie="prefdist=" + ref[1] + "; expires=" + fiveyears.toGMTString();}				//i.e., if the query string starts with "?peak" and there is a domain name in the referring url, write a 30-day cookie identifying the referring domaine as the source.			//var allcookies = document.cookie;			//document.write(allcookies);			//document.write("<br><br>");						var data3="";			if (pattern2.test(ref[1])) {} else {data3="?refurl="+ref[1];}						document.write('<iframe SRC="cgi-bin/performance.cgi',data3,'" name="prog" width="100" height="0" scrolling="no" frameborder="0" border="0"></iframe>');				//What this does is runs the performance.cgi script within an iframe so that the document.location is not changed.