function provincechanged(){
//alert('Jesus:'+$("select#province").val());
	//$.get("../../admin/getlocations.php",{id:val},function(data){$("select#location").html(data)});
	if($("select#province").val()==-1)
		$("select#location").attr("disabled", "disabled");
	else{
		$("select#location").removeAttr("disabled");
		$.get("getlocations.php",{id:$("select#province").val()},function(data){$("select#location").html(data)});
	}
}
function submitNow(){
	if(!jcap()){
		document.getElementById('errorsDiv').innerHTML='Error: Text image must be entered correctly';
		return false;
	}else{
		 var html = $.ajax({
		 	type: "POST",
  			url: "checker.php",
			data:"description="+$("textarea#description").val()+"&contact_person="+$("input#contact_person").val()+"&contact_number="+$("input#contact_number").val()+"&contact_email="+$("input#contact_email").val()+"&name="+$("input#name").val()+"&email="+$("input#email").val()+"&confirm="+$("input#confirm").val(),
			async: false
 			}).responseText;
			

		if(html=='')
			return true;
		else{
			document.getElementById('errorsDiv').innerHTML='Error(s):'+html;
			return false;
		}	
	}
}

function anotherimage(){
	cimg('captcha');
}

function provincechanged1(){
		$.get("getlocations.no.all.php",{id:$("select#province1").val()},function(data){$("select#location1").html(data)});
}
function changeFont(thisDiv,hover){
	if(hover){
		$(thisDiv).attr("class", "data_hover");
	}else{
		$(thisDiv).attr("class", "data_normal");
	}
}
function limitText(){
	if( $("#description").val().length>600){
		$("#description").val($("#description").val().substring(0,600));
		alert('600 characters only');
	}else{
		limitLabel=document.getElementById('limit');
		limitLabel.innerHTML= (600 - ($("#description").val().length)) + ' characters remaining';
	}
}