var d=window.document;
var w=window;
//w.saveNavigator=w.navigator;


 var element=null;
 navigator.OS='';
 navigator.version=0;
 navigator.org='';
 navigator.family='';

 var i=0;
 var ua=w.navigator.userAgent.toLowerCase();
 
 if(ua.indexOf('opera')!=-1)
 {
  i=ua.indexOf('opera');
  navigator.family='opera';
  navigator.org='opera';
  navigator.version=parseFloat('0'+ua.substr(i+6),10);
 }
 else if((i=ua.indexOf('msie'))!=-1)
 {
  navigator.org='microsoft';
  navigator.version=parseFloat('0'+ua.substr(i+5),10);
  
  if(navigator.version < 4)
   navigator.family='ie3';
  else
   navigator.family='ie4'
 }
 else if(typeof(w.controllers)!='undefined' && typeof(w.locationbar)!='undefined')
 {
  i=ua.lastIndexOf('/')
  navigator.version=parseFloat('0'+ua.substr(i+1),10);
  navigator.family='gecko';

  if(ua.indexOf('netscape')!=-1)
   navigator.org='netscape';
  else if(ua.indexOf('compuserve')!=-1)
   navigator.org='compuserve';
  else
   navigator.org='mozilla';
 }
 else if((ua.indexOf('mozilla') !=-1) &&(ua.indexOf('spoofer')==-1) &&(ua.indexOf('compatible')==-1) &&(ua.indexOf('opera')==-1)&&(ua.indexOf('webtv')==-1) &&(ua.indexOf('hotjava')==-1))
 {
  i=ua.lastIndexOf('/')
  navigator.version=parseFloat('0'+ua.substr(i+1),10);
  navigator.org='netscape';
  navigator.family='nn'+parseInt('0'+ua.substr(i+1),10);
 }
 else if((i=ua.indexOf('aol'))!=-1 )
 {
  // aol
  navigator.family='aol';
  navigator.org='aol';
  navigator.version=parseFloat('0'+ua.substr(i+4),10);
 }

 navigator.DOMCORE1=(typeof(document.getElementsByTagName)!='undefined' && typeof(document.createElement)!='undefined');
 navigator.DOMCORE2=(navigator.DOMCORE1 && typeof(document.getElementById)!='undefined' && typeof(document.createElementNS)!='undefined');
 navigator.DOMHTML=(navigator.DOMCORE1 && typeof(document.getElementById)!='undefined');
 navigator.DOMCSS1=((navigator.family=='gecko') ||(navigator.family=='ie4') );

 navigator.DOMCSS2=false;
 if(navigator.DOMCORE1)
 {
  element=document.createElement('p');
  navigator.DOMCSS2=(typeof(element.style)=='object');
 }

 navigator.DOMEVENTS=(typeof(document.createEvent)!='undefined');


if(!(navigator.DOMHTML || navigator.family=='ie4' || navigator.family=='nn4'))
{
 alert('This page is best viewed with a browser that supports DOM1. \nYour browser does not support DOM1.\n');
 //w.history.go(-1);
}
 
function noop() {}

function gpw()
{
 if(navigator.family=='nn4' || navigator.family=='gecko')return d.width;
 else if(navigator.family=='ie4')return d.body.scrollWidth;
return-1;
}
function gph()
{
 if(navigator.family=='nn4' || navigator.family=='gecko')return d.height;
 else if(navigator.family=='ie4')return d.body.scrollHeight;
 return-1;
}
function gww()
{
 var width=0;
 
 if(navigator.family=='nn4' || navigator.family=='gecko')   width=w.innerWidth;
 else if(navigator.family=='ie4')  width=d.body.clientWidth; return width;
}

function gwh()
{
 var height=0;
 
 if(navigator.family=='nn4' || navigator.family=='gecko')   height=w.innerHeight;
 else if(navigator.family=='ie4')  height=d.body.clientHeight;  
 return height;
}
function makeHighLightable(from,to,d,adjustx,adjusty)
{
 this.highLight = new L("highLight");
 for(var  i=from;i<=to;i++)
 {
  imPlace = new I("im"+i);
  if(this.parent != self)
  {
   this.parent.coords[i] = new Coord(adjustx,adjusty)
  }
 }
}
function unhighlight()
{
 this.highLight.off();
}
function highlight(ind)
{
 if(d.images["highlighter"] != null && this.parent != self)
 {
  imPlace = new I("im"+ind);
  this.highLight.to( this.parent.coords[ind].x+imPlace.left(), this.parent.coords[ind].y+imPlace.top());
  this.highLight.on();
 }

}
function Coord(x,y)
{ 
 this.x=x;
 this.y=y;
}

