// JavaScript Document
function gotopage(url){
	window.location = url;}
	
function reloadCaptcha(){
		 var rand_no = Math.random();
	 	 var date_obj = new Date();
		 document.getElementById("captcha_image").src = 'captcha/captcha.php?c=' + rand_no + '&rnd=' + date_obj.getTime();		    
		 return false;
 }

function chk_form(){
		$(":input.req + span.require").remove();
		$(":input.req").each(function(){
			$(this).each(function(){	
				if($(this).val()==""){
					$(this).after("<span class=require> * Required.</span>");
				}
			});
		});
		if($(":input.req").next().is(".require")==false){
			return true;
		}else{
			return false;
		}
}
function chk_form_sm(){
		$(":input.req + span.require").remove();
		$(":input.req").each(function(){
			$(this).each(function(){	
				if($(this).val()==""){
					$(this).after("<span class=require> * </span>");
					
				}
			});
		});
		
		if($(":input.req").next().is(".require")==false){
			$('#msgValidation').hide();
			return true;
		}else{
			$('#msgValidation').show();
			return false;
			
		}
}
	 //Javascript to Allow Only Numbers to Be Entered in a TextBox
	 // ex. <INPUT id="txtChar" onkeypress="return isNumberKey(event)" type="text" name="txtChar">
      function isNumberKey(evt)
      {
         var charCode = (evt.which) ? evt.which : event.keyCode
         if (charCode > 31 && (charCode < 48 || charCode > 57))
		 {
            return false;
		 }else{
			return true;
		 }
      }
	  
	function switchShowaAndHide(divID,status)
	{
		  if(status=="0"){
			  $("#"+divID).hide();
		  }else{
			  $("#"+divID).show();
		  }
	}




