		//-------------------------------------------------
		// bookmark()
		//-------------------------------------------------
		function bookmark(url, description)
		{
			netscape="Please press CTRL+D to add a bookmark to this site."
			if (navigator.appName=='Microsoft Internet Explorer')
			{
				window.external.AddFavorite(url, description);
			}
			else if (navigator.appName=='Netscape')
			{
				alert(netscape);
			}//end if

		}//end function

		//-------------------------------------------------
		// printWindow()
		//-------------------------------------------------
		function printWindow(){
   			
			version = parseInt(navigator.appVersion);
		   	if (version >= 4) window.print();

		}//end function

		//-------------------------------------------------
		// refreshPage()
		//-------------------------------------------------
		function refreshPage(URL){
			
			location.replace(URL);

		}//end function

		//-------------------------------------------------
		// checkEmail()
		//-------------------------------------------------
		function checkEmail(e){
			
			var regX = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
			
			return regX.test(RTrim(e));
			
		}//end function

		//-------------------------------------------------
		// checkURL()
		//-------------------------------------------------
		function checkURL(url){

			/*
				Check if 'http://' is included in url
				If it isn't then add it. 
			*/
			var regX = /http:\/\//;

			if(!regX.test(url)){
				url = "http://" + url;
			}//end if

			regX = /http:\/\/([\w-]+[\.]?)+[\w-]+\.{1}[\w+]/;

			return regX.test(url);

		}//end function

		//-------------------------------------------------
		// trim()
		//-------------------------------------------------
		function Trim(s){
			return LTrim(RTrim(s));
		}//end function

		//-------------------------------------------------
		// LTrim()
		//-------------------------------------------------
		function LTrim(s){
			var regX = /^\s */;
			return s.replace(regX, '');
		}//end function

		//-------------------------------------------------
		// RTrim()
		//-------------------------------------------------
		function RTrim(s){
			var regX = /^\s *$/;
			return s.replace(regX, '');
		}//end function

		//-------------------------------------------------
		// isCreditCard()
		//-------------------------------------------------
		function isCreditCard(st) {
		  // Encoding only works on cards with less than 19 digits
			if (st.length > 19){
    			return (false);
			}//end if

  			sum = 0; mul = 1; l = st.length;
			for (i = 0; i < l; i++) {
				digit = st.substring(l-i-1,l-i);
			    tproduct = parseInt(digit ,10)*mul;
			    if (tproduct >= 10){
			      sum += (tproduct % 10) + 1;
			    }else{
			      sum += tproduct;
				}//end if
			    if (mul == 1){
			      mul++;
			    }else{
			      mul--;
				}//end if
			}//end for
  			if ((sum % 10) == 0){
    			return (true);
			}else{
    			return (false);
			}//end if

		}//end function

		//------------------------------------
		// openWindow()
		//------------------------------------
		function openWindow(url){
			
			window.open(url,"");	
			
		}//end function

		//------------------------------------
		// showmenu
		//------------------------------------
		function showmenu(elmnt)
		{
			document.all(elmnt).style.visibility="visible"
			
		}//end function

		//-------------------------------------
		// hidemenu
		//-------------------------------------
		function hidemenu(elmnt)
		{
			document.all(elmnt).style.visibility="hidden"
			
		}//end function

		//-------------------------------------
		// verify()
		//------------------------------------
		function verify(msg)
		{
			
			if(confirm(msg)){
				return true;
			}else{
				return false;
			}//end if
			
		}//end function

		//------------------------------------
		// checkForInput
		//------------------------------------
		function checkForInput(s)
		{
			var input = Trim(s);

			if(input == null || input == '' || input.length < 1){
				return false;
			}else{
				return true;
			}//endif

		}//end function

		//-----------------------------------
		// SelectAll
		//-----------------------------------
		function selectAll(box)
		{
			for (i = 0; i < box.length; i++){
				if(box[i].checked == false)
				{
					box[i].checked = true;
				}//end if
			}//end for
		}//end toggleAll
		
		//--------------------------------
		// IsSunday()
		//--------------------------------
		function IsSunday(d) {
	
			if(d.getDay()==0){
				return true;
			}else{
				return false;
			}//end if

		}//end function

		//---------------------------------
		// checkDate
		//---------------------------------
		function checkDate(day, mnth, yr){
  
			var dateIsValid = true;       //init flag

			var d = day;
			var m = mnth;
			var y = yr;
	
			if(d > 28){
				switch(m){
					case 2:  //feb
						if(d != 29){                
							dateIsValid = false;
						}else{                  
							if(y%4 != 0){
								dateIsValid = false;
							}
						}
						break;
					case 4: //april
					case 6: //june
					case 9: //sept
					case 11: //nov
						if(d==31){
							dateIsValid=false;
						}
					break;
					default:	
						break;
				}//end switch
			}//end if  

			if(dateIsValid){
				return true;
			}else{
				return false;
			}//end if dateIsValid

		}//end function

		//---------------------------------
		// popUp
		//---------------------------------
		function popUp(PWidth,PHeight,id,page) {

			eval("newwindow"+id+"=window.open('"+page+"','newwindow','scrollbars=1,toolbar=0,location=0,status=0,menubars=0,resizable=1,width="+PWidth+",height="+PHeight+"')");

		}//end function
		


