
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();
}
MM_reloadPage(true);
// -->

hex=255 // Initial color value.

function fadetext(){ 
     if (hex>0) { //If color is not black yet
        hex-=11; // increase color darkness
        document.getElementById("sample").style.color="rgb("+hex+","+hex+","+hex+")";
       setTimeout("fadetext()",20); 
     } else
        hex=255; //reset hex value
}


full_width = 0;
full_height = 0;
full_src = "";
oldphoto = "";

function MA_switchPhoto(photo,oldp,width,height) {
   	if (document.photoArray==null) document.photoArray = new Array();
  
	lObj = (document.layers)?document.layers['Loading']:MM_findObj('Loading').style;
    lObj.visibility="visible";
	
	if (document.photoArray[photo]==null) {
		document.photoArray[photo] = new Image;
		document.photoArray[photo].src = photo;
	}
	
	if (oldp == "") {	
   	  if (!document.photoArray[photo].complete) {
	 	setTimeout('MA_switchPhoto("'+photo+'","'+oldp+'","'+width+'","'+height+'")',10);
   	  } else {
    	pObj = MM_findObj('previewImage');
    	pObj.setAttribute("src",photo);
		full_width = width;
		full_height = height;
		full_src = photo;
		setTimeout("lObj.visibility='hidden'",300);
	  }
	} else {
	  if (document.photoArray[oldp]==null) {
		document.photoArray[oldp] = new Image;
		document.photoArray[oldp].src = oldp;
	  }
	  if (document.photoArray[photo].complete && document.photoArray[oldp].complete) {
    	pObj = MM_findObj('previewImage');
    	pObj.setAttribute("src",photo);
		oldphoto = oldp;
		full_width = width;
		full_height = height;
		full_src = photo;
		setTimeout("lObj.visibility='hidden'",300);
  	  } else {
		setTimeout('MA_switchPhoto("'+photo+'","'+oldp+'","'+width+'","'+height+'")',10);
	  }
   }
}

function MA_swapImgRestore() {
  pObj = MM_findObj('previewImage');
  pObj.setAttribute("src",full_src);
  rObj = MM_findObj('rewind');
  rObj.setAttribute("src","../rewind_up.gif");
}

function MA_swapImage() {
  pObj = MM_findObj('previewImage');
  pObj.setAttribute("src",oldphoto);
  rObj = MM_findObj('rewind');
  rObj.setAttribute("src","../rewind_down.gif");
}

function MA_showPhoto() {
  photo=full_src.replace("sm_","");
  width=full_width;
  height=full_height;
  JustSoPicWindow(photo,width,height,'* * Click window to close * *','#336666','hug image','0');
}

function JustSoPicWindow(imageName,imageWidth,imageHeight,alt,bgcolor,hugger,hugMargin) {
// by E Michael Brandt of ValleyWebDesigns.com - Please leave these comments intact.
// version 3.0.4  

	if (bgcolor=="") {
		bgcolor="#FFFFFF";
	}
	var adj=10
	var w = screen.width;
	var h = screen.height;
	var byFactor=1;

	if(w<740){
	  var lift=0.90;
	}
	if(w>=740 & w<835){
	  var lift=0.91;
	}
	if(w>=835){
	  var lift=0.93;
	}
	if (imageWidth>w){	
	  byFactor = w / imageWidth;			
	  imageWidth = w;
	  imageHeight = imageHeight * byFactor;
	}
	if (imageHeight>h-adj){
	  byFactor = h / imageHeight;
	  imageWidth = (imageWidth * byFactor);
	  imageHeight = h; 
	}
	   
	var scrWidth = w-adj;
	var scrHeight = (h*lift)-adj;

	if (imageHeight>scrHeight){
  	  imageHeight=imageHeight*lift;
	  imageWidth=imageWidth*lift;
	}

	var posLeft=0;
	var posTop=0;

	if (hugger == "hug image"){
	  if (hugMargin == ""){
	    hugMargin = 0;
	  }
	  var scrHeightTemp = imageHeight - 0 + 2*hugMargin;
	  if (scrHeightTemp < scrHeight) {
		scrHeight = scrHeightTemp;
	  } 
	  var scrWidthTemp = imageWidth - 0 + 2*hugMargin;
	  if (scrWidthTemp < scrWidth) {
		scrWidth = scrWidthTemp;
	  }
	  
	  if (scrHeight<100){scrHeight=100;}
	  if (scrWidth<100){scrWidth=100;}

	  posTop =  ((h-(scrHeight/lift)-adj)/2);
	  posLeft = ((w-(scrWidth)-adj)/2);
 	}

	if (imageHeight > (h*lift)-adj || imageWidth > w-adj){
		imageHeight=imageHeight-adj;
		imageWidth=imageWidth-adj;
	}
	posTop = parseInt(posTop);
	posLeft = parseInt(posLeft);		
	scrWidth = parseInt(scrWidth); 
	scrHeight = parseInt(scrHeight);
	
	var agt=navigator.userAgent.toLowerCase();
	if (agt.indexOf("opera") != -1){
	  var args= new Array();
	  args[0]='parent';
	  args[1]=imageName;
	  var i ; document.MM_returnValue = false;
	  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
	} else {
	newWindow = window.open("vwd_justso.htm","newWindow","width="+scrWidth+",height="+scrHeight+",left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor='+bgcolor+' onBlur="self.close()" onClick="self.close()">');  
	newWindow.document.write('<table width='+imageWidth+' border="0" cellspacing="0" cellpadding="0" align="center" height='+scrHeight+' ><tr><td>');
	newWindow.document.write('<img src="'+imageName+'" width='+imageWidth+' height='+imageHeight+' alt="Click window to close" >'); 
	newWindow.document.write('</td></tr></table></body></html>');
	newWindow.document.close();
	newWindow.focus();
	}
}

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_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_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}

