function popupOpen (imageURL, caption) {
var co="2000-2011 SCOPE all rights reserved";
var windowTop = 15;
var windowLeft = 15;
var defaultWidth = 650;
var defaultHeight = 650;
var onLoseFocusExit = false;
var undefined;
var Options = "width=" + defaultWidth + ",height=" + defaultHeight + ",top=" + windowTop + ",left=" + windowLeft + ", resizable=no , status=no , scrollbars=no";
var myScript = "<html>\n" + 
"<head>\n" + 
"<title>" + caption + "\</title>\n" +
"<meta http-equiv=\"Content-Type\" content=\"text/html\">\n" +
"<meta http-equiv=\"Content-Language\" content=\"ja\">\n" +
"<script language=\"JavaScript\" type=\"text/javascript\">\n" +
"function resizewindow () {\n" +
"  var width = document.myimage.width;\n" + 
"  var height = document.myimage.height;\n";
if (navigator.userAgent.indexOf("Firefox/2")!=-1) {
    myScript = myScript +  "  window.resizeTo (width+7, height+80);\n"
  }
else if (navigator.userAgent.indexOf("Firefox/3")!=-1) {
    myScript = myScript +  "  window.resizeTo (width+7, height+100);\n"
  }
else if (navigator.userAgent.indexOf("SV1") != -1) {
    myScript = myScript + "  window.resizeTo (width+10, height+86);\n"
  }
else if (navigator.userAgent.indexOf("Chrome") != -1) { 
    myScript = myScript + "  window.resizeTo (width+12, height+111);\n"
  }
else if (navigator.userAgent.indexOf("Safari") != -1) {
    myScript = myScript +  "  window.resizeTo (width+5, height+60);\n"
  }
else if (navigator.appName.indexOf("Opera") != -1) {
    myScript = myScript +  "  window.resizeTo (width+12, height+62);\n"
  }
else if (navigator.userAgent.indexOf("MSIE 7.0"|"MSIE 8.0") != -1) { 
    myScript = myScript + "  window.resizeTo (width+12, height+111);\n"
  }
else if (navigator.appName.indexOf("Windows") != -1) { 
    myScript = myScript + "  window.resizeTo (width+12, height+62);\n"
  }
else {
    myScript = myScript + "  window.resizeTo (width+0, height+54);\n"
  }
myScript = myScript + "}\n" + "window.onload = resizewindow;\n" +
    "</script>\n</head>\n" + "<body oncontextmenu=\"return false\"\" ";
  if (onLoseFocusExit) {myScript = myScript + "onblur=\"self.close()\" ";}
  if (co.substr(10,1) == "S") { 
  
myScript = myScript + "style=\"margin: 0px; padding: 0px;\">\n" +
    "<img src=\"" + imageURL + "\" alt=\"" + caption + "\" onClick=\"self.close()\" title=\"" + caption + "\" name=\"myimage\" galleryimg=\"no\"><br><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n" +
	"<tr bgcolor=\"#000000\"> \n" +
	"<td height=\"1\"><img src=\"http://www.rakuten.ne.jp/gold/scope/img/spacer.gif\" width=\"1\" height=\"1\"></td></tr><tr><td align=\"right\"><font size=\"0.85em\" color=\"#666\">Copyright &copy; 2000-2012 scope Co.,Ltd All rights reserved.　画像の無断転載を禁止します。</font></td></tr></table>\n" +
	"</body>\n" +
	"</html>\n";var imageWindow = window.open ("","imageWin",Options);imageWindow.document.write (myScript);
imageWindow.document.close ();
if (window.focus) imageWindow.focus();
}
}

