
if(window.navigator.userAgent.indexOf("Firefox")>=1)
	var bDebug = true;
else
	var bDebug = false;

var zbOptions=
{
};
function $ieHomePage()
{
  return external.GetIEHomePage();
}
zbOptions.pages=
{
};
zbOptions.pages.general=
{
  type:"page",items:[
  {
    type:"header",html:$lang("su_homepage")
  }
  ,
  {
    type:"textarea",id:"su_homepage",key:"HomePage",section:"Startup",defaultValue:$ieHomePage(),tagx:'style="width: 400px;height: 55px;"'
  }
  ,
  {
    type:"html",html:'<div class="item"><a href="javascript:;" onclick="zbOptions.pages.general.setHomePage(\'about:blank\')">'+$lang("su_home_blank")+'</a> &nbsp;&nbsp; <a href="javascript:;" onclick="zbOptions.pages.general.setIEHomePage()">'+$lang("su_home_ie")+"</a></div>"
  }
  ,
  {
    type:"hr"
  }
  ,
  {
    type:"checkbox",id:"su_no_start_page",key:"NoStartPageOnExternalCall",section:"Startup",defaultValue:"1"
  }
  ,
  {
    type:"checkbox",id:"gen_check_default",key:"CheckDefaultBrowser",section:"Startup",defaultValue:"1"
  }
  ,
  {
    type:"html",html:'<div class="item indent"><a href="javascript:;" onclick="zbOptions.pages.general.setDefaultBrowser(true);">'+$lang("gen_default_browser")+'</a> &nbsp; <a href="javascript:;" onclick="zbOptions.pages.general.setDefaultBrowser(false);">'+$lang("gen_un_default_browser")+"</a></div>"
  }
  ,
  {
    type:"hr"
  }
  ,
  {
    type:"textbox",id:"gen_page_zoom",key:"GlobalZoom",section:"General",defaultValue:"100",pre:$lang("gen_page_zoom"),suf:"%",tagx:'style="width: 28px; text-align: center;" maxlength="4"'
  }
  ,
  {
    type:"hr"
  }
    ,
  {
    type:"checkbox",id:"close_fav",key:"closefav",section:"Advanced",defaultValue:"0"
  }
  ]   
};



