//、是否为空

function isempty(v) {
    return !((v == null) || (v.length == 0) || /^\s+$/.test(v));
}

//2、是否数字

function isnumber(v) {
    return (!isNaN(v) && !/^\s+$/.test(v));
}

//3、是否英文

function isenglish(v) {
    return /^[a-zA-Z]+$/.test(v);
}

//4、是否汉字

function ischinese(v) {
    return /^[\u4e00-\u9fa5]+$/.test(v);
}

//5、是否字母数字或汉字

function isennumcn(v){
   	return /^[\u4e00-\u9fa5-a-zA-Z-0-9]+$/.test(v);
}

//6、是否邮件地址

function isemail(v){
   	return /\w{1,}[@][\w\-]{1,}([.]([\w\-]{1,})){1,3}$/.test(v);
}

//7、是否电话号码

function isphone(v){
   	return /^[0-9-]+$/.test(v);
}

//8、是否手机

function ismobilephone(v){
    return /(^0?[1][35][0-9]{9}$)/.test(v);
}

//9、是否邮编

function iszip(v){
    return /^[1-9]\d{5}$/.test(v);
}

//10、是否 url

function isUrl(v) {
    return   /^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/.test(v)
}
//11、是否英文数字或空格

function isENS(v) {
    return /^[a-zA-Z0-9\s]+$/.test(v);
}

function close_window(id){
	$('#mark_iframe').hide();
	$('#' + id).hide();
}

function reloadImage()
{
	$('#login_pic').attr('src', '../loginRandomPicture.jsp?now='+new Date());
}

function waitting(){
	 /*var d = jQuery(document);
	 jQuery('<div class="boxy-modal-blackout"></div>')
     .css({position: 'absolute', 
     	'background-color': 'black',
     	left: 0,
     	top: 0,
     	zIndex: 1340,
        opacity: 0.7})
     .appendTo(document.body);
     jQuery('.boxy-modal-blackout').css('display', 'none').css({
         width: d.width(), height: d.height()
     }).css('display', 'block');*/
     //alert(jQuery.browser.msie);
     var d = document.documentElement, b = document.body, w = window;
     
     var u = jQuery.extend(
            jQuery.browser.msie ?
                { left: b.scrollLeft || d.scrollLeft, top: b.scrollTop || d.scrollTop } :
                { left: w.pageXOffset, top: w.pageYOffset },
            !_u(w.innerWidth) ?
                { width: w.innerWidth, height: w.innerHeight } :
                (!_u(d) && !_u(d.clientWidth) && d.clientWidth != 0 ?
                    { width: d.clientWidth, height: d.clientHeight } :
                    { width: b.clientWidth, height: b.clientHeight }) );
}

_u = function() {
        for (var i = 0; i < arguments.length; i++)
            if (typeof arguments[i] != 'undefined') return false;
        return true;
    }
