function OpenPopUp (PopUpUrl,Params)
{ 
WOffset = 0;
FoundIndex = Params.search ("width=");
if (FoundIndex != -1)
{
WOffset = (screen.availWidth / 2) - (Params.substr (FoundIndex + 6,3) / 
2);
}

HOffset = 0;
FoundIndex = Params.search ("height=");
if (FoundIndex != -1)
{
HOffset = (screen.availHeight / 2) - (Params.substr (FoundIndex + 7,3) 
/ 2);
}

MyWd = window.open (PopUpUrl,"",Params+",left="+WOffset+",top="+HOffset);
MyWd.focus ();
}
