//編集補助
function SetChar(strNum) {
 var strMsg;
 valMsg = document.set.photographer.value;
 strMsg = valMsg + strNum;
 document.set.photographer.value=strMsg;
}
function DelChar(strNum) {
 document.set.photographer.value=strNum;
}
//ページジャンプ
function LinkSelect(mysel){
 adrs = mysel.options[mysel.selectedIndex].value;
 if (adrs != "-" ) location.replace(mysel.options[mysel.selectedIndex].value);
}
//微動
var ie=document.all              //IE4用
var dom=document.getElementById  //N6,Moz,IE5,IE6用
var ns4=document.layers          //NN4用
function ImgDown(id) {
 if (!dom&&!ie&&!ns4) return
 imgobj=(dom)?document.getElementById(id).style : ie? document.all.id : document.id
 imgobj.top=1
 imgobj.left=1
}
function ImgUp(id) {
 if (!dom&&!ie&&!ns4) return
 imgobj=(dom)?document.getElementById(id).style : ie? document.all.id : document.id
 imgobj.top=-1
 imgobj.left=-1
}
/*//////////// フルスクリ−ン幅get用指定用関数   UseFree
========================================================
 Win  n4 n6 moz e4 e5 e6,
 Mac  n4 n6 moz e4.5 e5,
 Linux n4 n6 moz         
========================================================
 ルスクリ−ン幅をピクセル単位で取得する
 Support http://game.gr.jp/js/
=======================================================*/
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                //上記以外
}
/*//////////// フルスクリ−ン幅get用指定用関数ここまで */
var sw1; var sw2; var pitch1; var pitch2; var str;
function openpopup(popurl, w, h, flg){
 if (flg == 1) { w = w + 40; h = h + 70; }
 if (flg == 0) { w = getScreenWIDTH(); h = getScreenHEIGHT(); }
 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,resizable";
 } else {
  str = ",left=" + Pwscr + ",top=" + Phscr + ",screenX=0,screenY=0,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 getKey(e) {
 if (e == null) {
  keycode = event.keyCode
 } else {
  keycode = e.which
 }
 key = String.fromCharCode(keycode).toLowerCase()
 if(key == 'x') {
  window.close()
 }
}
function listenKey() {
 document.onkeypress = getKey
}
// 選択
function selectAll(theField) {
 var tempval=eval("document."+theField)
 tempval.focus()
 tempval.select()
}
