function popex(n,u,w,h,x) {
  var remote=null;
  if ((x == 2) || (x==3) || (x==4)) {
  args="width="+w+",height="+h+",resizable=no,scrollbars=no,status=0";
  } else {
  args="width="+w+",height="+h+",resizable=yes,scrollbars=yes,status=0";
  }
  remote=window.open(u,n,args);
  pos_top = 0; pos_left = 0;
	pos_left = ((screen.width-w)/2);
	pos_top = ((screen.height-h)/2);
	if ((x==3)|| (x==4)) {
		remote.moveTo(screen.width+100,screen.height+100);
	}
	else remote.moveTo(pos_left,pos_top);

	if ((x==3) ||(x==4)) {
		remote.print();
	} else remote.focus()

  if (remote != null) {
    if (remote.opener == null)
      remote.opener = self;
  }
  if ((x == 1) || (x == 3)) { return remote; }
}

function popexmodal(n,u,w,h,x) {
  var remote=null;
  if ((x == 2) || (x == 3)) {
  args="dialogHeight: "+h+"px; dialogWidth: "+w+"px; title: No; center: Yes; help: No; resizable: No; status: No; ";
  } else { //dialogTop: 150px; dialogLeft: 150px;
  args="dialogHeight: "+h+"px; dialogWidth: "+w+"px; title: No; center: Yes; help: No; resizable: Yes; status: No;";
  }
  remote=window.showModalDialog(u,n,args);


  if (remote != null) {
    if (remote.opener == null)
      remote.opener = self;
  }
  if (x == 1) { return remote; }
}

function _openTgt(url,tgt) {
  args="resizable=yes,scrollbars=yes,status=0";
  remote=window.open(url,tgt,args);
}

function _open(url) {
self.location = url;
}

function preloadImages() {
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=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];}}
}

preloadImages("/img/bg.gif","/img/bd.gif","/img/bm.gif","/img/dot.gif","/img/sbg.gif","/img/sbd.gif","/img/sbm.gif");


