/////*Фильтры-Images*///////////////////////////////////////////////////////////
/*function highPics(id){
id.className = 'image_filter2';
//id.filters.alpha.opacity=100;
}
function lowPics(id){
id.className = 'image_filter';
//id.filters.alpha.opacity=5;
}*/
//////////*Изображения-Галерея на страницах*////////////////////////////////////
g_c = 0;
ie = document.all;
function g_move(dir) {
g_c = (g_c + dir + g_i.length) % g_i.length;
document.images.gallery_image.src = g_i[g_c];
if(ie) { }
}
////////////////*Галерея-Gallery*///////////////////////////////////////////////
function doPic(imgName) {
document.mainpic.src = imgName;
}
/////////////////*Галерея*//////////////////////////////////////////////////////
function openWin4(img) {
wincode = "<img src='" + img + "'>"
var wincodeW=document.body.clientWidth;
var wincodeH=document.body.clientHeight;
myWin= window.open("", "displayWindow","width="+wincodeW+",height="+wincodeW+",status=no,scrollbars=yes,toolbar=no,menubar=no,resizable=yes");
myWin.document.open();
myWin.document.write("<html><head><title>Галерея</title></head><body><center>");
myWin.document.write(wincode);
myWin.document.write("</center></body></html>");
myWin.document.close();  
}
////////////////////////////////////////////////////////////////////////////////
function showHiddenBlock(id){
id.style.display='block';
}
////////////////////////////////////////////////////////////////////////////////
function ml_to(n){em='pajero'; e=' <a href=mail'+'to:'+em+'@'+em+'.us>'+em+'@'+em+'.us</a>';
m = new Array('&nbsp; <a href="/">PAJERO.US</a> &nbsp;','Нашли неточность в описании или<br>хотите добавить нового дилера?<br>Пишите:');
document.write(m[n]+e);}

function link_to(lnk,txt){
if (lnk==''){document.write("<div align=right class=ads1>"+txt+"</div>");}
else {if (txt==''){txt=lnk;}
document.write("<div align=right class=ads1><a hr"+"ef='ht"+"tp://"+lnk+"' target=_blank>"+txt+"</a></div>");}}
/// CD /////////////////////////////////////////////////////////////////////////
function cdTdImg(idImg){
if (idImg.className == 'cdTdImg1'){idImg.className = 'cdTdImg2';}
else {idImg.className = 'cdTdImg1';}
}
// showBookImg /////////////////////////////////////////////////////////////////
/*function showBookImg(id1, id2, id3){
var pref = 'http://my-shop.ru/_files/product/';
if (id1.src!=pref+id2){
id1.src=pref+id2;
id1.alt='Уменьшить изображение';}
else {
id1.src=pref+id3;
id1.alt='Увеличить изображение';}
}*/
/// addFavorite ////////////////////////////////////////////////////////////////
function add_favorite(a){
url=document.location; 
title=document.title; 
 try { window.external.AddFavorite(url, title); }// Internet Explorer 
  catch (e) {
			try { window.sidebar.addPanel(title, url, ""); }// Mozilla 
    catch (e) {
      if (typeof(opera)=="object") {// Opera 
        a.rel="sidebar"; 
        a.title=title; 
        a.url=url; 
        return true; 
      }
      else { alert('Нажмите Ctrl-D чтобы добавить страницу в закладки'); }// Unknown 
    }
  }
  return false;
}
/// gallOnTop //////////////////////////////////////////////////////////////////
function showGallOnTop(fold,imgName,topText,qImg){
/*document.getElementById('gallOnTopBodyBg').className = 'gallOnTopBodyBg';
document.getElementById('gallOnTopBodyBg').style.height = divBody.offsetHeight;
document.getElementById('gallOnTop2').className = 'gallOnTop2';*/
document.getElementById('pageTop').className = 'pageTop';
document.getElementById('pageTop').style.top=document.body.scrollTop+10+'px';
var prevImg = imgName;
var nextImg = imgName;
prevImg--;
nextImg++;

var str2 ="&nbsp;<a href='javascript:hidePageTop();' title='закрыть' class=gallclose></a>&nbsp;";
if (prevImg>=1){
var str1 ="<a href=\"javascript:showGallOnTop('"+fold+"','"+prevImg+"','"+topText+"','"+qImg+"');\" title='предыдущий' class=gallback></a>";
} else {str1 ="";}

if (nextImg<=qImg){
var str3 ="<a href=\"javascript:showGallOnTop('"+fold+"','"+nextImg+"','"+topText+"','"+qImg+"');\" title='следующий' class=gallnext></a>";
} else {str3 ="";}

pageTop1.innerHTML=("<div class=gallOnTop><img src='"+fold+imgName+".jpg'></div>"+
"<table border=0 align=center class=gallOnTopText><tr><td>"+str1+str2+str3+"</td><td>"+topText+"</td></tr></table>");
}                        
function hidePageTop(){pageTop1.innerHTML=(""); pageTop.className = 'pageTop0';}
//screen.height document.body.clientWidth  document.body.offsetHeight screen.availHeight

/// /////////////////////////////////// /images/bg/rbk.png
function adsright(){
document.write("<div align=right><a hr"+"ef='/id.php?id=rbk' target=_blank><img src='http://rbkmoney.ru/banners/partner.png' width=193 height=63></a></div>");
}