var colorme_easy_order_url = "https://shop-pro.jp/api/jsonp_check.php"; var HETEML_API_ORDER = 'https://secure.heteml.jp/api/order/'; var GOOPE_API_ORDER = 'https://admin.goope.jp/api/order/'; //************************************************************************************** //////////////////// 指定サイズでウィンドウを開き、センターに表示 ////////////////// //-------------------------------------------------------------------------------------- // gf_OpenNewWindow(URL,NAME,SIZE) // SIZEは、"width=800:height=600"のように入力してください //************************************************************************************** function gf_OpenNewWindow(pURL,pName,pSize){ var wWidth,wHeight; var wSize,wFeatures; var wLeft,wTop,PositionX,PositionY; wWidth = window.screen.availWidth/2; wHeight = window.screen.availHeight/2; wSize = pSize.split(":"); wLeft = wSize[0].split("="); wTop = wSize[1].split("="); PositionX = wWidth-wLeft[1]/2; PositionY = wHeight-wTop[1]/2; wFeatures = wSize+",left="+PositionX+",top="+PositionY; wWindow = window.open(pURL,pName,wFeatures+",scrollbars=yes,status=yes,resizable=yes"); wWindow.focus(); } //******************************************* // 『ヒント』ウィンドウ //******************************************* function jf_Hint(){ wUrl = "./top/hint.php"; gf_OpenNewWindow(wUrl,"EVENT","width=550:height=320"); } //******************************** // バイト数チェック //******************************** function gf_GetLength(value){ var i,nCnt=0; for(i=0; i= 4 ) nCnt+=2; else nCnt++; } return nCnt; } //******************************************* // 『リセットボタン』 //******************************************* function jf_Reset(){ obj = eval("document.frm.elements"); wEleNo = obj.length; for(i = 0; i < wEleNo; i++){ if(obj[i].type == "checkbox"){ obj[i].checked = false; }else if(obj[i].type == "select-one"){ obj[i].options[0].selected = true; }else{ obj[i].value = ""; } } } //******************************************* // 『よくある質問検索』 //******************************************* function jf_FaqSch(){ if( document.frm.faqtxt.value == ""){ alert("未入力項目があります"); document.frm.faqtxt.focus(); return; } document.frm.action="https://muumuu-domain.com/?mode=faq&state=search"; document.frm.submit(); } //******************************************* // 『WHOIS情報』 //******************************************* function jf_ShowWhoIs(pDomainId){ gf_OpenNewWindow("?mode=conpane&state=whois&domain_id="+pDomainId,"WHOIS","width=570:height=600"); } //******************************************* // 『WHOIS情報』 //******************************************* function jf_ShowWhoisPolicy(){ gf_OpenNewWindow("?mode=whois-policy","WHOISPOLICY","width=570:height=600"); } //************************************ // ドメイン検索(ギフポ) //************************************ function jf_ChkDomainNewGifpo(){ if( document.frm.domain_1.value == ""){ alert("未入力項目があります"); document.frm.domain_1.focus(); return; } if(/(^[a-zA-Z0-9][a-zA-Z0-9])+[\-][\-]/.test(document.frm.domain_1.value)){ alert("多言語ドメインでのお申し込みはできません"); document.frm.domain_1.focus(); return; } if( document.frm.domain_1.value.match(/[^0-9A-Za-z\-]/) ){ alert("ドメイン名に使えない文字が入力されています"); document.frm.domain_1.focus(); return; } if( document.frm.domain_1.value.match("(^-.*)|(.*-$)") ){ alert("ドメイン名のはじめと終わりに - (ハイフン)は使用できません"); document.frm.domain_1.focus(); return; } if( gf_GetLength(document.frm.domain_1.value) < 3 || gf_GetLength(document.frm.domain_1.value) > 32 ){ alert("ドメイン名は3文字以上32文字以内で入力ください"); document.frm.domain_1.focus(); return; } document.frm.action = '?mode=gifpo'; document.frm.submit(); } //************************************ // ドメイン検索 //************************************ function jf_ChkPresentDomain(){ if( document.frm.domain_1.value == ""){ alert("未入力項目があります"); document.frm.domain_1.focus(); return; } if(/(^[a-zA-Z0-9][a-zA-Z0-9])+[\-][\-]/.test(document.frm.domain_1.value)){ alert("多言語ドメインでのお申し込みはできません"); document.frm.domain_1.focus(); return; } if( document.frm.domain_1.value.match(/[^0-9A-Za-z\-]/) ){ alert("ドメイン名に使えない文字が入力されています"); document.frm.domain_1.focus(); return; } if( document.frm.domain_1.value.match("(^-.*)|(.*-$)") ){ alert("ドメイン名のはじめと終わりに - (ハイフン)は使用できません"); document.frm.domain_1.focus(); return; } if( gf_GetLength(document.frm.domain_1.value) < 3 || gf_GetLength(document.frm.domain_1.value) > 32 ){ alert("ドメイン名は3文字以上32文字以内で入力ください"); document.frm.domain_1.focus(); return; } // エレメント数 obj = eval("document.frm.elements"); wEleNo = obj.length; // チェックフラグ wChkFlg = false; // tld wTld = ""; // チェックボックスリセット for(i = 0; i < wEleNo; i++){ if( obj[i].type == "checkbox" && obj[i].checked == true ){ if(obj[i].name != "id_all_chk"){ wChkFlg = true; if( wTld != "" ){ wTld = wTld + ","; } wTld = wTld + obj[i].value; } } } if(wChkFlg == false){ alert("ドメインの種類を選択してください"); return; } document.frm.domain_2.value = wTld; document.frm.action = "?mode=present&state=whois"; document.frm.submit(); } //************************************ // すべてをチェック //************************************ function jf_AllChk(){ // エレメント数 obj = eval("document.frm.elements"); wEleNo = obj.length; // チェックボックスリセット for(i = 0; i < wEleNo; i++){ if( obj[i].type == "checkbox" ){ if( document.frm.hid_all_chk.value == 0 ){ obj[i].checked = true; }else{ obj[i].checked = false; } } } if( document.frm.hid_all_chk.value == 0 ){ document.frm.hid_all_chk.value = 1; }else{ document.frm.hid_all_chk.value = 0; } } //******************************* // NSI //******************************* function jf_Nsi(){ return false; } //******************************* // 移管のポイント //******************************* function jf_Tp(p_link){ gf_OpenNewWindow("?mode=guide&state=tp_faq"+p_link,"TP","width=580:height=600"); } //******************************* // 占い //******************************* function jf_ShowUranai(){ gf_OpenNewWindow("?mode=uranai","URANAI","width=580:height=680"); } //************************************ // 入力チェック(JWord登録フォーム) //************************************ function jf_ChkJwordForm(){ //if( document.frm.muu_domain_id.value == "" ){ alert("ドメインが選択されていません"); document.frm.muu_domain_id.focus(); return; } if( document.frm.keyword.value == "" ){ alert("キーワードが入力されていません"); document.frm.keyword.focus(); return; } if( document.frm.keyword.value != "" ){ if( gf_GetLength(document.frm.keyword.value) >= 64 ){ alert("キーワードの文字数が長すぎます"); document.frm.keyword.focus(); return; } } //if( document.frm.jword_yomi.value == "" ){ alert("キーワードのよみがなが入力されていません"); document.frm.jword_yomi.focus(); return; } if( document.frm.url.value == "" ){ alert("登録URLが入力されていません"); document.frm.url.focus(); return; } if( !document.frm.url.value.match(/^([0-9a-zA-Z]+[-_.!~*\'a-zA-Z0-9;\/?:\@&=+\$,%#]+)$/) ){ alert("\""+document.frm.url.value+"\"は適切な登録URLではありません"); document.frm.url.focus(); return; } if( document.frm.explan.value == "" ){ alert("説明文が入力されていません"); document.frm.explan.focus(); return; } if( document.frm.name_sei.value == "" ){ alert("連絡者名(姓)が入力されていません"); document.frm.name_sei.focus(); return; } if( document.frm.name_mei.value == "" ){ alert("連絡者名(名)が入力されていません"); document.frm.name_mei.focus(); return; } if( document.frm.postal_1.value == ""){ alert("郵便番号が入力されていません"); document.frm.postal_1.focus(); return; } if( document.frm.postal_1.value != "" ){ if( gf_GetLength(document.frm.postal_1.value) > 3 ){ alert("郵便番号の桁数が多すぎます"); document.frm.postal_1.focus(); return; } } if( document.frm.postal_2.value == ""){ alert("郵便番号が入力されていません"); document.frm.postal_2.focus(); return; } if( document.frm.postal_2.value != "" ){ if( gf_GetLength(document.frm.postal_2.value) > 4 ){ alert("郵便番号の桁数が多すぎます"); document.frm.postal_2.focus(); return; } } if( document.frm.pref_id.value == "" ){ alert("都道府県が選択されていません"); document.frm.pref_id.focus(); return; } if( document.frm.city.value == "" ){ alert("市区町村が入力されていません"); document.frm.city.focus(); return; } if( document.frm.address_1.value == "" ){ alert("住所1が入力されていません"); document.frm.address_1.focus(); return; } if( document.frm.tel.value == "" ){ alert("電話番号が入力されていません"); document.frm.tel.focus(); return; } if( document.frm.tel.value.match(/[^0-9\-]/) ){ alert("電話番号に使えない文字が入力されています"); document.frm.tel.focus(); return; } if(document.frm.fax.value!=""){ if( document.frm.fax.value.match(/[^0-9\-]/) ){ alert("ファックス番号に使用できない文字が入力されています"); document.frm.fax.focus(); return; } } if( document.frm.mail.value == "" ){ alert("ご連絡先メールアドレスが入力されていません"); document.frm.mail.focus(); return; } if(!document.frm.mail.value.match(/^[0-9a-zA-Z\-\_\.]+@[0-9a-zA-Z\-\_\.]+$/) ){ alert("\""+document.frm.mail.value+"\"は適切なアドレスではありません!"); document.frm.mail.focus(); return; } if( document.frm.re_mail.value == "" ){ alert("確認用メールアドレスが入力されていません"); document.re_mail.focus(); return; } if( document.frm.mail.value != document.frm.re_mail.value ){ alert("ご連絡先メールアドレスが一致しません\n確認用メールアドレスを入力しなおしてください"); document.frm.re_mail.focus(); return; } document.frm.action="?mode=conpane&state=jword&state2=jword_input&exec=1"; document.frm.submit(); } //******************************* // ツッキーのWHOIS検索 //******************************* function jf_ShowWhoisSearch(){ gf_OpenNewWindow("http://whois.muumuu-domain.com","WHOIS_SEARCH","width=580:height=680"); } //**************************************** // 『XMLHttpRequestオブジェクト生成』 //**************************************** function createHttpRequest(){ //Win ie用 if(window.ActiveXObject){ try { //MSXML2以降用 return new ActiveXObject("Msxml2.XMLHTTP") //[1]' } catch (e) { try { //旧MSXML用 return new ActiveXObject("Microsoft.XMLHTTP") //[1]' } catch (e2) { return null } } } else if(window.XMLHttpRequest){ //Win ie以外のXMLHttpRequestオブジェクト実装ブラウザ用 return new XMLHttpRequest() //[1]' } else { return null } } //**************************************** // 『ムーのHTTPページを経由して外部サイトに遷移する。』 //**************************************** function jf_GetRedirect(pUrl, pNewWindow){ if( !pUrl || !pUrl.match(new RegExp("^https?://")) ){ return; } if(pNewWindow == undefined){ pNewWindow = false; } var wRedirectPath = '?mode=jump&state=get&url=' + escape( pUrl ); if(pNewWindow){ window.open(wRedirectPath); }else{ location.href = wRedirectPath; } } //**************************************** // マニュアルページの画像を別窓拡大表示 //**************************************** function jf_ShowGuideImg( pImg, pWidth, pHeight ){ gf_OpenNewWindow("guide/img/"+pImg,"TP_IMG","width="+pWidth+":height="+pHeight); } //**************************************** // 画面全体にマスク(画面操作できないようになる) //**************************************** function jf_Mask(text) { // 表示するローディングテキストをセット text = text || '処理中です...'; $("#LoadingText").text(text); // マスクをドキュメントサイズいっぱいに広げて表示する var doc = $(document); $("#MaskLayer").css({ width: doc.width(), height: doc.height() }).show(); // ローディングアイコンを表示する var el = $("#LoadingLayer") el.css({ left: ($(window).width() / 2) - (el.width() / 2), top: ($(window).height() / 2) - (el.height() / 2) - 100 }).show(); } //**************************************** // マスク解除 //**************************************** function jf_Unmask() { $("#MaskLayer").hide(); $("#LoadingLayer").hide(); } //**************************************** // GoogleAnalytics用に?mode=gaにGETリクエストを送る //**************************************** function jf_GetGA(params) { // Analytics用URL var url = "/?mode=ga"; // パラメータの分だけURLに付与 for (var key in params) { url += "&" + key + "=" + params[key]; } // GoogleAnalyticsに記録する ga( 'send', 'pageview', url ); } //**************************************** // 全角英数字を半角に変換する //**************************************** function jf_ZenToHan(text) { if (typeof(text) != "string") return ""; var han= '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-.,:@_'.split(''); var zen= '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZー.、:@_'.split(''); for (i = 0; i < zen.length; i++) { var regex = new RegExp(zen[i],"gm"); text = text.replace(regex, han[i]); } return text; }