<dl style="height:80px;"></dl>
<!-- Carousel top -->
{if !$carousel_vertical_dir}
	<dl style="overflow:hidden;">
		<dt style="width:159px;">&nbsp;</dt>
		<dt align="{$default_right}" id="section_4" style="width:552px;height:77px; margin-{$default_left}:2px;" class="home_menu border_block {if $data[3] == 'true'}active_section_3{else}noactive_section{/if}">
			<div style="padding-{$default_left}: 5px; padding-{$default_right}: 5px; text-align: {$default_left};">
				<div style="margin-{$default_right}:-7px;margin-top:0px;" class="float_right">	
					<input {if $form.use_carousel eq 0}disabled{/if} type="checkbox" value="1" id="area_3" {if $data[3] == 'true'} checked {/if} onclick="ChangeHome(document.getElementById('home_div'));" />&nbsp;
				</div>
			</div>
		</dt>
	</dl>
{/if}
<dl style="overflow:hidden;{if !$carousel_vertical_dir}{/if}">
	<dt style="width:159px;">&nbsp;</dt>
	<dt align="{$default_right}" id="section_1" style="width:552px;height:218px; margin-{$default_left}:2px;" class="home_menu border_block {if $data[0] == 'true'}active_section_0{else}noactive_section{/if}">
		<div style="padding-{$default_left}: 5px; padding-{$default_right}: 5px; text-align: {$default_left};">
			<div style="margin-{$default_right}:-7px;margin-top:0px;" class="float_right">	
				<input type="checkbox" value="0" id="area_0" {if $data[0] == 'true'} checked {/if} onclick="ChangeHome(document.getElementById('home_div'));" />&nbsp;
			</div>
		</div>
	</dt>
</dl>
<dl style="overflow:hidden;{if !$carousel_vertical_dir}margin-top:-75px;{/if}" >
	<dt style="width:159px;" valign="top">
		<div>
			<!-- shoutbox -->			
			<dl>
				<dd valign="top" id="section_2" style="height:452px;width:157px;" class="home_menu border_block {if $data[1] == 'true'}active_section_1{else}noactive_section{/if}">
					<div class="float_right">
						<input {if $form.use_shoutbox_feature eq 0}disabled{/if} type="checkbox" value="1" id="area_1" name="area_1" {if $data[1] == 'true'} checked{/if} onclick="ChangeHome(document.getElementById('home_div'));" />&nbsp;
					</div>
				</dd>
			</dl>
			<!-- Account info -->
			<dl>
				<dd valign="top" id="section_3" class="border_block {if $data[2] == 'true'}active_section_2{else}noactive_section{/if}" style="height:68px;width:157px;">
					<div class="content content_adult float_right">
						<input type="checkbox" value="1" id="area_2" name="area_2" {if $data[2] == 'true'} checked {/if} onclick="ChangeHome(document.getElementById('home_div'));" />&nbsp;
					</div>
				</dd>
			</dl>
			<!-- Carousel left-->
				{if $carousel_vertical_dir}			
				<dl>
					<dd valign="top" id="section_4" class="border_block {if $data[3] == 'true'}active_section_3{else}noactive_section{/if}" style="height:301px;width:157px;">
						<div class="content content_adult float_right">
							<input {if $form.use_carousel eq 0}disabled{/if} type="checkbox" value="1" id="area_3" name="area_3" {if $data[3] == 'true'} checked {/if} onclick="ChangeHome(document.getElementById('home_div'));" />&nbsp;
						</div>
					</dd>
				</dl>
				{/if}
			<!-- Top members -->
			<dl>
				<dd valign="top" id="section_5" class="border_block {if $data[4] == 'true'}active_section_4{else}noactive_section{/if}" style="height:129px;width:157px;">
					<div class="content content_adult float_right">
						<input type="checkbox" value="1" id="area_4" name="area_4" {if $data[4] == 'true'} checked {/if} onclick="ChangeHome(document.getElementById('home_div'));" />&nbsp;
					</div>
				</dd>
			</dl>
			<!-- Birthday -->
			<dl>
				<dd valign="top" id="section_10" class="border_block {if $data[9] == 'true'}active_section_9{else}noactive_section{/if}" style="height:155px;width:157px;">
					<div class="content content_adult float_right">
						<input type="checkbox" value="1" id="area_9" name="area_9" {if $data[9] == 'true'} checked {/if} onclick="ChangeHome(document.getElementById('home_div'));" />&nbsp;
					</div>
				</dd>
			</dl>
			<!-- News -->
			<dl>
				<dd valign="top" id="section_6" class="border_block {if $data[5] == 'true'}active_section_5{else}noactive_section{/if}" style="height:280px;width:157px;">
					<div class="content content_adult float_right">
						<input type="checkbox" value="1" id="area_5" name="area_5" {if $data[5] == 'true'} checked {/if} onclick="ChangeHome(document.getElementById('home_div'));" />&nbsp;
					</div>
				</dd>
			</dl>
			<!-- Horoscope -->
			<dl>
				<dd valign="top" id="section_11" class="border_block {if $data[10] == 'true'}active_section_10{else}noactive_section{/if}" style="height:114px;width:157px;">
					<div class="content content_adult float_right">
						<input {if $form.use_horoscope_feature eq 0}disabled{/if} type="checkbox" value="1" id="area_10" name="area_10" {if $data[10] == 'true'} checked {/if} onclick="ChangeHome(document.getElementById('home_div'));" />&nbsp;
					</div>
				</dd>
			</dl>
		</div>
	</dt>
	<dt style="width:552px;{if !$carousel_vertical_dir}margin-top:83px;{else}margin-{$default_left}:5px;margin-top:7px;{/if}" valign="top">
		<div>
			<dl>
				<!-- Wall -->
				<dd valign="top" id="section_7" class="float_left border_block {if $data[6] == 'true'}active_section_6{else}noactive_section{/if}" style="height:13px;width:52px;margin-{$default_left}:17px;">
					<div class="content content_adult float_right" style="margin-{$default_right}:-3px;">
						<input type="checkbox" value="1" id="area_6" name="area_6" {if $data[6] == 'true'} checked {/if} onclick="ChangeHome(document.getElementById('home_div'));" />&nbsp;
					</div>
				</dd>
				<!-- General Description -->
				<dd valign="top" id="section_8" class="home_search float_left border_block {if $data[7] == 'true'}active_section_7{else}noactive_section{/if}" style="height:13px;width:91px;">
					<div class="float_right" style="margin-{$default_right}:-3px;">
						<input type="checkbox" value="1" id="area_7" name="area_7" {if $data[7] == 'true'} checked {/if} onclick="ChangeHome(document.getElementById('home_div'));" />&nbsp;
					</div>
				</dd>
				<!-- Multimedia Gallery -->
				<dd valign="top" id="section_9" class="float_left border_block {if $data[8] == 'true'}active_section_8{else}noactive_section{/if}" style="height:13px;width:70px;">
					<div class="content content_adult float_right" style="margin-{$default_right}:-3px;">
						<input type="checkbox" value="1" id="area_8" name="area_8" {if $data[8] == 'true'} checked {/if} onclick="ChangeHome(document.getElementById('home_div'));" />&nbsp;
					</div>
				</dd>
			</dl>
		</div>
	</dt>
