<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=8">
    <meta http-equiv="Content-Language" content="{$default_lang}">
    <meta http-equiv="Content-Type" content="text/html; charset={$charset}">
    <title>{$lang.admin_title_main}{$header.subtitle}</title>
	<link rel="shortcut icon" href="{$server}/favicon.ico" type="image/x-icon">
    {if $script}<script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/{$script}.js"></script>{/if}
    <script language="JavaScript" type="text/javascript" src="{$server}/flash_chat/admin/funcs.js"></script>
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/yahoo.js"></script>
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/treeview.js"></script>
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/location.js"></script>
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/jquery-1.7.2.min.js"></script>
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/rounded-corners.js"></script>
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/colorpicker.js"></script>
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/common.js"></script>
    <script language="JavaScript" type="text/javascript" src="{$server}/include/mp3player/ufo.js"></script>
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/jquery.corner.js"></script>
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/DD_roundies_0.0.2a-min.js"></script>
	<script language="JavaScript" type="text/javascript" src="{$server}{$index_theme_path}/js/jquery.form.js"></script>
	<script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/area-editor.js"></script>
   

    <link rel="stylesheet" type="text/css" href="{$server}{$template_root}/js/jquery/plugins/jquery.jqplot.css">

    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/jquery/excanvas.js"></script>
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/jquery/jquery.tools.min.js"></script>
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/jquery/plugins/jquery.jqplot.js"></script>
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/jquery/plugins/jqplot.categoryAxisRenderer.js"></script>
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/jquery/plugins/jqplot.canvasAxisTickRenderer.js"></script>
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/jquery/plugins/jqplot.canvasTextRenderer.js"></script>
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/jquery/plugins/jqplot.canvasAxisLabelRenderer.js"></script>
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/jquery/plugins/jqplot.barRenderer.js"></script>
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/jquery/plugins/jqplot.dateAxisRenderer.js"></script>
    
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/jquery/plugins/jquery.timers.js"></script>
	
    <script src="{$server}{$template_root}/js/jquery.cookie.js"></script>

    <script language="JavaScript" type="text/javascript">
        var autostart = false;
    </script>
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/jquery-ui.js"></script>
    <script language="JavaScript" type="text/javascript" src="{$server}{$template_root}/js/jquery.tooltip.js"></script>
    <link href="{$server}{$template_root}/css/jquery.tooltip.css" rel="stylesheet" type="text/css" media="screen">
    <link href="{$server}{$template_root}/css/colorpicker.css" rel="stylesheet" type="text/css" media="screen">
    <script language="JavaScript" type="text/javascript">
        var SERVER = "{$server}";
        var TEMPLATE_PATH = "{$site_root}{$template_root}";
		var SITE_ROOT = "{$site_root}";
		var SEO_SITE_ROOT = "{$seo_site_root}";
		var redactor_lang = "{if $redactor_lang}{$redactor_lang}{else}en{/if}";
		var DEMO_MODULE = 0;
    </script>
    <script language="JavaScript" type="text/javascript" src="{$server}/admin/admin_menu.php?js"></script>
    <link href="{$server}{$template_root}/css/style.css" rel="stylesheet" type="text/css">
    <link href="{$server}{$template_root}/css/tabs.css" rel="stylesheet" type="text/css">
    <link href="{$server}/admin/admin_menu.php?css" rel="stylesheet" type="text/css">
	
	{*!customized redactor by dpopenov*}
	<script type="text/javascript" src="{$server}/imp_redactor/redactor.js"></script>
	<link rel="stylesheet" href="{$server}/imp_redactor/css/redactor.css" type="text/css" />
	
    {literal}
    <style>
        #evb { margin: 3px 10px 0 0; white-space: nowrap;}
        #evb_text { float: left; margin-top: 2px;}
        #evb a {display: inline; float: left;}
        #evb img {display: inline; float: left; margin-right: 2px; margin-left: 10px;}
        #evb_switch_btn {float: left;}
        .off_btn {margin: 1px 0 0 12px;width: 16px;height: 16px;font-size: 0px;background: url('{/literal}{$server}{$template_root}{literal}/images/evaluate_switches.png') no-repeat left bottom;}
        .off_btn:hover {background: url('{/literal}{$server}{$template_root}{literal}/images/evaluate_switches.png') no-repeat right bottom;}
        .on_btn {margin: 1px 0 0 12px;width: 16px;height: 16px;font-size: 0px;background: url('{/literal}{$server}{$template_root}{literal}/images/evaluate_switches.png') no-repeat left top;}
        .on_btn:hover {background: url('{/literal}{$server}{$template_root}{literal}/images/evaluate_switches.png') no-repeat right top;}
    </style>

    <script type="text/javascript">
		(function($){
			 $.fn.extend({
				  center: function (options) {
					   var options =  $.extend({ // Default values
							inside:window, // element, center into window
							transition: 0, // millisecond, transition time
							minX:0, // pixel, minimum left element value
							minY:0, // pixel, minimum top element value
							top:10,
							bottom:0,
							left:10,
							right:0,
							opacity:1,
							position:'fixed',
							withScrolling:true, // booleen, take care of the scrollbar (scrollTop)
							vertical:true, // booleen, center vertical
							horizontal:true // booleen, center horizontal
					   }, options);
					   return this.each(function() {
							var props = {position: options.position, opacity: options.opacity};
							if (options.vertical) {
								 var top = ($(options.inside).height() - $(this).outerHeight()) / 2;
								 if (options.withScrolling) top += $(options.inside).scrollTop() || 0;
								 top = (top > options.minY ? top : options.minY);
								 $.extend(props, {top: top+'px'});
							}else{
								if(options.bottom){
									$.extend(props, {bottom: options.bottom+'px'});
									$(this).css({top: 'auto'});
								}else{
									$.extend(props, {top: options.top+'px'});
								}
							}
							if (options.horizontal) {
								  var left = ($(options.inside).width() - $(this).outerWidth()) / 2;
								  if (options.withScrolling) left += $(options.inside).scrollLeft() || 0;
								  left = (left > options.minX ? left : options.minX);
								  $.extend(props, {left: left+'px'});
							}else{
								if(options.right){
									$.extend(props, {right: options.right+'px'});
									$(this).css({left: 'auto'});
								}else{
									$.extend(props, {left: options.left+'px'});
								}
							}
							if (options.transition > 0) $(this).animate(props, options.transition);
							else $(this).css(props);
							return $(this);
					   });
				  }
			 });
		})(jQuery);

        $(document).ready(function() {
            if ($.cookie('evb_btn_on') == 'yes') {
                $('#evb_text').html('<img src="{/literal}{$server}{$template_root}{literal}/images/icon_help.gif" border="0"><a href="http://community.pilotgroup.net/pilotgroup/products/pilotgroup_pg_dating_pro" class="top_menu" target="_blank">Help</a><img src="{/literal}{$server}{$template_root}{literal}/images/icon_tick.gif" border="0"><a href="http://www.pilotgroup.net/questionnaire/feedback.php?fid=76&pid=2061" target="_blank" class="top_menu">Evaluate this product!</a>');
                $('#evb_switch_btn').addClass('off_btn');
            } else if ($.cookie('evb_btn_on') == 'no') {
                $('#evb_text').html('');
                $('#evb_switch_btn').addClass('on_btn');
            } else {
                $.cookie('evb_btn_on', 'yes', {path: '/'});
                $('#evb_switch_btn').addClass('off_btn');
                $('#evb_text').html('<img src="{/literal}{$server}{$template_root}{literal}/images/icon_help.gif" border="0"><a href="http://community.pilotgroup.net/pilotgroup/products/pilotgroup_pg_dating_pro" class="top_menu" target="_blank">Help</a><img src="{/literal}{$server}{$template_root}{literal}/images/icon_tick.gif" border="0"><a href="http://www.pilotgroup.net/questionnaire/feedback.php?fid=76&pid=2061" target="_blank" class="top_menu">Evaluate this product!</a>');
            }
            $('#evb_switch_btn').click (function() {
                if ($.cookie('evb_btn_on') == 'yes') {
                    $.cookie('evb_btn_on', 'no', {path: '/'});
                    $('#evb_switch_btn').removeClass('off_btn');
                    $('#evb_switch_btn').addClass('on_btn');
                    $('#evb_text').html('');
                } else {
                    $.cookie('evb_btn_on', 'yes', {path: '/'});
                    $('#evb_switch_btn').removeClass('on_btn');
                    $('#evb_switch_btn').addClass('off_btn');
                    $('#evb_text').html('<img src="{/literal}{$server}{$template_root}{literal}/images/icon_help.gif" border="0"><a href="http://community.pilotgroup.net/pilotgroup/products/pilotgroup_pg_dating_pro" class="top_menu" target="_blank">Help</a><img src="{/literal}{$server}{$template_root}{literal}/images/icon_tick.gif" border="0"><a href="http://www.pilotgroup.net/questionnaire/feedback.php?fid=76&pid=2061" target="_blank" class="top_menu">Evaluate this product!</a>');
                }
            });
			if ($.browser.msie) {$('#table_right_panel').css('width', '100%');}
			else{$('#table_right_panel').css('width', '100.5%');}			


			$(".tabs li").append('<div class="tobconvleft"/>');
			$(".tabs li").append('<div class="tobconvright"/>');
			$(".show_help").wrap('<div style="display:table;"/>');
			
			var err_type = 'error';
			var error = '{/literal}{$error|escape:"javascript"}{literal}';
			var formerr = '{/literal}{$form.err|escape:"javascript"}{literal}';
			ShowAjaxError(error, formerr, err_type);
			
			$(window).bind('resize', function() {
				$('#warnings-conv').center({vertical: false, top: '2px', transition: 100});
			});
		});

		function ShowAjaxError(error_text, form_error_text, type){
			form_error_text = form_error_text || '';
			if (!(error_text || form_error_text)){
				return false;
			}
			type = type || 'error';
			var top_pos = 10;				
			/* if array - get only 1 error */
			if (error_text instanceof Array || error_text == "Array") {
				error_text = '{/literal}{$error.0|escape:"javascript"}{literal}';
			}
			if (form_error_text instanceof Array || form_error_text == "Array") {
				form_error_text = '{/literal}{$form.err.0|escape:"javascript"}{literal}';
			}
			
			var status_char = form_error_text.charCodeAt(0);
			if(!(status_char >= 17 && status_char <= 20)){
				status_char = error_text.charCodeAt(0);
				if(status_char >= 17 && status_char <= 20){
					error_text = error_text.substr(1);
				}
			}else{
				form_error_text = form_error_text.substr(1);
			}

			switch(status_char){
				case 17: type = 'success'; break;
				case 18: type = 'error'; break;
				case 19: type = 'warning'; break;
				case 20: type = 'info'; break;
			}

			if ( (error_text != '') && (form_error_text !='') ){
				error_text = error_text+' '+form_error_text;
			}else if(error_text == ''){
				error_text = form_error_text;
			}
			
			CloseAjaxError();
			$("<div class='warnings-conv warnings-conv-"+type+"' id='warnings-conv'></div>")
					.appendTo('body')
					.html("<table><tr><td><div class='warnings-icon'></div></td><td><div class='warnings'>"+error_text+"</div></td></tr></table>")
					.click(function(){
						$(this).animate({top: -($(this).outerHeight())+'px', opacity: 0}, 200, function(){$(this).remove();});
					});
			$('#warnings-conv').center({vertical: false, top: -($('#warnings-conv').outerHeight()), opacity: 0});
			$('#warnings-conv').animate({top: '2px', opacity: 1}, 200);

			warn_to = setTimeout("$('#warnings-conv').animate({top: -($('#warnings-conv').outerHeight())+'px', opacity: 0}, 200, function(){$(this).remove();})", 7000);
		}
		
		function CloseAjaxError(animate){
			animate = animate || false;
			if(typeof warn_to !== 'undefined'){
				clearTimeout(warn_to);
			}
			if($('#warnings-conv').length && animate){
				$('#warnings-conv').animate({top: -($('#warnings-conv').outerHeight())+'px', opacity: 0}, 200, function(){$(this).remove();})
			}else{
				$('#warnings-conv').remove();
			}
		}
	</script>
    {/literal}
    
