function closehelp(){
if(top.frames.length==0)
self.close();
else {
if(document.all)parent.ContentFrames.rows = "*,0";
}
}
var FieldHelpChild;
function displayhelp(method, context){
var lbExpandHelpFrame=false;
var isBrowser=new WhichBrowser();
if( (document.getElementById||isBrowser.ie4up)&& method=='focus' )
self.status="Press 'CTRL+T' for field level help.";
else
self.status="";
if( !isBrowser.ns4up ){
if(parent.ContentFrames.rows=="*,0" && method!="focus"){
lbExpandHelpFrame=true;
parent.ContentFrames.rows = "*,25%";
}
numdivs=GetDivTags();
for(var x=0;x < numdivs.length;x++ ){
if(context.indexOf(numdivs[x].id)>-1){
if( numdivs[x].style.display == "block" && method != "focus" && ! lbExpandHelpFrame ){
parent.ContentFrames.rows = "*,0";
numdivs[x].style.display="none"
}
else
numdivs[x].style.display='block';
}
else
numdivs[x].style.display='none';
}
}
else if( document.getElementById ){
if( FieldHelpChild && ! FieldHelpChild.closed && (FieldHelpChild.name != context || method != "focus")){
FieldHelpChild.name=context;
FieldHelpChild.focus();
}
else if( method != "focus" ){
var lsPath=top.frames['PageHelp'].location.href;
FieldHelpChild=window.open(lsPath, context, "menubar=no , toolbar=no, resizable=yes, scrollbars=yes, status=no, height=110px, width=600px");
var xfuncunload = new Function("RemoveChildHelp();");
self.onunload=xfuncunload;
}
}
else if(method!="focus")
alert("Your browser does not support field help.")
}
function RemoveChildHelp(){
if(FieldHelpChild&&! FieldHelpChild.closed){
FieldHelpChild.close();
}
}
function GetDivTags(){
var numdivs=new Array();
if(document.getElementsByTagName){
numdivs = parent.PageHelp.document.getElementsByTagName("DIV");
} else {
var aChildren=parent.PageHelp.document.body.children;
for(var x=0;x < aChildren.length;x++){
if(aChildren[x].tagName == "DIV"){
numdivs[numdivs.length]=aChildren[x];
}
}
}
return numdivs;
}
function IfHelpkey(e, context){
if(window.event){
if(window.event.keyCode==20){
displayhelp('click', context);
}
}
else if(e){
if(e.which==116&&e.ctrlKey==true){
displayhelp('click', context);
}
}
return true;
}