zbOptions.pages.tab=
{
  type:"page",items:[
  {
    type:"radio",id:"tab_button_style",key:"ButtonStyle",section:"Tabs",defaultValue:"2",choices:[
    {
      value:"1",html:$lang("tab_style_auto")
    }
    ,
    {
      value:"2",html:$lang("tab_style_fixed")
    }
    ]
  }
  ,
  {
    type:"hr"
  }
    ,
  {
    type:"checkbox",id:"tab_color_tab",key:"UserColorTab",section:"Tab",defaultValue:"1"
  }
   ,
  {
    type:"checkbox",id:"tab_new_style",key:"NewStyle",section:"Tab",defaultValue:"1"
  } 
   ,
  {
    type:"checkbox",id:"tab_no_gray",key:"IconGray",section:"Tab",defaultValue:"0"
  } 
  ,
  {
    type:"hr"
  }
  ,
  {
    type:"checkbox",id:"tab_newTips",key:"UseNewTips",section:"Advanced",defaultValue:"1"
  } 
  ,
  {
    type:"hr"
  }

  ,
  {
    type:"checkbox",id:"tab_nosound",key:"DisableTabControlSound",section:"Advanced",defaultValue:"1"
  }
  ,
  {
    type:"checkbox",id:"tab_drag_tab",key:"DragTab",section:"Advanced",defaultValue:"0"
  }
  ,
   {
    type:"checkbox",id:"tab_bar_close",key:"BarClose",section:"Advanced",defaultValue:"0"
  }
   ,
  {
    type:"checkbox",id:"tab_scroll_on_right",key:"TabScrollOnRight",section:"Advanced",defaultValue:"0"
  }
  , 
  {
    type:"hr"
  }

//  ,
//  {
//    type:"checkbox",id:"tab_tab_on_bottom",key:"TabOnBottom",section:"Tabs",defaultValue:"0"
//  }
  ,
  {
    type:"checkbox",id:"tab_bold_active",key:"BoldActive",section:"Tabs",defaultValue:"0"
  }
  ,
  {
    type:"checkbox",id:"tab_ctrl_arrow",key:"CtrlArrowSwitchTab",section:"Tabs",defaultValue:"0"
  }
  ,
  {
    type:"checkbox",id:"tab_mouse_switch",key:"MouseWheelSwitchTab",section:"Tabs",defaultValue:"0"
  }  
  ,
  {
    type:"hr"
  }
  ,
  {
    type:"radio",id:"tab_close_button",key:"TabCloseButton",section:"Tabs",defaultValue:"1",choices:[
    {
      value:"0",html:$lang("tab_cb_none")
    }
    ,
    {
      value:"1",html:$lang("tab_cb_active")
    }
    ,
    {
      value:"2",html:$lang("tab_cb_all")
    }
    ]
  }
  
  ,
  {
    type:"hr"
  }
  ,
  {
    type:"radio",id:"tab_new_button",key:"TabNewButton",section:"Tabs",defaultValue:"2",choices:[
    {
      value:"0",html:$lang("tab_new_none")
    }
    ,
    {
      value:"1",html:$lang("tab_new_left")
    }
    ,
    {
    	value:"2",html:$lang("tab_new_right")
    }    
    ]
  }
  ,
  {
    type:"radio",id:"tab_close_act",key:"ActiveAfterTabClose",section:"Tabs",defaultValue:"2",choices:[
    {
      value:"0",html:$lang("tab_ca_left")
    }
    ,
    {
      value:"1",html:$lang("tab_ca_right")
    }
    ,
    {
      value:"2",html:$lang("tab_ca_last")
    }
    ]
  }
  ,
  {
    type:"hr"
  }
  ,
  {
    type:"radio",id:"tab_new_behavior",key:"NewTabMode",section:"Tabs",defaultValue:"blank",disabled:true,choices:[
    ]
  }
  ,
  {
    type:"checkbox",id:"tab_new_on_next",key:"NewTabOnNext",section:"Tabs",defaultValue:"1"
  }
  ,
  {
    type:"checkbox",id:"tab_new_reuse_blank",key:"NewTabReuseBlank",section:"Tabs",defaultValue:"1"
  }
  ,
  {
    type:"hr"
  }
  ,
  {
    type:"html",html:'<table cellpadding="0" cellspacing="0" border="0"><tr><td width="50%" valign="top">'
  }
  ,
  {
    type:"header",html:$lang("tab_new")
  }
  ,
  {
    type:"checkbox",id:"tab_new_addr",key:"NewFromAddressBar",section:"Tabs",defaultValue:"1"
  }
  ,
  {
    type:"checkbox",id:"tab_new_search",key:"NewFromSearch",section:"Tabs",defaultValue:"1"
  }
  ,
  {
    type:"checkbox",id:"tab_new_fav",key:"NewFromFavorites",section:"Tabs",defaultValue:"1"
  }
  ,
  {
    type:"checkbox",id:"tab_new_history",key:"NewFromHistroy",section:"Tabs",defaultValue:"1"
  }  
  ,
  {
    type:"html",html:'<td valign="top">'
  }
  ,
  {
    type:"header",html:$lang("tab_activate")
  }
  ,
  {
    type:"checkbox",id:"tab_act_bars",key:"ActivateTabFromInputBar",section:"Tabs",defaultValue:"1"
  }
  ,
  {
    type:"checkbox",id:"tab_act_fav_hist",key:"ActivateTabFromFavHist",section:"Tabs",defaultValue:"1"
  }
  ,
  {
    type:"checkbox",id:"tab_act_undo",key:"ActivateTabFromUndo",section:"Tabs",defaultValue:"1"
  }
  ,
  {
    type:"checkbox",id:"tab_act_click",key:"ActivateTabFromClick",section:"Tabs",defaultValue:"0"
  }
  ,
  {
    type:"checkbox",id:"tab_act_mid",key:"ActivateTabFromMidButton",section:"Tabs",defaultValue:"0"
  }
  ,
  {
    type:"checkbox",id:"tab_act_dd",key:"ActivateTabFromDragDrop",section:"Tabs",defaultValue:"0"
  }
  ,
  {
    type:"html",html:"</tr></table><br/>"
  }
  ]
};



zbOptions.pages.content_control=
{
	type:"page",items:[
  {
    type:"checkbox",id:"gen_disable_image",key:"DisableImage",section:"General",defaultValue:"0"
  }
  ,
  {
    type:"checkbox",id:"gen_disable_script",key:"DisableScript",section:"General",defaultValue:"0"
  }
  ,
  {
    type:"checkbox",id:"gen_disable_gif",key:"DisableGif",section:"General",defaultValue:"0"
  }
  ,
  {
    type:"checkbox",id:"gen_disable_flash",key:"DisableFlash",section:"General",defaultValue:"0"
  }
  ,
  {
    type:"checkbox",id:"gen_disable_sound",key:"DisableSound",section:"General",defaultValue:"0"
  }
  ,
  {
    type:"checkbox",id:"gen_disable_activex",key:"DisableActiveX",section:"General",defaultValue:"0"
  }
  ]
}

