// +------------------------------------------------------------+ // | Style Editor(for MenuG3/G3.1) Last Modified 05-Nov-2002 | // | Web Site: http://www.yxScripts.com | // | EMail: m_yangxin@hotmail.com | // +------------------------------------------------------------+ // | Copyright 2002 Xin Yang All Rights Reserved. | // +------------------------------------------------------------+ var inputBox=null, inputBox2=null, curItem=null; var colors=new Array("#ffcccc", "#ffcccc", "#ccffcc", "#ccffcc", "#6699cc", "#6699cc"); var colorTitles=new Array("red", "red", "green", "green", "blue", "blue"); addMenu("yxFunc", "funcTop"); addInfo("funcTop", "www.yxScripts.com", ""); addSubMenu("funcTop", "Style Editor", "", "", "styleFunc", ""); addCommand("styleFunc", "Show Styles", "", "showStyle()", ""); addCommand("styleFunc", "Pad Style", "", "showPad()", ""); addCommand("styleFunc", "Item Style", "", "showItem()", ""); addCommand("styleFunc", "Font Style", "", "showFont()", ""); addCommand("styleFunc", "Separator Style", "", "showSeparator()", ""); addMenu("yxStyle", "styleTop"); addInfo("styleTop", "Sample Menu", ""); addSeparator("styleTop"); addLink("styleTop", "Hocus Pocus, out of focus", "", "", ""); addLink("styleTop", "Hocus Pocus, out of", "", "", ""); addSubMenu("styleTop", "Hocus Pocus, out", "", "", "styleSub", ""); addLink("styleTop", "Hocus Pocus", "", "", ""); addLink("styleTop", "Hocus", "", "", ""); addLink("styleSub", "Hocus Pocus, out of focus", "", "", ""); addSeparator("styleSub"); addLink("styleSub", "Hocus Pocus, out of", "", "", ""); addLink("styleSub", "Hocus Pocus, out", "", "", ""); addLink("styleSub", "Hocus Pocus", "", "", ""); addLink("styleSub", "Hocus", "", "", ""); endMenu(); addStylePad("funcPad",1,1,"#ffffff",1,"solid","#000000",-4,-4); addStyleItem("funcItem",150,12,2,1,"solid","solid","#000000","#000000","#f9f9f9","#cccccc","",-1); addStyleFont("funcFont","verdana",12,"normal","italic","#000000","#000000","left"); addStyleTag("funcTag", "on", imagePath, "tagRN.gif", "tagRN.gif", 8, 11, "right"); addStyleMenu("funcMenu", "funcPad", "funcItem", "funcFont", "funcTag", ""); addStyleGroup("funcStyle", "funcMenu", "funcTop", "styleFunc"); function buildMenu() { yx_sMenus[0].sItem=new yx_sItemOBJ("",0,6,1,0,"","","","","#c0c0c0","#000080","",0); addInstance("yxFunc","yxFunc", "static", "absolute", "", "", "left", "top", 24, 24, "pad", "right-down", "show", "", "funcStyle", "sticky"); addInstance("yxStyle","yxStyle", "static", "absolute", "", "", "left", "top", 360, 20, "pad", "right-down", "show", "", "", "sticky"); inputBox=yx_makeLayer(20,150,null,"hidden",1000); inputBox2=yx_makeLayer(30,160,null,"hidden",1001); } function hideForm() { yx_hideLayer(inputBox); yx_hideLayer(inputBox2); } function hideForm2() { yx_hideLayer(inputBox2); } function pickColor(title,item) { curItem=item; var cc=(item.value=="")?"#cccccc":item.value; inputBox2.innerHTML=colorForm(title,cc); yx_showLayer(inputBox2); } function pickBorder(title,item) { curItem=item; inputBox2.innerHTML=borderForm(title); yx_showLayer(inputBox2); } function pickAction(title,item) { curItem=item; inputBox2.innerHTML=actionForm(title); yx_showLayer(inputBox2); } function pickFont(title,item) { curItem=item; inputBox2.innerHTML=faceForm(title); yx_showLayer(inputBox2); } function pickWeight(title,item) { curItem=item; inputBox2.innerHTML=weightForm(title); yx_showLayer(inputBox2); } function pickStyle(title,item) { curItem=item; inputBox2.innerHTML=shapeForm(title); yx_showLayer(inputBox2); } function pickAlign(title,item) { curItem=item; inputBox2.innerHTML=alignForm(title); yx_showLayer(inputBox2); } function selectIt(n,t,i) { return ' '; } function borderForm(t) { return '
'+t+'
    
'; } function actionForm(t) { return '
'+t+'
   
'; } function faceForm(t) { return '
'+t+'
    
    
'; } function weightForm(t) { return '
'+t+'
   
'; } function shapeForm(t) { return '
'+t+'
   
'; } function alignForm(t) { return '
'+t+'
    
'; } function colorForm(t,v) { return '
'+t+'
 


  
'; } function styleForm(content) { return '
Menu Styles
'; } function padForm() { return '
Pad Style
 Padding Width:  
 Padding Height:  
 Pad Color:  '+selectIt("Color","Pad Color",2)+'
 Border Size:  
 Border Style:  '+selectIt("Border","Border Style",5)+'
 Border Color:  '+selectIt("Color","Border Color",7)+'
 Pad Offset X:  
 Pad Offset Y:  
  
'; } function itemForm() { return '
Item Style
 Item Width:  
 Padding Width:  
 Padding Height:  
 Border Size:  
 Border Style(Normal):  '+selectIt("Border","Border Style(Normal)",4)+'
 Border Style(Highlighted):  '+selectIt("Border","Border Style(Highlighted)",6)+'
 Border Color(Normal):  '+selectIt("Color","Border Color(Normal)",8)+'
 Border Color(Highlighted):  '+selectIt("Color","Border Color(Highlighted)",10)+'
 Item Color(Normal):  '+selectIt("Color","Item Color(Normal)",12)+'
 Item Color(Highlighted):  '+selectIt("Color","Item Color(Highlighted)",14)+'
 Sub-Menu Trigger:  '+selectIt("Action","Sub-Menu Trigger",16)+'
 Item Distance:  
  
'; } function fontForm() { return '
Font Style
 Font Type:  '+selectIt("Font","Font Type",0)+'
 Font Size:  
 Font Weight:  '+selectIt("Weight","Font Weight",3)+'
 Font Style:  '+selectIt("Style","Font Style",5)+'
 Font Color(Normal):  '+selectIt("Color","Font Color(Normal)",7)+'
 Font Color(Highlighted):  '+selectIt("Color","Font Color(Highlighted)",9)+'
 Font Alignment:  '+selectIt("Align","Font Alignment",11)+'
  
'; } function separatorForm() { return '
Separator Style
 Separator Style:  '+selectIt("Border","Separator Style",0)+'
 Separator Color:  '+selectIt("Color","Separator Color",2)+'
 Separator Size:  
  
'; } function showPad() { inputBox.innerHTML=padForm(); yx_showLayer(inputBox); } function showItem() { inputBox.innerHTML=itemForm(); yx_showLayer(inputBox); } function showFont() { inputBox.innerHTML=fontForm(); yx_showLayer(inputBox); } function showSeparator() { inputBox.innerHTML=separatorForm(); yx_showLayer(inputBox); } function _clearMenu(menu) { for (var i=0; i