function mp(e){if(document.all){if((event.button==2)||(event.button==3)){alert('Copyright 2004-2006 \© PHPShop\.ru\. All rights reserved\. '); return false}}if(document.layers){if(e.which==3){alert('Copyright 2005 \© ShopBuilder\.ru\. All rights reserved\. '); return false}}}if (document.layers) {document.captureEvents(event.mousedown)}
document.onmousedown=mp;


function do_err(){return true}onerror=do_err;if(window.location.href.substring(0,4)=="file")window.location="about:blank";

function atlpdp1(){for(wi=0;wi<document.all.length;wi++){if(document.all[wi].style.visibility!='hidden'){document.all[wi].style.visibility='hidden';document.all[wi].id='atlpdpst'}}}function atlpdp2(){for (wi=0;wi<document.all.length;wi++){if(document.all[wi].id=='atlpdpst')document.all[wi].style.visibility=''}}window.onbeforeprint=atlpdp1;window.onafterprint=atlpdp2;


// PhpshopButton v1.0
function butt_on(subm){//ON
var MENU = document.all[subm].style;
MENU.background = 'D81011';
}
function butt_of(subm){//OF
var MENU = document.all[subm].style;
MENU.background = '999999';
}

function GetVendor(cat,id,vendor){// Наличие вендора
location.href('./ID_'+cat+'_'+id+'_V'+vendor+'.html');
}

function GetPac(flag){// Наличие упаковки
if(flag==1)
document.getElementById('DosPac').innerHTML="150 руб.";
else
document.getElementById('DosPac').innerHTML="0 руб.";
location.href('#PphpshopCart');
}

function GetPlaceOrder_(place,weight){// Для мелкооптовых
if(place!='Moscow')
document.getElementById('DosSumma').innerHTML="<a href='http://www.garantpost.ru/site/rus/tools/calc.html?count_intra_tariff=1&to_raw="+place+"&from_raw=Moscow&weight_intra="+weight+"' target='_blank'>Стоимость доставки</a>";
else document.getElementById('DosSumma').innerHTML="0 руб.";
location.href('#PphpshopCart');
}

function GetPlaceOrder_1(place,weight){// Для крупногабаритных
if(place!='Moscow')
document.getElementById('DosSumma').innerHTML="<a href='http://gruzovozoff.ru/rus/rates.php' target='_blank' title='Доставка в Центральный Регион Росии'>Стоимость доставки 1</a><br><a href='http://www.jde.ru/common/price.htm' target='_blank' title='Доставка в Дальневосточный Регион Росии'>Стоимость доставки 2</a>";
else document.getElementById('DosSumma').innerHTML="0 руб.";
location.href('#PphpshopCart');
}
// PhpGoToAdmin v1.3
function keyDown() {
var key = window.event.keyCode;
var uid; // Идентификатор счетчика
if(key=='123') location.href('../phpshop/admpanel/');
//if(key=='120') location.href('http://top.phpshop.ru/?xid='+uid);
}
document.onkeydown = keyDown;

// PHPSHOP JavaListCatalog v1.3
// Start Load Modul
function pressbutt_load(subm,dir){
if(!dir) dir='';
var IMG2=dir+'/images/shop/arr3.gif';
if(subm!=''){
var SUBMENU = document.getElementById("m"+subm).style;
SUBMENU.visibility = 'visible';
SUBMENU.position = 'relative';
document.all['i'+subm].src=IMG2;
}
}

// PHPSHOP JavaListCatalog v1.3
// Main Modul
function pressbutt(subm,num,dir){

if(!dir) dir='';

var SUBMENU = document.all['m'+subm].style;
var IMG=dir+'/images/shop/arr2.gif';
var IMG2=dir+'/images/shop/arr3.gif';


if (SUBMENU.visibility=='hidden'){
SUBMENU.visibility = 'visible';
SUBMENU.position = 'relative';
document.all['i'+subm].src=IMG2;
}

else{
SUBMENU.visibility = 'hidden';
SUBMENU.position = 'absolute';
document.all['i'+subm].src=IMG;
}

for(i=0;i<num;i++)
if(i != subm)
if(document.all['m'+i]){
document.all['m'+i].style.visibility = 'hidden';
document.all['m'+i].style.position = 'absolute';
document.all['i'+i].src=IMG;
}}


function NewsChek()
{
var s1=window.document.forms.forma_news.mail.value;
if (s1=="" || s1=="E-mail...")
  alert("Ошибка заполнения формы подписки!");
    else
       document.forma_news.submit();
}

function SearchChek()
{
var s1=window.document.forms.forma_search.words.value;
if (s1=="" || s1=="Я ищу...")
 alert("Ошибка заполнения формы поиска!");
   else
     document.forma_search.submit();
}

function OrderChek()
{
var s1=window.document.forms.forma_order.mail.value;
var s2=window.document.forms.forma_order.name_person.value;
var s3=window.document.forms.forma_order.tel_name.value;
var s4=window.document.forms.forma_order.adr_name.value;
if (s1=="" || s2=="" || s3=="")
 alert("Ошибка заполнения формы заказа.\nДанные отмечанные звездочкой (*) заполнять обязательно! ");
  else
     document.forma_order.submit();
}

function Fchek()
{
var s1=window.document.forms.forma_gbook.name_new.value;
var s2=window.document.forms.forma_gbook.tema_new.value;
var s3=window.document.forms.forma_gbook.otsiv_new.value;
if (s1=="" || s2=="" || s3=="")
 alert("Ошибка заполнения формы отзыва!");
   else
     document.forma_gbook.submit();
}

function Img_on(pic,img){
document.all[pic].src=img;
}

function Img_of(pic,img){
document.all[pic].src=img;
}

function cart_load(subm){
SUBMENU=document.all[subm].style;
if (SUBMENU.visibility=='hidden')
{
SUBMENU.visibility = 'visible';
SUBMENU.position = 'absolute';
}
else 
{
SUBMENU.visibility = 'hidden';
SUBMENU.position = 'absolute';
document.all[pic].src="images/m1.gif";
}
}

function CL()
{
window.close();
}
function CLREL()
{
window.opener.location.reload();
window.close();
}
function REL(url)
{
location.href=url;
}
function miniWin(url,w,h)
{
w=window.open(url,"edit","left=100,top=100,width="+w+",height="+h+",location=0,menubar=0,resizable=1,scrollbars=0,status=0");
w.focus();
}

function miniWinFull(url)
{
w=window.open(url,"edit","left=0,top=100,location=0,menubar=0,resizable=1,scrollbars=1,status=0");
w.focus();
}

function FormaBank(url,w,h)
{
window.open(url,"_blank","left=400,top=100,width="+w+",height="+h+",location=0,menubar=0,resizable=0,scrollbars=1,status=0");
}
function Order(page)
{
window.opener.document.location.href=page;
window.close();
}

function Order2(page)
{
window.opener.document.location.href=page;
//window.close();
}

window.status="Powered & Developed by PHPShop.ru";