var y;
var flag = 0;


function dropFlag()
{
flag = 0;
}
//------------------------------
function setCoords(obj)
{
//x = event.clientX;
y = obj;
flag = 1;
}
//-----------------------------
function f(obj,y1)
{


if (isNaN(y))
 return false;


//while(event.button!=1)

//   obj.firstChild.style.top = y1 - 120 + "px";


//if (flag==1)
   obj.firstChild.style.top = y1 - 120 + "px";

/*
if (isNaN(x)&&isNaN(y))
 return false;

if (y1>y)
 {
 if (isNaN(parseInt(obj.style.top)))
    obj.style.top = "10px";
 else 
    {
     if (parseInt(obj.style.top)+10==300)
      return false;
     else
       obj.style.top = parseInt(obj.style.top) + 10 + "px";
    }
 }
else {
// if (isNaN(parseInt(obj.style.top)))
 //   obj.style.top = "10px";
// else 
  //  {
     if (parseInt(obj.style.top)-10==0)
        return false;
     else
       obj.style.top = parseInt(obj.style.top) - 10 + "px";
 //   }
 }

*/


}


//-------------------------------------
function preloadImages()
{
var arr;
arr = new Array(9);

arr[1] = new Image();
arr[1].src = "images/goodspicts/1_o.jpg";

arr[2] = new Image();
arr[2].src = "images/goodspicts/2_o.jpg";

arr[3] = new Image();
arr[3].src = "images/goodspicts/3_o.jpg";

arr[4] = new Image();
arr[4].src = "images/goodspicts/4_o.jpg";

arr[5] = new Image();
arr[5].src = "images/goodspicts/5_o.jpg";

arr[6] = new Image();
arr[6].src = "images/goodspicts/6_o.jpg";

arr[7] = new Image();
arr[7].src = "images/goodspicts/7_o.jpg";

arr[8] = new Image();
arr[8].src = "images/goodspicts/8_o.jpg";

arr[9] = new Image();
arr[9].src = "images/goodspicts/9_o.jpg";

}
//-------------------------
function setOverImg(obj)
{
 if (obj.src.search("_o")!=-1)
    obj.src = obj.src.replace("_o.jpg",".jpg");
 else obj.src = obj.src.replace(".jpg","_o.jpg");
}
//--------------------------------
function setOutImg(obj)
{
 
obj.src = obj.src.replace("_o.jpg",".jpg");
}
//-------------------------------------
function loadCatalog(n)
{
location.href = "catalog.php?c="+n;
}
//------------------------------------------
function showBigImage(obj)
{
var path = obj.src.replace("_s","");
window.open(path,"_blank","width=830,menubar=no,status=no,location=no,scrollbars=yes");
}
//---------------------------------------------
function showSubMenu(obj)
{
 obj.style.position = 'relative';
 obj.getElementsByTagName('div').item(1).style.display = 'block';
}
//---------------------------------------------
function hideSubMenu(obj)
{
 obj.style.position = '';
 obj.getElementsByTagName('div').item(1).style.display = 'none';
}
//--------------------------------------------------------------
function showMap()
{
var path = "images/map.gif";
window.open(path,"_blank","width=500,height=500,menubar=no,status=no,location=no,scrollbars=yes");


}
