 // JavaScript Document
//Copyright Kerberos Internet Services, CC; All rights reserved.
//info@kerberosb2b.com
//helpdesk@kerberosb2b.com
//http://www.kerberosb2b.com
isIE4 = document.all? true : false;
isIE6 = document.getElementById && document.all ? true : false;
isNS4 = document.layers? true : false;
isNS6 = document.getElementById && !document.all ? true : false;
function getDOMObject (documentID){
	if (isIE4){return document.all[documentID];
	}else if(isIE6){return document.getElementById(documentID);
	}else if (isNS4){return document.layers[documentID];
	}else if (isNS6){return document.getElementById(documentID);
	}
}
var FONT_CONTAINER_PREFIX = "FONT_CONTAINER";
var FONT_DISPLAY_PREFIX = "FONT_DISPLAY";
var FONT_STATUSDISPLAY_PREFIX = "FONT_STATUSDISPLAY";
var FONT_FONTFACEDROPDOWN_PREFIX = "FONT_FONTFACEDROPDOWN";
var FONT_FONTSIZEDROPDOWN_PREFIX = "FONT_FONTSIZEDROPDOWN";
var FONT_FONTCOLOURDROPDOWN_PREFIX = "FONT_FONTCOLOURDROPDOWN";
var FontPicker_idGenerator = new IDGenerator(0);
var fontPickerMap = new Object();
var fontPickerIDGenerator = null;
var fontPickerColourswatch = [
	[ '000000', '000000', '003300', '006600', '009900', '00CC00', '00FF00', '330000', '333300', '336600', '339900', '33CC00', '33FF00', '660000', '663300', '666600', '669900', '66CC00', '66FF00' ],
    [ '333333', '000033', '003333', '006633', '009933', '00CC33', '00FF33', '330033', '333333', '336633', '339933', '33CC33', '33FF33', '660033', '663333', '666633', '669933', '66CC33', '66FF33' ],
    [ '666666', '000066', '003366', '006666', '009966', '00CC66', '00FF66', '330066', '333366', '336666', '339966', '33CC66', '33FF66', '660066', '663366', '666666', '669966', '66CC66', '66FF66' ],
    [ '999999', '000099', '003399', '006699', '009999', '00CC99', '00FF99', '330099', '333399', '336699', '339999', '33CC99', '33FF99', '660099', '663399', '666699', '669999', '66CC99', '66FF99' ],
    [ 'CCCCCC', '0000CC', '0033CC', '0066CC', '0099CC', '00CCCC', '00FFCC', '3300CC', '3333CC', '3366CC', '3399CC', '33CCCC', '33FFCC', '6600CC', '6633CC', '6666CC', '6699CC', '66CCCC', '66FFCC' ],
    [ 'FFFFFF', '0000FF', '0033FF', '0066FF', '0099FF', '00CCFF', '00FFFF', '3300FF', '3333FF', '3366FF', '3399FF', '33CCFF', '33FFFF', '6600FF', '6633FF', '6666FF', '6699FF', '66CCFF', '66FFFF'],
    [ 'FF0000', '990000', '993300', '996600', '999900', '99CC00', '99FF00', 'CC0000', 'CC3300', 'CC6600', 'CC9900', 'CCCC00', 'CCFF00', 'FF0000', 'FF3300', 'FF6600', 'FF9900', 'FFCC00', 'FFFF00' ],
    [ '00FF00', '990033', '993333', '996633', '999933', '99CC33', '99FF33', 'CC0033', 'CC3333', 'CC6633', 'CC9933', 'CCCC33', 'CCFF33', 'FF0033', 'FF3333', 'FF6633', 'FF9933', 'FFCC33', 'FFFF33' ],
    [ '0000FF', '990066', '993366', '996666', '999966', '99CC66', '99FF66', 'CC0066', 'CC3366', 'CC6666', 'CC9966', 'CCCC66', 'CCFF66', 'FF0066', 'FF3366', 'FF6666', 'FF9966', 'FFCC66', 'FFFF66' ],
    [ 'FFFF00', '990099', '993399', '996699', '999999', '99CC99', '99FF99', 'CC0099', 'CC3399', 'CC6699', 'CC9999', 'CCCC99', 'CCFF99', 'FF0099', 'FF3399', 'FF6699', 'FF9999', 'FFCC99', 'FFFF99' ],
    [ '00FFFF', '9900CC', '9933CC', '9966CC', '9999CC', '99CCCC', '99FFCC', 'CC00CC', 'CC33CC', 'CC66CC', 'CC99CC', 'CCCCCC', 'CCFFCC', 'FF00CC', 'FF33CC', 'FF66CC', 'FF99CC', 'FFCCCC', 'FFFFCC' ],
    [ 'FF00FF', '9900FF', '9933FF', '9966FF', '9999FF', '99CCFF', '99FFFF', 'CC00FF', 'CC33FF', 'CC66FF', 'CC99FF', 'CCCCFF', 'CCFFFF', 'FF00FF', 'FF33FF', 'FF66FF', 'FF99FF', 'FFCCFF', 'FFFFFF' ]
];
var fontPickerFontStrings = [
                "Agency FB",
                "Algerian",
	"Arial",
	"Arial Narrow",
                "Baskerville Old Face",
                "Bell MT",
                "Berlin Sans FB",
                "Bernard MT Condensed",
                "Blackadder ITC",
                "Bodoni MT Poster Compressed",
                "Bodoni MT",
	"Book Antiqua",
	"Bookman Old Style",
	"Bradley Hand ITC",
                "Broadway",
                "Brush Script MT",
                "Calisto MT",
                "Castellar",
                "Centaur",
	"Century",
	"Century Gothic",
                "Chiller",
                "Colonna MT",
	"Comic Sans MS",
	"Curlz MT",
	"Edwardian Script ITC",
                "Eras Medium ITC",
                "Felix Titling",
                "Footlight MT",
                "Freestyle Script",
                "French Script MT",
                "Gigi",
                "Gill Sans MT Condensed",
                "Gill Sans MT",
                "Harrington",
	"Imprint MT Shadow",
	"Jokerman",
                "Juice ITC",
                "Kristen ITC",
                "Kunstler Script",
 	"Lucida Calligraphy",
	"Lucida Handwriting",
                "Maiandra GD",
	"Mistral",
                "Monotype Corsiva",
                "Old English Text MT",
                "Palace Script MT",
                "Papyrus",
                "Poor Richard",
                "Pristina",
                "Tempus Sans ITC",
                "Verdana",
                "Viner Hand ITC",
                "Vivaldi",
                "Vladimir Script"
];





