/*
This function toggles DISPLAY status of style elements.
*/

function toggleDisp(DivID, iState) // 1=block, 0=none
{
   var obj = document.layers ? document.layers[DivID] :
   document.getElementById ?  document.getElementById(DivID).style :
   document.all[DivID].style;
   obj.display = document.layers ? (iState ? "block" : "none") :
   (iState ? "block" : "none");
}

/*
This function makes the center of the pop up window to pop exactly
to the location on the screen calculated from the screen's dimensions
*/

function popUp(winurl, w, h) {
var l = (screen.width - w) / 2;		/// distance is 1/2 of the screen width from the left
var t = (screen.height - h) / 2;	/// distance is 1/2 of the screen height from the top

winprops =
'left='+l+',top='+t+',width='+w+',height='+h+',location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no';

win = window.open(winurl, "Popup", winprops);
return false;
}
