Revision 296 (by ahitrov, 2013/03/26 17:59:01) Promosite (anthill) project source
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title><% $profile->name %></title>
% if ( ref $favicon && exists $favicon->{filename} ) {
<link rel="SHORTCUT ICON" href="<% $favicon->{filename} %>">
% }
<script language="JavaScript">
<!--
function openWin(popup_name,popup_url,popup_with,popup_height)
{
if(!popup_with) {popup_with = 500;}
if(!popup_height) {popup_height = 500;}
	var popup_left = (window.screen.width/2)  - (popup_with/2 + 10);
	var popup_top  = (window.screen.height/2) - (popup_height/2 + 40);
	var fenster = window.open(popup_url,popup_name,"toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=" + popup_with + ",height=" + popup_height + ",left=" + popup_left + ",top=" + popup_top + ",screenX=" + popup_left + ",screenY=" + popup_top);
	fenster.focus();
}

var Browser;
var Width = 0;
var Height = 0;

function R(ths) { _i = new Image(); _i.src = ths; }

function CheckPhotoArc(Id, Width, Height, Threshold)
{
// window.status = "Width = " + Width + "; Height = " + Height;
 if (!Threshold) {
	Threshold = 600;
 }
 for (i=5; i<11; i++) {
        var d='photo_' + Id + '_' +i;
        if (document.all[d] && ((Threshold + i*124) < Width) ) {
                document.all[d].style.display = 'inline';
        }
        else if (document.all[d] && ((Threshold + i*124) >= Width) ) {
                document.all[d].style.display = 'none';
        }
 }

}

function getWindowSize()
{
 Width = (window.innerWidth||document.body.clientWidth);
 Height = (window.innerHeight||document.body.clientHeight);

// window.status = "Width = " + Width + "; Height = " + Height;
% if (exists $request->{photorep} && ref $request->{photorep} eq 'ARRAY' && scalar @{$request->{photorep}}) {
%	foreach my $photorep ( @{$request->{photorep}} ) {
 CheckPhotoArc(<% $photorep->id %>, Width, Height, 100);
%	}
% }elsif ( exists $request->{photorep} && ref $request->{photorep} ne 'ARRAY' ) {
 CheckPhotoArc(<% $request->{photorep}->id %>, Width, Height, 550);
% }
}

-->
</script>
% if ($state->development) {
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
% }
</head>

<link href="/<% $prj %>/css/styles.css" rel="stylesheet" type="text/css">

<body bgcolor="#000000" onLoad="getWindowSize();" onResize="getWindowSize();">

% if ( $profile->top100 ) {
<a href="http://top100.rambler.ru/top100/"><img src="http://counter.rambler.ru/top100.cnt?<% $profile->top100 %>" alt="Rambler's Top100" width=1 height=1 border=0></a><br>
% }
%
% ### Верстка головы
% #########################################################
% if ( $m->comp_exists ("/comps/$prj/block_header.msn") ) {
<& "/comps/$prj/block_header.msn" &>
% } else {
<& /comps/block_header.msn &>
% }
% ### /Верстка головы

% ### Главное меню
% ###################################################################
%#<pre><% Dumper($menus) %></pre>
% if ( ref $menus eq 'ARRAY' && scalar @$menus ) {
%	my $i = 0;
<table cellspacing="0" cellpadding="0" width="100%" border="0">
	<tr>
	<td width="4%"><div style="width: 10px; height: 1px"><spacer height="1" width="10" type="block"></spacer></div></td>
	<td width="92%">
<table border="0" cellspacing="0" cellpadding="0" bgColor="#929292" width="100%" > 
<tr>
<td style="background:url(/i/<% $prj %>/l_l.gif) no-repeat left" width="165"><img src="/i/<% $prj %>/z.gif" width="165" height="1"></td>
<td  class="menu" ><div style="width:600px; padding-left:8px; white-space:nowrap;">
%	foreach my $menu ( @$menus ) {
%		my $href = $menu->{url};
%		my $target;
%		if ( $href && $href =~ /^http:/ ) {
%			$href = 'http://www.rambler.ru/click?from=market_'.$prj.'&_URL='.$href;
%			$target = ' target="_blank"';
%		}
%		my ($a1, $a2) = $href ? ('<a href="'.$href.'"'.$target.' class="topmenu">','</a>') : ('','');
%		my $menuname = $menu->{alias} ? '<img src="/i/'.$prj.'/'.$menu->{alias}.'" alt="'.$menu->{name}.'" height="21" border="0" title="'.$menu->{name}.'">' : $menu->{name};
<% $a1.$menuname.$a2 %>\
%	}
</div></td>
<td style="background:url(/i/<% $prj %>/l_r.gif) no-repeat right;" width="165"><img src="/i/<% $prj %>/z.gif" width="165" height="1"></td>
</tr>
</table></td>
<td width="4%"><div style="width: 10px; height: 1px"><spacer type="block"></div></td>
</tr>
</table>
% }
% ### /Главное меню

<%init>

  my $prj = $request->{project};
  my $profile = $request->{project_profile};
  my $menus = $profile->get_image('menus');
  my $favicon = $profile->get_image('favicon');

</%init>