//Utility Functions
function IDGenerator(nextID){
	this.nextID = nextID;
	this.GenerateID = IDGeneratorGenerateID;
}
function IDGeneratorGenerateID(){
	return this.nextID++;
}
function FontPicker (boundControl, scriptAction){
//Object Variables
	this.idGenerator = FontPicker_idGenerator;
	this.instantiated = false;
	this.scriptAction = scriptAction;
	this.valueControl = '';
	this.displayControl = '';
	this.boundControl = boundControl;
	
	this.demoMessage = "The quick brown fox jumps over the lazy dog...";
	this.showDemo = true;
	this.showBold = true;
	this.showItalic = true;
	this.showUnderline = true;
	this.showStatus = true;
	this.showFontFace = true;
	this.showFontSize = true;
	this.showColor = true;
	
	this.objectFonts = fontPickerFontStrings;
	
	this.fontSize_minimum = 8;
	this.fontSize_maximum = 24;
	this.CSSSettings_Status = "font: 8px verdana;";
	this.CSSSettings_Button = "padding:0 0 0 0; border:1px raised; font: 12px verdana;";
	this.CSSSettings_Object = "border: none; background-color:#FFFFFF;";
	this.CSSSettings_Control = "border: 1px solid #000000;";
	this.CSSSettings_Demo = "border: 1px solid #000000;";
	this.width = "300px";
//Font Decoration Variables
	this.color = "#000000";
	this.bold = false;
	this.italic = false;
	this.underline = false;
	this.fontsize = "42px";
	this.fontfamily = "Arial";
//Functions
	this.Instantiate = FontPicker_Instantiate;
	this.parseCSSString = FontPicker_parseInitialCSSString;
	this.updateDisplay = FontPicker_UpdateDisplay;
               }
