////////////////////////////////////////////////////////////////////////////////
function HD_pressCloseUp() {		
	document.dBook.handle_pressCloseUp();
}
function HD_pressZoom() {			
	document.dBook.handle_pressZoom();
}
function HD_pressLeftZoom() {		
	document.dBook.handle_pressZoomPage(document.dBook.handle_getLeftSlidePage());
}
function HD_pressRightZoom() {			
	document.dBook.handle_pressZoomPage(document.dBook.handle_getRightSlidePage());
}
function HD_pressPause() {			
	document.dBook.handle_pressPause();
}
function HD_pressNextPage() {		
	document.dBook.handle_pressNextPage();
}
function HD_pressPreviousPage() {	
	document.dBook.handle_pressPreviousPage();
}
function HD_gotoFirstPage() {		
	document.dBook.handle_gotoFirstPage();
}
function HD_gotoEndPage() {			
	document.dBook.handle_gotoEndPage();
}

function HD_pressBackwardRotate() {	// auto sliding (backward)
	document.dBook.handle_pressBackwardRotate();
}
function HD_pressForwardRotate() {	// auto sliding (forward)
	document.dBook.handle_pressForwardRotate();
}
function HD_pressSpeedUp() {		// turn speed up when sliding
	document.dBook.handle_pressSpeedUp();
}
function HD_pressSpeedDown() {		// turn speed down when sliding
	document.dBook.handle_pressSpeedDown();
}

function DigitalBookUnload()
{ 
	document.dBook.handle_setURL( getMailingParam() );
	document.dBook.handle_unload();
}
// Please append 'onUnload=DigitalBookUnload()' at BODY open tag.
// Please check that 'Port' number is 80 or not.
////////////////////////////////////////////////////////////////////////////////

function HD_openBrWindow(theURL,winName,features) {
		
	if (features == "")
	{
		features = "toolbar=yes,width=800,height=600,location=yes,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes";
	}

  HD_popup = window.open(theURL,winName,features);
  
  if (HD_popup != null)
  {
	  HD_popup.focus();
	}
}

var printTarget = ""

function HD_setPrintTarget(tempTarget) {
	printTarget = tempTarget
}

function printPage(direction, pagenum) {
	var tempFile=""
	var tempWindow = ""
	var validity

	if (direction != 2) {		
		printTarget = 'd__3dmall/d__3dmall__' + pagenum + '__2by2__';

		printWindow=window.open(tempFile,tempWindow,'scrollbars=yes,resizable=yes,width=700,height=600');
		printWindow.document.writeln("<HTML>")
		printWindow.document.writeln("<head>")
		printWindow.document.writeln("<scr"+"ipt lang" + "uage=jav"+"ascript>")
		printWindow.document.writeln("    funct" + "ion printPage() {")
		
		printWindow.document.writeln("    window.print()")
				
		printWindow.document.writeln("		setTimeout('window.close()', 1000);")
		printWindow.document.writeln("    } ")
		printWindow.document.writeln("</scr"+"ipt>")
		printWindow.document.writeln("</head>")
		printWindow.document.writeln("<BODY>")

		printWindow.document.writeln("<center>")
		printWindow.document.writeln("<table border='0' cellspacing='0' cellpadding='0' topmargin='0' marginwidth='0' marginheight='0'>")
		printWindow.document.writeln("<tr>")

		printWindow.document.writeln("<td><img src=\"" + printTarget + "0.jpg\" width=325 height=485></td>")
		printWindow.document.writeln("<td><img src=\"" + printTarget + "1.jpg\" width=325 height=485></td>")
		printWindow.document.writeln("</tr><tr>")
		printWindow.document.writeln("<td><img src=\"" + printTarget + "2.jpg\" width=325 height=485></td>")
		printWindow.document.writeln("<td><img src=\"" + printTarget + "3.jpg\" width=325 height=485></td>")

		printWindow.document.writeln("</tr>")
		printWindow.document.writeln("</table>")
		printWindow.document.writeln("</center>")

		printWindow.document.writeln("</BODY>")
		printWindow.document.writeln("</HTML>")
		printWindow.location.reload();

//		printWindow.print()
		printWindow.setTimeout("printPage()", 1000);
		printWindow.setTimeout("window.close()",1000);
	}
	else { //  (direction == 2) {		
		printTarget_l = 'd__3dmall/d__3dmall__' + pagenum + '__2by2__';
		printTarget_r = 'd__3dmall/d__3dmall__' + (parseInt(pagenum) + 1) + '__2by2__';

		printWindow=window.open(tempFile,tempWindow,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes, left=0, top=0, width=910,height=700');
		printWindow.document.writeln("<HTML>")
		printWindow.document.writeln("<head>")

		printWindow.document.writeln("<scr"+"ipt lang" + "uage=jav"+"ascript>")
		printWindow.document.writeln("		var msg = 'プリンタの詳細設定から印刷するページの向きを横向きに設定して下さい。'")
		printWindow.document.writeln("    funct" + "ion printPage() {")
		
		printWindow.document.writeln("    window.print()")
		
		printWindow.document.writeln("				setTimeout('alert(msg)', 1500)")
		printWindow.document.writeln("				setTimeout('window.close()', 2000);")
		printWindow.document.writeln("    } ")
		printWindow.document.writeln("</scr"+"ipt>")

		printWindow.document.writeln("</head>")
		printWindow.document.writeln("<BODY>")

		printWindow.document.writeln("<center>")
		printWindow.document.writeln("<table border='0' cellspacing='0' cellpadding='0' topmargin='0' marginwidth='0' marginheight='0'>")
		printWindow.document.writeln("<tr>")

		printWindow.document.writeln("<td><img src=\"" + printTarget_l + "0.jpg\" width=225 height=322></td>")
		printWindow.document.writeln("<td><img src=\"" + printTarget_l + "1.jpg\" width=225 height=322></td>")
		printWindow.document.writeln("<td><img src=\"" + printTarget_r + "0.jpg\" width=225 height=322></td>")
		printWindow.document.writeln("<td><img src=\"" + printTarget_r + "1.jpg\" width=225 height=322></td>")
		printWindow.document.writeln("</tr><tr>")
		printWindow.document.writeln("<td><img src=\"" + printTarget_l + "2.jpg\" width=225 height=322></td>")
		printWindow.document.writeln("<td><img src=\"" + printTarget_l + "3.jpg\" width=225 height=322></td>")
		printWindow.document.writeln("<td><img src=\"" + printTarget_r + "2.jpg\" width=225 height=322></td>")
		printWindow.document.writeln("<td><img src=\"" + printTarget_r + "3.jpg\" width=225 height=322></td>")

		printWindow.document.writeln("</tr>")
		printWindow.document.writeln("</table>")
		printWindow.document.writeln("</center>")

		printWindow.document.writeln("</BODY>")
		printWindow.document.writeln("</HTML>")
		printWindow.location.reload();

		printWindow.setTimeout("printPage()", 1000);
	}
}

//function HD_startApplet() {
//	interval_id = window.setInterval("HD_setPageNum()", intervalTime);
//}

////////////////////////////////////////////////////////////////////////////////