zbOptions.pages.nav=
{
  type:"page",items:[
  {
    type:"header",html:$lang("nav_quick_complete")
  }
  ,
  {
    type:"html",html:'<table cellpadding="4" cellspacing="0" border="0" class="item">'
  }
  ,
  {
    type:"textbox",id:"nav_qc_c_p",key:"CtrlEnterP",section:"Navigation",defaultValue:"http://www.",noWrapper:true,tagx:' style="width:auto;"',pre:'<tr><td align="right">Ctrl+Enter</td><td>=</td><td>',suf:"</td><td> + "+$lang("url")+" +</td><td>"
  }
  ,
  {
    type:"textbox",id:"nav_qc_c_s",key:"CtrlEnterS",section:"Navigation",defaultValue:".com",noWrapper:true,tagx:' style="width:auto;"',suf:"</td></tr>"
  }
  ,
  {
    type:"textbox",id:"nav_qc_s_p",key:"ShiftEnterP",section:"Navigation",defaultValue:"http://www.",noWrapper:true,tagx:' style="width:auto;"',pre:'<tr><td align="right">Shift+Enter</td><td>=</td><td>',suf:"</td><td> + "+$lang("url")+" +</td><td>"
  }
  ,
  {
    type:"textbox",id:"nav_qc_s_s",key:"ShiftEnterS",section:"Navigation",defaultValue:".net",noWrapper:true,tagx:' style="width:auto;"',suf:"</td></tr>"
  }
  ,
  {
    type:"textbox",id:"nav_qc_cs_p",key:"CtrlShiftEnterP",section:"Navigation",defaultValue:"http://www.",noWrapper:true,tagx:' style="width:auto;"',pre:'<tr><td align="right">Ctrl+Shift+Enter</td><td>=</td><td>',suf:"</td><td> + "+$lang("url")+" +</td><td>"
  }
  ,
  {
    type:"textbox",id:"nav_qc_cs_s",key:"CtrlShiftEnterS",section:"Navigation",defaultValue:".com.cn",noWrapper:true,tagx:' style="width:auto;"',suf:"</td></tr>"
  }
  ,
  {
    type:"html",html:"</table>"
  }
  ]
};

zbOptions.pages.search=
{
  type:"page",items:[
  {
    type:"checkbox",id:"srch_quick_search",key:"QuickSearch",section:"Search",defaultValue:"1"
  }
  ,
  {
    type:"checkbox",id:"srch_auto_highlight",key:"AutoHighlight",section:"Search",defaultValue:"1"
  }
  ,
  {
    type:"textbox",id:"srch_max_history",key:"MaxSearchHistory",section:"Search",defaultValue:"20",pre:$lang("srch_max_history"),tagx:'style="width: 32px; text-align: center;" maxlength="4"'
  }
  ,
  {
    type:"hr"
  }
  ,
  {
    type:"header",html:$lang("srch_list")
  }
  ,
  {
    type:"checkbox",id:"srch_server_list",key:"SearchServerList",section:"Search",defaultValue:"1"
  }
  ,
  {
    type:"checkbox",id:"srch_alt_addr_search",key:"AltQuickSearch",section:"Search",suf:"<br/><br/>"
  }
  ,
  {
    type:"html",html:'<div id="searchTable_wrapper"></div>'
  }
  ]
};

zbOptions.pages.update=
{
  type:"page",items:[
  
  {
    type:"radio",id:"su_check_update",key:"CheckUpdate",section:"Startup",defaultValue:"0",choices:[
    {
      value:"0",html:$lang("su_cu_auto")
    }
    ,
    {
      value:"1",html:$lang("su_cu_down")
    }
    ,
    {
      value:"2",html:$lang("su_cu_check")
    }
    ]
  }
  ]
}

zbOptions.pages.safety=
{
  type:"page",items:[
  {
    type:"checkbox",id:"saf_clean_upon_close",key:"CleanUponClose",section:"Safety",defaultValue:"0"
  }
  ,
  {
    type:"html",html:'<div class="indent">'
  }
  ,
  {
    type:"checkbox",id:"saf_clean_undo",key:"CleanUndo",section:"Safety",defaultValue:"0"
  }
  ,
  {
    type:"checkbox",id:"saf_clean_history",key:"CleanHistory",section:"Safety",defaultValue:"0"
  }
  ,
  {
    type:"checkbox",id:"saf_clean_address",key:"CleanAddress",section:"Safety",defaultValue:"0"
  }
  ,
  {
    type:"checkbox",id:"saf_clean_search",key:"CleanSearch",section:"Safety",defaultValue:"0"
  }
  ,
  {
    type:"checkbox",id:"saf_clean_rss",key:"CleanRssHistory",section:"Safety",defaultValue:"0"
  }
  ,
  {
    type:"checkbox",id:"saf_clean_cookies",key:"CleanCookies",section:"Safety",defaultValue:"0"
  }
  ,
  {
    type:"checkbox",id:"saf_clean_cache",key:"CleanCache",section:"Safety",defaultValue:"0"
  }
  ,
  {
    type:"html",html:"</div>"
  }
  ]
};


zbOptions.pages.general.setHomePage=function(B)
{
  var A=$id("su_homepage");
  if(A)
  {
    A.value=B;
    if(bDebug!=true)
    	A.fireEvent("onchange")
  }
  else
  {
    alert("No object: su_homepage")
  }
};

zbOptions.pages.general.setIEHomePage=function()
{
	var ie = external.GetIEHomePage();
	
  var A=$id("su_homepage");
  if(A)
  {
    A.value=ie;
    if(bDebug!=true)
    	A.fireEvent("onchange")
  }
  else
  {
    alert("No object: su_homepage")
  }
};


zbOptions.pages.general.setDefaultBrowser=function(bSet)
{
	external.SetDefaultBrowser(bSet);
}