//Highlight Image

function makevisible(cur,which){

 strength=(which==0)? 1 : 0.2

 if (cur.style.MozOpacity)

  cur.style.MozOpacity=strength

 else if (cur.filters)

  cur.filters.alpha.opacity=strength*100

}

//ポップアップ

function getScreenWIDTH(){

 if(!!window.screen)

  return screen.width        //N4,N6,Moz,IE,共用

 else

  return null                //上記以外

}

function getScreenHEIGHT(){

 if(!!window.screen)

  return screen.height       //N4,N6,Moz,IE,共用

 else

  return null                //上記以外

}

var sw1; var sw2; var pitch1; var pitch2; var str;

function openpopup(popurl, w, h){

 sw1 = 0; sw2 = 0; pitch1 = 13; pitch2 = 32; pitch3 = 0;

 if(getScreenWIDTH() < (w - 0) + (pitch1 * 2)){

  Pwidth = getScreenWIDTH() - pitch1; sw1 = 1;

 } else {

  Pwidth = (w - 0) + pitch3 ;

  Pwscr = (getScreenWIDTH() - pitch1 - Pwidth) / 2;

 }

 if(getScreenHEIGHT() < (h - 0) + (pitch2 * 2)){

  Pheight = getScreenHEIGHT() - pitch2; sw2 = 1;

 } else {

  Pheight = (h - 0) + pitch3 ;

  Phscr = (getScreenHEIGHT() - pitch2 - Pheight)/ 2 ;

 }

 if(sw1 && !sw2){ Pheight = (Pheight - 0) + pitch2; }

 if(!sw1 && sw2){ Pwidth = (Pwidth - 0) + pitch1; }

 if(sw1 || sw2){

  str = ",left=0,top=0,screenX=0,screenY=0,scrollbars=yes,resizable";

 } else {

  str = ",left=" + Pwscr + ",top=" + Phscr + ",screenX=0,screenY=0,scrollbars=no,resizable";

 }

 if(Pwidth < 40){Pwidth = 40}

 if(Pheight < 80){Pheight = 80}

 Astr = "width=" + Pwidth + ",height=" + Pheight + str;

 subwin = window.open(popurl,'window1',Astr);

 if(sw1 || sw2){

  subwin.window.scrollTo(0, 0);

 }

}

//ポップアップ

function openpopup2(popurl, w, h){

 oneself = "width=" + w + ",height=" + h + ",scrollbars=no";

 winpops=window.open(popurl,"window1",oneself)

}

// 新規ウィンドウオープン

function NewOpenWin(url){

 if (url != ''){

  window.open(url, '_blank');

 }

}

// 同一ウィンドウオープン

function SameOpenWin(url){

 if (url != ''){

  window.location = url;

 }

}


