<!-- открытие корзины -->

function basket(prod_kod)
{
s=window.open("/cgi-bin/basket.php?prod_kod="+prod_kod,'s','width=600,height=400,top=100,left=200,scrollbars=1'),s.focus();
}

<!-- /открытие корзины -->

message="Наш номер телефона (812) 334-57-14^" +
                "^"
scrollSpeed=25;
lineDelay=1500;

txt="";

  function scrollText(pos) {
    if (message.charAt(pos)!='^') {
      txt=txt+message.charAt(pos);
      status=txt;
      pauze=scrollSpeed;
    }
    else {
      pauze=lineDelay;
      txt="";
      if (pos==message.length-1) pos=-1
    }
    pos++;
    setTimeout("scrollText('"+pos+"')",pauze);
  }

function wow(obj) {
obj.style.display='block';
}
function owo(obj) {
obj.style.display='none';
}

function phone()
{
status="Наш номер телефона (812) 334-57-14";
}


//w:+20 h:+26
function opWind() {
mypop=window.open("/popup3.html","", "width=483, height=350, toolbar=0, location=0, status=0, menubar=0, scrollbars=0, resizable=0,left="+(screen.width-480)/2+",top="+(screen.height-350)*0.4+"") 
}


function zakaz() {
var myUrl = "popup.html";
myWin=window.open(myUrl, "Компания ProfiLine -- Корзина заказа", "width=500, height=375, resizable=no, scrollbars=no, menubar=no");
}

function swot(obj) {
if (obj.style.display=='none')
{
obj.style.display='inline';
}
else
{
obj.style.display='none';
}
}


/*mail*/
function chkmail(mailString)
{
   if(mailString!="")
   {
      re=/(\.@)|(^-[\.]{1})|(\.\.+)|(@\.-)|(@.*_)/;
      result = re.test(mailString);
      if(!result)
      {
         re=/^[(\w)\.\-]+[@]{1}[(\w)\.]+[\.]{1}[^(\W|_|\.)]{2,3}$/;
         result = re.test(mailString);
         if(result) {return true;}
      }
   }
   alert('Укажите верный email!');
   return false;
}


/*/mail*/

/*menu*/
ar5=new Array();
ar4=new Array();
ar3=new Array();
ar2=new Array();
ar=new Array();

function hide_1(DI)
{
	if (ar[DI]==0)
	{
	document.getElementById(DI).style.visibility="hidden";
	}
}

function hide_2(DI2)
{
	if (ar2[DI2]==0)
	{
	document.getElementById(DI2).style.visibility="hidden";
	}
}

function hide_3(DI3)
{
	if (ar3[DI3]==0)
	{
	document.getElementById(DI3).style.visibility="hidden";
	}
}

function hide_4(DI4)
{
	if (ar4[DI4]==0)
	{
	document.getElementById(DI4).style.visibility="hidden";
	}
}

function hide_5(DI5)
{
	if (ar5[DI5]==0)
	{
	document.getElementById(DI5).style.visibility="hidden";
	}
}

function show_(DI)
{
	document.getElementById(DI).style.visibility="visible";
	ar[DI] = 1;
}

function hide1(DI)
{
	ar[DI] = 0;
	st=DI.toString();
	proc="hide_1('"+st+"')";
	setTimeout(proc,200);
}

function sl(DI)
{
	ar[DI] = 1;
	document.getElementById(DI).style.visibility="visible";
}

function sla(DI)
{	
	ar[DI] = 0;
	st=DI.toString();
	proc1="hide_1('"+st+"')";
	setTimeout(proc1,200);
}

function therd_l_on1(DI,DI1){
	ml(DI,DI1);
	DI2 = DI1+""+DI;
	ar2[DI2] = 1;
	document.getElementById(DI2).style.visibility="visible";
}

