// The arrays where we will be keeping our database data:
// Reason for placing the arrays here (in the same file;
// as the functions and others is that it is the only;
// way to make the pages with frames (eg Kingston;
// Memory Configuration) will extract the arrays with;
// the ITL Tags properly expanded;

/* To continue work

function setLinkCat(cat) {
  var theurl = "http://future.pr-sol.com/cgi-bin/future/cats.html?";
  var catAddr = theurl + cat;
  alert(catAddr);
  return catAddr;
}

var ar = new Array();
var linc = new Array();
var titl = new Array();	
		
ar[1] = 1;	linc[1] = "setLinkCat(A)";	titl[1] = "Desktops";
ar[2] = 1;	linc[2] = "[area cats B]";	titl[2] = "Notebooks";
ar[3] = 1;	linc[3] = "[area cats C]";	titl[3] = "Servers";
ar[4] = 1;	linc[4] = "[area cats L]";	titl[4] = "PDA's";
ar[5] = 1;	linc[5] = "[area cats J]";	titl[5] = "Wireless";
ar[6] = 1;	linc[6] = "[area cats SA]";	titl[6] = "Office Machines";
ar[7] = 1;	linc[7] = "[area cats SB]";	titl[7] = "Office Security";
ar[8] = 1;	linc[8] = "[area cats R]";	titl[8] = "Home Electronics";
ar[9] = 1;	linc[9] = "[area cats F]";	titl[9] = "Memory";
ar[10] = 1;	linc[10] = "[area cats CO]";	titl[10] = "Processor & Accessories";
ar[11] = 1;	linc[11] = "[area cats AS]";	titl[11] = "Desktop Components";
ar[12] = 1;	linc[12] = "[area cats AJ]";	titl[12] = "Motherboards";
ar[13] = 1;	linc[13] = "[area cats CP]";	titl[13] = "UPS Systems";
ar[14] = 1;	linc[14] = "[area cats PR]";	titl[14] = "Power Protection";
ar[15] = 1;	linc[15] = "[area cats BN]";	titl[15] = "Docking Stations/Port Replicators";
ar[16] = 1;	linc[16] = "[area cats CS]";	titl[16] = "Accessories";
ar[17] = 1;	linc[17] = "[area cats AR]";	titl[17] = "Extended Warranties";
  
ar[18] = 2;	linc[18] = "[area cats GA]";	titl[18] = "Internal Hard Drives";
ar[19] = 2;	linc[19] = "[area cats GB]";	titl[19] = "External Hard Drives";
ar[20] = 2;	linc[20] = "[area cats GC]";	titl[20] = "CDR/CDRW Drives";
ar[21] = 2;	linc[21] = "[area cats GD]";	titl[21] = "Portable/Removable Drives";
ar[22] = 2;	linc[22] = "[area cats GE]";	titl[22] = "Smartcard/Flashcard Readers";
ar[23] = 2;	linc[23] = "[area cats GF]";	titl[23] = "DVD Drives";
ar[24] = 2;	linc[24] = "[area cats GG]";	titl[24] = "Server Hard Drives";
ar[25] = 2;	linc[25] = "[area cats GH]";	titl[25] = "CD-ROM/Optical Drives";
ar[26] = 2;	linc[26] = "[area cats GI]";	titl[26] = "Network Attached Storage (NAS)";
ar[27] = 2;	linc[27] = "[area cats GJ]";	titl[27] = "Storage Area Networks (SAN)";
ar[28] = 2;	linc[28] = "[area cats GK]";	titl[28] = "Control Interfaces";
ar[29] = 2;	linc[29] = "[area cats GL]";	titl[29] = "USB/Firewire/Other I/O Adapters";
ar[30] = 2;	linc[30] = "[area cats GM]";	titl[30] = "Tape Drives";
ar[31] = 2;	linc[31] = "[area cats GS]";	titl[31] = "Floppy Drives";
ar[32] = 2;	linc[32] = "[area cats GO]";	titl[32] = "CD-ROM Server";
ar[33] = 2;	linc[33] = "[area cats GU]";	titl[33] = "Duplicators";
ar[34] = 2;	linc[34] = "[area cats GR]";	titl[34] = "Recording/Authoring Software";
  
ar[35] = 3;	linc[35] = "[area cats HA]";	titl[35] = "CD/DVD Blank Media";
ar[36] = 3;	linc[36] = "[area cats HB]";	titl[36] = "ZIP/JAZ Media";
ar[37] = 3;	linc[37] = "[area cats HC]";	titl[37] = "Diskettes";
ar[38] = 3;	linc[38] = "[area cats HD]";	titl[38] = "Tape Media";
ar[39] = 3;	linc[39] = "[area cats HE]";	titl[39] = "Hard Drive Removable Media";
ar[40] = 3;	linc[40] = "[area cats HF]";	titl[40] = "Other Media";
ar[41] = 3;	linc[41] = "[area cats PD]";	titl[41] = "Mice, Trackballs & Pointing Devices";
ar[42] = 3;	linc[42] = "[area cats PE]";	titl[42] = "Keyboards";
ar[43] = 3;	linc[43] = "[area cats PA]";	titl[43] = "PDA/Handheld Accessories";
ar[44] = 3;	linc[44] = "[area cats PB]";	titl[44] = "Digital Camera Accessories";
ar[45] = 3;	linc[45] = "[area cats PC]";	titl[45] = "Wireless Accessories";
ar[46] = 3;	linc[46] = "[area cats PG]";	titl[46] = "Portable Computer Accessories";
ar[47] = 3;	linc[47] = "[area cats PH]";	titl[47] = "Tablet PC Accessories";
ar[48] = 3;	linc[48] = "[area cats PU]";	titl[48] = "Phones/Mobile Accessories";
ar[49] = 3;	linc[49] = "[area cats PK]";	titl[49] = "Printer Accessories";
ar[50] = 3;	linc[50] = "[area cats PL]";	titl[50] = "Paper, Labels & Transparencies";
ar[51] = 3;	linc[51] = "[area cats PN]";	titl[51] = "Paper Shredder";
ar[52] = 3;	linc[52] = "[area cats PP]";	titl[52] = "Storage / Media";
ar[53] = 3;	linc[53] = "[area cats PI]";	titl[53] = "Carrying Cases";
ar[54] = 3;	linc[54] = "[area cats PJ]";	titl[54] = "Glare Filters & Dust Covers";
ar[55] = 3;	linc[55] = "[area cats PF]";	titl[55] = "Graphics Tablets & Whiteboards";

ar[56] = 4;	linc[56] = "[area cats D]";	titl[56] = "Monitors";
ar[57] = 4;	linc[57] = "[area cats DC]";	titl[57] = "Projectors";
ar[58] = 4;	linc[58] = "[area cats E]";	titl[58] = "Printers";
ar[59] = 4;	linc[59] = "[area cats O]";	titl[59] = "Scanners";
ar[60] = 4;	linc[60] = "[area cats EH]";	titl[60] = "Copiers";
ar[61] = 4;	linc[61] = "[area cats EI]";	titl[61] = "Plotters";
ar[62] = 4;	linc[62] = "[area cats EP]";	titl[62] = "Laminators";
ar[63] = 4;	linc[63] = "[area cats PK]";	titl[63] = "Printer Accessories";

ar[64] = 5;	linc[64] = "[area cats IA]";	titl[64] = "Wireless";
ar[65] = 5;	linc[65] = "[area cats IB]";	titl[65] = "Switches";
ar[66] = 5;	linc[66] = "[area cats IC]";	titl[66] = "Routers/Bridges";
ar[67] = 5;	linc[67] = "[area cats ID]";	titl[67] = "Hubs";
ar[68] = 5;	linc[68] = "[area cats IE]";	titl[68] = "Adapters (NICS)";
ar[69] = 5;	linc[69] = "[area cats IF]";	titl[69] = "Modems & Remote Access";
ar[70] = 5;	linc[70] = "[area cats IG]";	titl[70] = "ATM/Frame Relay/DSL & Other Devices";
ar[71] = 5;	linc[71] = "[area cats IH]";	titl[71] = "Transceivers/Converters";
ar[72] = 5;	linc[72] = "[area cats II]";	titl[72] = "Cables";
ar[73] = 5;	linc[73] = "[area cats IJ]";	titl[73] = "Thin Client/Terminal Devices";
ar[74] = 5;	linc[74] = "[area cats IK]";	titl[74] = "Serial I/O Devices";
ar[75] = 5;	linc[75] = "[area cats IL]";	titl[75] = "Print Servers";
ar[76] = 5;	linc[76] = "[area cats IM]";	titl[76] = "VOIP/Telephony";
ar[77] = 5;	linc[77] = "[area cats IN]";	titl[77] = "Video Conferencing";
ar[78] = 5;	linc[78] = "[area cats IO]";	titl[78] = "Racks & Storage Enclosures";
ar[79] = 5;	linc[79] = "[area cats IP]";	titl[79] = "Power Protection/UPS";
ar[80] = 5;	linc[80] = "[area cats IQ]";	titl[80] = "Network Security";
ar[81] = 5;	linc[81] = "[area cats IS]";	titl[81] = "Network Accessories";
ar[82] = 5;	linc[82] = "[area cats IT]";	titl[82] = "Network Software";
ar[83] = 5;	linc[83] = "[area cats IU]";	titl[83] = "SoHo Networks";

ar[84] = 6;	linc[84] = "[area cats KA]";	titl[84] = "Digital & Video Cameras";
ar[85] = 6;	linc[85] = "[area cats MA]";	titl[85] = "MP3 Players & Accessories";
ar[86] = 6;	linc[86] = "[area cats KB]";	titl[86] = "Digital Camera Accessories";
ar[87] = 6;	linc[87] = "[area cats MC]";	titl[87] = "Speakers & Microphones";
ar[88] = 6;	linc[88] = "[area cats KD]";	titl[88] = "Video Conferencing/Webcams";
ar[89] = 6;	linc[89] = "[area cats KG]";	titl[89] = "Film Cameras";
ar[90] = 6;	linc[90] = "[area cats KF]";	titl[90] = "Photo Editing Software";
ar[91] = 6;	linc[91] = "[area cats RA]";	titl[91] = "Video Games";
ar[92] = 6;	linc[92] = "[area cats RB]";	titl[92] = "Home Entertainment";
ar[93] = 6;	linc[93] = "[area cats KC]";	titl[93] = "Flash Memory";
ar[94] = 6;	linc[94] = "[area cats MB]";	titl[94] = "Sound Cards";
ar[95] = 6;	linc[95] = "[area cats MH]";	titl[95] = "Video Cards";
ar[96] = 6;	linc[96] = "[area cats MD]";	titl[96] = "Video Digitizers";
ar[97] = 6;	linc[97] = "[area cats KE]";	titl[97] = "Camera Carrying Cases";
ar[98] = 6;	linc[98] = "[area cats ML]";	titl[98] = "Photo Editing Software";
ar[99] = 6;	linc[99] = "[area cats MM]";	titl[99] = "Recording/Authoring Software & Utilites";

ar[100] = 7;	linc[100] = "[area cats QA]";	titl[100] = "Anti-Virus";
ar[101] = 7;	linc[101] = "[area cats QB]";	titl[101] = "Backup";
ar[102] = 7;	linc[102] = "[area cats QC]";	titl[102] = "Graphics/Publishing";
ar[103] = 7;	linc[103] = "[area cats QD]";	titl[103] = "CD/DVD Authoring";
ar[104] = 7;	linc[104] = "[area cats QE]";	titl[104] = "Accounting/Finance/Tax";
ar[105] = 7;	linc[105] = "[area cats QF]";	titl[105] = "Entertainment/Games";
ar[106] = 7;	linc[106] = "[area cats QG]";	titl[106] = "Self Training";
ar[107] = 7;	linc[107] = "[area cats QH]";	titl[107] = "Home/Education";
ar[108] = 7;	linc[108] = "[area cats QI]";	titl[108] = "Utilities";
ar[109] = 7;	linc[109] = "[area cats QJ]";	titl[109] = "Voice Recognition";
ar[110] = 7;	linc[110] = "[area cats QK]";	titl[110] = "Desktop/Notebook Operating Systems";
ar[111] = 7;	linc[111] = "[area cats QL]";	titl[111] = "Server Operating Systems";
ar[112] = 7;	linc[112] = "[area cats QM]";	titl[112] = "Other Operating Systems";
ar[113] = 7;	linc[113] = "[area cats QN]";	titl[113] = "Business & Productivity";
ar[114] = 7;	linc[114] = "[area cats QO]";	titl[114] = "CAD/CAM";
ar[115] = 7;	linc[115] = "[area cats QP]";	titl[115] = "Communication";
ar[116] = 7;	linc[116] = "[area cats QQ]";	titl[116] = "Database";
ar[117] = 7;	linc[117] = "[area cats QR]";	titl[117] = "Development Tools";
ar[118] = 7;	linc[118] = "[area cats QT]";	titl[118] = "Internet/Web";
ar[119] = 7;	linc[119] = "[area cats QU]";	titl[119] = "Network Security";
ar[120] = 7;	linc[120] = "[area cats QV]";	titl[120] = "Network Software";
ar[121] = 7;	linc[121] = "[area cats QW]";	titl[121] = "Project Management";
ar[122] = 7;	linc[122] = "[area cats QX]";	titl[122] = "Reference";
ar[123] = 7;	linc[123] = "[area cats QY]";	titl[123] = "Miscellaneous";

ar[124] = 8;	linc[124] = "[area ord/basket]";	titl[124] = "[scratch rcart]";

  */

