

var isMSIE = document.attachEvent != null;

var DraggingItem = new Object();

function StartDrag (event, _this, _afteraction)
{
        DraggingItem.This = _this;
        DraggingItem.AfterAction = _afteraction;

        var position = new Object();
        if (isMSIE)
        {
                position.x = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft;
                position.y = window.event.clientY + document.documentElement.scrollTop + document.body.scrollTop;
        }

        DraggingItem.cursorStartX = position.x;
        DraggingItem.cursorStartY = position.y;

        DraggingItem.StartLeft = parseInt (DraggingItem.This.style.left);
        DraggingItem.StartTop = parseInt (DraggingItem.This.style.top);

        if (isNaN (DraggingItem.StartLeft)) DraggingItem.StartLeft = 0;
        if (isNaN (DraggingItem.StartTop)) DraggingItem.StartTop = 0;

        if (isMSIE)
        {
                document.attachEvent ("onmousemove", ProceedDrag);
                document.attachEvent ("onmouseup", StopDrag);
                window.event.cancelBubble = true;
                window.event.returnValue = false;
        }
}

function ProceedDrag (event)
{
        var position = new Object();

        if (isMSIE) {
                position.x = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft;
                position.y = window.event.clientY + document.documentElement.scrollTop + document.body.scrollTop;
        }

         var nextX = DraggingItem.StartLeft + position.x - DraggingItem.cursorStartX;
       if (nextX < 0) nextX = 0;
        DraggingItem.This.style.left = nextX + "px";
//        if (nextX > 800) nextX = 600;
        DraggingItem.This.style.left = nextX + "px";

        var nextY = DraggingItem.StartTop  + position.y - DraggingItem.cursorStartY;
//        if (nextY > 300) nextY = 300;
        if (nextY < 0) nextY = 0;
        DraggingItem.This.style.top = nextY + "px";

        if (isMSIE)
        {
                window.event.cancelBubble = true;
                window.event.returnValue = false;
        }
}

function StopDrag (event)
{
        if (isMSIE)
        {
                document.detachEvent ("onmousemove", ProceedDrag);
                document.detachEvent ("onmouseup", StopDrag);
        }

        if (DraggingItem.AfterAction) DraggingItem.AfterAction (DraggingItem.This);

}

function popup(tit,cont,w,h,id)
{
//hidden
//alert('>Hello!<br>>my problem is that on list the price is 198.53EUR<br>>shipping cost is: 36.29EUR<br>>than why is the total cost 270.04EUR???<br>>Product Name    Price   Qty     Amount<br>>1           6-24x56AG Mil-dot Illuminated       198.53  1       *198.53*<br>>Delivery  EMS cost of delivery          36.29   <br>>Total           EUR 270.04      <br>>Including VAT           35.22<br><br>------------------------------------------------Dear Mr. Attila,<br>Your total order price includes 15% VAT of 35.22 euro.<br>We\'d like to note that all prices exclude delivery cost and 15% VAT (15% VAT is added for European countries only).<br><br>Sincerely,<br>Info service<br>');

//cont=">Hello!<br>>my problem is that on list the price is 198.53EUR<br>>shipping cost is: 36.29EUR<br>>than why is the total cost 270.04EUR???<br>>Product Name    Price   Qty     Amount<br>>1           6-24x56AG Mil-dot Illuminated       198.53  1       *198.53*<br>>Delivery  EMS cost of delivery          36.29   <br>>Total           EUR 270.04      <br>>Including VAT           35.22<br><br>------------------------------------------------<br><br>Dear Mr. Attila,<br>Your total order price includes 15% VAT of 35.22 euro.<br>We\'d like to note that all prices exclude delivery cost and 15% VAT (15% VAT is added for European countries only).<br><br>Sincerely,<br>Info service<br>";



document.write('<div style="left: 300; top: 120; position: absolute;visibility: visible" id=pop ><table cellspacing="0" cellpadding="0" border="0" width="'+w+'" style="font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px;"><tr bgcolor="#9BB1CD"><td onmousedown="StartDrag(event,pop)" height="20" width="'+(w-20)+'">&nbsp;&nbsp;'+tit+'</td><td style="CURSOR: hand;" align="center" height="20" width="20" onClick="pop.style.visibility=\'hidden\'"><b>X</b></td></tr><tr bgcolor="#C0C0C0"><td align="left" valign="top" colspan="2" height="'+h+'" width="100%"><div style="margin-left:7px;margin-right:7px">'+cont+'<hr><b>Answer</b><form style="margin-top:0px;" name="airgun_m" method="post" action="index.php?message"><textarea name="airgun_mes" cols="27" rows="3" wrap="VIRTUAL"></textarea><input type="hidden" name="airgun_mes_id" value="'+id+'"><input type="image" src="images/supp_bot.jpg" align="bottom" ></form></div></td></tr><tr><td colspan="2" bgcolor="#968C78" align="right" valign="top"><a style="text-decoration: none;color: #FFFFC8;font-weight: bold;" href="index.php?message='+id+'&no">Don\'t show&nbsp;&nbsp;</a></td></tr></table></div>');


}

function popup_vis()
{
  pop.visibility = "visible";
}