
 pageTitle = "";
 
 
 function Remove_Spaces(string) {
 
  string = string + " "
  newString = ""
  
  schars = string.split(" ")
 
  for(j=0;j<schars.length;j++)
      newString = newString + schars[j]
  
  return newString
  
 } // end function


 function Check_Email(email) {

  ss = ""
  at = email.indexOf("@")
  
  if(at == -1)	
	  ss = "Not a valid e-mail"  
  
  return ss
    
 } // end function
 
 

 function open_win_data(url) {

   windowprops = "top=0,"
               + "left=0," 
               + "toolbar=no,"
               + "location=no,"
               + "directories=no,"
               + "menubar=no,"
               + "copyhistory=yes,"
               + "status=no,"
               + "resizable=yes,"
               + "scrollbars=yes,"
               + "width=500,"
               + "height=500";

   page = "popup.asp?page=" + url  
   window.open(page, "", windowprops);

 } // end function


 function open_win_images(url) {

   windowprops = "top=0,"
               + "left=0," 
               + "toolbar=no,"
               + "location=no,"
               + "directories=no,"
               + "menubar=no,"
               + "copyhistory=yes,"
               + "status=no,"
               + "resizable=yes,"
               + "scrollbars=yes,"
               + "width=100,"
               + "height=100";

   page = "images.asp?page=" + url  
   window.open(page, "", windowprops);

 } // end function



 function validation(v, lang, ftarget) {

   len = document.items.length;
   re = 0;
    
   if(v == "modify") {

    for(i=0;i<len;i++) {
      if(document.items.elements[i].type == "radio") {
       if(document.items.elements[i].checked == true) {
          re++;
       }
      }   
    }   
   
    if(re == 0) {
       alert("Select One Account");
    }
          
   } 
   else if(v == "disable" || v == "enable" || v == "delete") {

    for(i=0;i<len;i++) {
      if(document.items.elements[i].type == "checkbox") {
       if(document.items.elements[i].checked == true) {
          re++;
       }
      }   
    }   
   
    if(re == 0) {
       alert("Select at least One Account");
    }
    else {
       document.items.dataaction.value = v;
       dfaction = "admin_area/manage.asp?";
       
       dfaction += "page=" + ftarget;
          
       document.items.action = dfaction;   
    }

   } 
   
   if(re != 0) {
      document.items.submit();
   }   
      
 } // end function
