﻿<!--
var nWin,cWin,vWin,dWin,pWin;

function closeWins()
{
  if(nWin) nWin.close();
  if(cWin) cWin.close();
  if(vWin) vWin.close();
  if(dWin) dWin.close();
  if(pWin) pWin.close();
}


function showPorts(src)
{
  var w = 240;
  var h = 140;
  if(nWin) nWin.close();
  with(document.search)
  {
    nWin = window.open("/schedule/place.jsp?type=" + src , "nWin", "width=" + w + ", height=" + h + ", left=" +(screen.width - w) / 2 + ", top=" +(screen.height - h) / 2);
    nWin.focus();
  }
}

/**
 * 船期查询结果中,点击某一船,显示船详细信息 /Homepage/schedule/vessel.jsp
 * @param vesselid 船id
 */
function showVesselDeatil(vesselid){
  var w = 500;
  var h = 240;
  vWin = window.open ("/schedule/vessel.jsp?todo=detail&id=" + vesselid, "vWin", "width=" + w + ", height=" + h + ", left=" + (screen.width - w) / 2 + ", top=" + (screen.height - h) / 2);
  vWin.focus ();
}

/**
 * 船期查询结果中,点击某一承运人,显示承运人详细信息 /Homepage/schedule/carrier.jsp
 * @param carrierid 承运人id
 */
function showCarrier(carrierid){
  var w = 500;
  var h = 310;
  cWin = window.open ("carrier.jsp?carrierid=" + carrierid, "cWin", "width=" + w + ", height=" + h + ", left=" + (screen.width - w) / 2 + ", top=" + (screen.height - h) / 2);
  cWin.focus ();
}

/**
 * 船期查询结果中,点击某一航线名,显示船期详细信息 /Homepage/schedule/index.jsp
 * @param circleno 船期 Circleno
 * @param routeseq 航线Seq
 */
function showRoutev(circleno,routeseq){
 var w = 600;
 var h = 450;
 nWin = window.open ("/schedule2/?todo=detail&circleno=" + circleno + "&routeseq=" + routeseq, "nWin", "width=" + w + ", height=" + h + ", left=" + (screen.width - w) / 2 + ", top=" + (screen.height - h) / 2+",scrollbars = yes" ) ;
 nWin.focus ();
}


function showRoute(voyage_id,vessel_name,voyage){
 var w = 600;
 var h = 450;
 nWin = window.open ("?todo=detail&voyage_id=" + voyage_id + "&vessel_name=" + vessel_name + "&voyage=" + voyage, "nWin", "width=" + w + ", height=" + h + ", left=" + (screen.width - w) / 2 + ", top=" + (screen.height - h) / 2+",scrollbars = yes" ) ;
 nWin.focus ();
}
function showCutday(voyage,portId){
 var w = 500;
 var h = 260;
 dWin = window.open ("/schedule2/?todo=cutday&voyage=" + voyage + "&portId="+portId, "dWin", "width=" + w + ", height=" + h + ", left=" + (screen.width - w) / 2 + ", top=" + (screen.height - h) / 2);
 dWin.focus ();
}

function showVoyageSpot(voyagespotid,servicetype){
 var w = 500;
 var h = 530;
 pWin = window.open ("/schedule2/?todo=point&voyagespotid=" + voyagespotid + "&servicetype=" + servicetype, "pWin", "width=" + w + ", height=" + h + ", left=" + (screen.width - w) / 2 + ", top=" + (screen.height - h) / 2+",scrollbars = yes") ;
 pWin.focus ();
}

function checkType()
{
  var selected = false;
  var unSelect = "一つ以上のサービスタイプを選択してください。";

  with(document.search)
  {
        for(var i = 0; i < serviceType.length; i++)
        {
          if(serviceType[i].checked)
          {
            selected = true;
            break;
          }
        }
        if(! selected) alert(unSelect);
    }

    return selected;
  
}

/*----------------------------- schedule/result.jsp Start -----------------------------*/

function checkSelelctBox() {
	var result = false;
	var ckArr =document.getElementsByName("ckYoyaku");
	if(null != ckArr) {
		for(var i = 0; i< ckArr.length; i++) {
			if(ckArr[i].checked==true) {
				result = true;
				break;
			}		
		}
		
	}
	
	if(result){
		//alert(document.forms[2].name);
		var f = document.ckBl;
		f.submit();
	}else{
		alert("Please choose shipping.");
	}
}

/*----------------------------- schedule/result.jsp End -------------------------------*/


