var w = 0;
var h = 0;
var Mh = 0;
var mout;

var wDis = 0;
var hDis = 0;
var moutDis;

function ShowPopupWindow(){
 var oMenu = document.getElementById("menu");
 Mh = parseFloat($("ctl00_CPH_Additional1_hidPopHeight").value / 4 + 2);
 
 var cW = 0;
 if(document.documentElement.clientWidth > 762)
 {
   cW = eval((document.documentElement.clientWidth - 762) / 2)
 }
 oMenu.style.left = eval(document.documentElement.clientWidth - cW - 180 + document.documentElement.scrollLeft) + "px";

 
 if(w <= 50){
  oMenu.style.display = "block";
  fnLarge();
 }
 else{
  fnSmall();
 }
}
function fnLarge(){
 var oMenu = document.getElementById("menu");
 if(w < 200){
  w += 50;
  h += Mh;
  oMenu.style.width = w+"px";
  oMenu.style.height = h+"px";
  window.setTimeout("fnLarge()",25);
 }
}
function fnSmall(){
 var oMenu = document.getElementById("menu");
 if(w > 0){
  w -= 50;
  h -= Mh;
  oMenu.style.width = w+"px";
  oMenu.style.height = h+"px";
  window.setTimeout("fnSmall()",25);
 }
 else{
  oMenu.style.display = "none";
 }
}
/*---------- Show Volume Discounts ------------*/
function ShowVolumeDiscounts(){
 var oMenu2 = document.getElementById("VDiscounts");
 if(wDis <= 50){
  oMenu2.style.display = "block";
  fnLargeDis();
 }
 else{
  fnSmallDis();
 }
}
function fnLargeDis(){
 var oMenu2 = document.getElementById("VDiscounts");
 if(wDis < 200){
  wDis += 50;
  hDis += 48;
  oMenu2.style.width = wDis + "px";
  oMenu2.style.height = hDis + "px";
  window.setTimeout("fnLargeDis()", 25);
 }
}
function fnSmallDis(){
 var oMenu2 = document.getElementById("VDiscounts");
 if(wDis > 0){
  wDis -= 50;
  hDis -= 48;
  oMenu2.style.width = wDis + "px";
  oMenu2.style.height = hDis + "px";
  window.setTimeout("fnSmallDis()", 25);
 }
 else{
  oMenu2.style.display = "none";
 }
}