/*
  jsFontDetect.  Written by Joe McCormack.  www.virtualsecrets.com.
*/

/* START: QUERY FOR A SPECIFIC FONT */
function font_query(source, target, height, state, fontLabel, fontSize, bwidth, dwidth) {
/*
  CALL AS:
  source = the font to look for
  target = the target element prefix that creation of elements can take place in so that a font test can be done
  height = the height of the target area in pixels (most likely this will always be set to 12)
  state = visible or hidden (most likely this will always be set to hidden)
  fontLabel = common font (not really applicable here, but should contain a font nonetheless)
  fontSize = typically 8pt (a standard font size across most systems)
  bwidth = width of the element border (most likely this will always be set to 0px)
  dwidth = width of the element testing area (most likely 100%)
*/
var detectedWidth = 0, detectedHeight = 0;
font_buildElement(target, height, state, fontLabel, fontSize, bwidth, dwidth);
font_detectDefault(target);
document.getElementById(target + "_child").style.fontFamily = source;
detectedWidth = document.getElementById(target + "_child").offsetWidth;
detectedHeight = document.getElementById(target + "_child").offsetHeight;
if ((detectedWidth != fontDefaultWidth) || (detectedHeight != fontDefaultHeight)) { font_queryFound(source); }
else { font_queryMissing(source); }
}
function font_queryFound(source) {
/* This function is called when the font is found to be unique in the browser */
alert("The font you specified (" + source + ") was found and is unique in dimensions to the default browser font.");
}
function font_queryMissing(source) {
/* This function is called when the font could not be found or has the same dimensions as the browser's default font */
alert("The font you specified (" + source + ") could not be found OR has the same dimensions as the default font.");
}
/* END: QUERY FOR A SPECIFIC FONT */

