var CONTENT_FRAME_HEIGHT = "74";
var AUTOCHECK_CONTENT_FRAME_HEIGHT = "0";
function closehelp()
{
var objFrame=parent.document.getElementById('ContentFrames');
if(parent.frames.length==0)
self.close();
else
{
if(objFrame.rows.substring(0,2)==CONTENT_FRAME_HEIGHT)
{
objFrame.rows= CONTENT_FRAME_HEIGHT + ",*,0";
}
else
{
objFrame.rows= AUTOCHECK_CONTENT_FRAME_HEIGHT + ",*,0";
}
}
}
var FieldHelpChild;
function displayhelp(method, context)
{
var lbExpandHelpFrame=false;
var isBrowser=new WhichBrowser();
var objFrame=parent.document.getElementById('ContentFrames');
if( (document.getElementById||isBrowser.ie4up)&& method=='focus' )
self.status="Press 'CTRL+T' for field level help.";
else
self.status="";
if(objFrame)
{
if(objFrame.rows==CONTENT_FRAME_HEIGHT + ",*,0" && method!="focus")
{
lbExpandHelpFrame=true;
objFrame.rows = CONTENT_FRAME_HEIGHT + ",*,25%";
}
if(objFrame.rows==AUTOCHECK_CONTENT_FRAME_HEIGHT + ",*,0" && method!="focus")
{
lbExpandHelpFrame=true;
objFrame.rows = AUTOCHECK_CONTENT_FRAME_HEIGHT + ",*,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 )
{
if(objFrame.rows.substring(0,2)==CONTENT_FRAME_HEIGHT)
{
objFrame.rows= CONTENT_FRAME_HEIGHT + ",*,0";
}
else
{
objFrame.rows= AUTOCHECK_CONTENT_FRAME_HEIGHT + ",*,0";
}
numdivs[x].style.display="none";
}
else
{
numdivs[0].parentNode.style.display='block';
numdivs[x].style.display='block';
}
}
else
numdivs[x].style.display='none';
}
if(numdivs[0])numdivs[0].style.display="block";
}
}
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;
}



