aimsDHTMLPresent=true;
function createLayer(name,inleft,intop,width,height,visible,content){
var layer;
if(isNav4){
document.writeln('<layer name="'+name+'" left='+inleft+' top='+intop+' width='+width+' height='+height+' visibility='+(visible?'"show"':'"hide"')+'>');
document.writeln(content);
document.writeln('</layer>');
}else{
document.writeln('<div id="'+name+'" style="position:absolute; overflow:hidden; left:'+inleft+'px; top:'+intop+'px; width:'+width+'px; height:'+height+'px;'+'; z-index:1; visibility:'+(visible?'visible;':'hidden;')+'">');
document.writeln(content);
document.writeln('</div>');
}
}
function getLayer(name)
{
if(isNav4)
return(document.layers[name]);
else if(isIE4){
layer=eval('document.all.'+name+'.style');
return(layer);
}else if(is5up){
var theObj=document.getElementById(name);
return theObj.style
}
else
return(null);
}
function getOVLayer(name){
if(parent.OverviewFrame!=null){
if(isNav4)
return(parent.OverviewFrame.document.layers[name]);
else if(isIE4){
layer=eval('parent.OverviewFrame.document.all.'+name+'.style');
return(layer);
}else if(is5up){
var theObj=parent.OverviewFrame.document.getElementById(name);
return theObj.style
}
else
return(null);
}else
return getLayer(name);
}
function isVisible(name){
var layer=getLayer(name);
if(isNav&&layer.visibility=="show")
return(true);
if(isIE&&layer.visibility=="visible")
return(true);
return(false);
}
function moveLayer(name,x,y){
var layer=getLayer(name);
if(isNav4){
layer.moveTo(x,y);
}else{
layer.left=x+"px";
layer.top=y+"px";
}
}
function setLayerBackgroundColor(name,color){
var layer=getLayer(name);
if(isNav4)
layer.bgColor=color;
else
layer.backgroundColor=color;
}
function hideLayer(name){
var layer=getLayer(name);
if(isNav4)
layer.visibility="hide";
else
layer.visibility="hidden";
}
function showLayer(name){
var layer=getLayer(name);
if(isNav4)
layer.visibility="show";
else
layer.visibility="visible";
}
function showOVLayer(name){
var layer=getOVLayer(name);
if(isNav4)
layer.visibility="show";
else
layer.visibility="visible";
}
function hideOVLayer(name){
var layer=getOVLayer(name);
if(isNav4)
layer.visibility="hide";
else
layer.visibility="hidden";
}
function clipLayer2(name,clipleft,cliptop,clipright,clipbottom){
var layer=getLayer(name);
if(isNav4){
layer.clip.left=clipleft;
layer.clip.top=cliptop;
layer.clip.right=clipright;
layer.clip.bottom=clipbottom;
}
else if(isIE){
layer.clip='rect('+cliptop+' '+clipright+' '+clipbottom+' '+clipleft+')';
}
}
function clipLayer(name,clipleft,cliptop,clipright,clipbottom){
var layer=getLayer(name);
if(isNav4){
layer.clip.left=clipleft;
layer.clip.top=cliptop;
layer.clip.right=clipright;
layer.clip.bottom=clipbottom;
}else{
var newWidth=clipright-clipleft;
var newHeight=clipbottom-cliptop;
layer.height=newHeight;
layer.width=newWidth;
layer.top=cliptop+"px";
layer.left=clipleft+"px";
}
}
function clipOVLayer(name,clipleft,cliptop,clipright,clipbottom){
var layer=getLayer(name);
if(parent.OverviewFrame!=null)layer=getOVLayer(name);
if(isNav4) 
{
layer.clip.left=clipleft;
layer.clip.top=cliptop;
layer.clip.right=clipright;
layer.clip.bottom=clipbottom;
} 
else
{
if((clipright.isNaN)||(clipleft.isNaN)||(cliptop.isNaN)||(clipbottom.isNaN)){
layer.visibility="hidden";
}
else 
{
var newWidth=clipright-clipleft;
var newHeight=clipbottom-cliptop;
if((newWidth<=0)||(newHeight<=0)) 
{
layer.visibility="hidden";
}
else
{
if(newWidth.isNaN)newWidth=parseInt(i2Width);
if(newHeight.isNaN)newHeight=parseInt(i2Height);
layer.height=newHeight;
layer.width=newWidth;
var theTop=parseInt((parseFloat(cliptop)*10+0.5)/10);
var theLeft=parseInt((parseFloat(clipleft)*10+0.5)/10);
layer.top=cliptop+"px";
layer.left=clipleft+"px";
layer.display="none";
layer.visibility="visible";
}
}
}
}
function replaceLayerContent(name,content){
if(isNav4){
var layer=getLayer(name);
layer.document.open();
layer.document.writeln(content);
layer.document.close();
}else if(isIE){
var str="document.all."+name+".innerHTML = '"+content+"'";
eval(str);
}
}
function toggleOVMap(){
if(imsURL!=""){
ovIsVisible=!ovIsVisible;
if(ovIsVisible){
putExtentOnOVMap();
showLayer("ovLayer");
showLayer("ovShadow");
}else{
hideLayer("ovLayer");
hideLayer("ovShadow");
hideLayer("zoomOVBoxTop");
hideLayer("zoomOVBoxLeft");
hideLayer("zoomOVBoxRight");
hideLayer("zoomOVBoxBottom");
}
if(isIE){
document.all.theTop.style.cursor=theCursor;
}
}else{
alert(msgList[45]);
}
}
function putExtentOnOVMap(){
var ovXincre=fullOVWidth/i2Width;
var ovYincre=fullOVHeight/i2Height;
var vleft=(eLeft-fullOVLeft)/ovXincre+ovBorderWidth;
var vright=(eRight-fullOVLeft)/ovXincre+ovBorderWidth;
var vtop=(fullOVTop-eTop)/ovYincre+ovBorderWidth;
var vbottom=(fullOVTop-eBottom)/ovYincre+ovBorderWidth;
if(vright>i2Width+ovBorderWidth)vright=i2Width;
if(vbottom>i2Height+ovBorderWidth)vbottom=i2Height;
if(!isNav4){
vleft=vleft+ovHspc;
vright=vright+ovHspc;
vtop=vtop+ovVspc;
vbottom=vbottom+ovVspc;
}
if(eTop>fullOVBottom){
clipOVLayer("zoomOVBoxTop",vleft,vtop-ovExtentBoxSize,vright+1,vtop);
showOVLayer("zoomOVBoxTop");
}else{
hideOVLayer("zoomOVBoxTop");
}
if(eLeft<fullOVRight){
clipOVLayer("zoomOVBoxLeft",vleft-ovExtentBoxSize,vtop-ovExtentBoxSize,vleft,vbottom);
showOVLayer("zoomOVBoxLeft");
}else{
hideOVLayer("zoomOVBoxLeft");
}
if(eRight>fullOVLeft){
clipOVLayer("zoomOVBoxRight",vright,vtop-ovExtentBoxSize,vright+ovExtentBoxSize,vbottom);
showOVLayer("zoomOVBoxRight");
}else{
hideOVLayer("zoomOVBoxRight");
}
if(eBottom<fullOVTop){
clipOVLayer("zoomOVBoxBottom",vleft,vbottom-ovExtentBoxSize,vright+1,vbottom);
showOVLayer("zoomOVBoxBottom");
}else{
hideOVLayer("zoomOVBoxBottom");
}
}
function boxIt(theLeft,theTop,theRight,theBottom){
if(!isNav4){
theTop=theTop+vspc;
theBottom=theBottom+vspc;
theLeft=theLeft+hspc;
theRight=theRight+vspc;
}
clipLayer("zoomBoxTop",theLeft,theTop,theRight,theTop+ovBoxSize);
clipLayer("zoomBoxLeft",theLeft,theTop,theLeft+ovBoxSize,theBottom);
clipLayer("zoomBoxRight",theRight-ovBoxSize,theTop,theRight,theBottom);
clipLayer("zoomBoxBottom",theLeft,theBottom-ovBoxSize,theRight,theBottom);
showLayer("zoomBoxTop");
showLayer("zoomBoxLeft");
showLayer("zoomBoxRight");
showLayer("zoomBoxBottom");
}
