function Netphiles_preloadImages(){
  var d=document;
  if(d.images){
    if(!d.Netphiles_p) d.Netphiles_p=new Array();
    var i,j=d.Netphiles_p.length,a=Netphiles_preloadImages.arguments;
    for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){
      d.Netphiles_p[j]=new Image; d.Netphiles_p[j++].src=a[i];
    }
  }
}

function Netphiles_findObj(n, d){
  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=Netphiles_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n);
  return x;
}

function Netphiles_nbGroup(event, grpName){
  var i,img,nbArr,args=Netphiles_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = Netphiles_findObj(args[2])) != null && !img.Netphiles_init) {
      img.Netphiles_init = true;
      img.Netphiles_up = args[3];
      img.Netphiles_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2)
      if ((img = Netphiles_findObj(args[i])) != null) {
        if (!img.Netphiles_up) img.Netphiles_up = img.src;
        img.src = img.Netphiles_dn = args[i+1];
        nbArr[nbArr.length] = img;
      }
    }
  } else if (event == "over") {
    document.Netphiles_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3)
    if ((img = Netphiles_findObj(args[i])) != null) {
      if (!img.Netphiles_up) img.Netphiles_up = img.src;
      img.src = (img.Netphiles_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.Netphiles_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.Netphiles_nbOver.length; i++) {
      img = document.Netphiles_nbOver[i];
      img.src = (img.Netphiles_dn) ? img.Netphiles_dn : img.Netphiles_up;
    }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr)
      for (i=0; i < nbArr.length; i++) {
        img=nbArr[i];
        img.src = img.Netphiles_up;
        img.Netphiles_dn = 0;
      }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2)
    if ((img = Netphiles_findObj(args[i])) != null) {
      if (!img.Netphiles_up) img.Netphiles_up = img.src;
      img.src = img.Netphiles_dn = (args[i+1])? args[i+1] : img.Netphiles_up;
      nbArr[nbArr.length] = img;
    }
  }
}

function Netphiles_swapImage(){
  var i,j=0,x,a=Netphiles_swapImage.arguments;
  document.Netphiles_sr=new Array;
  for(i=0;i<(a.length-2);i+=3)
    if ((x=Netphiles_findObj(a[i]))!=null){
      document.Netphiles_sr[j++]=x;
      if(!x.oSrc) x.oSrc=x.src;
      x.src=a[i+2];
    }
}

function Netphiles_swapImgRestore(){
  var i,x,a=document.Netphiles_sr;
  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function popUp(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=398,height=730');");
}

function Netphiles_reloadPage(init){
  if (init==true) with (navigator) {
    if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
      document.Netphiles_pgW=innerWidth;
      document.Netphiles_pgH=innerHeight;
      onresize=Netphiles_reloadPage;
    }
  } else if (innerWidth!=document.Netphiles_pgW || innerHeight!=document.Netphiles_pgH) {
    location.reload();
  }
}
Netphiles_reloadPage(true);

function P7_JumpMenu(selObj,restore){ //v1.4 by Project Seven
	var theFullString = selObj.options[selObj.selectedIndex].value;
	if (restore) selObj.selectedIndex=0;
	var theLength = theFullString.length;
	var endPos = theFullString.lastIndexOf("~");
	var theUrl, theTarget, theParent;
	if (endPos > 0) {theUrl = theFullString.substring(0,endPos);}
	else {theUrl = theFullString;}
	endPos++
	if (endPos < theLength) {theTarget = theFullString.substring(endPos,theLength)}
	else {theTarget = "window:Main";}
	if (theTarget == "window:New") {window.open(theUrl);}
	else if (theTarget == "window:Main") {eval("parent.location='"+theUrl+"'");}
	else {eval("parent.frames[\'"+theTarget+"\'].location='"+theUrl+"'");}
}

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 P7_JumpMenuGo(selName,restore){ //v1.1 Beta Version by Project Seven
  var selObj = MM_findObj(selName); if (selObj) P7_JumpMenu(selObj,restore);
}

var maxW,maxH,fromX,fromY,toX,toY,adjX,adjY,zBox,zStep=0,zLink,zNew;

function zoomBox(evt,zlink,maxw,maxh,tox,toy) {
if (arguments.length > 2) zNew=1;
scrollH=(window.pageYOffset!=null)?window.pageYOffset:document.body.scrollTop;
maxW=maxw?maxw:window.innerWidth?innerWidth:document.body.clientWidth;
maxH=maxh?maxh:window.innerHeight?innerHeight:document.body.clientHeight;
toX=tox?tox:0;
toY=(toy?toy:0)+scrollH;
fromX=evt.pageX?evt.pageX:evt.clientX;
fromY=(evt.pageY?evt.pageY:evt.clientY)+(document.all?scrollH:0);
adjX=toX+evt.screenX-fromX;
adjY=toY+evt.screenY-fromY;
if (document.createElement && document.body.appendChild && !zBox) {
	zBox=document.createElement("div");
	zBox.style.position="absolute";
	document.body.appendChild(zBox);
} else if (document.all && !zBox) {
	document.all[document.all.length-1].outerHTML+='<div id="zBoxDiv" style="position:absolute"></div>';
	zBox=document.all.zBoxDiv;
} else if (document.layers && !zBox) {
	zBox=new Layer(maxW);
	zBox.style=zBox;
	}
zLink=zlink;
doZoom();
}

function doZoom() {
zStep+=1;
zPct=(10-zStep)/10
if (document.layers) {
	zBox.moveTo(toX+zPct*(fromX-toX),toY+zPct*(fromY-toY));
	zBox.document.open();
	zBox.document.write("<table width='"+maxW*(1-zPct)+"' height="+maxH*(1-zPct)+" border=1 bgcolor=#FFFFFF cellspacing=0><tr><td></td></tr></table>");
	zBox.document.close();
	} else {
	zBox.style.border="1px solid #AAAAAA";
	zBox.style.left=toX+zPct*(fromX-toX);
	zBox.style.top=toY+zPct*(fromY-toY);
	zBox.style.width=maxW*(1-zPct);
	zBox.style.height=maxH*(1-zPct);
	}
zBox.style.visibility="visible";
if (zStep < 10) setTimeout("doZoom("+fromX+","+fromY+","+toX+","+toY+")",30);
else {
	zBox.style.visibility='hidden';
	zStep=0;
	if (zLink && !zNew) location.href=zLink.href;
	else if (zLink && zNew) {
		var w=window.open(zLink.href,'','width='+maxW+',height='+maxH+',left='+adjX+',top='+adjY+',scrollbars,resizable,titlebar=0');
		zNew=null;
		}
	}
}

if (document.layers) {
origWidth = innerWidth;
origHeight = innerHeight;}
function reDo() {
if (innerWidth != origWidth || innerHeight != origHeight)
location.reload();}
if (document.layers) onresize = reDo;
//tmtC_NNresizeFixEnd
  function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=420,height=515');");
  }

