/************************************************
  
    Site Name: カームサイド奈良
	Description: common script
	Last Modified :

************************************************/

function backToTop() {
  var x1 = x2 = x3 = 0;
  var y1 = y2 = y3 = 0;
  if (document.documentElement) {
      x1 = document.documentElement.scrollLeft || 0;
      y1 = document.documentElement.scrollTop || 0;
  }
  if (document.body) {
      x2 = document.body.scrollLeft || 0;
      y2 = document.body.scrollTop || 0;
  }
  x3 = window.scrollX || 0;
  y3 = window.scrollY || 0;
  var x = Math.max(x1, Math.max(x2, x3));
  var y = Math.max(y1, Math.max(y2, y3));
  window.scrollTo(Math.floor(x / 2), Math.floor(y / 2));
  if (x > 0 || y > 0) {
      window.setTimeout("backToTop()", 25);
  }
}


/************************************************
	Description: メールフォーム
************************************************/
function openContact(){
 window.open("https://www.megurogajoen.co.jp/inquiry/group/inquiry/index.php?store_code=4",'','resizable=yes,scrollbars=yes,menubar=no,directories=no,status=no,location=no,width=650,height=500');
}
function openReserved(){
 /*window.open("https://www.megurogajoen.co.jp/inquiry/group/reserve/index.php?store_code=4",'','resizable=yes,scrollbars=yes,menubar=no,directories=no,status=no,location=no,width=650,height=500');*/
	window.open("http://zexy.net/zhpd/entry/kengakuYoyaku/?gyoshuCd=01&clientCd=7770015118",'7770015118_01_ZHPD_KENGAKU_YOYAKU','width=900, status=yes, resizable=yes, scrollbars=yes, toolbar=no, menubar=yes, location=yes,height=700');
}
function openFair(){
 /*window.open("http://www.megurogajoen.jp/bridalfair/fair.php?store_code=store5",'','resizable=yes,scrollbars=no,menubar=no,directories=no,status=no,location=no,width=650,height=704');*/
	window.open("http://zexy.net/zhpd/wedding/c_7770015118/fair/calendar/",'7770015118_01_ZHPD_FAIR_CALENDER_LIST','width=900, status=yes, resizable=yes, scrollbars=yes, toolbar=no, menubar=yes, location=yes,height=704');
}
function openPlan(){
 window.open("plan.html",'','resizable=yes,scrollbars=yes,menubar=no,directories=no,status=no,location=no,width=666,height=700');
}

/************************************************
	Description: フォトストーリー
************************************************/
function openPS01() {
var w = screen.availWidth;
var h = screen.availHeight;
window.open("photostory/photostory1/photo.html","window1","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + w + ",height=" + h + ",left=0,top=0");
}
function openPS02() {
var w = screen.availWidth;
var h = screen.availHeight;
window.open("photostory/photostory2/photo.html","window1","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + w + ",height=" + h + ",left=0,top=0");
}
function openPS03() {
var w = screen.availWidth;
var h = screen.availHeight;
window.open("photostory/photostory3/photo.html","window1","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + w + ",height=" + h + ",left=0,top=0");
}
function openPS04() {
var w = screen.availWidth;
var h = screen.availHeight;
window.open("photostory/photostory4/photo.html","window1","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + w + ",height=" + h + ",left=0,top=0");
}
function openPS05() {
var w = screen.availWidth;
var h = screen.availHeight;
window.open("photostory/photostory5/swf/photo.html","window1","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + w + ",height=" + h + ",left=0,top=0");
}
function openPS06() {
var w = screen.availWidth;
var h = screen.availHeight;
window.open("photostory/photostory6/swf/photo.html","window1","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + w + ",height=" + h + ",left=0,top=0");
}
function openPS07() {
var w = screen.availWidth;
var h = screen.availHeight;
window.open("photostory/photostory7/swf/photo.html","window1","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + w + ",height=" + h + ",left=0,top=0");
}


