//-------------------------------
// Page Jump
//-------------------------------
var nossl_url   = 'http://www.chintai.net';
var ssl_url     = 'https://www0.chintai.net';

//-------------------------------
function go_AreaContents_Choice(cont,prefkey,kbn)
{
	switch(cont){
		case 'bk':
			if(kbn == 'rosen'){
				location.href = nossl_url + '/' + prefkey + '/top/CGI/index.cgi?tab=1';
			}else if(kbn == 'city'){
				location.href = nossl_url + '/' + prefkey + '/top/CGI/index.cgi?tab=2';
			}else if(kbn == 'map'){
				location.href = nossl_url + '/' + prefkey + '/top/CGI/index.cgi?tab=3';
			}
		break;
		case 'tp':
			if(kbn == 'rosen'){
				location.href = nossl_url + '/' + prefkey + '/omise/CGI/omise_index.cgi?tab=1';
			}else if(kbn == 'city'){
				location.href = nossl_url + '/' + prefkey + '/omise/CGI/omise_index.cgi?tab=2';
			}
		break;
		case 'rent':
			if(kbn == 'rosen'){
				location.href = nossl_url + '/' + prefkey + '/rent/CGI/rent_cond.cgi';
			}else if(kbn == 'city'){
				location.href = nossl_url + '/' + prefkey + '/rent/CGI/rent_list.cgi';
			}
		break;
		case 'wish':
			if(kbn == 'rosen'){
				location.href = ssl_url + '/' + prefkey + '/wish/CGI/wish_index.cgi?tab=1';
			}else if(kbn == 'city'){
				location.href = ssl_url + '/' + prefkey + '/wish/CGI/wish_index.cgi?tab=2';
			}
		break;
		case 'order':
			location.href = ssl_url + '/' + prefkey + '/request/CGI/request_index.cgi';
		break;
		default:
	}

	return;

}

//-------------------------------
function go_inquiry()
{
	var url = ssl_url + '/inquiry/form/CGI/form.cgi';
	window.open(url,"inquiry","location=no,menubar=no,resizable=yes,status=no,toolbar=no,scrollbars=yes,left=10,top=10,width=800,height=600");
	return;
}

//-------------------------------
function go_mail_magazine()
{
	var url = ssl_url + '/mail_magazine/index.html';
	window.open(url,"inquiry","location=no,menubar=no,resizable=yes,status=no,toolbar=no,scrollbars=yes,left=10,top=10,width=800,height=650");
	return;
}

//-------------------------------
function go_keitai()
{
	location.href = nossl_url + '/keitai/index.html';
}

//-------------------------------
function go_magazine_order()
{
	location.href = ssl_url + '/magazine_order/index.html';
}

//-------------------------------
function go_crs()
{
	location.href = ssl_url + '/crs/index.html';
}

//-------------------------------
function go_request(area)
{
	location.href = ssl_url + '/request/' + area + '/CGI/request_index.cgi?area=' + area + '_all';
}

//-------------------------------
function go_request_login(area)
{
	location.href = ssl_url + '/request/base/CGI/us_login.cgi';
}

//-------------------------------
function go_tv_cm()
{
	var url = nossl_url + '/cm/index.html';
	window.open(url,"cm","location=yes,menubar=yes,resizable=yes,status=yes,toolbar=yes,scrollbars=yes,left=10,top=10,width=800,height=600");
	return;
}

//-------------------------------
function gomail_chintainet()
{
	location.href = ssl_url + '/CGI/infomail/index.cgi?no=chintainet_toiawase';
}
//-------------------------------
function gomail_onerank(obj)
{
	obj.action = ssl_url + '/CGI/infomail/index.cgi';
	obj.submit();
}
//-------------------------------
function gomail_marketrep()
{
	location.href = ssl_url + '/CGI/infomail/index.cgi?no=marketrep_order';
}
//-------------------------------
function gomail_zagat()
{
	location.href = ssl_url + '/CGI/infomail/index.cgi?no=zagat_order';
}

//-------------------------------
function go_MapSerch_List(prefkey, geo, ss_key)
{
	location.href = nossl_url + '/' + prefkey + '/chintai/CGI/map_list.cgi?sl=' + geo + '&ss=' + ss_key + '&st=02';
}

//-------------------------------
function go_Area_Top_Map(prefkey, ss_key)
{
	location.href = nossl_url + '/' + prefkey + '/top/CGI/index.cgi?tab=3&ss=' + ss_key;
}


//-------------------------------
// 店舗情報メール送信
//-------------------------------
function wo_sendmail_omise(code)
{
	var url = ssl_url + '/CGI/omise/base/omise_keitai.cgi?us=' + code;
	var wx = 325;
	var wy = 585;
	var x = (screen.width  - wx) / 2;
	var y = (screen.height - wy) / 2;
	window.open(url, 'omise_keitai', 'left='+ x +',top='+ y +',width='+ wx +',height='+ wy +',status=no,scrollbars=yes,directories=no,menubar=no,resizable=no,toolbar=no');
	return;
}

//-------------------------------
// 物件情報メール送信
//-------------------------------
function wo_sendmail_bukken(code)
{
	var url = ssl_url + '/CGI/chintai/base/chintai_keitai.cgi?bk=' + code;
	var wx = 325;
	var wy = 560;
	var x = (screen.width  - wx) / 2;
	var y = (screen.height - wy) / 2;
	window.open(url, 'omise_keitai', 'left='+ x +',top='+ y +',width='+ wx +',height='+ wy +',status=no,scrollbars=yes,directories=no,menubar=no,resizable=no,toolbar=no');
	return;
}

//-------------------------------
// webcalling
//-------------------------------
function wo_webcalling(tel)
{
	var url = 'https://www.webcalling.jp/ppc/popup?portal_id=0003&advertiser_id=' + tel;
	var wx = 554;
	var wy = 650;
	var x = (screen.width  - wx) / 2;
	var y = (screen.height - wy) / 2;
	window.open(url, 'webcalling', 'left='+ x +',top='+ y +',width='+ wx +',height='+ wy +',status=no,scrollbars=no,directories=no,menubar=no,resizable=no,toolbar=no');
	return;
}

//-------------------------------
// Image Operate
//-------------------------------

//-------------------------------
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

//-------------------------------
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//-------------------------------
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

//-------------------------------
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//-------------------------------
function MM_openBrWindow(theURL,winName,features) { //v2.0
  var newWin = window.open(theURL,winName,features);
  newWin.focus();
}