function P7AniMagic(el, x, y, a, b, c, s) { //v2.5 PVII
 var g,elo=el,f="",m=false,d="";x=parseInt(x);y=parseInt(y);
 var t = 'g.p7Magic = setTimeout("P7AniMagic(\''+elo+'\','; 
 if ((g=MM_findObj(el))!=null) {d=(document.layers)?g:g.style;}else{return;}
 if (parseInt(s)>0) {eval(t+x+','+y+','+a+','+b+','+c+',0)",' + s+')');return;}
 var xx=(parseInt(d.left))?parseInt(d.left):0;
 var yy=(parseInt(d.top))?parseInt(d.top):0;
 if(parseInt(c)==1) {x+=xx;y+=yy;m=true;c=0;}
 else if (c==2) {m=false;clearTimeout(g.p7Magic);}
 else {var i=parseInt(a);
  if (eval(g.moved)){clearTimeout(g.p7Magic);}
  if (xx<x){xx+=i;m=true;if(xx>x){xx=x;}}
  if (xx>x){xx-=i;m=true;if(xx<x){xx=x;}}
  if (yy<y){yy+=i;m=true;if(yy>y){yy=y;}}
  if (yy>y){yy-=i;m=true;if(yy<y){yy=y;}}}
 if (m) {if((navigator.appName=="Netscape") && parseInt(navigator.appVersion)>4){
    xx+="px";yy+="px";}
  d.left=xx;d.top=yy;g.moved=true;eval(t+x+','+y+','+a+','+b+','+c+',0)",'+b+')');
  }else {g.moved=false;}
}


function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

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_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];}
}

function YY_Animateimg() { //v3.04
  //copyright (c)1999,2001 yaromat.com
  var args = YY_Animateimg.arguments;
  if (document.images){
    var yyani=eval(args[1]);
    if (args.length>5){
      eval(args[3]+"= new Array()");
      for (var i=5;i<args.length;i=i+2){
        eval(args[3]+"["+ args[3] + ".length]= new Image")
        eval(args[3]+"["+ args[3] + ".length-1].src=\'"+args[i]+"\'")
        eval(args[3]+"["+ args[3] + ".length-1].yyto=\'"+args[i+1]+"\'")
      }
    }
    var yyImgArray = eval(args[3]);
    var yyImage = MM_findObj(args[4]);
    if(yyImgArray[yyani]){
      if(yyImgArray[yyani].yyTimeout) clearTimeout(yyImgArray[yyani].yyTimeout);
      if(yyImage)yyImage.src = yyImgArray[yyani].src;
    }
    if(yyani>=yyImgArray.length-1){args[0]=(args[0]!="-1")?(args[0]-1):args[0]}
    var argStr= 'YY_Animateimg(\"' +args[0]+ '\",\"' +((yyani>=yyImgArray.length-1 && args[0]!=0)?'0':(yyani+1));
    for (var i=2;i<5;i++){argStr+='\",\"'+args[i]}
    argStr+='\")';
    if ((yyani<yyImgArray.length-1) || args[0]!=0&&yyImgArray[yyani]){
      if(yyImgArray[yyani].yyTimeout) clearTimeout(yyImgArray[yyani].yyTimeout);
      yyImgArray[yyani].yyTimeout = setTimeout(argStr,yyImgArray[yyani].yyto);
    }else{if(args[2]!='#')setTimeout(args[2],10)}
  }
}