//The code below does browser detection.
ua=navigator.userAgent;
agt=navigator.userAgent.toLowerCase(); 
HM_DOM = (document.getElementById) ? true : false;
HM_NS4 = (document.layers) ? true : false;
HM_IE = (document.all) ? true : false;
HM_IE4 = HM_IE && !HM_DOM;
HM_Mac = (navigator.appVersion.indexOf("Mac") != -1);
HM_IE4M = HM_IE4 && HM_Mac;
HM_opera = (agt.indexOf("opera") != -1); 
HM_gecko = (agt.match("gecko")) ? true : false;

//GLOBAL MENU VARIABLES:
var yesoff;
var nav=(document.layers);
var activeVisi = "visiCart"; //default active visi layer

// @var timedHide int Netscape solution of lack of onMouseOut- timed disappearance *}
var timedHide;

var hideTimeout;
var layer2Hide;


var alreadySubmitted = false;
function submitForm(form) {             	
	if (!alreadySubmitted) {        
		alreadySubmitted=true;  
		return true;            
	} else {
		return false;
	}
}

function showSelect()
{
	if(HM_IE || HM_IE4) {
		var obj;
	
		if (document.all) {
			for(var i  =  0; i < document.all.tags("select").length; i++) {
				obj = document.all.tags("select")[i];
				if(!obj || !obj.offsetParent) continue;
				obj.style.visibility = 'visible';}
		} else {
			for(var i  =  0; i < document.forms.length; i++) {
				for(var j = 0; j < document.forms[i].elements.length; j++) {
					document.forms[i].elements[j].visibility = 'show';
				}
			}
		}
	}
}

