<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function Cart(target)
{
l=(screen.width-600)/2;
t=(screen.height-500)/2;
window.open('shop/addcart.php?idcart='+target+'&mode=add','','top='+t+', left='+l+', resizable=no, scrollbars=yes, width=600, height=500');
window.focus;
}

function ShowCart(target)
{
l=(screen.width-600)/2;
t=(screen.height-500)/2;
window.open('cart.php','','top='+t+', left='+l+', resizable=no, scrollbars=yes, width=600, height=500');
window.focus;
}


function AddCart(form)
{
jid=form.elements[0].value;	
jsize=form.elements[1].value;
jcolor=form.elements[2].value;
l=(screen.width-600)/2;
t=(screen.height-500)/2;
window.open('shop/addcart.php?idcart='+jid+'&count=1&size='+jsize+'&color='+jcolor+'&mode=add','','top='+t+', left='+l+', resizable=no, scrollbars=yes, width=600, height=500');
window.focus;
return false;
}

function z(name,w,h,title){l=(screen.width-w)/2; t=(screen.height-h)/2; q=w-2;g=h-2; obj=open("", "404", "top="+t+", left="+l+", width="+q+", height="+g+", status=no, toolbar=no, menubar=no"); obj.document.write("<title>"+title+"</title><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><img src="+name+" width="+w+" height="+h+ "></body>"); obj.document.close(); }

function JavaOpen(project,w,h) 
{
var winfeatures="width=200,height=100,scrollbars=0,resizable=0,toolbar=0,location=0,menubar=0,status=0,directories=0"
win2=window.open("http://www.loskut.ru/sound.html","",winfeatures)
win2.blur()
window.focus()
}

function show_pop(txt,im)
{
hide_pop();
yy=getImageY(im);
xx=getImageX(im);
document.getElementById( "i_popup" ).innerHTML=txt;
i_popup.style.left=xx;
i_popup.style.top=yy-20;
i_popup.style.visibility='visible';
}

function hide_pop()
{
i_popup.style.visibility='hidden';
}

function getImageX(imgElem) {
  xPos = eval(imgElem).offsetLeft;
  tempEl = eval(imgElem).offsetParent;
    while (tempEl != null) {
     xPos += tempEl.offsetLeft;
     tempEl = tempEl.offsetParent;
    }
  return xPos;
}
function getImageY(imgElem) {
   xPos = eval(imgElem).offsetTop;
   tempEl = eval(imgElem).offsetParent;
     while (tempEl != null) {
      xPos += tempEl.offsetTop;
      tempEl = tempEl.offsetParent;
     }
   return xPos;
}
//-->