function FontPicker_UpdateDisplay(){
               	FontPicker_SetDisplayAreaParams(this.id);
}
function FontPicker_GetFontDilimeters(fontName){
	if (fontName.indexOf(" ") != -1)return "'" + fontName + "'";
	return fontName;
}
function FontPicker_Instantiate(){
	if (this.instantiated) {
		return;
	}
	this.id = this.idGenerator.GenerateID();
	fontPickerMap[this.id] = this;
	fontPickerIDGenerator = this.idGenerator;
	
	var html = "";
//Set the event styles
	html += "<STYLE>";
	html += "#ATR_SELECT {display: block; background-color:#FFFFFF; color:#000000; text-decoration:none; width:100%; height:20px;}";
	html += "#ATR_SELECT:hover {background-color:#CCCCCC;}";
	html += "#ATR_COLOR {display: block; text-decoration:none; width:12px; height:12px;}";
	html += "";
	html += "";
	html += "</STYLE>";
//Create the object container
//Create the buttons for the subsequent dropdowns
	html += "<TABLE width='" + this.width + "' Cellspacing=0 cellpadding=0 style='" + this.CSSSettings_Object + ";'> ";
	html += "<tr><td style=\"" + this.CSSSettings_Control + "\">";
	html += "<table cellspacing=5 cellpadding=0 border=0 width='100%'>"
//Top Row
	html += "<tr>";
//Font Dropdown Button
	html += "<td height=20 width=20>";
	if(this.showFontFace)html += "<input type='button' value='Ff' style='height:20px; width:20px; " + this.CSSSettings_Button + "' title='Font Face' onclick='FontPicker_ShowPicker(" + this.id + ", 0)'>";
	html += "</td>";
//Size Dropdown Button
	html += "<td height=20 width=20>";
	if (this.showFontSize)html += "<input type='button' value='S' style='height:20px; width:20px; " + this.CSSSettings_Button + "' title='Font Size' onclick='FontPicker_ShowPicker(" + this.id + ", 1)'>";
	html += "</td>";
//Bold Button	
	html += "<td height=20 width=20>";
	if (this.showBold)html += "<input type='button' value='B' style='height:20px; width:20px; " + this.CSSSettings_Button + "; font-weight:bold;' title='Bold'  onclick='FontPicker_SetFontBold(" + this.id + ")'>";
	html += "</td>";
//Italic Button	
	html += "<td height=20 width=20>";
	if (this.showItalic)html += "<input type='button' value='I' style='height:20px; width:20px; " + this.CSSSettings_Button + "; font-style:italic;' title='Italic'  onclick='FontPicker_SetFontItalic(" + this.id + ")'>";
	html += "</td>";
//Underline Button
	html += "<td height=20 width=20>";
	if (this.showUnderline)html += "<input type='button' value='U' style='height:20px; width:20px; " + this.CSSSettings_Button + " ; text-decoration: underline; ' title='Underline'  onclick='FontPicker_SetFontUnderline(" + this.id + ")'>";
	html += "</td>";
//Color Button	
	html += "<td>";
	if (this.showColor)html += "<input name='btnFontColourPicker_Button" + this.id + "' type='button' id='btnFontColourPicker_Button" + this.id + "' style='width:20px; height:20px; border:2px ridge #CCCCCC;' value='' onClick='FontPicker_ShowPicker(" + this.id + ", 2);'>";
	html += "</td>";
//Color Input Box
	html += "<td>";	
	if (this.showColor)html += "<input type='text' name='txtFontColourPicker_TextBox" + this.id + "' id='txtFontColourPicker_TextBox" + this.id + "' style='width:50px; height:20px; border:1px solid #CCCCCC; font: 10 Arial' onblur='FontPicker_SetBackgroundColour(" + this.id + ",this.value)'></td>";
	html += "</td>";
//Status Display	
	html += "<td rowspan=2 width=100% id='" + FONT_STATUSDISPLAY_PREFIX + this.id + "' name='id=" + FONT_STATUSDISPLAY_PREFIX + this.id + "' style='" + this.CSSSettings_Status + "'></td>";
//Second Row - Dropdowns
	html += "</tr><tr>";
	html += "<td valign='top'>";
//Font Face Dropdown
	html += "<div id='"+FONT_FONTFACEDROPDOWN_PREFIX + this.id + "' name='"+FONT_FONTFACEDROPDOWN_PREFIX + this.id + "' style='height: 200px; width:220px; display:none; position:absolute; overflow: auto; border: 2px solid #CCCCCC; background-color:#FFFFFF;'>"
	html += "<table width=100% cellpadding=0 cellspacing=0 border=0 bgcolor='#FFFFFF'>" 
	for (i = 0; i < this.objectFonts.length; i += 1){
		html +=	"<tr><td nowrap><a id=\"ATR_SELECT\" href=\"javascript:FontPicker_SetFontFace(" + this.id + ",'" + this.objectFonts[i] + "');void(0);\" style=\"font: 20px " + FontPicker_GetFontDilimeters(this.objectFonts[i]) + ";\"><img src=\"images/" + this.objectFonts[i] + ".gif\" style=\"border:\"0\"></a></td></tr>";
	}
	html += "</table>"
	html += "</div>"
	html += "</td>";
	html += "<td valign='top'>";
//Font Size Dropdown
 	html += "<div id='"+FONT_FONTSIZEDROPDOWN_PREFIX + this.id + "' name='"+FONT_FONTSIZEDROPDOWN_PREFIX + this.id + "' style='height: 150px; display:none; position:absolute; overflow: auto; border: 2px solid #CCCCCC; background-color:#FFFFFF;'>"
	html += "<table width=100% cellpadding=0 cellspacing=0 border=0 bgcolor='#FFFFFF'>"
	for (i = this.fontSize_minimum; i <= this.fontSize_maximum; i += 1){
		html += "<tr><td nowrap><a id=\"ATR_SELECT\" href=\"javascript:FontPicker_SetFontSize(" + this.id + ",'"+i+"px');void(0);\" style=\"font-size:" + i + "px;\">" + i + "px</a></td></tr>"
	}
	html +=	"</table>"
	html +=	"</div>"
	html += "</td>";
	html += "<td colspan=3></td>";
	html += "<td colspan=2 valign='top'>";
	//Color Swatch Dropdown
	var csWidth = fontPickerColourswatch[0].length * 12;
	var csHeight = fontPickerColourswatch.length * 12 + 12;
	var divWidth = fontPickerColourswatch[0].length * 14;
	var divHeight = fontPickerColourswatch.length * 14 + 14;
	html += "<DIV id='"+FONT_FONTCOLOURDROPDOWN_PREFIX+this.id+"' name='"+FONT_FONTCOLOURDROPDOWN_PREFIX+this.id+"' style='position:absolute; display:none; width:"+divWidth+"px; height:"+divHeight+"px;border:1px solid #999999;z-index:1; background-color:#FFFFFF; overflow:visible;'>"
	html += "<table width="+csWidth+" height="+eval(csHeight-12)+" border=0 cellspacing=0 cellpadding=0 bgcolor='#FFFFFF'>";
	for (i=0; i < fontPickerColourswatch.length ; i++) {
	html += "<tr>";
	for (ii=0; ii<fontPickerColourswatch[i].length; ii++) {
		html += "<td valign=top width=12 height=12 bgcolor=#"+fontPickerColourswatch[i][ii]+" style='border:1px solid white;' onmouseover='this.style.border=\"1px inset black\";window.status=\"#" + fontPickerColourswatch[i][ii] + "\";FontPicker_modifyText(\"thisColourObject"+this.id+"\",\"#" + fontPickerColourswatch[i][ii] + "\");return true;' onmouseout='this.style.border=\"1px solid white\";window.status=window.defaultStatus;\'><a id=\"ATR_COLOR\" href=\"javascript:FontPicker_SetColour("+this.id+",'#"+fontPickerColourswatch[i][ii]+"');void(0);\" style=\"text-decoration:none; font: 10px verdana\">&nbsp;</a></td>";
		}
	html += "</tr>";
	}
	html += "</table>";
	html += "<table width="+csWidth+" border=0 cellspacing=0 cellpadding=0 bgcolor='#FFFFFF'>";
	html += "<tr>";
	html += "<td NOWRAP width=\"5%\" valign=\"middle\" align=\"center\"><DIV style=\"border:1px solid white; width:12px; height:12px; \" onmouseover='this.style.border=\"1px inset black\";window.status=\"No Colour\";FontPicker_modifyText(\"thisColourObject"+this.id+"\",\"No Colour\");return true;' onmouseout=\"this.style.border='1px solid white';window.status = window.defaultStatus\" onclick=\"javascript:FontPicker_HideAllPickers("+this.id+")\"><a href=\"javascript:FontPicker_SetColour("+this.id+",'')\" style=\"text-decoration:none;font: 10px Arial; color: #000000\"><B>X</B></a></DIV></td>";

	html += "<td NOWRAP width=\"20%\" valign=middle><span style=\"font-family:arial;font-size:8pt;\">No colour</span></td>";
	html += "<td NOWRAP width=\"75%\" align=right><SPAN id='thisColourObject"+this.id+"' name='thisColourObject"+this.id+"' style=\"font:10px Arial\">No Colour</SPAN></td>";
	html += "</tr>";
	html += "</table>";
	html += "</DIV>";
	html += "</td>";
	html += "</tr></table></td></tr>";
	if (this.showDemo){
	html += "<tr><td name='"+FONT_DISPLAY_PREFIX+this.id+"' id='"+FONT_DISPLAY_PREFIX+this.id+"' align='center' valign='middle' style='"+this.CSSSettings_Demo+"'>" +this.demoMessage+ "</td></tr>";
	}
	html += "</table>";
	document.write (html);
	this.parseCSSString();
	FontPicker_SetDisplayAreaParams(this.id); 
	this.instantiated = true;
}
function FontPicker_parseInitialCSSString(){
	var isBoldRegExp = new RegExp("(bold)","gi");
	var isItalicRegExp = new RegExp("(italic)","gi");
	var isUnderlineRegExp = new RegExp("(underline)","gi");
	var isColorDefined = new RegExp("(#[A-Fa-f0-9]{6})","gi");
	var isFontFaceDefine = new RegExp("(Agency FB)|(Algerian)|(Arial)|(Arial Narrow)|(Baskerville Old Face)|(Bell MT)|(Berlin Sans FB)|(Bernard MT Condensed)|(Blackadder ITC)|(Bodoni MT Poster Compressed)|(Bodoni MT)|(Book Antiqua)|(Bookman Old Style)|(Bradley Hand ITC)|(Broadway)|(Brush Script MT)|(Calisto MT)|(Castellar)|(Centaur)|(Century)|(Century Gothic)|(Chiller)|(Colonna MT)|(Comic Sans MS)|(Curlz MT)|(Edwardian Script ITC)|(Eras Medium ITC)|(Felix Titling)|(Footlight MT)|(Freestyle Script)|(French Script MT)|(Gigi)|(Gill Sans MT Condensed)|(Gill Sans MT)|(Harrington)|(Imprint MT Shadow)|(Jokerman)|(Juice ITC)|(Kristen ITC)|(Kunstler Script)|(Lucida Calligraphy)|(Lucida Handwriting)|(Maiandra GD)|(Mistral)|(Monotype Corsiva)|(Old English Text MT)|(Palace Script MT)|(Papyrus)|(Poor Richard)|(Pristina)|(Tempus Sans ITC)|(Viner Hand ITC)|(Vivaldi)|(Vladimir Script)|(Verdana)");
	var initialCSSString = "";
	initialCSSString = getDOMObject (this.boundControl).value
	if (initialCSSString == "")return;
	var colourString = initialCSSString.match(isColorDefined);
	var fontsizestring = initialCSSString.match(/\d+px/gi);
	var fontfacestring = initialCSSString.match(isFontFaceDefine);
	if (fontfacestring.length > 0)this.fontfamily = fontfacestring[0];
	if (fontsizestring.length > 0)this.fontsize = fontsizestring[0];
	if (colourString.length > 0)this.color = colourString[0];
	if (initialCSSString.search(isBoldRegExp)!= '-1')this.bold=true;
	if (initialCSSString.search(isItalicRegExp)!= '-1')this.italic=true;
	if (initialCSSString.search(isUnderlineRegExp)!= '-1')this.underline=true;
	
}
function FontPicker_SetFontSize(id, size){
	fontPickerMap[id].fontsize = size;
	FontPicker_SetDisplayAreaParams(id);
	FontPicker_ShowPicker(id, 1);
	eval(fontPickerMap[id].scriptAction);	
}

