<!-- Copyright 2001, 2002, 2003 Macromedia, Inc. All rights reserved. -->
<!DOCTYPE HTML SYSTEM "-//Macromedia//DWExtension layout-engine 5.0//dialog">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns:MMString="http://www.macromedia.com/schemes/data/string/">
<head>
	<title><MMString:loadString id="TagLibraries/HTML/font/title" /></title>
<script src="../../Shared/Common/Scripts/dwscripts.js"></script>
<script src="../../Shared/Common/Scripts/ListControlClass.js"></script>
<script src="../../Shared/Common/Scripts/tagDialogsCmn.js"></script>
<script src="loc_strings.js"></script>
<script src="strings.js"></script>
<script>
/************************* GLOBAL VARS **************************/

var LANGUAGELIST; 
var DIRLIST; 
var FONTLIST; 
var SIZELIST; 

var theUIObjects; 

// Color control elements
var COLORP_COLOR; 
var TEXT_COLOR; 

/****************************************************************/

function inspectTag(tagNodeObj)
{
  tagDialog.inspectTagCommon(tagNodeObj, theUIObjects); 
  updateColors();
}

function applyTag(tagNodeObj)
{
  tagDialog.applyTagCommon(tagNodeObj, theUIObjects); 
}


function updateUI(itemName)
{
  switch(itemName)
  {
    case "colorColorPicker":
    { 
      tagDialog.updateColorPicker("colorPicker",COLORP_COLOR,TEXT_COLOR);
      break;
    }
    case "color":
    {
      tagDialog.updateColorPicker("colorField",COLORP_COLOR,TEXT_COLOR);
      break;
    }
  }
}

function updateColors()
{
  tagDialog.updateColorPicker("colorField",COLORP_COLOR,TEXT_COLOR);
}

function updateFontList(){
	// Remember old value if there was one
	var oldValue = FONTLIST.getValue();
	
	// Null out the list first, then add the new values.
	FONTLIST.setAll(new Array(0),new Array(0));
  tagDialog.populateDropDownList(FONTLIST, dw.getFontList(), dw.getFontList(), 1); 
	FONTLIST.pickValue(oldValue);
}

function initializeUI()
{
	LANGUAGELIST = new ListControl("thelang"); 
	DIRLIST = new ListControl("thedir"); 
	FONTLIST = new ListControl("theface"); 
	SIZELIST = new ListControl("thesize"); 

	theUIObjects  = new Array(FONTLIST,SIZELIST,LANGUAGELIST,DIRLIST); 

  COLORP_COLOR = dwscripts.findDOMObject("colorColorPicker");
  TEXT_COLOR = dwscripts.findDOMObject("thecolor");
  
  updateColors(); 
  tagDialog.populateDropDownList(FONTLIST, dw.getFontList(), dw.getFontList(), 1); 
  tagDialog.populateDropDownList(SIZELIST, theFontSizesFontCap, theFontSizesFontVal, 0); 
  tagDialog.populateDropDownList(LANGUAGELIST, theLanguagesCap, theLanguagesVal, 1); 
  tagDialog.populateDropDownList(DIRLIST, theDirectionCap, theDirectionVal, 1); 
}
</script>
<link href="../../fields.css" rel="stylesheet" type="text/css">
</head>

<body onLoad="initializeUI()">
<div MMString:name="TagLibraries/HTML/font/div/name/General"> 
  <table border="0" cellspacing="4">
    <tr>
      <td valign="baseline" align="right" nowrap="nowrap"><MMString:loadString id="TagLibraries/HTML/font/text/Face" /> </td>
      <td nowrap="nowrap">
        <select name="theface" class="fontGroupList" id="attr:font:face" attname="face" editable="true">
           
        </select>
        &nbsp;
				<input type="button" name="editFontList" MMString:value="TagLibraries/HTML/font/button/editFontList/Edit" onClick="dw.editFontList();updateFontList()" />
      </td>
    </tr>
    <tr>
      <td valign="baseline" align="right" nowrap="nowrap"><MMString:loadString id="TagLibraries/HTML/font/text/Size" /> </td>
      <td nowrap="nowrap">
        <select name="thesize" class="smallNumOrCharList" id="attr:font:size" attname="size"> 
        </select>    
      </td>
    </tr>
    <tr>
      <td valign="baseline" align="right" nowrap="nowrap"><MMString:loadString id="TagLibraries/HTML/font/text/Color" /> </td>
      <td nowrap="nowrap">
        <input type="mmcolorbutton" name="colorColorPicker" value="" onChange="updateUI('colorColorPicker')"> 
        <input name="thecolor" type="text" class="smallTField" id="html:font:color" onBlur="updateUI('color')" value="" attname="color">
        <img src="../../Shared/MM/Images/transparent.gif" width="10" height="1"> <!-- spacer - do not remove --> 
      </td>
    </tr>
  </table> 
</div> 
<div MMString:name="TagLibraries/HTML/font/div/name/Style"> 
  <table border="0" cellspacing="4">
    <tr>
      <td valign="baseline" align="right" nowrap="nowrap"><MMString:loadString id="TagLibraries/HTML/font/text/Class" /> </td>
      <td nowrap="nowrap">
        <input name="theclass" type="text" class="basicTextField" id="attr:acronym:class" attname="class" />
      </td>
    </tr>
    <tr>
      <td valign="baseline" align="right" nowrap="nowrap"><MMString:loadString id="TagLibraries/HTML/font/text/ID" /> </td>
      <td nowrap="nowrap">
        <input name="theid" type="text" class="medTField" id="attr:acronym:id" attname="id" />
      </td>
    </tr>
    <tr>
      <td valign="baseline" align="right" nowrap="nowrap"><MMString:loadString id="TagLibraries/HTML/font/text/Style" /> </td>
      <td nowrap="nowrap">
        <input name="thestyle" type="text" class="basicTextField" id="attr:acronym:class" attname="style" />
      </td>
    </tr>
    <tr>
      <td valign="baseline" align="right" nowrap="nowrap"><MMString:loadString id="TagLibraries/HTML/font/text/Title" /> </td>
      <td nowrap="nowrap">
        <input name="thetitle" type="text" class="basicTextField" id="attr:acronym:title" attname="title" />
      </td>
    </tr>
  </table> 
</div>
<div MMString:name="TagLibraries/HTML/font/div/name/Language"> 
  <table border="0" cellspacing="4">
    <tr>
      <td valign="baseline" align="right" nowrap="nowrap"><MMString:loadString id="TagLibraries/HTML/font/text/Direction" /> </td>
      <td nowrap="nowrap">
        <select name="thedir" class="dirLangList" id="attr:acronym:dir" attname="dir"> 
        </select>
      </td>
    </tr>
    <tr>
      <td align="right" nowrap="nowrap"></td>
      <td nowrap="nowrap"></td>
    </tr>
    <tr>
      <td valign="baseline" align="right" nowrap="nowrap"><MMString:loadString id="TagLibraries/HTML/font/text/Language" /> </td>
      <td nowrap="nowrap">
        <select name="thelang" class="dirLangList" id="attr:acronym:lang" attname="lang" editable="true"> 
        </select>
      </td>
    </tr>
  </table>
</div>
</body>
</html>
