//\/////
//\  coolTip Iframe Shim Plugin for support of an iframe shim to 
//\  mask system controls for IE v5.5 or higher as suggested in
//\  http://dotnetjunkies.com/weblog/jking/posts/488.aspx
//\  This file requires coolTip 1.44 or later.
//\  Modified September 13, 2006 so that the iframe shim object is 
//\   created once and then just manipulated.
//\  Modified September 18, 2006 so that the previous fix is made more
//\   efficient.
//\
//\  You may not remove or change this notice.
//\  Copyright Robert E Boughner 2005. All rights reserved.
//\  
//\  This plugin is governed by the same restrictions set forth
//\  in the prologue to cCore.js.
//\/////
if(typeof cInfo==cUdf||!cInfo.meets(1.44))alert('coolTip 1.44 or later is required for the HideForm Plugin.');else{var cShimObj=null,XHIDEFORM=4;
function setHideFormVariables(obj){obj.HideForm=1;if(typeof obj.shim==cUdf)obj.shim=null;}
function generatePopUp(content){if(!cIe4||cOp||!cIe55||(po.shadow||(typeof po.bubble!=cUdf&&po.bubble)))return;var wd,ht,txt,zIdx=0;wd=cTip.offsetWidth;ht=cTip.offsetHeight;txt=backDropSource(wd,ht,zIdx++);txt+='<div style="position: absolute;top: 0;left: 0;width: '+wd+'px;z-index: '+zIdx+';">'+(po.doXml&XHIDEFORM?'':content)+'</div>';(po.doXml&XHIDEFORM)?setPluginXmlCode(txt,null,2):layerWrite(txt);}
function backDropSource(width,height,Z){if(!cShimObj){cShimObj=document.createElement('iframe');cShimObj.setAttribute("frameborder","0");cShimObj.setAttribute("scrolling","no");cShimObj.setAttribute("src","javascript:false;");cShimObj.setAttribute("width",width);cShimObj.setAttribute("height",height);cShimObj.style.zIndex=Z;cShimObj.style.filter="Alpha(Style=0,Opacity=0)";}else{cShimObj.setAttribute("width",width);cShimObj.setAttribute("height",height);cShimObj.style.zIndex=Z;}
cTip.pop.shim=cShimObj;return '';}
function setShim(obj){if(!cIe4||cOp||!cIe55)return;var ifrm=obj.getElementsByTagName('IFRAME');if(ifrm.length)obj.replaceChild(obj.pop.shim,ifrm[0]);else obj.insertBefore(obj.pop.shim,obj.firstChild);}
function hideSelectBox(){var px,py,pw,ph,sx,sw,sy,sh,selEl,v;if(!(cNs4||cOp||cIe55)){if(cIe4)v=0;else{v=navigator.userAgent.match(/Gecko\/(\d{8})/i);if(!v)return;v=parseInt(v[1]);}
if(v<20030624){px=parseInt(cTip.style.left);py=parseInt(cTip.style.top);with(po){pw=width;ph=(aboveheight?parseInt(aboveheight):cTip.offsetHeight);}
selEl=(cIe4)?cFrame.document.all.tags("SELECT"):cFrame.document.getElementsByTagName("SELECT");for(var i=0;i<selEl.length;i++){if(!cIe4&&selEl[i].size<2)continue;sx=pageLocation(selEl[i],'Left');sy=pageLocation(selEl[i],'Top');sw=selEl[i].offsetWidth;sh=selEl[i].offsetHeight;if((px+pw)<sx||px>(sx+sw)||(py+ph)<sy||py>(sy+sh))continue;selEl[i].isHidden=1;selEl[i].style.visibility='hidden';}}}}
function showSelectBox(){var selEl,v;if(!(cNs4||cOp||cIe55)){if(cIe4)v=0;else{v=navigator.userAgent.match(/Gecko\/(\d{8})/i);if(!v)return;v=parseInt(v[1]);}
if(v<20030624){selEl=(cIe4)?cFrame.document.all.tags("SELECT"):cFrame.document.getElementsByTagName("SELECT");for(var i=0;i<selEl.length;i++){if(typeof selEl[i].isHidden!=cUdf&&selEl[i].isHidden){selEl[i].isHidden=0;selEl[i].style.visibility='visible';}}}}}
function pageLocation(o,t){var x=0
while(o.offsetParent){x+=o['offset'+t]
o=o.offsetParent}
x+=o['offset'+t]
return x}
function setDoXml_hdfrm(){with(cTip.pop){if(xml){doXml|=XHIDEFORM;}}
return void(0);}
function cleanUpXml_hdfrm(obj){with(obj.pop){if(doXml&&!(cNs4||cIe4)){if(doXml&XHIDEFORM)doXml^=XHIDEFORM;}}
return void(0);}
registerRunTimeFunction(setHideFormVariables);registerHook("ctCreatePopup",generatePopUp,FAFTER);registerHook("showObject",setShim,FBEFORE);registerHook("hideObject",showSelectBox,FAFTER);registerHook("cleanUpXml",cleanUpXml_hdfrm,FCHAIN);registerHook("setDoXml",setDoXml_hdfrm,FCHAIN);}
