function mail_makajin( type, website, mail_input ){
	var email = jQuery.trim( jQuery("#" + mail_input).val() );
	reg = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	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);
}

function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6. 
{ 
    var arVersion = navigator.appVersion.split("MSIE") 
    var version = parseFloat(arVersion[1]) 
    if ((version >= 5.5) && (document.body.filters)) 
    { 
       for(var j=0; j<document.images.length; j++) 
       { 
          var img = document.images[j] 
          var imgName = img.src.toUpperCase() 
          if (imgName.substring(imgName.length-3, imgName.length) == "PNG") 
          { 
             var imgID = (img.id) ? "id='" + img.id + "' " : "" 
             var imgClass = (img.className) ? "class='" + img.className + "' " : "" 
             var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' " 
             var imgStyle = "display:inline-block;" + img.style.cssText 
             if (img.align == "left") imgStyle = "float:left;" + imgStyle 
             if (img.align == "right") imgStyle = "float:right;" + imgStyle 
             if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle 
             var strNewHTML = "<span " + imgID + imgClass + imgTitle 
             + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" 
             + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" 
             + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
             img.outerHTML = strNewHTML 
             j = j-1 
          } 
       } 
    }    
} 
window.attachEvent("onload", correctPNG); 

