function mail_makajin( type, images, website, mail_input ){
	var email = jQuery.trim( jQuery("#" + mail_input).val() );
	reg = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/i;
	if( email.length == 0 ){
		jQuery("#" + mail_input).addClass( "error" );
		jQuery("#" + mail_input).focus();
		return false;
	}

	if( !reg.test( email ) ){
		alert( "メールアドレスのフォマットが正しくないです。" );
		jQuery("#" + mail_input).addClass( "error" );
		jQuery("#" + mail_input).focus();
		jQuery("#" + mail_input).select();
		return false;
	}
		     		
	jQuery("#mail_title").ajaxStart(function() { 
		jQuery(this).html( "<img src=\"" + images + "ajax-loader.gif\">" );
	}).ajaxError(function(request, settings) {
		jQuery(this).html( "&nbsp;" );
		jQuery("#" + mail_input).addClass( "error" );
		jQuery("#" + mail_input).focus();
		jQuery("#" + mail_input).select();
	});
	
	jQuery("#mobile_title").ajaxStart(function() { 
		jQuery(this).html( "<img src=\"" + images + "ajax-loader.gif\">" );
	}).ajaxError(function(request, settings) {
		jQuery(this).html( "&nbsp;" );
		jQuery("#" + mail_input).addClass( "error" );
		jQuery("#" + mail_input).focus();
		jQuery("#" + mail_input).select();
	});
	
	var search_data = "type=" + type + "&email=" + jQuery("#" + mail_input).val() + "&_uuunonce=" + jQuery("#_uuunonce").val();
	jQuery.ajax({
	   type: "POST",
	   url: website + "/uuu_mail_man.php",
	   data: search_data,
	   success: function(msg){
			jQuery("#mail_title").html( "&nbsp;" );
			jQuery("#" + mail_input).removeClass( "error" );
			jQuery("#" + mail_input).val('');
			if( msg.length > 0 )
				alert( msg );
	   }
	});
}

function showWindow( location, biaoti ){
	Windows.closeAll();
	win = new Window({className: "alphacube", url: location, maximizable: false, minimizable: false, destroyOnClose: true, width:660, height:520, zIndex: 1000, resizable: true, title: biaoti, showEffect:Element.show, hideEffect: Effect.SwitchOff, draggable:true})
	win.showCenter(false, 0);
}
