function pop(url, x, y){
   window.open(url,'popup','width='+x+',height='+y+',scrollbars=yes');
 }

function Enable() {
  var numControls = document.grp_email.length;
  var boolVal = true;
  var element = null;

if(!grp_email.email_all.checked) {
     boolVal = false;     
 }
for(var aa = 0; aa < numControls; aa++) {
   element = document.grp_email[aa];
if((element.type == "checkbox") && (element.name != "email_all")) {
   element.disabled = boolVal;
if(boolVal) {element.checked = !boolVal;}
     }
  }
}

function limitText(textArea, length) {
if(textArea.value.length > 5000){
   textArea.value = textArea.value.substr(0, length);
  }
 }

function checkTextArea() {
if(document.post_msg.msg_text.value == ""){
   alert('You must enter a message to post!');
   return false;
 }
else {
   return true;
  }
 }

function chkStr(field){
   var str = field.value;
   var reg1 = /'/;
   var reg2 = /"/;

if(str.match(reg1)||str.match(reg2)){
   alert('This is an invalid character!');
   field.value = str.substring(0,str.length-1);
  }
 }

function change2(menu, info){
   parent.menuFrame.location=menu;
   parent.infoFrame.location=info;
 }
function showSpan(which){
if(document.getElementById('TD'+which).focus){
   document.getElementById('Span'+which).style.display='block';
  }
 }

function hideSpan(which){
if(document.getElementById('TD'+which).blur){
   document.getElementById('Span'+which).style.display='none';
  }
 }

function noSubtract(field){
   var str = field.value;
   var reg = /-/;

if(str.match(reg)){
   alert('This is an invalid character!');
   field.value = str.substring(0,str.length-1);
  }
 }

function doHourglass(){
   document.body.style.cursor = "wait";
 }

function openThis(url, x, y){
   features='top=100,left=100,width='+x+',height='+y+',scrollbars=yes,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,directories=yes,status=yes';
   mywindow=window.open(url,'profile',features);
   mywindow.focus();	
 }

   var temp=new Array();
window.onload=function(){
   inf=document.getElementById('menu').getElementsByTagName('div');
   lst=document.getElementById('menu').getElementsByTagName('li');
for(c=0;c<inf.length;c++){
   inf[c].className='hide';
 }

for(c=0;c<lst.length;c++){
   lst[c].id=c;
lst[c].onclick=function(){
   num=this.id;
if(this.id!=temp[this.id]) {
   inf[num].className='';
   temp[num]=num;
 }
else {
   inf[num].className='hide';
   temp[num]=num+1;
    }
   }
  }
 }

