function sizeImg(obj, _width) {
    var tmpImg = new Image();
    tmpImg.src = obj.src;
    if (tmpImg.width > _width) { obj.width = _width; }
    return true;
}

function checkEmail(mail) {
	var myRegExp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	return myRegExp.test(mail);
}

function SIP(obj, _w, _h) {
var tmpImg = new Image();
tmpImg.src = obj.src;
if (_w/tmpImg.width > _h/tmpImg.height) {
if (tmpImg.width > _w) {
obj.height = tmpImg.height*(_w/tmpImg.width);
obj.width = _w;
}
if (tmpImg.height > _h) {
obj.width = tmpImg.width*(_h/tmpImg.height);
obj.height = _h;
}
} else {
if (tmpImg.height > _h) {
obj.width = tmpImg.width*(_h/tmpImg.height);
obj.height = _h;
}
if (tmpImg.width > _w) {
obj.height = tmpImg.height*(_w/tmpImg.width);
obj.width = _w;
}
}
}
