
function getE(id)
{
	return document.getElementById(id);
}

function setVisible(element,visible)
{
	if(element == null)
		return;
	if(visible == true)
	{
		element.style.display='';
	}
	else
	{
		element.style.display='none';
	}
}

function isNum(str){ 
        var patrn=/^[0-9]{1,20}$/; 
        if (patrn.exec(str)) return true; 
        return false; 
} 

function isMobile(str){ 
        //var patrn = /^((\+86)|(86))?(13)\d{9}$/; 
        var patrn = /^(13|15)\d{9}$/; 
        if(patrn.exec(str)) return true; 
        return false;
} 

function isTel(str){ 
        var patrn = /^(\d{3,4}\-)?\d{7,8}$/; 
        if(patrn.exec(str)) return true; 
        return false; 
} 

function isEmail(str){ 
        var patrn = /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/; 
        if(patrn.exec(str)) return true; 
        return false; 
} 

function openpop(url)
{
	var w = window.open(url,'','height=350,width=600,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no');  
	w.focus();
}