function hideSelect()
{
	if(HM_IE || HM_IE4) {
		var obj;
	
		if (document.all) {
			for(var i  =  0; i < document.all.tags("select").length; i++) {
				obj = document.all.tags("select")[i];
				if(!obj || !obj.offsetParent) continue;
				obj.style.visibility = 'hidden';
			}
		} else {
			for(var i  =  0; i < document.forms.length; i++) {
				for(var j = 0; j < document.forms[i].elements.length; j++) {
					document.forms[i].elements[j].visibility = 'hide';
				}
			}
		}
	}
}

//Sub that hides menus	
function NoMenus()		
{
	if(nav)
	{
		for(i=1;i<=9;i++){
			document["Menu"+i].display="none";
			document["Menu"+i].visibility="hidden";
		}
		showSelect();
	}
	else 
	{
		for(i=1;i<=9;i++){
			document.getElementById("Menu"+i).style.display="none";
			document.getElementById("Menu"+i).style.visibility="hidden";
		}
		showSelect();
	}
}

function menu(n)	//Displays the menus
{
	if(layer2Hide == "NoMenus()") window.clearTimeout(hideTimeout); //Yes the menus are on
	if(nav) {
		for(i=1;i<=9;i++){
			document["Menu"+i].display="none";
			document["Menu"+i].visibility="hidden";
		}
		document["Menu"+n].display="block";
		document["Menu"+n].visibility="visible";

		hideSelect();
	} else {
		for(i=1;i<=9;i++){
			document.getElementById("Menu"+i).style.display="none";
			document.getElementById("Menu"+i).style.visibility="hidden";
		}
		document.getElementById("Menu"+n).style.display="block";
		document.getElementById("Menu"+n).style.visibility="visible";
		hideSelect();
	}
}