function YY_ImageGauge(yybgg, yybss, yyfc,yywidth, yyheight, yyhide, yyshowpc, yyendjs){ //v4.00
//copyright (c)1998,2001 Yaromat.com
 var yyready=true; var yyidiv="";
 if (document.images)with (document){
  if (document.preloadArray==null) document.preloadArray = new Array();
  var yyi=preloadArray.length;
  for (var yyj=8;yyj<YY_ImageGauge.arguments.length-1;yyj++){
    preloadArray[yyi] = new Image;
    preloadArray[yyi].src = YY_ImageGauge.arguments[yyj];
    yyi++;
  }
  if (preloadArray){
   var howmany=0;
   for (var yyj=0; yyj < preloadArray.length; yyj++){
     yyready = yyready && preloadArray[yyj].complete;
     if (preloadArray[yyj].complete) {howmany++;}
   }
   var yysuc=Math.round(howmany*100/preloadArray.length);
   if (document.all||document.getElementById){
    var yypos=Math.round(howmany/preloadArray.length*yywidth);
    yyidiv='<table width='+yywidth+' height="'+yyheight+'" bgcolor='+yybgg+' border=0 cellpadding=0 cellspacing=0><tr><td bgcolor='+yybss+' width='+yypos+' style="font-size: 2pt">&nbsp;</td>';
        yyidiv+='<td width='+(yywidth-yypos)+' style="font-size: 2pt">'+((yywidth-yypos)>1?'&nbsp;':'')+'</td></tr></table>';
    if (yyshowpc){yyidiv+='<center><font size=1 face="Arial, sans-serif" color="'+yyfc+'">'+yysuc+'%</font></center>'}
    if(document.all){
          document.all['yyg'].innerHTML=yyidiv;
      if ((yyready)&&(yyhide)){
	  	setTimeout('document.all[\'yyg\'].style.visibility="hidden"',500);
		setTimeout('document.all[\'topmenu\'].style.visibility="visible"',500);
		
		}
        }
        else if(document.getElementById){
          document.getElementById('yyg').innerHTML=yyidiv;
          if ((yyready)&&(yyhide)){setTimeout('document.getElementById("yyg").style.visibility="hidden"',1000);}
        }
   }
   if (document.layers){
    var nnsuc = '<span style="font-size:11px;font-family: Arial, sans-serif;color:'+yyfc+'">'+yysuc+'% </span>';
    if (!document.layers['yyg'].document.layers['yynv']){
      yyidiv='<layer id="yynb" left="0" top="0" width="'+yywidth+'" height="'+yyheight+'" bgcolor='+yybgg+'><font face="sans-serif" size="1"></font></layer>';
      yyidiv+='<layer id="yynv" left="-'+yywidth+'" top="0" width="'+yywidth+'" height="'+yyheight+'" bgcolor='+yybss+'></layer>';
      if (yyshowpc){yyidiv+='<layer id="yypc" left="'+(yywidth/2-15)+'" top="'+yyheight+'" width="30" height="15">'+nnsuc+'</layer>'}
      document.layers['yyg'].document.open();
      document.layers['yyg'].document.write(yyidiv);
      document.layers['yyg'].document.close();
    }else{
      var yypos=Math.round(howmany/preloadArray.length*yywidth-yywidth);
      var nnlayer = document.layers['yyg'].document;
      nnlayer.layers['yynv'].left=yypos;
      if (yyshowpc){
        nnlayer.layers['yypc'].document.write(nnsuc);
        nnlayer.layers['yypc'].document.close();
      }
    }
    if ((yyready)&&(yyhide)){
		setTimeout('document.layers[\'yyg\'].visibility="hide"',500);
		setTimeout('document.layers[\'topmenu\'].visibility="hide"',500);
		
	}
   }
   if (yyready){if(yyendjs!='#')document.location=yyendjs}
   else{setTimeout('YY_ImageGauge("'+yybgg+'","'+ yybss+'","'+ yyfc+'",'+yywidth+','+yyheight+','+yyhide+','+yyshowpc+',"'+ yyendjs+'")',250);}
  }else {setTimeout('YY_ImageGauge("'+yybgg+'","'+yybss+'","'+ yyfc+'",'+yywidth+','+yyheight+','+yyhide+','+yyshowpc+',"'+ yyendjs+'")',500)}
 }
}

<!-- // DDMenu

  var eOpenMenu = null;
  function OpenMenu(eSrc,eMenu){
    eMenu.style.left = eSrc.parentElement.offsetLeft + divMenuBar.offsetLeft;
    eMenu.style.top = divMenuBar.offsetHeight + divMenuBar.offsetTop;
    eMenu.style.visibility = "visible";
    eOpenMenu = eMenu;
  }

  function CloseMenu(eMenu){
    eMenu.style.visibility = "hidden";
    eOpenMenu = null;
  }

  function MenuBar_over(){
    var eSrc = window.event.srcElement;
    if ("A" == eSrc.tagName.toUpperCase()){
      var eMenu = document.all[eSrc.parentElement.id.replace("tdMenuBarItem","divMenu")];
      if (eOpenMenu && eOpenMenu != eMenu){
        CloseMenu(eOpenMenu);}
      if (eMenu){
		  OpenMenu(eSrc,eMenu);}
    }
  }

  function MenuBar_out(){
    var eTo = window.event.toElement;
    if (eOpenMenu && eTo && !eOpenMenu.contains(eTo) && "tblMenuBar" != eTo.id){
      CloseMenu(eOpenMenu)}
	}

  function Menu_out(){
    var eSrc = window.event.toElement;
    if (eOpenMenu && !eOpenMenu.contains(eSrc) && !divMenuBar.contains(eSrc)){
      CloseMenu(eOpenMenu)}
	}

//-->