function nav4GetLayerById(id)
{
 return nav4FindLayer(d,id);
}

function nav4FindLayer(doc,id)
{
 var i;
 var subdoc;
 var obj;
 
 for(var i=0; i < doc.layers.length; ++i)
 {
  if(doc.layers[i].id && id==doc.layers[i].id)
   return doc.layers[i];
   
  subdoc=doc.layers[i].document;
  obj=nav4FindLayer(subdoc,id);
  if(obj!=null)
   return obj;
 }
 return null;
}



/////////////////////////////////////////////////////////////
// xbClipRect

function xbClipRect(a1,a2,a3,a4)
{

 this.top=0;
 this.right=0;
 this.bottom=0;
 this.left=0;

 if (typeof(a1) == 'string')
	{
		var val;
		var ca;
		var i;
			
		if (a1.indexOf('rect(') == 0)
		{
			ca = a1.substring(5, a1.length-1).split(' ');
			for (i = 0; i < 4; ++i)
			{
				val = parseInt(ca[i]);
				if (val != 0 && ca[i].indexOf('px') == -1)
					if (!confirm('A clipping region ' + a1 + ' was detected that did not use pixels as units.  Click Ok to continue, Cancel to Abort'))
						return;
				ca[i] = val;
			}
			this.top	= ca[0];
			this.right	= ca[1];
			this.bottom	= ca[2];
			this.left	= ca[3];
		}
	}		
 else if(typeof(a1)=='number' && typeof(a2)=='number' && typeof(a3)=='number' && typeof(a4)=='number')
 {
  this.top=a1;
  this.right=a2;
  this.bottom=a3;
  this.left=a4;
 }
}
function xbClipRectGetWidth()
{
  return this.right-this.left;
}
function xbClipRectGetHeight()
{
 return this.bottom-this.top ;
}


function xbClipRectSetWidth(width)
{
 this.right=this.left+width;
}
function xbClipRectSetHeight(height)
{
 this.bottom=this.top+height;
}
function xbClipRectToString()
{
 return 'rect('+this.top+' '+this.right+' '+this.bottom+' '+this.left+' '+')' ;
}
xbClipRect.prototype.toString=xbClipRectToString;
xbClipRect.prototype.top=0;
xbClipRect.prototype.right=0;
xbClipRect.prototype.bottom=0;
xbClipRect.prototype.left=0;
xbClipRect.prototype.setHeight=xbClipRectSetHeight;
xbClipRect.prototype.setWidth=xbClipRectSetWidth;
xbClipRect.prototype.getWidth=xbClipRectGetHeight
xbClipRect.prototype.getHeight=xbClipRectGetWidth


/////////////////////////////////////////////////////////////
// l

L.p=L.prototype;
L.p.styleObj=null;
L.p.object=null;
I.p=I.prototype;
// Navigator 4.x resizing...

function nslOnresize()
{
   // if(w.saveInnerWidth!=gww() || w.saveInnerHeight!=gwh())
  //location.reload();

 return false;
}
function findL(name)
{

 return obj;
}
function L(obj,position)
{ 
 if(typeof obj == "string")
 { 
  if(navigator.family=='nn4')
  {
   obj=nav4GetLayerById(obj);
  }
  else if(document.getElementById(obj))
  {
   obj=document.getElementById(obj);
  }
  else
  {
   obj=d.all[obj];
  }
 }
 if(navigator.DOMCSS1)
 {
  this.styleObj=obj.style;
 }
 else if(navigator.family=='nn4')
 {
  if(typeof(position)=='undefined')
  {
   position='';
  }
  this.styleObj=obj;
  this.styleObj.position=position;
 }
 this.object=obj;
}
function I(na)
{
 if(navigator.org=='microsoft')
 {
  this.i=eval('d.all.'+na)
 }
 else
 {
  var i;
  for (i = 0; i < d.images.length; i++)
  {
   if (d.images[i].name == na)
   {
      this.i= d.images[i];
      break;
   }
  }
 }
}

L.p.by=function(deltaX,deltaY)
{
 this.to(this.left()+deltaX,this.top()+deltaY);
}
L.p.to=function(x,y)
{
 this.left(x);
 this.top(y);
}
L.p.resizeBy=function(deltaX,deltaY)
{
 this.width(this.width()+deltaX);
 this.height(this.height()+deltaY);
}
L.p.resizeTo=function(x,y)
{
 this.width(x);
 this.height(y);
}