function timeOut(hide){
	hideTimeout = window.setTimeout(hide, 100);
	layer2Hide = hide;
}

function clearTime(){
	window.clearTimeout(hideTimeout);
}

function rand(number) {
	return Math.ceil(Math.random()*number);
}

function SetClickTracksCookie()
{
	var thisCookie = GetCookie("CLICKTRACKSCOOKIE");
	if( thisCookie == null)
	{
		//Setup the random cookie value
		var myValue = new Date();
		var randNum = rand(100);		
		myValue = myValue.toGMTString() + "_" + randNum;

		//Setup the expiry date to expire in 2010
		var expiryDate = new Date();
		var date2010 = "Fri, 31 Dec 2030 23:00:00 EST";
		var dt = Date.parse(date2010);

		expiryDate.setTime(dt);

		SetCookie("CLICKTRACKSCOOKIE", myValue, expiryDate, "/", window.location.hostname);
	}
}


// ---------------------------------------------------------------
    //  Cookie Functions - Second Helping  (21-Jan-96)
    //  Written by:  Bill Dortch, hIdaho Design <BDORTCH@NETW.COM>
    //  The following functions are released to the public domain.
    //
    //  The Second Helping version of the cookie functions dispenses with
    //  my encode and decode functions, in favor of JavaScript's new built-in
    //  escape and unescape functions, which do more complete encoding, and
    //  which are probably much faster.
    //
    //  The new version also extends the SetCookie function, though in
    //  a backward-compatible manner, so if you used the First Helping of
    //  cookie functions as they were written, you will not need to change any
    //  code, unless you want to take advantage of the new capabilities.
    //
    //  The following changes were made to SetCookie:
    //
    //  1.  The expires parameter is now optional - that is, you can omit
    //      it instead of passing it null to expire the cookie at the end
    //      of the current session.
    //
    //  2.  An optional path parameter has been added.
    //
    //  3.  An optional domain parameter has been added.
    //
    //  4.  An optional secure parameter has been added.
    //
    //  For information on the significance of these parameters, and
    //  and on cookies in general, please refer to the official cookie
    //  spec, at:
    //
    //      http://www.netscape.com/newsref/std/cookie_spec.html    
    //
    //
    // "Internal" function to return the decoded value of a cookie
    //
    function getCookieVal (offset) {
      var endstr = document.cookie.indexOf (";", offset);
      if (endstr == -1)
        endstr = document.cookie.length;
      return unescape(document.cookie.substring(offset, endstr));
    }

    //
    //  Function to return the value of the cookie specified by "name".
    //    name - String object containing the cookie name.
    //    returns - String object containing the cookie value, or null if
    //      the cookie does not exist.
    //
    function GetCookie (name) {
      var arg = name + "=";
      var alen = arg.length;
      var clen = document.cookie.length;
      var i = 0;
      while (i < clen) {
        var j = i + alen;
        if (document.cookie.substring(i, j) == arg)
          return getCookieVal (j);
        i = document.cookie.indexOf(" ", i) + 1;
        if (i == 0) break; 
      }
      return null;
    }

    //
    //  Function to create or update a cookie.
    //    name - String object object containing the cookie name.
    //    value - String object containing the cookie value.  May contain
    //      any valid string characters.
    //    [expires] - Date object containing the expiration data of the cookie.  If
    //      omitted or null, expires the cookie at the end of the current session.
    //    [path] - String object indicating the path for which the cookie is valid.
    //      If omitted or null, uses the path of the calling document.
    //    [domain] - String object indicating the domain for which the cookie is
    //      valid.  If omitted or null, uses the domain of the calling document.
    //    [secure] - Boolean (true/false) value indicating whether cookie transmission
    //      requires a secure channel (HTTPS).  
    //
    //  The first two parameters are required.  The others, if supplied, must
    //  be passed in the order listed above.  To omit an unused optional field,
    //  use null as a place holder.  For example, to call SetCookie using name,
    //  value and path, you would code:
    //
    //      SetCookie ("myCookieName", "myCookieValue", null, "/");
    //
    //  Note that trailing omitted parameters do not require a placeholder.
    //
    //  To set a secure cookie for path "/myPath", that expires after the
    //  current session, you might code:
    //
    //      SetCookie (myCookieVar, cookieValueVar, null, "/myPath", null, true);
    //
    function SetCookie (name, value) {
      var argv = SetCookie.arguments;
      var argc = SetCookie.arguments.length;
      var expires = (argc > 2) ? argv[2] : null;
      var path = (argc > 3) ? argv[3] : null;
      var domain = (argc > 4) ? argv[4] : null;
      var secure = (argc > 5) ? argv[5] : false;
      document.cookie = name + "=" + escape (value) +
        ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
        ((path == null) ? "" : ("; path=" + path)) +
        ((domain == null) ? "" : ("; domain=" + domain)) +
        ((secure == true) ? "; secure" : "");
    }

    //  Function to delete a cookie. (Sets expiration date to current date/time)
    //    name - String object containing the cookie name
    //
    function DeleteCookie (name) {
      var exp = new Date();
      exp.setTime (exp.getTime() - 1);  // This cookie is history
      var cval = GetCookie (name);
      document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
    }

//---------------------------------------------------------------------------------------------



//Call the SetClickTracksCookie() function

SetClickTracksCookie();

