﻿var IE = (typeof document.all != "undefined")?true:false;
var curX;
var curY;
var popDivID=0;
var t=false;


function showPopup(divid,arrow) {

popDivID=divid;

var div =document.getElementById("pnProductDetail");

if(arrow%4==2 || arrow%4==3)
{


document.getElementById("divpopup").style.backgroundImage="url('http://image.vialuxe.com/GlobalImages2/bg_ProductDiv_ArrowRt.gif')";
document.getElementById("divpopup").style.backgroundRepeat="no-repeat";
document.getElementById("divpopup").style.paddingLeft="0px";
//   document.getElementById("tbBottom").style.marginLeft="2px";

if(arrow%4==2)
     curX=document.getElementById("top").offsetLeft+250;
  else
      curX=document.getElementById("top").offsetLeft+430;
}
else
{ 
   document.getElementById("divpopup").style.backgroundImage="url('http://image.vialuxe.com/GlobalImages2/bg_ProductDiv_ArrowLft.gif')";
     document.getElementById("divpopup").style.backgroundRepeat="no-repeat";
  document.getElementById("divpopup").style.paddingLeft="18px";
//  document.getElementById("tbBottom").style.marginLeft="19PX";

 if(arrow%4==1)
     curX=document.getElementById("top").offsetLeft+570;
  else
      curX=document.getElementById("top").offsetLeft+390;
}

if(!IE)
curY=document.getElementById("dv"+divid).offsetTop+40;
else
curY=document.getElementById("dv"+divid).offsetTop+370;

vl.GetProductListingDetailPop(divid,Display,null,div)

}



function hidePopup1() {


document.getElementById("pnProductDetail").style.visibility= "hidden";

}

function Display(result,div)
{


var div1 =document.getElementById("divpopup");

div1.innerHTML=result;

DivDisplay(div)

}
function DivDisplay(div)
{

if (!IE)
{
div.style.left = curX + "px";
div.style.top = (curY-30 )+ "px";
}
else
{
div.style.left = curX ;
div.style.top = (curY-30 );
}

div.style.visibility= "visible";
}