using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class ctrls_head : System.Web.UI.UserControl
{
	private string title;
	public string Title
	{
		get{ return title; }
		set{ title = value;}
	}

	private bool showbanner = true;
	public bool ShowBanner
	{
		get{ return showbanner; }
		set{ showbanner = value;}
	}

    private string keywords;
    public string Keywords
    {
        get { return keywords; }
        set { keywords = value; }
    }

    private string describe;
    public string Describe
    {
        get { return describe; }
        set { describe = value; }
    }

	private Ycbw.Data.OleDbClient r;
	public Ycbw.Data.OleDbClient R
	{
        set { this.r = value; }
	}

    protected void Page_Load(object sender, EventArgs e)
    {
		try
		{
			r = (Ycbw.Data.OleDbClient)Parent;
		}
		catch
		{
			r = new Ycbw.Data.OleDbClient();
		}

		//title
		if( title != null && title != "" )
			title += " - ";
			
		title += r.Configuration["title"].ToString();
			
		//seo
		if( describe == null || describe == "" )
			describe = r.Configuration["description"].ToString();		//  ConfigurationSettings.AppSettings["description"];

		if( keywords == null || keywords == "" )
			keywords = r.Configuration["keywords"].ToString();		//ConfigurationSettings.AppSettings["keywords"];
			
		if( showbanner )
			panel1.Visible = true;
		else
			panel2.Visible = true;
    }
}