if(navigator.DOMCSS1)
{
/*
 * CSS * addE
 */ 
 L.p.addE=function()
 {
  var dynel=this;
  var handler=arguments[1];
  if(this.object.attachEvent)
  {
   this.object[arguments[0]]=function()
   {
    var e=w.event;
    e.cancelBubble=true;
    return handler(dynel,e.type);
   }
  }
  else if(this.object.addEventListener)
  {
   this.object[arguments[0]]=function()
   {
    return handler(dynel,arguments[0]);
   }
  }
 }
/*
 * CSS * body
 */ 
 L.p.bgColor=function()
 {
  if(arguments[0])
   this.styleObj.backgroundColor=arguments[0];
  else
   return this.styleObj.backgroundColor;
 }
/*
 * CSS * body
 */ 
 L.p.body=function()
 {
  var body="";
  for(var i=0;i<arguments.length;i++)
  {
   body+=arguments[i]+"\n";
  }
  this.object.innerHTML=body;
 }
/*
 * CSS * clip
 */
 L.p.clip=function(l,t,r,b)
 {
  this.styleObj.clip='rect('+t+' '+r+' '+b+' '+l+')';
 }
/*
 * CSS * clipBottom
 */
 L.p.clipBottom=function()
 {
  var rect=new xbClipRect(this.styleObj.clip);
  if(arguments[0])
  {
   rect.bottom=arguments[0];
   this.styleObj.clip=rect.toString();
  }
  else
  {
   return rect.bottom;
  }
 }
/*
 * CSS * clipHeight
 */
 L.p.clipHeight=function()
 {
  var rect=new xbClipRect(this.styleObj.clip);
  if(arguments[0])
  {
   rect.setHeight(arguments[0]);
   this.styleObj.clip=rect.toString();
  }
  else
  {
   return rect.getHeight();
  }
 }
/*
 * CSS * clipLeft
 */
 L.p.clipLeft=function(cl)
 {
  var rect=new xbClipRect(this.styleObj.clip);
  if(arguments[0])
  {
   rect.left=arguments[0];
   this.styleObj.clip=rect.toString();

  }
  else
  {
   return rect.left;
  }
 }
/*
 * CSS * clipRight
 */
 L.p.clipRight=function()
 {
  var rect=new xbClipRect(this.styleObj.clip);

  if(arguments[0])
  {

   rect.right=arguments[0];

   this.styleObj.clip=rect.toString();

  }
  else
  {
   return rect.right;
  }

 }
/*
 * CSS * clipTop
 */
 L.p.clipTop=function()
 {
  var rect=new xbClipRect(this.styleObj.clip);
  if(arguments[0])
  {
   rect.top=arguments[0];
   this.styleObj.clip=rect.toString();
  }
  else
  {
   return rect.top;
  }
 }
/*
 * CSS * clipWidth
 */
 L.p.clipWidth=function()
 {
  var rect=new xbClipRect(this.styleObj.clip);
  if(arguments[0])
  {
   rect.setWidth(arguments[0]);
   this.styleObj.clip=rect.toString();
  }
  else
  {
   return rect.getWidth();
  }
 }
/*
 * CSS * fgColor
 */
 L.p.fgColor=function()
 {
  if(arguments[0])
   this.styleObj.color=arguments[0];
  else
   return this.styleObj.color;
 }
/*
 * CSS * height
 */
 L.p.height=function()
 {
  if(arguments[0])
  {
   this.styleObj.height=arguments[0]+'px';
  }
  else
  {
   var height=parseInt('0'+this.styleObj.height,10);
   if(height==0)
    height=this.object.offsetHeight;
   return height;
  }
 }
/*
 * CSS * isOn
 */
 L.p.isOn=function()
 {
  return this.styleObj.visibility=='visible';
 }
/*
 * CSS * left
 */
 L.p.left=function()
 {
  if(arguments[0])
  {
   this.styleObj.left=arguments[0]+'px';
  }
  else
  {
   var left=this.styleObj.left;
   if(left=='')
   {
    this.styleObj.left=this.object.offsetLeft+'px';
   }
   return parseInt('0'+this.styleObj.left,10);
  }
 }
/*
 * CSS * off
 */
 L.p.off=function()
 {
  this.styleObj.visibility='hidden';
 }
/*
 * CSS * on
 */
 L.p.on=function()
 {
  this.styleObj.visibility='visible';
 }
/*
 * CSS * removeE
 */ 
 L.p.removeE=function()
 {
  this.object[arguments[0]]=null;
 }
/*
 * CSS * top
 */ 
 L.p.top=function()
 {
  if(arguments[0])
  {
   this.styleObj.top=arguments[0]+'px';
  }
  else
  {
   var top=this.styleObj.top;
   if(top=='')
   {
    this.styleObj.top=this.object.offsetTop+'px';
   }
   return parseInt('0'+this.styleObj.top,10);
  }
 }
/*
 * CSS * width
 */
 L.p.width=function()
 {
  if(arguments[0])
  {
   this.styleObj.width=arguments[0]+'px';
  }
  else
  {
   var width=parseInt('0'+this.styleObj.width,10);
   if(width==0)
   {
    width=this.object.offsetWidth;
   }
   return width;
  }
 }
/*
 * CSS * z
 */
 L.p.z=function()
 {
  if(arguments[0])this.styleObj.zIndex=arguments[0];
  else return this.styleObj.zIndex;
 }
 I.p.left=function()
 {
  x=0;
  obj=this.i;
  while(obj.offsetParent!=null) 
  {
   x+=obj.offsetLeft;
   obj=obj.offsetParent;
  }
  x+=obj.offsetLeft;
  return x;
 }
 I.p.top=function()
 {
  y=0;
  obj=this.i;
  while(obj.offsetParent!=null)
  {
   y+=obj.offsetTop;
   obj=obj.offsetParent;
  }
  y+=obj.offsetTop;
  return y;
 }
}
else if(navigator.family=='nn4')
{
 /*
 * NN4 * addE
 */
 L.p.addE=function()
 {
  this.object.captureEvents(L.p.emask[arguments[0]]);
  var dynel=this;
  var handler=arguments[1]; 
  this.object[arguments[0]]=function(event)
  {
   return handler(dynel,event.type)
  }
 }
/*
 * NN4 * clip
 */
 L.p.clip=function(l,t,r,b)
 {
  this.styleObj.clip.top=t;
  this.styleObj.clip.right=r;
  this.styleObj.clip.bottom=b;
  this.styleObj.clip.left=l;
 }
/*
 * NN4 * bgColor
 */
 L.p.bgColor=function nslBgColor()
 {
  if(arguments[0])
  {
   this.styleObj.bgColor=arguments[0];
   this.styleObj.bgColorString=arguments[0]+"";
   this.object.document.bgColor=arguments[0];
  }
  else
  {
   if(typeof(this.styleObj.bgColorString)!= undefined)
   {
    return this.styleObj.bgColorString;
   }
   else
   {
    return null;
   }
  }
 }
/*
 * NN4 * body
 */ 
 L.p.body=function()
 {
  for(var i=0;i<arguments.length;i++)
  {
   this.object.document.writeln(arguments[i]);
  }
  this.object.document.close();
 }
/*
 * NN4 * clipBottom
 */
 L.p.clipBottom=function()
 {
  if(arguments[0])
  {
   this.styleObj.clip.bottom=arguments[0];
  }
  return this.styleObj.clip.bottom;
 }
/*
 * NN4 * clipHeight
 */
 L.p.clipHeight=function()
 {
  if(arguments[0])
  {
   this.styleObj.clip.height=arguments[0];
  }
  return this.styleObj.clip.height
 }
/*
 * NN4 * clipLeft
 */
 L.p.clipLeft=function()
 {
  if(arguments[0])
  {
   this.styleObj.clip.left=arguments[0];
  }
  return this.styleObj.clip.left;
 }
/*
 * NN4 * clipRight
 */
 L.p.clipRight=function()
 {
  if(arguments[0])
  {
   this.styleObj.clip.right=arguments[0];
  }
  return this.styleObj.clip.right;
 }
/*
 * NN4 * clipTop
 */
 L.p.clipTop=function()
 {
  if(arguments[0])
  {
   this.styleObj.clip.top=arguments[0];
  }
  return this.styleObj.clip.top;
 }
/*
 * NN4 * clipWidth
 */
 L.p.clipWidth=function nslClipWidth()
 {
  if(arguments[0])
  {
   this.styleObj.clip.width=arguments[0];
  }
  return this.styleObj.clip.width;
 }
/*
 * NN4 * isOn
 */
 L.p.fgColor=function()
 {
  if(arguments[0])
  {
   this.object.document.fgColorString=arguments[0];
  }
  else
  {
   return this.object.document.fgColorString;
  }
 }
/*
 * NN4 * isOn
 */
 L.p.isOn=function()
 { 
  return this.styleObj.visibility=="show";
 }
/*
 * NN4 * isOn
 */ 
 L.p.left=function()
 {
  if(arguments[0])
   this.styleObj.left=arguments[0];
  else
   return this.styleObj.left;
 }
/*
 * NN4 * height
 */
 L.p.height=function()
 {
  if(arguments[0])
  {
   this.styleObj.document.height=arguments[0];
  }
  else
  {
   if(this.styleObj.clip.bottom - this.styleObj.clip.top >0)
    return this.styleObj.clip.bottom - this.styleObj.clip.top
   else
    return this.styleObj.document.height;
  }
 }
/*
 * NN4 * off
 */
 L.p.off=function()
 {
  this.styleObj.visibility='hide';
 }
/*
 * NN4 * on
 */
 L.p.on=function()
 { 
  this.styleObj.visibility='show';
 }
/*
 * NN4 * removeE
 */
 L.p.removeE=function()
 {
  this.object.releaseEvents(L.p.emask[arguments[0]]);
  delete this.object[arguments[0]];
 }
/*
 * NN4 * top
 */
 L.p.top=function nslTop()
 {
  if(arguments[0])
   this.styleObj.top=arguments[0];
  else
   return this.styleObj.top;
 }
/*
 * NN4 * width
 */
 L.p.width=function()
 {
  if(arguments[0])
   this.styleObj.document.width=arguments[0];
  else
   return this.styleObj.document.width;
 }
/*
 * NN4 * z
 */
 L.p.z=function()
 {
  if(arguments[0])
   this.styleObj.zIndex=arguments[0];
  else 
   return this.styleObj.zIndex;
 }
 L.p.emask=
 { 
  onmousedown:Event.MOUSEDOWN,
  onmousemove:Event.MOUSEMOVE,
  onmouseout:Event.MOUSEOUT,
  onmouseover:Event.MOUSEOVER,
  onmouseup:Event.MOUSEUP
 };
 I.p.left=function(){return this.i.x;}
 I.p.top=function(){return this.i.y;}
 w.saveInnerWidth=w.innerWidth;
 w.saveInnerHeight=w.innerHeight;
 w.onresize=nslOnresize;
}
else 
{
 L.p.isOn=function(){ return(L.p.getVisibility()=='visible');} 
 L.p.on=function(){ L.p.setVisibility('visible');}
 L.p.off=function(){ L.p.setVisibility('hidden');}
 L.p.clip=function(l,t,r,b){L.p.setClip('rect('+t+' '+r+' '+b+' '+l+')');}
 L.p.left=function(){if(arguments[0])L.p.setLeft(arguments[0]);else return L.p.getLeft;}
 L.p.top=function(){if(arguments[0])L.p.setTop(arguments[0]);else return L.p.getTop;}
 L.p.height=function(){if(arguments[0])L.p.setHeight(arguments[0]);else return L.p.getHeight;}
 L.p.width=function(){if(arguments[0])L.p.setWidth(arguments[0]);else return L.p.getWidth;}
 L.p.z=function(){if(arguments[0])L.p.setzIndex=arguments[0];else return L.p.getzIndex;}
 L.p.fgColor=function(){if(arguments[0])L.p.setColor(arguments[0]);else return L.p.getColor;}
 L.p.bgColor=function(){if(arguments[0])L.p.setBackgroundColor(arguments[0]);else return L.p.getBackgroundColor;}
 L.p.body=function()
 {
  var body="";
  for(var i=0;i<arguments.length;i++)
   {
    body+=arguments[i]+"\n";
   }
   this.object.innerHTML=body;
 }
 L.p.addE=function()
 {
  var dynel=this;
  var handler=arguments[1];
  if(this.object.attachEvent)
  {
   this.object[arguments[0]]=function()
   {
    var e=w.event;
    e.cancelBubble=true;
    return handler(dynel,e.type);
   }
  }
  else if(this.object.addEventListener)
  {
   this.object[arguments[0]]=function()
   {
    return handler(dynel,arguments[0]);
   }
  }
 }
 L.p.removeE=function()
 {
  this.object[arguments[0]]=null;
 }

 L.p.clipTop=function(){if(arguments[0])L.p.setClipTop;else return L.p.getClipTop;}
 L.p.clipRight=function(){if(arguments[0])L.p.setClipRight;else return L.p.getClipRight;}
 L.p.clipBottom=function(){if(arguments[0])L.p.setClipBottom;else return L.p.getClipBottom;}
 L.p.clipLeft=function(){if(arguments[0])L.p.setClipLeft;else return L.p.getClipLeft;} 
 L.p.clipWidth=function(){if(arguments[0])L.p.setClipWidth;else return L.p.getClipWidth;}
 L.p.clipHeight=function(){if(arguments[0])L.p.setClipHeight;else return L.p.getClipHeight;}

 I.p.left=function(){return this.i.offsetLeft;}
  I.p.top=function(){return this.i.offsetTop;}

}