function FontPicker_SetFontFace(id, font){
   	fontPickerMap[id].fontfamily = font;
	FontPicker_SetDisplayAreaParams(id);
	FontPicker_ShowPicker(id, 0);
	eval(fontPickerMap[id].scriptAction);	
}
function FontPicker_SetFontBold(id){
	fontPickerMap[id].bold = !fontPickerMap[id].bold;
	FontPicker_SetDisplayAreaParams(id);
	eval(fontPickerMap[id].scriptAction);	
}
function FontPicker_SetFontItalic(id){
	fontPickerMap[id].italic = !fontPickerMap[id].italic;
	FontPicker_SetDisplayAreaParams(id);
	eval(fontPickerMap[id].scriptAction);	
}
function FontPicker_SetFontUnderline(id){
	fontPickerMap[id].underline = !fontPickerMap[id].underline;
	FontPicker_SetDisplayAreaParams(id);
	eval(fontPickerMap[id].scriptAction);	
}
function FontPicker_getStyleString(id){
	var styleString = "";
	styleString += 'font-size:' + fontPickerMap[id].fontsize + ';';
	styleString += 'font-family:' + FontPicker_GetFontDilimeters(fontPickerMap[id].fontfamily) + ';';
	styleString += 'color:' + fontPickerMap[id].color + ';';
	if (fontPickerMap[id].bold){
		styleString +=  'font-weight:bold;';
	}else{
		styleString +=  'font-weight:normal;';
	}
	if (fontPickerMap[id].italic){
		styleString +=  'font-style:italic;';
	}else{
		styleString +=  'font-style:normal;';
	}
	if (fontPickerMap[id].underline){
		styleString +=  'text-decoration:underline;';
	}else{
		styleString +=  'text-decoration:none;';
	}
	return styleString;
}
function FontPicker_SetDisplayAreaParams(id){
//Construct the status display string
	var statusString = "";
                var embed = "";
                embed += "<STYLE TYPE=\"text/css\">";
                embed += "<!-- /* $WEFT -- Created by: Shelley Wardwell (customersupport@webfactoryct.com) on 4/13/2006 -- */";
                embed += "@font-face { font-family: "+ fontPickerMap[id].fontfamily + "; font-style: "+ fontPickerMap[id].italic + "; font-weight: "+ fontPickerMap[id].bold +"; src: url(BASKERV0.eot); </STYLE>";
              
	statusString += "<b>Font-Face:</b> " + fontPickerMap[id].fontfamily + "<BR>";
	statusString += "<b>Font-Size:</b> " + fontPickerMap[id].fontsize + "<BR>";
	statusString += "<b>Bold:</b> " + fontPickerMap[id].bold + "<BR>";
	statusString += "<b>Italic:</b> " + fontPickerMap[id].italic + "<BR>";
	statusString += "<b>Underline:</b> " + fontPickerMap[id].underline;
 
	if (fontPickerMap[id].showStatus) getDOMObject (FONT_STATUSDISPLAY_PREFIX + id).innerHTML = statusString;
	getDOMObject (fontPickerMap[id].boundControl).value = FontPicker_getStyleString(id);
	if (fontPickerMap[id].showColor)getDOMObject ('txtFontColourPicker_TextBox' + id).value = fontPickerMap[id].color;
	if (fontPickerMap[id].showColor)getDOMObject ('btnFontColourPicker_Button' + id).style.backgroundColor = fontPickerMap[id].color;
	if (fontPickerMap[id].showDemo){
	    getDOMObject (FONT_DISPLAY_PREFIX + id).innerHTML = fontPickerMap[id].demoMessage ;
		getDOMObject (FONT_DISPLAY_PREFIX + id).style.fontSize = fontPickerMap[id].fontsize;
		getDOMObject (FONT_DISPLAY_PREFIX + id).style.fontFamily = FontPicker_GetFontDilimeters(fontPickerMap[id].fontfamily);
		getDOMObject (FONT_DISPLAY_PREFIX + id).style.color = fontPickerMap[id].color;
		getDOMObject (FONT_DISPLAY_PREFIX + id).style.fontWeight = (fontPickerMap[id].bold ? "bold": "normal");
		getDOMObject (FONT_DISPLAY_PREFIX + id).style.fontStyle = (fontPickerMap[id].italic ? "italic": "normal");
		getDOMObject (FONT_DISPLAY_PREFIX + id).style.textDecoration = (fontPickerMap[id].underline ? "underline": "none");
	    getDOMObject (FONT_DISPLAY_PREFIX + id).style.src = "www.webfactoryonlinestores.com/BLACKAD2.eot"; }
}
function isColour(colour){
	var myRegExp = new RegExp("#[A-Fa-f0-9]{6}","gi");
	if (colour.search(myRegExp)!=-1)return true;
	return false;
}
function FontPicker_SetColour(id, colour){
	colour = colour.toUpperCase();
	if (!isColour(colour) && colour != '')return;
	fontPickerMap[id].color = colour;
	FontPicker_SetDisplayAreaParams(id);
	FontPicker_ShowPicker(id, 2);
	eval(fontPickerMap[id].scriptAction);
}
function FontPicker_SetBackgroundColour(id, colour){
	colour = colour.toUpperCase();
	if (!isColour(colour) && colour != '')return;
	fontPickerMap[id].color = colour;
	FontPicker_SetDisplayAreaParams(id);
	FontPicker_ShowPicker(id, 2);
	eval(fontPickerMap[id].scriptAction);
} 
function FontPicker_ShowPicker(id, pickerID){
	switch (pickerID){
		case 0:
			getDOMObject (FONT_FONTFACEDROPDOWN_PREFIX+id).style.display = (String(getDOMObject (FONT_FONTFACEDROPDOWN_PREFIX+id).style.display).toLowerCase() == 'inline' ? "none" : "inline"); 
			getDOMObject (FONT_FONTSIZEDROPDOWN_PREFIX+id).style.display = 'none'; 
			getDOMObject (FONT_FONTCOLOURDROPDOWN_PREFIX+id).style.display = 'none'; 
			break;
		case 1:
			getDOMObject (FONT_FONTSIZEDROPDOWN_PREFIX+id).style.display = (String(getDOMObject (FONT_FONTSIZEDROPDOWN_PREFIX+id).style.display).toLowerCase() == 'inline' ? "none" : "inline"); 
			getDOMObject (FONT_FONTFACEDROPDOWN_PREFIX+id).style.display = 'none'; 
			getDOMObject (FONT_FONTCOLOURDROPDOWN_PREFIX+id).style.display = 'none'; 
			break;
		case 2:
			getDOMObject (FONT_FONTCOLOURDROPDOWN_PREFIX+id).style.display = (String(getDOMObject (FONT_FONTCOLOURDROPDOWN_PREFIX+id).style.display).toLowerCase() == 'inline' ? "none" : "inline"); 
			getDOMObject (FONT_FONTFACEDROPDOWN_PREFIX+id).style.display = 'none'; 
			getDOMObject (FONT_FONTFACEDROPDOWN_PREFIX+id).style.display = 'none'; 
			break;
	}
}
function FontPicker_modifyText(id, text) {
	if(document.getElementById && text != '') {
		obj = document.getElementById(id);
		obj.childNodes[0].data = text;
	}
}