/****************************************************
     Author: Eric King
     Url: http://redrival.com/eak/index.shtml
     This script is free to use as long as this info is left in
     Featured on Dynamic Drive script library (http://www.dynamicdrive.com)
****************************************************/
     
/* some handly Javascript functions, collected (rather than written...) by Graham Stark
 * build a pop-up window and give it focus.
 **/

function NewWindow(mypage,myname,w,h,scroll,horiz_pos){
       
       if(horiz_pos=="center"){
          LeftHoriz_position=(screen.width)?(screen.width-w)/2:100;
          TopPosition=(screen.height)?(screen.height-h)/2:100;
       } else if((horiz_pos!="center" && horiz_pos!="random") || horiz_pos==null){
          LeftPosition=0;TopPosition=20
       }
       settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
       w = window.open(mypage,myname,settings);
       w.focus();
}





/**
 * frankly, I don't know what this does, but it was in the dummy files...
*/
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

/* 
   check or uncheck a group of radio buttons
   author: Vincent Puglia, GrassBlade Software
   site:   http://members.aol.com/grassblad
*/
function selectAll(formObj, unselect) 
{
   for (var i=0;i < formObj.length;i++) 
   {
      fldObj = formObj.elements[i];
      if (fldObj.type == 'checkbox')
      { 
         if( unselect )
            fldObj.checked = false;
         else 
            fldObj.checked = true; 
       }
   }
}

function MacroWindow( mypage, rowTitle, colTitle ){
   xsettings = 'width=650,height=500,top=70,left=70,scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
   w = window.open(mypage,'',xsettings);
   w.focus();
}

/*
 *
*/
function MicroWindow( mypage, rowTitle ){
       xsettings='width=500,height=750,top=70,left=70,scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
       w = window.open(mypage,'',xsettings);
       w.focus();
}