</dl>
{literal}
<script type="text/javascript">
function HighLight(section, state) {
	if (document.getElementById('section_'+section)) {
		if (state == 1) {
			setElementOpacity('section_'+section, 0.4);
		} else {
			setElementOpacity('section_'+section, 1.0);
		}
	}
	return;
}

function setElementOpacity(sElemId, nOpacity)
{

  var opacityProp = getOpacityProperty();
  var elem = document.getElementById(sElemId);

  if (!elem || !opacityProp) return; // error

  if (opacityProp=="filter")  // Internet Explorer 5.5+
  {
    nOpacity *= 100;

    var oAlpha = elem.filters['DXImageTransform.Microsoft.alpha'] || elem.filters.alpha;
    if (oAlpha) oAlpha.opacity = nOpacity;
    else elem.style.filter += "progid:DXImageTransform.Microsoft.Alpha(opacity="+nOpacity+")";
  }
  else
    elem.style[opacityProp] = nOpacity;
}

function getOpacityProperty()
{
  if (typeof document.body.style.opacity == 'string') {
    return 'opacity';
  } else if (typeof document.body.style.MozOpacity == 'string') {
    return 'MozOpacity';
  } else if (typeof document.body.style.KhtmlOpacity == 'string') {
    return 'KhtmlOpacity';
  } else if (document.body.filters && navigator.appVersion.match(/MSIE ([\d.]+);/)[1]>=5.5) {
    return 'filter'
  } else {
  	return false;
  }
}

var req = null;

function InitXMLHttpRequest() {
	// Make a new XMLHttp object
	if (window.XMLHttpRequest) {
		req = new XMLHttpRequest();
	} else if (window.ActiveXObject) {
		req = new ActiveXObject("Microsoft.XMLHTTP");
	}
}

function ChangeHome(destination) {
	if(DEMO_MODULE){
		ShowAjaxError('{/literal}{$lang.err.demo_mode|escape:javascript}{literal}', '');
	}else{
		disabled_ids = Array(11);
		{/literal}
		{foreach name=disabled_ids from=$disabled_data_ids item=item}
			disabled_ids[{$smarty.foreach.disabled_ids.iteration}] = {$item};
		{/foreach}
		{literal}
		var statuses = new Array(11);
		var use_shout = {/literal}{$form.use_shoutbox_feature}{literal};
		for (var i=0; i<11; i++) {
			statuses[i] = document.getElementById("area_"+i).checked;
		}
		$.get(
			SEO_SITE_ROOT+"/organizer.php",
			"sel=ajax_req&statuses="+statuses,
			function(resp){
				if(resp.status == 0){
					ShowAjaxError(resp.msg, '');
				}else{ 
					$(destination).html(resp.html);
				}
			},
			'json'
		);
	}
}
</script>
{/literal}