function showProcessingMsg(pStrId) {
    document.getElementById(pStrId).style.visibility = 'hidden';
    document.getElementById(pStrId).style.display = 'none';
    document.getElementById('divProcessingMsg').style.visibility = 'visible';
    document.getElementById('divProcessingMsg').style.display = 'inline';

}
var timerID = null;
var timerRunning = false;
var timeValue = 150;
var count = 0;
var finish = false;
//load up the images for the progress bar
image00 = new Image(); image00.src = 'images/image-00.gif';
image01 = new Image(); image01.src = 'images/image-01.gif';
image02 = new Image(); image02.src = 'images/image-02.gif';
image03 = new Image(); image03.src = 'images/image-03.gif';
image04 = new Image(); image04.src = 'images/image-04.gif';
image05 = new Image(); image05.src = 'images/image-05.gif';
image06 = new Image(); image06.src = 'images/image-06.gif';
image07 = new Image(); image07.src = 'images/image-07.gif';
image08 = new Image(); image08.src = 'images/image-08.gif';
image09 = new Image(); image09.src = 'images/image-09.gif';
image10 = new Image(); image10.src = 'images/image-10.gif';
image11 = new Image(); image11.src = 'images/image-11.gif';
image12 = new Image(); image12.src = 'images/image-12.gif';

function increment() {

    count += 1;
    if (count == 0) { document.images.bar.src = image00.src; }
    if (count == 1) { document.images.bar.src = image01.src; }
    if (count == 2) { document.images.bar.src = image02.src; }
    if (count == 3) { document.images.bar.src = image03.src; }
    if (count == 4) { document.images.bar.src = image04.src; }
    if (count == 5) { document.images.bar.src = image05.src; }
    if (count == 6) { document.images.bar.src = image06.src; }
    if (count == 7) { document.images.bar.src = image07.src; }
    if (count == 8) { document.images.bar.src = image08.src; }
    if (count == 9) { document.images.bar.src = image09.src; }
    if (count == 10) { document.images.bar.src = image10.src; }
    if (count == 11) { document.images.bar.src = image11.src; }
    if (count == 12) { document.images.bar.src = image12.src; }
    //repeat the bar continuously:
    //if (count == 12) {document.images.bar.src=image012.src; count=-1;}
    //stop repeating the bar:
    if (count == 12) { document.images.bar.src = image12.src; end(); }
}

function stopclock() {
    if (timerRunning) {
        clearInterval(timerID);
    }
    timerRunning = false;
}

function end() {
    if (finish == true) {
        stopclock();
        window.close();
    }
    else {
        finish = true;
    }
}

function startclock() {
    stopclock();
    timerID = setInterval("increment()", timeValue);
    timerRunning = true;
    document.images.bar.src = image00.src;
}

function Send_onclick(frmSubmit) {
    startclock();
    //frmSubmit.submit();			
}


function loadApplication(location,title,features) {
	if(location!= null && title!=null && features!=null) {
		loadNewWindow(location,title,features);
		//closeWindow();
	}				
}	

function loadNewWindow(location,title,features) {
	var sourceWindow;

	sourceWindow=window.open(location,title,features);
	sourceWindow.focus();
}

function loadNews(location)
  {
  loadNewWindow(location,'popnews','width=610, height=450, scrollbars=1, location=0, status=1, menubar=1, resizable=1, toolbar=1');
  }

function loadPrint()
  {
  window.print();
  closeWindow();
  }

function closeWindow() {
	var thisWindow; 
	thisWindow = window.self;
	thisWindow.opener = window.self;
	thisWindow.close();
}

function btnSubmitPricing() {
	submitForm();
}

function submitForm() {
	document.aspnetForm.submit();
}

//Menu and rollover
function show_menu(mname)
  {
  document.getElementById(mname).style.visibility = "visible";
  }
  
function hide_menu(mname)
  {
  document.getElementById(mname).style.visibility = "hidden";
  }
  
function rover(roname, rocolor)
  {
  document.getElementById(roname).style.backgroundColor = rocolor;
  //document.getElementByID('td_photo').style.backgroundImage = url(../images/photo
  }
  
function rout(roname, rocolor)
  {
  document.getElementById(roname).style.backgroundColor = rocolor;
  //document.getElementByID('td_photo').style.backgroundPosition = pos;
  }
  
function getObjRow(ID)
  {
  var tr
  tr = eval("document.all." + ID + ".style")
  return tr;
  }

function highlightrow(ID, color)
  {
  var tr
  tr = getObjRow(ID)
  tr.backgroundColor = color
  }
  
function FilterKeys()
  {
  if (8==window.event.keyCode)
    {
    window.event.cancelBubble = true;
    window.event.returnValue = false;
    return false; return false;
    }
  }

function selectRad(index) {
    //alert(index);
    if (document.getElementById('ctl00_VertexHolder_radQuantities_0')) {
        var rad0 = document.getElementById('ctl00_VertexHolder_radQuantities_0');
    }
    if (document.getElementById('ctl00_VertexHolder_radQuantities_1')) {
        var rad1 = document.getElementById('ctl00_VertexHolder_radQuantities_1');
    }
    if (document.getElementById('ctl00_VertexHolder_radQuantities_2')) {
        var rad2 = document.getElementById('ctl00_VertexHolder_radQuantities_2');
    }
    if (document.getElementById('ctl00_VertexHolder_radQuantities_3')) {
        var rad3 = document.getElementById('ctl00_VertexHolder_radQuantities_3');
    }
    if (index == 3) {
        rad0.checked = false
        rad1.checked = false
        rad2.checked = false
        rad3.checked = true
    }
    if (index == 2) {
        rad0.checked = false
        rad1.checked = false
        rad2.checked = true
    }
    if (index == 1) {
        rad0.checked = false
        rad1.checked = true
    }
}

function clearBox(index) {
    document.getElementById('ctl00_VertexHolder_txtDrugQty').value = "";
}