/////*Фильтры-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(){
em1 = 'pajero'; em2 = '.us'; em3 = '@';
document.write('<a href="/">PAJERO.US</a> &nbsp; <a href'+'=mailto:'+em1+em3+em1+em2+'>'+em1+em3+em1+em2+'</a>');
}
////////////////////////////////////////////////////////////////////////////////
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>");
}}
/// Книги //////........////////////////////////////////////////////////////////
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='Увеличить изображение';}
}*/

/// 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
