
var loginSettings = {
	ch : [
		{
			ch : 'mantan',
			path : '/mantan/',
			frameCGI : '/mantan/frame.cgi'
		},{
			ch : 'dexcreative',
			path : '/dexcreative/',
			frameCGI : '/dexcreative/frame.cgi'
		},{
			ch : 'font',
			path : '/download/font/',
			frameCGI : '/download/font/frame_font.cgi'
		},{
			ch : 'map',
			path : '/download/map/',
			frameCGI : '/download/map/frame_map.cgi'
		},{
			ch : 'template',
			path : '/download/template/',
			frameCGI : '/download/template/frame_temp.cgi'
		}
	],
	headerURL : "",
	parent : false,
	constructor : function(mmbflg){
		//親要素がありやなしや
		loginSettings.parent = (parent!=window)?true:false;
		var d = loginSettings.parent?parent.document:document;
		//ログイン後の転送先
		loginSettings.headerURL = d.URL?d.URL:( d.location.href?d.location.href:'http://www.dex.ne.jp/' );
		if(loginSettings.headerURL.indexOf("dex.ne.jp") == -1) loginSettings.headerURL='http://www.dex.ne.jp/';
		var here = loginSettings.iHit();
		if(here!=-1){
			loginSettings.call(mmbflg,('http://www.dex.ne.jp'+loginSettings.ch[here].frameCGI),loginSettings.ch[here].path);
//			var leftHref = 'http://www.dex.ne.jp'+loginSettings.ch[here].frameCGI;
		}else{
			loginSettings.call(mmbflg,'http://www.dex.ne.jp/frame.cgi','/');
		}
		
	},
	iHit : function(){
		var chlength = loginSettings.ch.length;
		var ii=-1;
		for(i=0; i<chlength; i++){
			if(loginSettings.headerURL.indexOf('http://www.dex.ne.jp'+loginSettings.ch[i].path) != -1) {
				ii=i;
				break;
			}
		}
		return ii;
	},
	call : function(a,b,c){
		var DWtext = '';
		if(a==1||a==2){
			DWtext = 
'<img src="/img/member_m.gif" alt="メンバーログイン" width="200" height="17">'+"\n"+
'<div style="background-image:url(/img/member_bg.gif);background-repeat: repeat-y;padding: 8px 15px;">'+"\n"+
'	<table border="0" cellspacing="0" cellpadding="0">'+"\n"+
'		<tr align="center">'+"\n"+
'			<td colspan="2"><p style="font-size:12px;margin-bottom:5px;">ようこそ　'+utf8to16(my_unescape(getCookie("DEXUNAME2")))+'　様</p></td>'+"\n"+
'		</tr>'+"\n"+
'		<tr align="center" valign="middle">'+"\n"+
'			<td colspan="2"><img src="/img/line170.gif" width="170" height="1" class="line"></td>'+"\n"+
'		</tr>'+"\n"+
'		<tr>'+"\n"+
'			<td height="20" align="left" valign="middle"><a href="'+b+'?rtn=1&main=https://ssl.dex.ne.jp/cgi-bin/prevMemb.cgi" target="_top"><img src="/img/member_-user.gif" alt="お客様情報" width="65" height="11" border="0"></a></td>'+"\n"+
'			<td align="left" valign="middle"><a href="'+b+'?rtn=1&main=http://www.dex.ne.jp/p/list/list.php" target="_top"><img src="/img/member_buy.gif" alt="ご購入履歴" width="66" height="12" border="0"></a></td>'+"\n"+
'		</tr>'+"\n"+
'		<tr>'+"\n"+
'			<td width="96" height="20" align="left" valign="middle"><a href="'+b+'?rtn=1&main=/cgi-bin2/cart_in.cgi?db_kind=D" target="_top"><img src="/img/member_cart.gif" alt="カート" width="42" height="11" border="0"></a></td>'+"\n"+
'			<td width="74" align="left" valign="middle"><a href="'+b+'?rtn=1&main=/cgi-bin2/download_list.cgi" target="_top"><img src="/img/member_down.gif" alt="ダウンロード" width="74" height="12" border="0"></a></td>'+"\n"+
'		</tr>'+"\n"+
'		<tr align="center" valign="middle">'+"\n"+
'			<td colspan="2"><img src="/img/line170.gif" width="170" height="1" class="line"></td>'+"\n"+
'		</tr>'+"\n"+
'		<tr align="center" valign="middle">'+"\n"+
'			<td height="18" colspan="2"><a href="/cgi-bin2/dexlogout.cgi?url='+c+'" target="_top"><img src="/img/member_logout.gif" alt="ログアウト" width="65" height="18" border="0" style="margin-top:5px;"></a></td>'+"\n"+
'		</tr>'+"\n"+
'	</table>'+"\n"+
'</div>'+"\n"+
'<img src="/img/member_bottom.gif" width="200" height="4" style="margin-bottom: 20px;">'+"\n";
		}else{
			DWtext = 
'<img src="/img/member_m.gif" alt="メンバーログイン" width="200" height="17">'+"\n"+
'<div style="background-image:url(/img/member_bg.gif);background-repeat: repeat-y;padding: 8px 15px;">'+"\n"+
'	<form name="loginform" method="post" action="https://ssl.dex.ne.jp/cgi-bin/dexlogin-real" target="_top" onsubmit="return SubmitCheck()">'+"\n"+
'	<table border="0" cellspacing="0" cellpadding="0">'+"\n"+
'		<tr>'+"\n"+
'			<td width="90" align="left"><img src="/img/member_id.gif" alt="ユーザーID" width="58" height="10"></td>'+"\n"+
'			<td><input name="login" type="text" maxlength="14" style="width:90px;border:1px solid #D0DBDD;font-size:12px;"></td>'+"\n"+
'		</tr>'+"\n"+
'		<tr>'+"\n"+
'			<td width="90" align="left"><img src="/img/member_pass.gif" alt="パスワード" width="58" height="10"></td>'+"\n"+
'			<td><input type="password" name="password" style="width:90px;border:1px solid #D0DBDD;font-size:12px;"></td>'+"\n"+
'		</tr>'+"\n"+
'		<tr align="center" valign="middle">'+"\n"+
'			<td height="43" colspan="2"><input type="image" src="/img/member_login.gif" alt="ログイン"></td>'+"\n"+
'		</tr>'+"\n"+
'		<tr align="left" valign="top">'+"\n"+
'			<td colspan="2">'+"\n"+
'				<a href="'+b+'?rtn=1&main=https://ssl.dex.ne.jp/reg/A_top/mantan_member_reg.cgi&from=A_mantan" target="_top"><img src="/img/member_entry.gif" alt="新規メンバー登録" width="91" height="11" border="0" style="margin-bottom: 5px;"></a><br>'+"\n"+
'				<a href="'+b+'?rtn=1&main=/forget/index.html" target="_top"><img src="/img/member_forget.gif" alt="ID・パスワードを忘れた" width="117" height="11" border="0"></a>'+"\n"+
'			</td>'+"\n"+
'		</tr>'+"\n"+
'	</table>'+"\n"+
'	<input type="hidden" name="url" value="'+loginSettings.headerURL+'" />'+"\n"+
'	</form>'+"\n"+
'</div>'+"\n"+
'<img src="/img/member_bottom.gif" width="200" height="4" style="margin-bottom: 20px;">'+"\n";
		}
		document.write(DWtext);
	}
};
loginSettings.constructor(mmbflg);


		//ログイン後の転送先
