function emptyOthers(rad_id){
	if(rad_id=="curmember_no"){
		document.getElementById("curanet_email").value="";
	}
}

function selectRadio(rad_id){
	document.getElementById(rad_id).checked=true;
}

function postForm(form_id, toPage){
	document.getElementById(form_id).action=toPage;
	document.getElementById(form_id).submit();
}

function verifyAction(sFormId, sAction, args){
	var confirmAction;
	switch(sFormId){
		case "":
			
		break;
	}
	if (confirmAction) {
		return true;
	} else {
		return false;
	}
}

function setSelectVal(sel_id, val){
	document.getElementById(sel_id).value=val;
}

function setInputVal(id, val){
	document.getElementById(id).value=val;
}

//***************************//
//*							*//
//*		EMAIL FUNCTIONS		*//
//*							*//
//***************************//

var curanetMailDomain = "@cura.net";
var mioMailDomain = "@mio.an";

function isValidEmail(sEmail){
    var isValid;
	var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
    if (!sEmail.match(re)) {
        isValid = false; 
    }
	else {
		isValid = true; 
	}
    return isValid;
}

function getUserFromMail(sEmail){
	var splitName = sEmail.split("@");
	return splitName[0];
}

function getDomainFromMail(sEmail){
	var splitName = sEmail.split("@");
	return splitName[1];
}

function isNumeric(val){
	var isNumeric;
	if (isNaN(val)){
		return isNumeric = false;
	}
	else {
		return isNumeric = true;
	}
}

