
 ///////////////////.............///
 //MUSICIANS GATHERING POPUPS
 ////////.................////////
   function muso_logout() {
	  void window.open('/musicians/musicians_options.php?logout=true','MusoLogout','width=10,height=10,scrollbars=no');
   }

   function muso_login()  {
          void window.open('/musicians/musicians_login.php','MusoLogin','width=350,height=250,scrollbars=yes');
   }

   //popup the musicians description panel
   function desc_popup(mid) {   
     void window.open("/musicians/musicians_details.php?mid="+mid,"MDesc","width=500,height=480,scrollbars=1");
   }
   
   //popup to email musician
   function mail_popup(mid) {
    void window.open('/musicians/musicians_email.php?recp_mids='+mid,'EmailWin','width=450,height=415,scrollbars=no');	
   }
   
   //popup musician recordings
   function rec_popup(mid) {
     void window.open('/musicians/musicians_recordings.php?mid='+mid,'RecWin','width=425,height=415,scrollbars=1');	
   }
   
   //popup the muso website
   function web_popup(addr) {
     void window.open(addr,'NewWin');	
   }
   
   //popup to view classified
   function cinfo_popup(cid) {
   
     void window.open('/musicians/musicians_classifieds_view.php?cid='+cid,'CViewWin','width=500,height=375,scrollbars=1');	
   }
   
   function popupJam(mySel) {
    
    var idVal = mySel[mySel.selectedIndex].value;
    if (idVal != "") 
     window.open("/musicians/musicians_recordings_view.php?rid="+mySel[mySel.selectedIndex].value,"MRecord","width=450,height=300,scrollbars=1");	

  }
  
  //////////////......///
//MY MUSIC POPUPS  
 //////////.......///
  
   //popup to view either composition/improvisation/repertoire/song
   function view_popup(id,type) {
     void window.open('/mymusic/mymusic_'+type+'_view.php?'+type.charAt(0)+'id='+id,'ViewWin','width=500,height=375,scrollbars=1');	
   }
  
   
 ///////////////////  
//GENERIC FUNCTIONS   
 ///////////////////
 
   function confirmDel(myForm) { 
   	 if (confirm("Are you sure you want to delete this?")) {
         	 myForm.deleteFlag.value = "true";
       
                 myForm.submit();
       
                 return true;
          } else return false;
   }
    
  //allows item
  function FormItem(field,display) {
     this.field = field;
     this.display = display;	
  }
     
  //check_array is array of FormItem where each has the form field and the message to display   
  function formCheck(myForm,check_array) {
  	
     //allow delete submissions to go through 
     if (myForm.deleteFlag && myForm.deleteFlag.value == "true") 
       return true;
     
     var msg = "";
     
     for (var i = 0; i < check_array.length; i++) {
        if (eval("myForm." + (check_array[i]).field + " && " + "myForm." + (check_array[i]).field + ".value") == "")
           msg = "the " + (check_array[i]).display;
     }
     
       
       
     if (msg != "") {
       alert("Please enter " + msg);
       return false;
     } else if (myForm.password && myForm.password_test && myForm.password.value != myForm.password_test.value) {
       alert("Passwords do not match");
       return false;	
     } 
       
     
     
     return true;
  
  }
  
  
  

   function changePage(amount) {
      document.pageChooser.row_start.value = Number(document.pageChooser.row_start.value) + amount;
      
      if (Number(document.pageChooser.row_start.value) < 0) 
         document.pageChooser.row_start.value = 0;  	
      
      document.pageChooser.submit();
   }