//		loginSettings.headerURL = d.URL?d.URL:( d.location.href?d.location.href:'http://192.168.160.67/' );
//		if(loginSettings.headerURL.indexOf("192.168.160.67") == -1) loginSettings.headerURL='http://192.168.160.67/';
//		var here = loginSettings.iHit();
//		if(here!=-1){
//			loginSettings.call(mmbflg,('http://192.168.160.67'+loginSettings.ch[here].frameCGI));
////			var leftHref = 'http://www.dex.ne.jp'+loginSettings.ch[here].frameCGI;
//		}else{
//			loginSettings.call(mmbflg,'http://192.168.160.67/frame.cgi');
//		}
//		alert(here);

//			if(loginSettings.headerURL.indexOf('http://192.168.160.67'+loginSettings.ch[i].path) != -1) {


//var loc3 = "http://www.dex.ne.jp/";
//if(loc2.indexOf("http://www.dex.ne.jp/mantan/") != -1){ var loc3 = "http://www.dex.ne.jp/mantan/" }
//else if(loc2.indexOf("http://www.dex.ne.jp/dexcreative/") != -1){ var loc3 = "http://www.dex.ne.jp/dexcreative/" }
//else if(loc2.indexOf("http://www.dex.ne.jp/download/font/") != -1){ var loc3 = "http://www.dex.ne.jp/download/font/" }
//else if(loc2.indexOf("http://www.dex.ne.jp/download/map/") != -1){ var loc3 = "http://www.dex.ne.jp/download/map/" }
//else if(loc2.indexOf("http://www.dex.ne.jp/download/template/") != -1){ var loc3 = "http://www.dex.ne.jp/download/template/" }


// 会員（CP_KBN == 1）

// 会員（CP_KBN != 1）

// ログイン前