function popupText (imageURL, caption) {
var co="2000-2011 SCOPE all rights reserved";
var windowTop = 15;
var windowLeft = 15;
var defaultWidth = 650;
var defaultHeight = 650;
var onLoseFocusExit = false;
var undefined;
var Options = "width=" + defaultWidth + ",height=" + defaultHeight + ",top=" + windowTop + ",left=" + windowLeft + ", resizable=no , status=no , scrollbars=no";
var myScript = "<html>\n" + 
"<head>\n" + 
"<title>" + caption + "\</title>\n" +
"<meta http-equiv=\"Content-Type\" content=\"text/html\">\n" +
"<meta http-equiv=\"Content-Language\" content=\"ja\">\n" +
"<script language=\"JavaScript\" type=\"text/javascript\">\n" +
"function resizewindow () {\n" +
"  var width = document.myimage.width;\n" + 
"  var height = document.myimage.height;\n";
if (navigator.userAgent.indexOf("Firefox/2")!=-1) {
    myScript = myScript +  "  window.resizeTo (width+7, height+80);\n"
  }
else if (navigator.userAgent.indexOf("Firefox/3")!=-1) {
    myScript = myScript +  "  window.resizeTo (width+7, height+100);\n"
  }
else if (navigator.userAgent.indexOf("SV1") != -1) {
    myScript = myScript + "  window.resizeTo (width+10, height+86);\n" /*IE6*/
  }
else if (navigator.userAgent.indexOf("Chrome") != -1) {
    myScript = myScript +  "  window.resizeTo (width+12, height+85);\n"
  }
else if (navigator.userAgent.indexOf("Safari") != -1) {
    myScript = myScript +  "  window.resizeTo (width+5, height+60);\n"
  }
else if (navigator.appName.indexOf("Opera") != -1) {
    myScript = myScript +  "  window.resizeTo (width+12, height+62);\n"
  }
else if (navigator.userAgent.indexOf("MSIE 7.0"|"MSIE 8.0") != -1) { 
    myScript = myScript + "  window.resizeTo (width+12, height+111);\n"
  }
else if (navigator.appName.indexOf("Windows") != -1) { 
    myScript = myScript + "  window.resizeTo (width+12, height+62);\n"
  }
else {
    myScript = myScript + "  window.resizeTo (width+0, height+54);\n"
  }
myScript = myScript + "}\n" + "window.onload = resizewindow;\n" +
    "</script>\n</head>\n" + "<body oncontextmenu=\"return false\"\" ";
  if (onLoseFocusExit) {myScript = myScript + "onblur=\"self.close()\" ";}
  if (co.substr(10,1) == "S") {

myScript = myScript + "style=\"margin: 0px; padding: 0px;\">\n"+
	"<div style=\"position: absolute;bottom:25px;width:95%;_width:100%;font-size:11px;filter:Alpha(opacity=70); -moz-opacity:.70; opacity:.70; background-color:#ffffff; padding:5px 15px 5px 15px; \">"+ caption + "</div>\n"+
    "<img src=\"" + imageURL + "\" alt=\"" + caption + "\" onClick=\"self.close()\" title=\"" + caption + "\" name=\"myimage\" galleryimg=\"no\"><br><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n"+
	"<tr bgcolor=\"#000000\"><td height=\"1\" background=\"http://www.rakuten.ne.jp/gold/scope/img/spacer.gif\"></td></tr><tr><td align=\"right\"><font size=\"0.85em\" color=\"#666\">Copyright &copy; 2000-2012 scope Co.,Ltd All rights reserved.　画像の無断転載を禁止します。</font></td></tr></table>\n"+
	"</body>\n"+
	"</html>\n";var imageWindow = window.open ("","imageWin",Options);imageWindow.document.write (myScript);
imageWindow.document.close ();
if (window.focus) imageWindow.focus();
}
}