/*
  DEFAULT FONT DEFINITIONS AND DETECTION
*/
var fontDetectElementID = "fontDetectElementID";		/* Name/ID of the element which will be used in font testing */
var fontDetectRegionHeight = 200;				/* Height of the region used for font detection and display */
var fontDefaultWidth = 0, fontDefaultHeight = 0;
fontGrid = new Array(); fontDetectedGrid = new Array(); fontNullGrid = new Array();
function font_constructGrid() {
var fontaddIndex = 0;
fontaddIndex = fontGrid.push("ACaslonPro-Bold");
fontaddIndex = fontGrid.push("ACaslonPro-BoldItalic");
fontaddIndex = fontGrid.push("ACaslonPro-Italic");
fontaddIndex = fontGrid.push("ACaslonPro-Regular");
fontaddIndex = fontGrid.push("ACaslonPro-Semibold");
fontaddIndex = fontGrid.push("ACaslonPro-SemiboldItalic");
fontaddIndex = fontGrid.push("AGaramondPro-Bold");
fontaddIndex = fontGrid.push("AGaramondPro-BoldItalic");
fontaddIndex = fontGrid.push("AGaramondPro-Italic");
fontaddIndex = fontGrid.push("AGaramondPro-Regular");
fontaddIndex = fontGrid.push("Agency FB");
fontaddIndex = fontGrid.push("Alba");
fontaddIndex = fontGrid.push("Alba Matter");
fontaddIndex = fontGrid.push("Alba Super");
fontaddIndex = fontGrid.push("Algerian");
fontaddIndex = fontGrid.push("Angsana New");
fontaddIndex = fontGrid.push("Arial");
fontaddIndex = fontGrid.push("Arial Black");
fontaddIndex = fontGrid.push("Arial Narrow");
fontaddIndex = fontGrid.push("Arial Rounded MT Bold");
fontaddIndex = fontGrid.push("Arial Unicode MS");
fontaddIndex = fontGrid.push("ArnoPro-Bold");
fontaddIndex = fontGrid.push("ArnoPro-BoldCaption");
fontaddIndex = fontGrid.push("ArnoPro-BoldDisplay");
fontaddIndex = fontGrid.push("ArnoPro-BoldItalic");
fontaddIndex = fontGrid.push("ArnoPro-BoldItalicCaption");
fontaddIndex = fontGrid.push("ArnoPro-BoldItalicDisplay");
fontaddIndex = fontGrid.push("ArnoPro-BoldItalicSmText");
fontaddIndex = fontGrid.push("ArnoPro-BoldItalicSubhead");
fontaddIndex = fontGrid.push("ArnoPro-BoldSmText");
fontaddIndex = fontGrid.push("ArnoPro-BoldSubhead");
fontaddIndex = fontGrid.push("ArnoPro-Caption");
fontaddIndex = fontGrid.push("ArnoPro-Display");
fontaddIndex = fontGrid.push("ArnoPro-Italic");
fontaddIndex = fontGrid.push("ArnoPro-ItalicCaption");
fontaddIndex = fontGrid.push("ArnoPro-ItalicDisplay");
fontaddIndex = fontGrid.push("ArnoPro-ItalicSmText");
fontaddIndex = fontGrid.push("ArnoPro-ItalicSubhead");
fontaddIndex = fontGrid.push("ArnoPro-LightDisplay");
fontaddIndex = fontGrid.push("ArnoPro-LightItalicDisplay");
fontaddIndex = fontGrid.push("ArnoPro-Regular");
fontaddIndex = fontGrid.push("ArnoPro-Smbd");
fontaddIndex = fontGrid.push("ArnoPro-SmbdCaption");
fontaddIndex = fontGrid.push("ArnoPro-SmbdDisplay");
fontaddIndex = fontGrid.push("ArnoPro-SmbdItalic");
fontaddIndex = fontGrid.push("ArnoPro-SmbdItalicCaption");
fontaddIndex = fontGrid.push("ArnoPro-SmbdItalicDisplay");
fontaddIndex = fontGrid.push("ArnoPro-SmbdItalicSmText");
fontaddIndex = fontGrid.push("ArnoPro-SmbdItalicSubhead");
fontaddIndex = fontGrid.push("ArnoPro-SmbdSmText");
fontaddIndex = fontGrid.push("ArnoPro-SmbdSubhead");
fontaddIndex = fontGrid.push("ArnoPro-SmText");
fontaddIndex = fontGrid.push("ArnoPro-Subhead");
fontaddIndex = fontGrid.push("Arnprior");
fontaddIndex = fontGrid.push("Baby Kruffy");
fontaddIndex = fontGrid.push("Baskerville Old Face");
fontaddIndex = fontGrid.push("Batang");
fontaddIndex = fontGrid.push("BatangChe");
fontaddIndex = fontGrid.push("Bauhaus 93");
fontaddIndex = fontGrid.push("Baveuse");
fontaddIndex = fontGrid.push("BellGothicStd-Black");
fontaddIndex = fontGrid.push("BellGothicStd-Bold");
fontaddIndex = fontGrid.push("Bell MT");
fontaddIndex = fontGrid.push("Berlin Sans FB");
fontaddIndex = fontGrid.push("Berlin Sans FB Demi");
fontaddIndex = fontGrid.push("Bernard MT Condensed");
fontaddIndex = fontGrid.push("Berylium");
fontaddIndex = fontGrid.push("BickhamScriptPro-Bold");
fontaddIndex = fontGrid.push("BickhamScriptPro-Regular");
fontaddIndex = fontGrid.push("BickhamScriptPro-Semibold");
fontaddIndex = fontGrid.push("BirchStd");
fontaddIndex = fontGrid.push("Blackadder ITC");
fontaddIndex = fontGrid.push("BlackoakStd");
fontaddIndex = fontGrid.push("Blue Highway");
fontaddIndex = fontGrid.push("Blue Highway Condensed");
fontaddIndex = fontGrid.push("Blue Highway D Type");
fontaddIndex = fontGrid.push("Blue Highway Linocut");
fontaddIndex = fontGrid.push("Bodoni MT");
fontaddIndex = fontGrid.push("Bodoni MT Black");
fontaddIndex = fontGrid.push("Bodoni MT Condensed");
fontaddIndex = fontGrid.push("Bodoni MT Poster Compressed");
fontaddIndex = fontGrid.push("Book Antiqua");
fontaddIndex = fontGrid.push("Bookman Old Style");
fontaddIndex = fontGrid.push("Bradley Hand ITC");
fontaddIndex = fontGrid.push("Britannic Bold");
fontaddIndex = fontGrid.push("Broadway");
fontaddIndex = fontGrid.push("Browallia New");
fontaddIndex = fontGrid.push("BrushScriptStd");
fontaddIndex = fontGrid.push("Brush Script MT");
fontaddIndex = fontGrid.push("Burnstown Dam");
fontaddIndex = fontGrid.push("Calibri");
fontaddIndex = fontGrid.push("Californian FB");
fontaddIndex = fontGrid.push("Calisto MT");
fontaddIndex = fontGrid.push("Cambria");
fontaddIndex = fontGrid.push("Cambria Math");
fontaddIndex = fontGrid.push("Candara");
fontaddIndex = fontGrid.push("Carbon Block");
fontaddIndex = fontGrid.push("Castellar");
fontaddIndex = fontGrid.push("Centaur");
fontaddIndex = fontGrid.push("Century");
fontaddIndex = fontGrid.push("Century Gothic");
fontaddIndex = fontGrid.push("Century Schoolbook");
fontaddIndex = fontGrid.push("ChaparralPro-Bold");
fontaddIndex = fontGrid.push("ChaparralPro-BoldIt");
fontaddIndex = fontGrid.push("ChaparralPro-Italic");
fontaddIndex = fontGrid.push("ChaparralPro-Regular");
fontaddIndex = fontGrid.push("CharlemagneStd-Bold");
fontaddIndex = fontGrid.push("Chick");
fontaddIndex = fontGrid.push("Chiller");
fontaddIndex = fontGrid.push("Colonna MT");
fontaddIndex = fontGrid.push("Comic Sans MS");
fontaddIndex = fontGrid.push("Consolas");
fontaddIndex = fontGrid.push("Constantia");
fontaddIndex = fontGrid.push("CooperBlackStd-Italic");
fontaddIndex = fontGrid.push("CooperBlackStd");
fontaddIndex = fontGrid.push("Cooper Black");
fontaddIndex = fontGrid.push("Copperplate Gothic Bold");
fontaddIndex = fontGrid.push("Copperplate Gothic Light");
fontaddIndex = fontGrid.push("Corbel");
fontaddIndex = fontGrid.push("Cordia");
fontaddIndex = fontGrid.push("Cordia New");
fontaddIndex = fontGrid.push("Courier");
fontaddIndex = fontGrid.push("Courier New");
fontaddIndex = fontGrid.push("Credit Valley");
fontaddIndex = fontGrid.push("Croobie");
fontaddIndex = fontGrid.push("Curlz MT");
fontaddIndex = fontGrid.push("Cursive");
fontaddIndex = fontGrid.push("Dotum");
fontaddIndex = fontGrid.push("DotumChe");
fontaddIndex = fontGrid.push("Earwig Factory");
fontaddIndex = fontGrid.push("EccentricStd");
fontaddIndex = fontGrid.push("Edwardian Script ITC");
fontaddIndex = fontGrid.push("Elephant");
fontaddIndex = fontGrid.push("Engravers MT");
fontaddIndex = fontGrid.push("Eras Bold ITC");
fontaddIndex = fontGrid.push("Eras Demi ITC");
fontaddIndex = fontGrid.push("Eras Light ITC");
fontaddIndex = fontGrid.push("Eras Medium ITC");
fontaddIndex = fontGrid.push("Euro Sign");
fontaddIndex = fontGrid.push("Fantasy");
fontaddIndex = fontGrid.push("Fat");
fontaddIndex = fontGrid.push("Felix Tilting");
fontaddIndex = fontGrid.push("Footlight MT Light");
fontaddIndex = fontGrid.push("Forte");
fontaddIndex = fontGrid.push("Franklin Gothic Book");
fontaddIndex = fontGrid.push("Franklin Gothic Demi");
fontaddIndex = fontGrid.push("Franklin Gothic Demi Condensed");
fontaddIndex = fontGrid.push("Franklin Gothic Heavy");
fontaddIndex = fontGrid.push("Franklin Gothic Medium");
fontaddIndex = fontGrid.push("Franklin Gothic Medium Condensed");
fontaddIndex = fontGrid.push("Freestyle Script");
fontaddIndex = fontGrid.push("French Script MT");
fontaddIndex = fontGrid.push("Freshbot");
fontaddIndex = fontGrid.push("Frosty");
fontaddIndex = fontGrid.push("Garamond");
fontaddIndex = fontGrid.push("GaramondPremrPro-It");
fontaddIndex = fontGrid.push("GaramondPremrPro-Smbd");
fontaddIndex = fontGrid.push("GaramondPremrPro-SmbdIt");
fontaddIndex = fontGrid.push("GaramondPremrPro");
fontaddIndex = fontGrid.push("Gentium");
fontaddIndex = fontGrid.push("Georgia");
fontaddIndex = fontGrid.push("GiddyupStd");
fontaddIndex = fontGrid.push("GIGI");
fontaddIndex = fontGrid.push("Gil Sans MT");
fontaddIndex = fontGrid.push("Gil Sans MT Condensed");
fontaddIndex = fontGrid.push("Gil Sans Ultra Bold");
fontaddIndex = fontGrid.push("Gil Sans Ultra Bold Condensed");
fontaddIndex = fontGrid.push("GlooGun");
fontaddIndex = fontGrid.push("Gloucester MT Extra Condensed");
fontaddIndex = fontGrid.push("Gothic");
fontaddIndex = fontGrid.push("Goudy Old Style");
fontaddIndex = fontGrid.push("Goudy Stout");
fontaddIndex = fontGrid.push("Gulim");
fontaddIndex = fontGrid.push("GulimChe");
fontaddIndex = fontGrid.push("Gungsuh");
fontaddIndex = fontGrid.push("GungsuhChe");
fontaddIndex = fontGrid.push("Haettenschweiler");
fontaddIndex = fontGrid.push("Harlow Solid Italic");
fontaddIndex = fontGrid.push("Harrington");
fontaddIndex = fontGrid.push("High Tower Text");
fontaddIndex = fontGrid.push("HoboStd");
fontaddIndex = fontGrid.push("Hurry Up");
fontaddIndex = fontGrid.push("Impact");
fontaddIndex = fontGrid.push("Imprint MT Shadow");
fontaddIndex = fontGrid.push("Informal Roman");
fontaddIndex = fontGrid.push("Jenkins v2.0");
fontaddIndex = fontGrid.push("Jokerman");
fontaddIndex = fontGrid.push("Jokewood");
fontaddIndex = fontGrid.push("Juice ITC");
fontaddIndex = fontGrid.push("Kartika");
fontaddIndex = fontGrid.push("King");
fontaddIndex = fontGrid.push("KozGoPro-Bold");
fontaddIndex = fontGrid.push("KozGoPro-ExtraLight");
fontaddIndex = fontGrid.push("KozGoPro-Heavy");
fontaddIndex = fontGrid.push("KozGoPro-Medium");
fontaddIndex = fontGrid.push("KozGoPro-Regular");
fontaddIndex = fontGrid.push("KozMinPro-Bold");
fontaddIndex = fontGrid.push("KozMinPro-ExtraLight");
fontaddIndex = fontGrid.push("KozMinPro-Heavy");
fontaddIndex = fontGrid.push("KozMinPro-Light");
fontaddIndex = fontGrid.push("KozMinPro-Medium");
fontaddIndex = fontGrid.push("KozMinPro-Regular");
fontaddIndex = fontGrid.push("Kredit");
fontaddIndex = fontGrid.push("Kristen ITC");
fontaddIndex = fontGrid.push("Kunstler Script");
fontaddIndex = fontGrid.push("Lalit");
fontaddIndex = fontGrid.push("Latin");
fontaddIndex = fontGrid.push("LetterGothicStd-Bold");
fontaddIndex = fontGrid.push("LetterGothicStd-BoldSlanted");
fontaddIndex = fontGrid.push("LetterGothicStd-Slanted");
fontaddIndex = fontGrid.push("LetterGothicStd");
fontaddIndex = fontGrid.push("LithosPro-Black");
fontaddIndex = fontGrid.push("LithosPro-Regular");
fontaddIndex = fontGrid.push("Lucida Bright");
fontaddIndex = fontGrid.push("Lucida Calligraphy");
fontaddIndex = fontGrid.push("Lucida Console");
fontaddIndex = fontGrid.push("Lucida Fax");
fontaddIndex = fontGrid.push("Lucida Handwriting");
fontaddIndex = fontGrid.push("Lucida Sans");
fontaddIndex = fontGrid.push("Lucida Sans Typewriter");
fontaddIndex = fontGrid.push("Lucida Sans Unicode");
fontaddIndex = fontGrid.push("Magneto");
fontaddIndex = fontGrid.push("Maiandra GD");
fontaddIndex = fontGrid.push("Mangal");
fontaddIndex = fontGrid.push("Matura MT Script Capitals");
fontaddIndex = fontGrid.push("MentorSTD");
fontaddIndex = fontGrid.push("MesquiteStd");
fontaddIndex = fontGrid.push("Microsoft Sans Serif");
fontaddIndex = fontGrid.push("Mingliu");
fontaddIndex = fontGrid.push("MinionPro-Bold");
fontaddIndex = fontGrid.push("MinionPro-BoldCn");
fontaddIndex = fontGrid.push("MinionPro-BoldCnIt");
fontaddIndex = fontGrid.push("MinionPro-BoldIt");
fontaddIndex = fontGrid.push("MinionPro-It");
fontaddIndex = fontGrid.push("MinionPro-Medium");
fontaddIndex = fontGrid.push("MinionPro-MediumIt");
fontaddIndex = fontGrid.push("MinionPro-Regular");
fontaddIndex = fontGrid.push("MinionPro-Semibold");
fontaddIndex = fontGrid.push("MinionPro-SemiboldIt");
fontaddIndex = fontGrid.push("Minya Nouvelle");
fontaddIndex = fontGrid.push("Mistral");
fontaddIndex = fontGrid.push("Modern");
fontaddIndex = fontGrid.push("Modern No. 20");
fontaddIndex = fontGrid.push("Monospace");
fontaddIndex = fontGrid.push("Monotype Corsiva");
fontaddIndex = fontGrid.push("MS Gothic");
fontaddIndex = fontGrid.push("MS Mincho");
fontaddIndex = fontGrid.push("MS PGothic");
fontaddIndex = fontGrid.push("MS PMincho");
fontaddIndex = fontGrid.push("MS Reference Sans Serif");
fontaddIndex = fontGrid.push("MS UI Gothic");
fontaddIndex = fontGrid.push("MyriadPro-Bold");
fontaddIndex = fontGrid.push("MyriadPro-BoldCond");
fontaddIndex = fontGrid.push("MyriadPro-BoldCondIt");
fontaddIndex = fontGrid.push("MyriadPro-BoldIt");
fontaddIndex = fontGrid.push("MyriadPro-Cond");
fontaddIndex = fontGrid.push("MyriadPro-CondIt");
fontaddIndex = fontGrid.push("MyriadPro-It");
fontaddIndex = fontGrid.push("MyriadPro-Regular");
fontaddIndex = fontGrid.push("MyriadPro-Semibold");
fontaddIndex = fontGrid.push("MyriadPro-SemiboldIt");
fontaddIndex = fontGrid.push("Neuropol");
fontaddIndex = fontGrid.push("Niagara Engraved");
fontaddIndex = fontGrid.push("Niagara Solid");
fontaddIndex = fontGrid.push("Nina");
fontaddIndex = fontGrid.push("NSimSun");
fontaddIndex = fontGrid.push("NuevaStd-BoldCond");
fontaddIndex = fontGrid.push("NuevaStd-BoldCondItalic");
fontaddIndex = fontGrid.push("NuevaStd-Cond");
fontaddIndex = fontGrid.push("NuevaStd-CondItalic");
fontaddIndex = fontGrid.push("OCRAStd");
fontaddIndex = fontGrid.push("OCR A Extended");
fontaddIndex = fontGrid.push("Old English Text MT");
fontaddIndex = fontGrid.push("Onyx");
fontaddIndex = fontGrid.push("OratorStd-Slanted");
fontaddIndex = fontGrid.push("OratorStd");
fontaddIndex = fontGrid.push("Outlook");
fontaddIndex = fontGrid.push("Palace Script MT");
fontaddIndex = fontGrid.push("Palatino Linotype");
fontaddIndex = fontGrid.push("Papyrus");
fontaddIndex = fontGrid.push("Parchment");
fontaddIndex = fontGrid.push("Perpetua");
fontaddIndex = fontGrid.push("Perpetua Titling MT");
fontaddIndex = fontGrid.push("Planet Benson 2");
fontaddIndex = fontGrid.push("Playbill");
fontaddIndex = fontGrid.push("PMingLiU");
fontaddIndex = fontGrid.push("Poor Richard");
fontaddIndex = fontGrid.push("PoplarStd");
fontaddIndex = fontGrid.push("PrestigeEliteStd-Bd");
fontaddIndex = fontGrid.push("Pristina");
fontaddIndex = fontGrid.push("Pupcat");
fontaddIndex = fontGrid.push("Rage Italic");
fontaddIndex = fontGrid.push("RAVIE");
fontaddIndex = fontGrid.push("Rockwell");
fontaddIndex = fontGrid.push("Rockwell Condensed");
fontaddIndex = fontGrid.push("Rockwell Extra Bold");
fontaddIndex = fontGrid.push("Rod");
fontaddIndex = fontGrid.push("Roman");
fontaddIndex = fontGrid.push("RosewoodStd-Regular");
fontaddIndex = fontGrid.push("Sans-serif");
fontaddIndex = fontGrid.push("Script");
fontaddIndex = fontGrid.push("Script MT Bold");
fontaddIndex = fontGrid.push("Segoe Condensed");
fontaddIndex = fontGrid.push("Segoe UI");
fontaddIndex = fontGrid.push("Showcard Gothic");
fontaddIndex = fontGrid.push("Simhei");
fontaddIndex = fontGrid.push("Simsun");
fontaddIndex = fontGrid.push("Snap ITC");
fontaddIndex = fontGrid.push("Stencil");
fontaddIndex = fontGrid.push("StencilStd");
fontaddIndex = fontGrid.push("Stereofidelic");
fontaddIndex = fontGrid.push("Sybil Green");
fontaddIndex = fontGrid.push("Sydnie");
fontaddIndex = fontGrid.push("Sylfaen");
fontaddIndex = fontGrid.push("Symbol");
fontaddIndex = fontGrid.push("Tahoma");
fontaddIndex = fontGrid.push("TektonPro-Bold");
fontaddIndex = fontGrid.push("TektonPro-BoldCond");
fontaddIndex = fontGrid.push("TektonPro-BoldExt");
fontaddIndex = fontGrid.push("TektonPro-BoldObl");
fontaddIndex = fontGrid.push("Tempus Sans ITC");
fontaddIndex = fontGrid.push("Times");
fontaddIndex = fontGrid.push("Times New Roman");
fontaddIndex = fontGrid.push("TradeGothicLTStd-Bd2");
fontaddIndex = fontGrid.push("TradeGothicLTStd-Bd2Obl");
fontaddIndex = fontGrid.push("TradeGothicLTStd-Bold");
fontaddIndex = fontGrid.push("TradeGothicLTStd-BoldObl");
fontaddIndex = fontGrid.push("TradeGothicLTStd-Light");
fontaddIndex = fontGrid.push("TradeGothicLTStd-LightObl");
fontaddIndex = fontGrid.push("TradeGothicLTStd-Obl");
fontaddIndex = fontGrid.push("TradeGothicLTStd");
fontaddIndex = fontGrid.push("TrajanPro-Bold");
fontaddIndex = fontGrid.push("TrajanPro-Regular");
fontaddIndex = fontGrid.push("Trebuchet MS");
fontaddIndex = fontGrid.push("Tw Cen MT");
fontaddIndex = fontGrid.push("Tw Cen MT Condensed");
fontaddIndex = fontGrid.push("Velvenda Cooler");
fontaddIndex = fontGrid.push("Verdana");
fontaddIndex = fontGrid.push("VeriBest BC");
fontaddIndex = fontGrid.push("VeriBest Gerber 0");
fontaddIndex = fontGrid.push("VeriBest Gerber 1");
fontaddIndex = fontGrid.push("Viner Hand ITC");
fontaddIndex = fontGrid.push("Verona");
fontaddIndex = fontGrid.push("Vivaldi");
fontaddIndex = fontGrid.push("Vladimir Script");
fontaddIndex = fontGrid.push("Vrinda");
fontaddIndex = fontGrid.push("Waker");
fontaddIndex = fontGrid.push("Webdings");
fontaddIndex = fontGrid.push("Weltron Urban");
fontaddIndex = fontGrid.push("Wide Latin");
fontaddIndex = fontGrid.push("wst_czec");
fontaddIndex = fontGrid.push("wst_engl");
fontaddIndex = fontGrid.push("wst_fren");
fontaddIndex = fontGrid.push("wst_germ");
fontaddIndex = fontGrid.push("wst_ital");
fontaddIndex = fontGrid.push("wst_span");
fontaddIndex = fontGrid.push("wst_swed");
fontaddIndex = fontGrid.push("ZWAdobeF");
}
function font_buildElement(target, height, state, fontLabel, fontSize, bwidth, dwidth) {
var fontStr = "a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";
elem = document.createElement("div");
elem.id = target;
elem.name = target;
elem.style.fontFamily = fontLabel;
elem.style.fontSize = fontSize;
elem.style.visibility = state;
elem.style.height = height;
elem.style.width = dwidth;
elem.style.borderWidth = bwidth;
elem.style.borderStyle = "solid";
elem.style.overflow = "scroll";
document.body.appendChild(elem);
document.getElementById(target).innerHTML = "<span id=\"" + target + "_child\">" + fontStr + "</span>";
}
function font_detectDefault(target) {
if (document.getElementById(target + "_child")) {
						 document.getElementById(target + "_child").style.fontFamily = "zebrasAndKangaroos012";
						 fontDefaultWidth = document.getElementById(target + "_child").offsetWidth;
						 fontDefaultHeight = document.getElementById(target + "_child").offsetHeight;
						 document.getElementById(target + "_child").style.fontFamily = "verdana";
						}
}
function font_buildFontGrid(target) {
var detectedWidth = 0, detectedHeight = 0;
for (x = 0; x <= fontGrid.length - 1; x++) {
					    document.getElementById(target + "_child").style.fontFamily = fontGrid[x];
					    detectedWidth = document.getElementById(target + "_child").offsetWidth;
					    detectedHeight = document.getElementById(target + "_child").offsetHeight;
					    if ((detectedWidth != fontDefaultWidth) || (detectedHeight != fontDefaultHeight)) { addIndex = fontDetectedGrid.push(fontGrid[x]); }
					    else { addIndex = fontNullGrid.push(fontGrid[x]); }
					   }
}
function font_fontGridDetectAndShow() {
var addIndex = 0, compiled = "";
font_constructGrid();
font_buildElement(fontDetectElementID, fontDetectRegionHeight, "visible", "verdana", "8pt", "1px", "100%");
font_detectDefault(fontDetectElementID);
font_buildFontGrid(fontDetectElementID);
compiled = compiled + "<table width=\"100%\"><tr>";
compiled = compiled + "<td width=\"50%\" valign=\"top\">";
compiled = compiled + "<strong><u>Unique Fonts Detected:</u></strong><ul style=\"margin-top: 0px; padding-top: 0px;\">";
for (x = 0; x <= fontDetectedGrid.length - 1; x++) { compiled = compiled + "<li>" + fontDetectedGrid[x] + "</li>"; }
compiled = compiled + "</ul></td>";
compiled = compiled + "<td width=\"50%\" valign=\"top\">";
compiled = compiled + "<strong><u>Non-Unique Fonts Detected Or Missing:</u></strong><ul style=\"margin-top: 0px; padding-top: 0px;\">";
for (x = 0; x <= fontNullGrid.length - 1; x++) { compiled = compiled + "<li>" + fontNullGrid[x] + "</li>"; }
compiled = compiled + "</ul></td>";
compiled = compiled + "</tr></table>";
document.getElementById(fontDetectElementID).innerHTML = compiled;
}
