	function removeDefault(element) {
  		if (element.value.charAt(0) == ' '){
	  		element.value = '';
  		}
	}
	function textval(language){
		var ret=false;
		var text="english";
		removeSearchDefault(document.getElementById('keyword'));
		removeSearchDefault(document.getElementById('institution'));
		var subject=document.getElementById('keyword').value;
		var institution=document.getElementById('institution').value;
		var filterSKeyword=subject.replace(/[^a-zA-Z0-9]+/g,'');
		var filterIKeyword=institution.replace(/[^a-zA-Z0-9]+/g,'');		
		if(((filterIKeyword!="" && filterIKeyword.indexOf("eg.")<0))){
			ret=true;
		}else if(filterSKeyword!=""){
			ret=true;
		}else{
			if (language.indexOf(text)==0){
				alert('Please enter a subject or valid uni/college');
			}else{
				alert('Rhowch enw pwnc neu brifysgol/coleg dilys');
			}
		}
	    return ret;
	}

	function removeSearchDefault(element) {
		if (element.value.indexOf(' enter') == 0 || element.value.indexOf(' rhowch') == 0 || element.value.length==0 || element.value.indexOf(' allweddair') == 0 || element.value.indexOf(' broad') == 0)
			element.value = '';
	}

	function validateInstitution(language){
    	var text="english";
		var ret=false;
		var institution=document.getElementById('instkeyword').value;
		var filterIKeyword=institution.replace(/[^a-zA-Z0-9]+/g,'');
		if(filterIKeyword!="" && filterIKeyword.indexOf("eg.")<0){
			ret=true;
		}else{
			if (language.indexOf(text)==0){
				alert('Please enter a uni/college');
			}else{
				alert('Rhowch enw prifysgol/coleg');
			}
		}
		return ret;
	}

	
	

	
	
	