function popupText2 (img_cap) {
var windowTop = 15;
var windowLeft = 15;
var defaultWidth = 900;
var defaultHeight = 700;
var onLoseFocusExit = false;
var undefined;
//edit start
  
  
var def = img_cap.split("&");
var imgS = new Array();
var imgL = new Array();
var imgLall = new Array();
var txt = new Array();
var txtall = new Array();

	for (i = 0; i < def.length; i++) {
	var sp = def[i].split("|");
	imgL.push(sp[0]);
	txt.push(sp[1]);
	imgLall.push("'"+imgL[i]+"'");
	txtall.push("'"+txt[i]+"'");
	}
	
	var Sout = new Array();
   	for (i = 0; i < imgL.length; i++){
	Sout.push("<div style=\"padding:10px 10px 0 10px;\"><a onClick=\"ChangeIMG("+i+")\"><img src=\""+imgL[i]+"\" class=\"btn\" height=\"50\"></a></div>\n");
	};
	var Sall = Sout.join(" ");
	
var Options = "width=" + defaultWidth + ",height=" + defaultHeight + ",top=" + windowTop + ",left=" + windowLeft + ", resizable=no , status=no , scrollbars=no";
var myScript = "<html>\n" + 
"<head>\n" + 
"<title>" + txt[0] + "\</title>\n" +
"<meta http-equiv=\"Content-Type\" content=\"text/html\">\n" +
"<meta http-equiv=\"Content-Language\" content=\"EUC-JP\">\n" +
"<link rel=\"stylesheet\" href=\"/gold/scope/css/2009/element.css\" type=\"text/css\" />\n" +
"<script language=\"JavaScript\" type=\"text/javascript\">\n" +

"var imgL = ["+imgLall+"];\n"+
"var txt = ["+txtall+"];\n"+

"function resizewindow () {\n" +
"  var width = document.myimage.width;\n" + 
"  var height = document.myimage.height;\n";

if (navigator.userAgent.indexOf("Firefox/3") != -1 || navigator.userAgent.indexOf("Firefox/2") != -1) {
    myScript = myScript +  "  window.resizeTo (width+100, height+125);\n"
  }
else if (navigator.userAgent.indexOf("Chrome") != -1) { 
    myScript = myScript + "  window.resizeTo (width+100, height+100);\n"
  }
else if (navigator.userAgent.indexOf("Safari") != -1) {
    myScript = myScript +  "  window.resizeTo (width+100, height+90);\n"
  }
else if (navigator.userAgent.indexOf("MSIE 6") != -1|| navigator.userAgent.indexOf("MSIE 7") != -1) { 
    myScript = myScript + "  window.resizeTo (width+100, height+125);\n"
  }
else if (navigator.appName.indexOf("Windows") != -1) { 
    myScript = myScript + "  window.resizeTo (width+100, height+125);\n"
  }
myScript = myScript +"}\n" + "window.onload = resizewindow;\n" +

"function ChangeIMG(n){\n" +
"	document.myimage.src=imgL[n];\n" +
"	document.getElementById(\"cap\").innerHTML = txt[n];\n" +
"   var width = document.myimage.width;\n" + 
"   var height = document.myimage.height;\n"+
"   window.resizeTo (width+100, height+125);\n"+
"}\n"+

    "</script>\n</head>\n" + "<body ";
  if (onLoseFocusExit) {myScript = myScript + "onblur=\"self.close()\" ";}
  
myScript = myScript + "style=\"margin: 0px; padding: 0px;\">\n"+

"<div class=\"imgL\">\n"+Sall+"</div>"+

"<div class=\"imgL\" style=\"position:relative;padding-top:10px;\">\n"+

"\n<p style=\"position: absolute;bottom:0;width:95%;_width:100%;font-size:11px;filter:Alpha(opacity=70); -moz-opacity:.70; opacity:.70; background-color:#ffffff; padding:5px 15px 5px 15px;\" id=\"cap\" name=\"cap\">\n"+txt[0]+"</p>\n"+
"<img src=\""+imgL[0]+"\" name=\"myimage\" id=\"myimage\" onClick=\"self.close()\" galleryimg=\"no\" >\n"+
"</div>\n"+
"<div style=\"margin-top:10px;clear:both;width:100%;height:30px;text-align:right;border-top:solid 1px #000;\"  class=\"imgL\"><font size=\"0.85em\" color=\"#666\">Copyright &copy; 2000-2012 scope Co.,Ltd All rights reserved.　画像の無断転載を禁止します。</font></div>\n"+

	"</body>\n"+
	
	"</html>\n";
		
	var imageWindow = window.open ("","imageWin",Options);
			
	imageWindow.document.write (myScript);		
			imageWindow.document.close ();
if (window.focus) imageWindow.focus();
}



function popupWindow (URL,WWidth,WHeight,WScroll) {
	
  if (navigator.userAgent.indexOf("Firefox/2")!=-1) {
    REwidth = WWidth + 0;
	REheight = WHeight + 35;
  }
else if (navigator.userAgent.indexOf("SV1") != -1) {
    REwidth = WWidth + 0;
	REheight = WHeight + 0; /*IE6*/
  }
else if (navigator.userAgent.indexOf("MSIE 7.0"|"MSIE 8.0") != -1) { 
    REwidth = WWidth + 0;
	REheight = WHeight + 0;
  }
else {
    REwidth = WWidth + 0;
	REheight = WHeight + 0;
  }
var Options = "width=" + REwidth + ",height=" + REheight + ", scrollbars= " + WScroll + " , top=50, left=50, location=no, menubar=no, toolbar=no, resizable=no,status=no ";

var imageWindow = window.open (URL,"imageWin",Options);
	imageWindow.document.close ();
if (window.focus) imageWindow.focus();
}


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_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_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 GoPage( a ){		
		location = a.options[a.selectedIndex].value;	
	}
