<!--    var theWaitWindow = null;   
  // temporarily window while calling a script    
  
 
function view_help(){      
     var options = "toolbar=0,status=0,menubar=0,scrollbars=1," +                
                   "resizable=1,width=800,height=600";      
     var url = "http://www.pgdcanada.com/searchhelp/index.html";      
     window.open(url,"", options);           
 }   
  function x_member_012_window() {        
    var width = "800";        
    var height = "600";       
    var url = "http://pgdcanada.com/member/index.php";      
    options = "toolbar=0,status=0,menubar=0,scrollbars=1," +                
              "resizable=1,width=800,height=600";       
    var mywin = window.open(url,"memWin", options);       
    mywin.focus();    
   } 
   function _JSWait(msg){  	  
   	 var option = "width=400, height=150," +
   	 	          "resizable=yes,"+			 
   	 	          "menubar=no," +			 
   	 	          "toolbar=no," +			 
   	 	          "location=no," +			 
   	 	          "status=no, " + 			 
   	 	          "left=80, " +			 
   	 	          "top=80 ";  	  
   	 var newWin = window.open('/pwait.php?msg='+ msg,'waitWin',option);  	  
   	 newWin.focus();  	  
   	 return newWin;    
   	}        
   	var max_len = 225;    
   	function count(desc){       
   	  var desc_len = desc.value.length;       
   	  if(desc_len < max_len){          
   	    var cnt_id = document.getElementById("maxchar");          
   	    cnt_id.innerHTML = (max_len - desc_len);       
   	  }else{          
   	    alert("You may only type 255 characters in this box");          
   	    desc.focus();       
   	  }    
   	 }   
   	 function select(obj,msg){          
   	   obj.focus();          
   	   obj.select();          
   	   alert(msg);          
   	   return false;    
   	 }        
   	 function select_menu(obj,msg){          
   	   obj.focus();          
   	   alert(msg);          
   	   return false;    
   	 }        
   	 
   	 function firstUpper(str){       
   	   var b = str.charAt(0).toUpperCase();       
   	   var b = b + str.slice(1,str.length).toLowerCase();       
   	   return b;    
   	 }         
   	 
   	 function is_valid(obj) {       
   	   var invalid = "!\"#%&\'()$;<=>?[\\]*+,-./:^";       
   	   for(i=0;i <invalid.length;i++){           
   	     if(obj.value.indexOf(invalid.charAt(i)) >= 0){              
   	       return false;           
   	     }       
   	   }       
   	   return true;    
   	 }        
   	 function is_digit(obj) {       
   	    var isValid = 1;      
   	    for(i=0;i<obj.value.length;i++){        
   	       var ch = obj.value.charCodeAt(i);        
   	       isvalid = (ch >= 48 && ch <= 57);        
   	       if(!isValid) return false;      
   	    }      
   	    isvalid = !isNaN(obj.value);      
   	    return isvalid;    
   	 }  
   	 
   	 function is_empty(obj) {        
   	   obj.value = L_trim(obj);        
   	   obj.value = R_trim(obj);      	
   	   if ((obj.value.length==0) || (obj.value==null)) {         
   	     return true;        
   	   }else{           
   	     return false;        
   	   }    
   	 }        
   	 
   	 function L_trim(obj){       
   	    var hasChar = false;       
   	    var tempObjVlaue = "";       
   	    for(i = 0; i < obj.value.length ; i++){          
   	      cur_char = obj.value.charCodeAt(i);          
   	      if(cur_char != 32)            
   	        hasChar = true;                      
   	        if(hasChar)             
   	          return obj.value.substr(i);       
   	      }       
   	      return obj.value;    
   	 }        
   	 
   	 function R_trim(obj){       
   	   var hasChar = false;       
   	   var tempObjVlaue = "";       
   	   var cur_char = "";       
   	   for(i = obj.value.length; i >= 0 ; i--){          
   	      cur_char = obj.value.charCodeAt(i-1);          
   	      if(cur_char != 32)            
   	        hasChar = true;                      
   	        if(hasChar){             
   	          return obj.value.substr(0,i);          
   	        }          
   	      }       
   	      return obj.value;    
   	  }        
   	  
   	  function isValidPhone(phone) {	  
   	    var valid = true;	   
   	    var GoodChars = "0123456789()-+ "	   
   	    var i = 0	   
   	    for (i =0; valid  && i <= phone.value.length -1; i++) {	      
   	      if (GoodChars.indexOf(phone.value.charAt(i)) == -1) {                
   	         valid = false;	       
   	      } 	   
   	    } 	   
   	    return valid;     
   	  }        
   	  
   	  function isValidEmail(str) {       
   	    // are regular expressions supported?       
   	    var supported = 0;       
   	    if (window.RegExp) {    	    
   	      var tempStr = "a";	    
   	      var tempReg = new RegExp(tempStr);	    
   	      if (tempReg.test(tempStr)) 
   	        supported = 1;       
   	      }       
   	      if (!supported)           
   	         return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);                 
   	         var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");       
   	         var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");       
   	         return (!r1.test(str) && r2.test(str));    
   	   }         
   	   
   	   function _wait_window(){      
   	     if(theWaitWindow != null)        
   	        theWaitWindow.close();    
   	     }        
   	     
   	     function isValidCategory(obj,newCat,icase){       
   	        var len = obj.options.length;       
   	        for(i = 0; i < len;i++){          
   	           var m_value = obj.options[i].text;          
   	           var new_value = newCat.value;          
   	           if(icase.checked){             
   	              m_value = m_value.toUpperCase();             
   	              new_value = new_value.toUpperCase();          
   	           }          
   	           if(m_value  == new_value){            
   	             obj.options[i].selected = true;            
   	               return  
   	             select_menu(obj,new_value + " category already exist");          
   	           }       
   	        }       
   	        return true;    
   	      }        
   	      
   	      function addItem(des,src){      
   	        if(src.type == "select-one"){       
   	             des.value = src.options[src.options.selectedIndex].text;      
   	        }else{         
   	             alert("there is no value to add");         
   	             des.style.background = "#ffcc00";      
   	        }    
   	      }     
   	      acc_key = Math.floor(Math.random()*1000000);    
   	      acc_key = "pgd_can_" +acc_key;    // -->