
function MM_reloadPage(init) 
{ //reloads the window if Nav4 resized
  if (init==true) with (navigator) 
  {
    if ((appName=="Netscape")&&(parseInt(appVersion)==4)) 
    {
      document.MM_pgW=innerWidth; 
      document.MM_pgH=innerHeight; 
      onresize=MM_reloadPage; 
    }
  }
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) 
    location.reload();
}

function popUp(URL,w,h) 
{
  day = new Date();
  id = day.getTime();
  if (typeof(w) == "undefined")
  {
    w=760;
    h=700;
  }
  eval("page" + id + " = window.open(URL, '" + id + 
    "', 'toolbars=0,location=0,statusbars=0,menubars=0,scrollbars=yes," +
    "resizable=yes,width=" + w + ",height=" + h + ",left=2,top=34');");
}

function confirmation(f) 
{
  var bchoice
  bchoice=window.confirm ('This item will be deleted, are you really sure you want to do this?')
  if (bchoice==true)
  {
    f.deletecheck.value = "SomethingThatIsNotEmpty"; 
    f.submit()
  }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

MM_reloadPage(true);

function set_selection(sel)
{
  val = sel.getAttribute("val");
  for (i=0; i<sel.length; i++)
  {
    option = sel.options[i];
    option.selected = (option.value == val);
  }
}

function copy_selection(from,to)
{
  val = to.getAttribute("val");
  options = to.options;
  for (i=0; i<from.length; i++)
  {
    option = from.options[i];
    newopt = document.createElement("option");
    newopt.text = option.text;
    newopt.value = option.value;
    try
    {
      // for IE earlier than version 8
      to.add(newopt,to.options[null]);
    }
    catch (e)
    {
      to.add(newopt,null);
    }
  }
  set_selection(to);
}

function submitenter(myfield,e)
{
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
else return true;

if (keycode == 13)
   {
   myfield.form.submit();
   return false;
   }
else
   return true;
}

// Copyright 2001 Idocs.com      
// Distribute this script freely, but keep this notice in place

// backlink object initializer
function backlink() {
	this.text = 'Go Back';
	this.type = 'link';
	this.write = backlink_write;
	this.form = true;
}


// write method
function backlink_write() {
	if (! window.history) return;
	if (window.history.length == 0)return;

	this.type = this.type.toLowerCase();
	if (this.type == 'button') {
		if (this.form)
			document.write('<FORM>');
		document.write('<INPUT TYPE=BUTTON onClick="history.back(-1)" VALUE="', this.text, '"');
		if (this.otheratts) document.write(' ', this.otheratts);
		document.write('>');
		if (this.form)document.write('<\/FORM>');
	} else {
		document.write('<A HREF="javascript:history.back(-1)"');
		if (this.otheratts)
			document.write(' ', this.otheratts);
		document.write('>');
		if (this.type == 'image' || this.type == 'img') {
			document.write('<IMG SRC="', this.src, '" ALT="', this.text, '"');
			if (this.width) document.write(' WIDTH=', this.width);
			if (this.height) document.write(' HEIGHT=', this.height);
			if (this.otherimgatts) document.write(' ', this.otherimgatts);
			document.write(' BORDER=0>');
		}
		else
			document.write(this.text);
		document.write('<\/A>');
	}
}

var TINY={};

function T$(i){return document.getElementById(i)}
function T$$(e,p){return p.getElementsByTagName(e)}

TINY.dropdown=function(){
	var p={fade:1,slide:1,active:0,timeout:200}, init=function(n,o){
		for(s in o){p[s]=o[s]} p.n=n; this.build()
	};
	init.prototype.build=function(){
		this.h=[]; this.c=[]; this.z=1000;
		var s=T$$('ul',T$(p.id)), l=s.length, i=0; p.speed=p.speed?p.speed*.1:.5;
		for(i;i<l;i++){
			var h=s[i].parentNode; this.h[i]=h; this.c[i]=s[i];
			h.onmouseover=new Function(p.n+'.show('+i+',1)');
			h.onmouseout=new Function(p.n+'.show('+i+')')
		}
	};
	init.prototype.show=function(x,d){
		var c=this.c[x], h=this.h[x];
		clearInterval(c.t); clearInterval(c.i); c.style.overflow='hidden';
		if(d){
			if(p.active&&h.className.indexOf(p.active)==-1){h.className+=' '+p.active}
			if(p.fade||p.slide){
				c.style.display='block';
				if(!c.m){
					if(p.slide){
						c.style.visibility='hidden'; c.m=c.offsetHeight; c.style.height='0'; c.style.visibility=''
					}else{
						c.m=100; c.style.opacity=0; c.style.filter='alpha(opacity=0)'
					}
					c.v=0
				}
				if(p.slide){
					if(c.m==c.v){
						c.style.overflow='visible'
					}else{
						c.style.zIndex=this.z; this.z++; c.i=setInterval(function(){slide(c,c.m,1)},20)
					}
				}else{
					c.style.zIndex=this.z; this.z++; c.i=setInterval(function(){slide(c,c.m,1)},20)
				}
			}else{
				c.style.zIndex=this.z; c.style.display='block'
			}
		}else{
			c.t=setTimeout(function(){hide(c,p.fade||p.slide?1:0,h,p.active)},p.timeout)
		}
	};
	function hide(c,t,h,s){
		if(s){h.className=h.className.replace(s,'')}
		if(t){c.i=setInterval(function(){slide(c,0,-1)},20)}else{c.style.display='none'}
	}
	function slide(c,t,d){
		if(c.v==t){
			clearInterval(c.i); c.i=0;
			if(d==1){
				if(p.fade){c.style.filter=''; c.style.opacity=1}
				c.style.overflow='visible'
			}
		}else{
			c.v=(t-Math.floor(Math.abs(t-c.v)*p.speed)*d);
			if(p.slide){c.style.height=c.v+'px'}
			if(p.fade){var o=c.v/c.m; c.style.opacity=o; c.style.filter='alpha(opacity='+(o*100)+')'}
		}
	}
	return{init:init}
}();

var scrollerheight;
var cross_scroller;
var copyspeed,scrollerspeed;
var scroll_interval_id;

function scroll_pause()
{
  copyspeed=0;
}

function scroll_resume()
{
  copyspeed=scrollerspeed;
}

function scroll_initialize(id)
{
  obj = document.getElementById(id);
  var scrollercontent = obj.innerHTML;
  obj.innerHTML = '<div id="iescroller" style="position:absolute;left:0px;top:0px;width:100%;" onMouseover="scroll_pause()" onMouseout="scroll_resume()"></div>';
  scrollerspeed=1; // Scrollers speed here (larger is faster 1-10)
  scrollerspeed=(document.all)? scrollerspeed : Math.max(1, scrollerspeed-1); //slow speed down by 1 for NS
  copyspeed=scrollerspeed;
  cross_scroller=document.getElementById? document.getElementById("iescroller") : document.all.iescroller;
  scrollerheight = cross_scroller.parentNode.style.height;
  cross_scroller.style.top=0; //parseInt(scrollerheight)+8+"px";
  cross_scroller.innerHTML=scrollercontent;
  scroll_interval_id=setInterval("scroll_scroller()",2000);
}

function scroll_scroller()
{
  clearInterval(scroll_interval_id);
  scroll_interval_id=setInterval("scroll_scroller()",40);
  var actualheight=cross_scroller.offsetHeight;
  if (parseInt(cross_scroller.style.top)>(actualheight*(-1)+8))
    cross_scroller.style.top=parseInt(cross_scroller.style.top)-copyspeed+"px";
  else
    cross_scroller.style.top=parseInt(scrollerheight)+8+"px";
}



