// Define arrays for each group
//File located @ store/scripts

var POS = new Array();
var home = new Array();
var ATM = new Array();

POS = ["ABS", "Addmaster", "Axiohm", "Bixolon","Brandt", "Burroughs/Unisys", "Casio", "Centrodyne", "Check-a-Tron", "Citizen", "CRS", "Data Card", "Datacap", "Datamega", "DH Tech", "Digital Check", "Epson", "First Data", "Fujitsu", "Hypercom", "IBM", "Ingenico", "Ithaca", "JCM", "Krone", "Magtek", "Maverick", "NCR", "Nurit", "Okidata", "Olivetti", "Olympia", "Omniprint", "Panasonic", "Panini", "Par MICROSystems" , "Pertech", "POS-X", "Samsung", "Sanyo", "Seiko", "Sharp", "Shear Tech", "Standard Register", "Star", "Swintec", "Systex", "Tallygenicom", "TEC", "Telecheck", "TransAct", "Unisys", "Uniwell", "Verifone"];

home = ["Acom Computer", "Addmaster", "Addressease", "ADP", "Advanced Hi-Tech", "Agfa", "Aitell", "Alps", "Amstrad", "Analog Tech Corp", "Anzac Comp Equip", "Apollo by Hewlett Packard", "Apple", "Applied Comp Science", "Asker Intl", "BDT", "Bezier", "BGL Tech", "Birmy Graphics", "Bixolon", "Blaser", "Brother", "Bryce Office Systems", "Burroughs/Unisys", "Business Sys Intl", "Calcomp", "Canon", "Casio", "Chameleon Proofing Sys", "Chelgraph Prod", "Chinon", "Colossal Graphics", "Commodore", "Compaq", "Compugraphic", "Computer Language Res", "Comtech", "Comterm", "Costar", "Craig Assoc.", "Cycomm", "Daewoo Teletech", "Data General", "Datamega", "Dataproducts", "Datasec Corp", "Datatech", "Dbtel", "DEC", "Decision 1Data", "Dell Computer", "Detewe", "Develop", "DEX Bus System", "Diconix/Kodak", "Diebold", "Digital Check", "Digital Laser Sys", "EGT", "Eicon", "Electronic Forms Sys", "ENC Electronics", "Encad Computer", "Facit", "Fargo", "Frostbyte JPS", "Fujitsu", "GBT", "GCC", "Gestetner Corp", "Grundig", "GSD Systems", "Hasi", "Hennes Ltd", "HP", "Huntress Corp", "IBM", "IDS", "IJ Technologies", "Imagen", "Infotec", "Integrex", "Interface Systems", "Interkom", "Ithaca", "ITT Courier", "Iverson Tech", "JRL Systems", "Kodak", "Kohmitech", "Konica Minolta", "Kyocera Mita", "Lanier", "Laser Connection", "Lasermaster", "Lee Data", "Lexmark", "Marcan", "Magtek", "Memorex", "Meonic", "Microplex", "Miltope Corp", "Mitek Systems", "Nashuatec", "National Televar", "NBI", "NCR", "NEC", "Neopost", "Newgen Sys.", "Next Comp", "Nixdorf", "Nokia", "Norsk Data", "North Atlantic", "Northern Telecom", "OCE Imagistics", "Okidata", "Olivetti", "Olympia", "Omnifax", "Omniprint", "Pacific Semi.", "Panasonic", "Panini", "Pitney Bowes", "Prepress Solutions", "Primera Tech.", "Printer Systems", "Printer Works", "Printers Plus", "Privileg", "R2D2", "Raster Dev", "Rena", "REX Rotary", "Ricoh", "Sagem", "Samsung", "Sanyo", "Savin", "Scan-Code", "Selex", "Sharp", "Siemens", "Sony", "SRS Imaging", "Star Micronics", "Stielow", "Summagraphics", "Sun Microsystems", "Syntrex", "T/R Systems", "Talaris Systems", "Tallygenicom", "Tandem", "TEC", "Tegra", "Telecheck", "Telekom", "Tidemark Corp", "Toshiba", "TransAct", "Triumph Adler", "True Tech", "U.S. Laser Corp", "Unisys", "Utax", "Valhalla Inc", "Victor", "Wang", "Westrex Intl.", "Xante Corp", "Xerox", "Xli Corp"];

ATM = ["Cross/Tranax", "Diebold", "Fujitsu", "Green Link", "Interbold", "NCR-ATM", "Nextran", "Tidel", "Triton", "Wincor-Nixdorf"];

$(document).ready(function() {
			   $("#whatAreYouLookingFor").change(function(){
			   	var manufacturers = "<option value=\"0\">Manufacturer:</option>";
			   	var models = "<option value=\"\">Model:</option>";
			   	
			   		eval("for (x in "+$(this).val()+") { manufacturers += '<option value=\"'+"+$(this).val()+"[x]+'\">'+"+$(this).val()+"[x]+'</option>' }");

			   		$("#manufacturer").html(manufacturers);
			   		$("#models").html(models)
			   });
			   
			
			var t; 
			var t2;
			var isHovered = false;
			var length = 500;
			function isHoveredFalse(){
				isHovered = false;
			}

			$("#top-nav > li").hover(
				
				function() {
					
					thisNav = $(this);
					clearTimeout(t);
					clearTimeout(t2);
					if(isHovered == false){						
						t = setTimeout("thisNav.children('.sub-nav').show();thisNav.children('a').addClass('hovered');$('#bucket3 select').hide();", length);
						isHovered = true;
					}
					else{
						thisNav.children('.sub-nav').show();
						thisNav.children('a').addClass('hovered');
						$('#bucket3 select').hide();
					}
					
				},
				function() {
					clearTimeout(t);
					//isHovered = false;
					t2 = setTimeout(isHoveredFalse, 100);
					$(this).children('.sub-nav').hide();
					$(this).children('a').removeClass("hovered");
					$('#bucket3 select').show();
					
				});
				
			

			});      
		  /*
			$("#top-nav > li").hover(
				function() {
					$(this).children('.sub-nav').show();
					$(this).children('a').addClass("hovered");
					$('#bucket3 select').hide();
					
					
				},
				function() {
					$(this).children('.sub-nav').hide();
					$(this).children('a').removeClass("hovered");
					$('#bucket3 select').show();
					
				});
			

});*/

function modelSelectPopulate(str){
	var options = "";
	var model_array = str.split(",");
	for (i=0; i < model_array.length; i++){
		options += "<option value='"+model_array[i]+"'>"+model_array[i]+"</option>";
	}
	
	$("#models").html(options);

}

function authFormLogin(){
	$("#authform").submit();
}