function therd_l_off1(DI,DI2){
	ar2[DI2] = 0;
	st=DI2.toString();
	proc1="hide_2('"+st+"')";
	setTimeout(proc1,200);
}

function therd_l_on(DI,DI2){
	ar[DI]	 = 1;
	ar2[DI2]	 = 1;
}

function therd_l_off(DI,DI2){
	ar[DI] = 0;
	ar2[DI2] = 0;
	st=DI2.toString();
	proc1="hide_2('"+st+"')";
	setTimeout(proc1,200);
	st2=DI.toString();
	proc2="hide_1('"+st2+"')";
	setTimeout(proc2,200);
}

function forth_l_on1(DI,DI1,DI2){
	m2(DI,DI1,DI2);/*подвинули слой на нужную поизицию*/
	DI_end = DI2+""+DI1+""+DI;
	ar3[DI_end] = 1;/*объявили слой открытым*/
	document.getElementById(DI_end).style.visibility="visible";/*показали его*/
}

function forth_l_off1(DI,DI2,DI3){
	ar3[DI3] = 0;
	st=DI3.toString();
	proc1="hide_3('"+st+"')";
	setTimeout(proc1,200);
}

function forth_l_on(DI,DI2,DI3){
	ar[DI] = 1;
	ar2[DI2] = 1;
	ar3[DI3] = 1;
}

function forth_l_off(DI,DI2,DI3){
	ar[DI] = 0;
	ar2[DI2] = 0;
	ar3[DI3] = 0;
	st=DI3.toString();
	proc1="hide_3('"+st+"')";
	setTimeout(proc1,200);
	st2=DI2.toString();
	proc2="hide_2('"+st2+"')";
	setTimeout(proc2,200);
	st3=DI.toString();
	proc3="hide_1('"+st3+"')";
	setTimeout(proc3,200);
}

function fifth_l_on1(DI,DI1,DI2,DI3){
	m3(DI,DI1,DI2,DI3);/*подвинули слой на нужную поизицию*/
	DI_end = DI3+""+DI2+""+DI1+""+DI;
	ar4[DI_end] = 1;/*объявили слой открытым*/
	document.getElementById(DI_end).style.visibility="visible";/*показали его*/
}

function fifth_l_off1(DI,DI2,DI3,DI4){
	ar4[DI4] = 0;
	st=DI4.toString();
	proc1="hide_4('"+st+"')";
	setTimeout(proc1,200);
}

function fifth_l_on(DI,DI2,DI3,DI4){
	ar[DI] = 1;
	ar2[DI2] = 1;
	ar3[DI3] = 1;
	ar4[DI4] = 1;	
}

function fifth_l_off(DI,DI2,DI3,DI4){
	ar[DI] = 0;
	ar2[DI2] = 0;
	ar3[DI3] = 0;
	ar4[DI4] = 0;	
	st0=DI4.toString();
	proc0="hide_4('"+st0+"')";
	setTimeout(proc0,200);
	st1=DI3.toString();
	proc1="hide_3('"+st1+"')";
	setTimeout(proc1,200);
	st2=DI2.toString();
	proc2="hide_2('"+st2+"')";
	setTimeout(proc2,200);
	st3=DI.toString();
	proc3="hide_1('"+st3+"')";
	setTimeout(proc3,200);
}

function sixth_l_on1(DI,DI1,DI2,DI3,DI4){
	m4(DI,DI1,DI2,DI3,DI4);/*подвинули слой на нужную поизицию*/
	DI_end = DI4+""+DI3+""+DI2+""+DI1+""+DI;
	ar5[DI_end] = 1;/*объявили слой открытым*/
	document.getElementById(DI_end).style.visibility="visible";/*показали его*/
}

function sixth_l_off1(DI,DI2,DI3,DI4,DI5){
	ar5[DI5] = 0;
	st=DI5.toString();
	proc1="hide_5('"+st+"')";
	setTimeout(proc1,200);
}

