cb='b0';

function over(buttonname){
eval('window.document.'+buttonname).src=(eval('window.document.'+buttonname).src).substr(0,(eval('window.document.'+buttonname).src).length-5)+'1.gif';
}
function out(buttonname){
eval('window.document.'+buttonname).src=(eval('window.document.'+buttonname).src).substr(0,(eval('window.document.'+buttonname).src).length-5)+'0.gif';
}
function over2(buttonname){
buttonname.src=(buttonname.src).substr(0,(buttonname.src).length-5)+'1.gif';

}
function out2(buttonname){
buttonname.src=(buttonname.src).substr(0,(buttonname.src).length-5)+'0.gif';
}

function over3(buttonname){
if (cb!=buttonname){eval('window.document.'+buttonname).src=eval('window.document.'+buttonname+'_1').src};
}

function out3(buttonname){
if (cb!=buttonname){eval('window.document.'+buttonname).src=eval('window.document.'+buttonname+'_0').src};
}

function closewindow(){
//if(window_name_img_number_old>0){window_handle_img[window_name_img_number_old].close();}
}

if (!((navigator.appName=='Netscape') & (navigator.appVersion.substr(0,1)<='4'))){
 document.write('\
<style>\
.field,.button {\
	font-size:8pt;\
	font-family : Tahoma;\
    margin:0px;\
    padding: 1px 0px 0px 5px;\
	color: #8ec5ff;\
}\
.field {\
    color: #021176;\
    border: #bdbdbd solid 1px;\
}\
.button{\
    color: #ffffff;\
	bbackground-color : #059de8;\
    border: #bdbdbd solid 1px;\
}\
.tobasket{\
	border:0px;\
	cursor:hand;\
}\
</style>\
 ');
}


var is_open_submenu=new Array();
var opencloseimg=new Array();
opencloseimg[0]=new Image();
opencloseimg[1]=new Image();
opencloseimg[0].src='img/minus.gif';
opencloseimg[1].src='img/plus.gif';
function openclose(m_id){
 if (typeof(is_open_submenu[m_id]) == 'undefined'){
  is_open_submenu[m_id]=true;
 }

 if (is_open_submenu[m_id]){
  eval('window.document.img'+m_id).src=opencloseimg[0].src;
  eval('window.document.img'+m_id).alt='-';
  document.getElementById('submenu'+m_id).style.display='block';
  is_open_submenu[m_id]=false;
 }else{
  eval('window.document.img'+m_id).src=opencloseimg[1].src;
  eval('window.document.img'+m_id).alt='+';
  document.getElementById('submenu'+m_id).style.display='none';
  is_open_submenu[m_id]=true;
 }
return false;
}


var php_part="<? include('config.php');?>";
var title_img="<?print$sitename?>";
var bgcolor_img="ffffff";
var window_name_img="img_<?print$sitenameshort?>";
var window_handle_img;
var filename_img;
var title_img;
var width_img_auto=600;
var height_img_auto=400;
var scrollbars_img_auto='no';
var window_is_open=false;

function open_img_window (user_filename_img, userwidth_img, userheight_img, userscrollbars_img,usertitle_img) {
filename_img=user_filename_img;
width_img=width_img_auto;
height_img=height_img_auto;
scrollbars_img=scrollbars_img_auto;
resize_img_auto=1;
if (usertitle_img>''){}else{usertitle_img='';}
if ((userwidth_img>40)&(userheight_img>40)){
 width_img=userwidth_img;
 height_img=userheight_img;
 resize_img_auto=0;
 }

if (userscrollbars_img>''){scrollbars_img=userscrollbars_img;};
window_handle_img = window.open("",window_name_img, "menubar=no,directories=no,location=no,resizable=no,scrollbars="+scrollbars_img+",width="+width_img +",height="+height_img+",left="+((screen.width-width_img)/2)+",top="+((screen.height-height_img-56)/2));
window_handle_img.document.open();
window_handle_img.document.write('                                                            \
<html>                                                                                        \
 <head>                                                                                       \
  <meta http-equiv="Content-Type" content="text/html; charset=windows-1251">                  \
  <meta http-equiv="Content-Language" content="ru">                                           \
  <title>'+usertitle_img+' '+title_img+'</title>                                              \
  <link rel="stylesheet" type="text/css" href="main.css">                                     \
  <script language="JavaScript">                                                              \
var resize_img_auto='+resize_img_auto+';                                                      \
function resizewindow(){                                                                      \
/*window.document.title=window.document.img.width+\' \'+window.document.img.height;*/         \
self.resizeTo((window.document.img.width+10),(window.document.img.height+48));                \
self.moveTo(                                                                                  \
(screen.width-window.document.img.width-10)/2,                                                \
(screen.height-window.document.img.height-68)/2);}                                            \
  </script>                                                                                   \
 </head>                                                                       				  \
                                                                                              \
 <body bgcolor="#'+bgcolor_img+'" topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0 marginwidth=0 marginheight=0  onload="if (resize_img_auto==1){self.resizeTo((window.document.img.width+10),(window.document.img.height+48));self.moveTo((screen.width-window.document.img.width-10)/2,(screen.height-window.document.img.height-68)/2);openwnd=setTimeout(\'resizewindow();\',500);}else{self.resizeTo(('+width_img+'+10),('+height_img+'+48));self.moveTo((screen.width-'+width_img+'-10)/2,(screen.height-'+height_img+'-68)/2);}">                            \
                                                                                              \
<table width=1000 height=768 border=0 cellpadding=0 cellspacing=0 width=100% height=100%>     \
 <tr>                                                                                         \
  <td align=left valign=top><a href="JavaScript:window.close();" title="close"><img src="'+filename_img+'" alt="close" border=0 name=img></a><!--br>'+usertitle_img+'<br-->                                          \
  </td>                                                                                       \
 </tr>                                                                                        \
</table>                                                                                      \
                                                                                              \
 </body>                                                                                      \
</html>');
window_handle_img.document.close();
window_handle_img.focus();
window_is_open=true;
}









var title_html="<?print$sitename?>";
var bgcolor_html="ffffff";
var window_name_html="html_<?print$sitenameshort?>";
var window_handle_html;
var filename_html;
var width_html_auto=600;
var height_html_auto=400;
var scrollbars_html_auto='yes';

function open_html_window (user_filename_html, userwidth_html, userheight_html,userscrollbars_html) {
filename_html=user_filename_html;
width_html=width_html_auto;
height_html=height_html_auto;
scrollbars_html=scrollbars_html_auto;

if (userwidth_html>40){width_html=userwidth_html;};
if (userheight_html>40){height_html=userheight_html;};
if (userscrollbars_html>''){scrollbars_html=userscrollbars_html;};

window_handle_html = window.open(filename_html,window_name_html,"menubar=no,directories=no,location=no,resizable=no,scrollbars="+scrollbars_html+",width="+width_html +",height="+height_html+",left="+((screen.width-width_html)/2)+",top="+((screen.height-height_html-56)/2));
window_handle_html.focus();
return false;
}
