function openWin(myURL,myW,myH,myName){
	var scWidthCenter=screen.availWidth/2;
	var scHeightCenter=screen.availHeight/2;
	option="toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width="+myW+",height="+myH+",left="+(scWidthCenter-(myW/2))+",top="+(scHeightCenter-(myH/2));
	var newWin=window.open(myURL,myName,option);
	newWin.window.focus();
}

function setParam(){
	var sea_length = location.search.length;
	var equal_chara = location.search.indexOf("?")+1;
	var result = unescape(location.search.substring(equal_chara,sea_length));
	return result;
}

function quit(){
	window.close();
}

function openCart(URL){
	var win;
	var strUrl=URL;

    try {
      if(window.imagelist.closed) {
        win = window.open(strUrl, 'imagelist');
        if(win != null) {
          window.imagelist = win;
        }
      } else {
        window.imagelist.location.href = strUrl;
      } 
    } catch(e) {
      var win = window.open(strUrl, 'imagelist');
      if(win != null) {
        window.imagelist = win;
      }
    }
    
    try {
      if(window.imagelist != null) {
        window.imagelist.focus();
      }
    } catch(e) {}
}

function openPageCart(pageNum){
	var cgiURL = 'http://prosite.eidai-sangyo.co.jp/download/cgi-bin/digital_result.cgi';

	var subDirectory = '/catalog/';
	var indexHtml	 = '/index.html';

	var catalogNumber = location.pathname;
	catalogNumber = catalogNumber.substring(subDirectory.length, catalogNumber.indexOf(indexHtml, 0));
	cgiURL += '?catalogNumber=' + catalogNumber + '&pageID=' + pageNum;
	openCart(cgiURL);
}

function open_pdf(pageNum){
 alert('open_pdf: '+pageNum);
}

function open_pdf_both(pageNum){
 alert('open_pdf_both: '+pageNum);
}
