function popIt() {
var n = window.open('about:blank', 'formwin', 'scrollbars=yes,height=250,width=350,status=no');
return true;
}

function printwhithout(divid)
{
var excludediv = document.all ? document.all[divid] :
				document.getElementById(divid);
excludediv.style.display = 'none';
//alert('printing page');
window.print();
window.close();
}
function makeprint()
{
	document.printform.printtext.value = document.getElementById("d_print").innerHTML;
	document.printform.submit();
}
function getprinthtml()
{
var printdiv=document.getElementById("d_print").innerHTML;
  win = window.open();
  self.focus();
  win.document.open();
  //win.document.location.href="http://bel01656/TestPrintPage/test.html";
  //win.document.getElementById("printarea").innerHTML = "JAHOO";
  win.document.write(printdiv);
}
function printpage(divid)
{
	var selecteddiv = document.all ? document.all[divid] :
              document.getElementById(divid);
	alert(selecteddiv.id);
	//idtoprint=selecteddiv.id;
	//window.print();
//hideDivs(divid);
//alert('divs hidden');
//showDivs();
 //  window.onbeforeprint = hideDivs;
 //  window.onafterprint = showDivs;
    hideDivs(divid);
    //window.print();
    //showDivs();
}

function hideDivs (divid) {
	
 
  var divs;
  if (document.all) {
    divs = document.all.tags("DIV");
  }
  else if (document.getElementById) {
    divs = document.getElementsByTagName("DIV");
  }
  
 alert(divs.length);
 for (var d = 0; d < divs.length; d++)
    if(divs[d].id != divid)
	divs[d].style.display = 'none';

}
function showDivs () {
  var divs;
  if (document.all) {
    divs = document.all.tags("DIV");
  }
  else if (document.getElementById) {
    divs = document.getElementsByTagName("DIV");
  }
  for (var d = 0; d < divs.length; d++)
    divs[d].style.display = 'block';
	
}
