var imgWindow;

imgWindow=null;

function checkAllRows(frm,objName,status)

{

	for(i=0;i<frm.elements.length;i++)

	if(frm.elements[i].name==objName &&  frm.elements[i].type=='checkbox')

	{

	   frm.elements[i].checked=status;

	}

}



function isCheckAllRows(frm,objName,objSel) 

{

   var checkedAll=true;

   for(i=0;i<frm.elements.length;i++)

	if(frm.elements[i].name==objName &&  frm.elements[i].type=='checkbox')

	{

	   if(frm.elements[i].checked==false && checkedAll==true)

	   {

	     checkedAll=false;

	   }

	}

	objSel.checked=checkedAll;

}

function delAlert(msg)

{

 if(confirm(msg+ "\n\nAre you sure you want to delete?")==true)

 {

  return confirm('DO YOU WANT TO DELETE?')

 }

  return false; 

}

function hideLayer(layerId){ 

	if (document.all) { document.all[layerId].style.visibility = "hidden"; } 

	if(document.layers){ document.layers[layerId].visibility = "hide";} 

	if(document.getElementById) {document.getElementById(layerId).style.visibility='hidden';} 

}

function showLayer(layerId) { 

	if (document.all) { document.all[layerId].style.visibility = "visible";} 

	if(document.layers) { document.layers[layerId].visibility = "show" ;} 

	if(document.getElementById) {document.getElementById(layerId).style.visibility='visible';} 

} 

var popUpWin=0;

function popUpWindow(URLStr, left, top, width, height)

{

  if(popUpWin)

  {

	if(!popUpWin.closed) popUpWin.close();

  }

  popUpWin = window.open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');

}