</head>
<body>
	<noscript><div id="no_js">{$lang.no_js}</div></noscript>
	{*pg_include_file=demo_help_admin_menu.html*}
	{if $demo_module eq 1}
		<script>var DEMO_MODULE = 1;</script>
		{include file="$admingentemplates/demo_admin_top_panel2.tpl"}
	{/if}
<div class="body">
    <div class="wrapper">
        <table width="100%" cellpadding="0" cellspacing="0" border="0" style="margin: 0px 0 5px 0;">
            <tr>
				<td valign="top" align="left" colspan="10" height="30px">
                    <div style="overflow:hidden; height:30px;">
                        <div class="top_menu_box">
                            <table cellpadding="0" cellspacing="0" align="right" border="0">
                                <tr>
                                    <td style="padding-right:5px">
                                        <select name="lang_select" onChange="javascript: document.location=this.value;">
										{section name=a loop=$langs_link}
											<option value="{$langs_link[a].link}" {if $default_lang eq $langs_link[a].code}selected{/if}>{$langs_link[a].name}</option>
										{/section}
										</select>
                                    </td>
                                    <td width="8" style="padding-left: 3px;"><img src="{$server}{$template_root}/images/line_10px.gif" alt="" border="0"></td>
                                    <td style="padding-right:5px"><a href="http://community.pilotgroup.net/pilotgroup/products/pilotgroup_pg_dating_pro" target="_blank">Support</a></td>
                                    <td width="8" style="padding-left: 3px;"><img src="{$server}{$template_root}/images/line_10px.gif" alt="" border="0"></td>
                                    <td><a href="{$logoff.link}" class="top_menu" style="color:#f27000;">{$logoff.value}</a></td>
								</tr>
                            </table>
						</div>
                    </div>
				</td>
            </tr>
            <tr>
            {if (!$commit)}
                <td valign="top" align="left" width="215">
                    <div class="left_panel">
			<div style="position: relative; width: 215px;" id="left_menu_bg">
                            <div class="banner_place">
                                <a href="{$server}/admin/index.php" style="border: none;">
                                    <img width="177" height="152" src="{$server}{$template_root}/images/menu/admin_Dating_logo_green.png" alt="" border="0">
				</a>
                            </div>
                            <div id="box">
                            <!--- box border -->
                                <div id="content">
                                    {include file="$admingentemplates/admin_menu.tpl"}
				</div>
                            <!--- end of box border -->
                            </div>
			</div>
                    </div>
		</td>
        {/if}
                {* ############# CENTRAL PANEL ############## *}
		<td valign="top">
			<div id="right_panel" style="background-color:#FFFFFF; border:1px solid #d4d4d4; border-top:5px solid #29B43D;padding:0px 15px 11px 20px;margin-right:5px;">
                    <table border="0" cellpadding="0" cellspacing="0" width="97.5%" height="7" id="table_right_panel">
                        <tr>
                            <td>
                            {if $form.err || $error || $notice}
								<div class="error_message" id="error_message">
                                                    {if $form.err}
                                                        {$form.err}
                                                    {elseif $error}
                                                        {$error}
                                                    {elseif $notice}
                                                        {$notice}
                                                    {/if}
								</div>
                            {/if}