function sixth_l_on(DI,DI2,DI3,DI4,DI5){
	ar[DI] = 1;
	ar2[DI2] = 1;
	ar3[DI3] = 1;
	ar4[DI4] = 1;	
	ar5[DI5] = 1;		
}

function sixth_l_off(DI,DI2,DI3,DI4,DI5){
	ar[DI] = 0;
	ar2[DI2] = 0;
	ar3[DI3] = 0;
	ar4[DI4] = 0;	
	ar5[DI5] = 0;		
	st00=DI5.toString();
	proc00="hide_5('"+st00+"')";
	setTimeout(proc00,200);
	st0=DI4.toString();
	proc0="hide_4('"+st0+"')";
	setTimeout(proc0,200);
	st1=DI3.toString();
	proc1="hide_3('"+st1+"')";
	setTimeout(proc1,200);
	st2=DI2.toString();
	proc2="hide_2('"+st2+"')";
	setTimeout(proc2,200);
	st3=DI.toString();
	proc3="hide_1('"+st3+"')";
	setTimeout(proc3,200);
}

function counter_top(name)
{
name_ = document.all[name];
top_ = 0;
while (name_.offsetParent) {
   top_=top_+name_.offsetTop;
   name_ = name_.offsetParent;
 }
top_ = top_-1;
return top_;
}

function counter_left(name)
{
name_ = document.all[name];
left_ = 0;
while (name_.offsetParent) {
   	 left_=left_+name_.offsetLeft;
  	 name_=name_.offsetParent;
 }
left_ = left_+1;
return left_;
}

function ml(DI,DI1)
{
num = "1"+(DI-1)+""+(DI1-1);
_left = counter_left('zero_xy'+num);
_top = counter_top('zero_xy'+num);
DI2 = DI1+""+DI;
document.getElementById(DI2).style.left = _left;
document.getElementById(DI2).style.top = _top;
}

function m2(DI,DI1,DI2)
{
num = (DI-1)+""+(DI1-1)+""+(DI2-1);
_left = counter_left('zero_xy2_'+num);
_top = counter_top('zero_xy2_'+num);
DI_end = DI2+""+DI1+""+DI;
document.getElementById(DI_end).style.left = _left;
document.getElementById(DI_end).style.top = _top;
}

function m3(DI,DI1,DI2,DI3)
{
num = (DI-1)+""+(DI1-1)+""+(DI2-1)+""+(DI3-1);
_left = counter_left('zero_xy3_'+num);
_top = counter_top('zero_xy3_'+num);
DI_end = DI3+""+DI2+""+DI1+""+DI;
document.getElementById(DI_end).style.left = _left;
document.getElementById(DI_end).style.top = _top;
}

function m4(DI,DI1,DI2,DI3,DI4)
{
num = (DI-1)+""+(DI1-1)+""+(DI2-1)+""+(DI3-1)+""+(DI4-1);
_left = counter_left('zero_xy4_'+num);
_top = counter_top('zero_xy4_'+num);
DI_end = DI4+""+DI3+""+DI2+""+DI1+""+DI;
document.getElementById(DI_end).style.left = _left;
document.getElementById(DI_end).style.top = _top;
}

/*/menu*/

/*scripts*/
function show(name,x,y){
		x = x + 20;
		y = y + 30;
		window.open(name,null,"width="+x+",height="+y+",status=no,toolbar=no,menubar=no,resizable=no,scrollbars=no");
}

Q=0;
function test()
{
if (Q==1) {A.style.top=122;}
ST=document.body.scrollTop;
HE=document.body.offsetHeight;
CH=document.body.scrollHeight;
NH=ST+HE;
PT=parseInt(A.style.top);
if (PT+192>CH)
	{
	A.style.top=CH-192;return false;
	}

A.style.top=ST;
Q=0;
}
/*/scripts*/

/*select*/
function Open(l){
location.href=l;
}
/*/select*/

