You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
4.3 KiB
JavaScript

var nm3 = ["Bureau of", "Department of", "Division of", "Federal Agency of", "Federal Bureau of", "Federal Department of", "Royal Agency of", "Royal Bureau of", "Royal Department of", "Royal", "Agency of ", "Department of", "Division of", "Service of", "Unit of"];
var nm4 = ["Agency", "Bureau", "Department", "Division", "Service", "Unit"];
var nm1 = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "Civic ", "Civil ", "Domestic ", "Federal ", "Homeland ", "Independent ", "National ", "Secret ", "Public ", "Royal "];
var nm5 = ["", "", "", "", "", "", "", "", "", "", "", "", "Civic ", "Civil ", "Domestic ", "Homeland ", "National "];
function nameGen(type) {
var nm2 = ["Air Defense", "Air Enforcement", "Air Logistics", "Air Protection", "Airspace", "Airspace", "Airspace", "Airspace Defense", "Airspace Enforcement", "Airspace Logistics", "Airspace Protection", "Ballistic Enforcement", "Ballistic Logistics", "Ballistics", "Ballistics", "Ballistics", "Ballistics Intelligence", "Border Control", "Border Defence", "Border Enforcement", "Border Logistics", "Border Protection", "Corrections", "Corrections", "Corrections", "Corrections and Rehabilitation", "Corruption", "Corruption", "Corruption", "Corruption Control", "Counter Corruption", "Counter Intelligence", "Counter Terrorism", "Crime", "Crime", "Crime", "Crime", "Crime Detection", "Crime Intelligence", "Crime Investigation", "Crime Scene Investigation", "Criminal Intelligence", "Criminal Investigation", "Criminal Logistics", "Criminality", "Customs", "Criminality", "Customs", "Criminality", "Customs", "Customs and Border", "Customs and Border Control", "Customs and Border Defence", "Customs and Border Enforcement", "Customs and Border Logistics", "Customs and Border Protection", "Defense", "Defense", "Defense", "Defense Intelligence", "Defense Logistics", "Defense Resources", "Drug Enforcement", "Felonies", "Fraud", "Felonies", "Fraud", "Felonies", "Fraud", "Fraud Detection", "Fraud Intelligence", "Fraud Investigation", "Immigration", "Immigration", "Immigration Enforcement", "Intelligence", "Investigation", "Intelligence", "Investigation", "Intelligence", "Investigation", "Intelligence", "Investigation", "Intelligence", "Investigation", "Intelligence", "Investigation", "Intelligence", "Investigation", "Marine Defense", "Marine Protection", "Maritime Defense", "Maritime Preservation", "Maritime Protection", "Misconduct", "Misdemeanors", "Misconduct", "Misdemeanors", "Natural Resources", "Naval Defense", "Naval Enforcement", "Naval Protection", "Police Investigation", "Preservation", "Preservation", "Probation Violation", "Protection", "Protection", "Protection", "Protection", "Protection", "Protection Intelligence", "Protection Investigation", "Scam Intelligence", "Scam Investigation", "Security", "Security", "Security", "Security", "Security Enforcement", "Security Intelligence", "Security Investigation", "Special Intelligence", "Special Investigations", "Surveillance", "Surveillance", "Surveillance", "Terror Defense", "Terror Detection", "Terror Intelligence", "Terror Investigation", "Terrorism", "Terrorism", "Terrorism", "Terrorism Detection", "Terrorism Investigation", "Wildlife", "Wildlife", "Wildlife", "Wildlife Crime", "Wildlife Defense", "Wildlife Enforcement", "Wildlife Preservation", "Wildlife Protection"];
var br = "";
$('#placeholder').css('textTransform', 'capitalize');
var element = document.createElement("div");
element.setAttribute("id", "result");
for (i = 0; i < 10; i++) {
rnd2 = Math.random() * nm2.length | 0;
if (i < 5) {
rnd = Math.random() * nm1.length | 0;
rnd3 = Math.random() * nm3.length | 0;
names = nm3[rnd3] + " " + nm1[rnd] + nm2[rnd2];
} else {
rnd = Math.random() * nm5.length | 0;
rnd4 = Math.random() * nm4.length | 0;
names = nm5[rnd] + nm2[rnd2] + " " + nm4[rnd4];
}
nm2.splice(rnd2, 1);
br = document.createElement('br');
element.appendChild(document.createTextNode(names));
element.appendChild(br);
}
if (document.getElementById("result")) {
document.getElementById("placeholder").removeChild(document.getElementById("result"));
}
document.getElementById("placeholder").appendChild(element);
}