/*出展企業情報ウィンドウ*/

function  collect(url) {
	var w = window;
	var destination = "width=720,height=620,left=0,top=0,resizable=yes,scrollbars=yes,toolbar=yes,location=yes,menubar=yes,status=yes";
	if((w == window) || w.closed) { w = open(url,'superdetail',destination);w.focus();} else {w.focus();}
	return(false);
}

/*出展企業情報ウィンドウNEW*/
function  collect4(url, target) {
	var w = open(url, target);
	w.focus();
	return false;
}

/*POPUPウィンドウ*/

function  collect2(url) {
	var w = window;
	var destination = "width=400,height=400,left=0,top=0,resizable=yes,scrollbars=yes";
	if((w == window) || w.closed) { w = open(url,'superdetail',destination);w.focus();} else {w.focus();}
	return(false);
}

/*verisign用ウィンドウ*/

function  collect3(url) {
	var w = window;
	var destination = "width=500,height=450,left=0,top=0,resizable=yes,scrollbars=yes";
	if((w == window) || w.closed) { w = open(url,'superdetail',destination);w.focus();} else {w.focus();}
	return(false);
}

/*出展企業情報お知らせタイトル用ウィンドウ*/

function  collect_dealerintroduction(code) {
	collect('/j/do/clickDealerIntroduction?code=' + code);
	return(false);
}

/**/

function check_all(){
	var i,e;
	i = 0;
	f = document.clickProductDetail;//フォームの名前
	e = f.elements.length;

for (i = 0; i < e; i++) {
    f.elements[i].checked = true;
	}
}

function nocheck_all(){
	var i,e;
	i = 0;
	f = document.clickProductDetail;//フォームの名前
	e = f.elements.length;

for (i = 0; i < e; i++) {
    f.elements[i].checked = false;
	}
}

/*　ページＴＯＰへリンク （新バージョン）2008/7/30 */

var getBrowserHeight = function(){
	if (window.innerHeight) {
		return window.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight != 0) {
		return document.documentElement.clientHeight;
	}
	else if (document.body) {
		return document.body.clientHeight;
	}
	else {
		return 0;
	}
}
var funcMoveNavi = function(){
	var scroll_value = document.body.scrollTop || document.documentElement.scrollTop;
	var browser_height = getBrowserHeight();

	if (Number(scroll_value) != NaN && Number(browser_height) != NaN && browser_height != 0){
		document.getElementById("navi").style.top = "" + (browser_height + scroll_value - 80) + "px";
		document.getElementById("navi").style.display = "block";
	}
}

/* 日付取得 */
var getDateFunction = function(){
	mydate=new Date();
	Mo=mydate.getMonth()+1+"/";
	Da=mydate.getDate()+"";
	Day=mydate.getDay();
	Day2=new Array(7);
	Day2[0]="日";Day2[1]="月";Day2[2]="火";
	Day2[3]="水";Day2[4]="木";Day2[5]="金";
	Day2[6]="土";
	return (""+Mo+Da+"("+Day2[Day]+")");
}

/*以下廃止予定------------------------------------------*/

function winopen2(loc) {
pjs=window.open(loc,'Newpage','width=400,height=300,left=0,top=90,resizable=yes,scrollbars=yes,menubar=no'); }

/*ページの上へリンクの位置*/

function startFixed(){
      fixedLAYER('fixedLay1','rightBottom',-60,-40)
}

  var ie = !!document.all
  var n4 = !!document.layers
  var w3c= !!document.getElementById
  var ua = navigator.userAgent
  var mac45= ua.indexOf('MSIE 4.5; Mac_PowerPC')!=-1
  var mac5 = ua.indexOf('MSIE5.0;Mac_PowerPC')!=-1
  var macie = ua.indexOf('Mac_PowerPC')!=-1&&ie
  var moz = ( ua.indexOf('Gecko')!=-1 )
  var opr = ( ua.indexOf('Opera')!=-1 )


  if(document.layers)window.onresize=resizeFunc
  function resizeFunc(e){location.reload()}
  function iniFunc(){
    if(ie&&!(mac45))window.onscroll = startFixed
    startFixed()
  }
  var tid=new Array()

  function fixedLAYER(layName,posString,offSetX,offSetY){

    offSetX = parseInt(offSetX,10)
    offSetY = parseInt(offSetY,10)

    if( posString == 'rightTop' ){
     
      if(ie&&!opr) offLeft = document.body.clientWidth   + offSetX
      else         offLeft = window.innerWidth           + offSetX
      if(ie&&!opr) offTop  =                               offSetY
      else         offTop  =                               offSetY

    }
    else if( posString == 'rightBottom' ){

      if(ie&&!opr) offLeft = document.body.clientWidth   + offSetX
      else         offLeft = window.innerWidth           + offSetX
      if(ie&&!opr) offTop  = document.body.clientHeight  + offSetY
      else         offTop  = window.innerHeight          + offSetY

    }
    else if( posString == 'leftBottom' ){

      if(ie&&!opr) offLeft =                               offSetX
      else         offLeft =                               offSetX
      if(ie&&!opr) offTop  = document.body.clientHeight  + offSetY
      else         offTop  = window.innerHeight          + offSetY

    }
    else if( posString == 'center' ){

      if(ie&&!opr) offLeft = document.body.clientWidth/2 + offSetX
      else         offLeft = window.innerWidth/2         + offSetX
      if(ie&&!opr) offTop  = document.body.clientHeight/2+ offSetY
      else         offTop  = window.innerHeight/2        + offSetY

    }
    else {

      if(ie&&!opr) offLeft =                         offSetX
      else         offLeft =                         offSetX
      if(ie&&!opr) offTop  =                         offSetY
      else         offTop  =                         offSetY

    }

    offLeft = parseInt(offLeft)
    offTop  = parseInt(offTop)

    if(document.all&&!opr){
      var mx = parseInt(document.body.scrollLeft +offLeft)
      var my = parseInt(document.body.scrollTop  +offTop)
    } else {
      var mx = parseInt(self.pageXOffset+offLeft)
      var my = parseInt(self.pageYOffset+offTop)

    }
    moveLAYER(layName,mx,my)


    //WinIE以外 opera n4用
    if(!(ie&&!mac45) || opr){
      clearTimeout(fixedLAYER[layName])
      fixedLAYER[layName]=setTimeout("fixedLAYER('"+layName+"','"+posString
                   +"','" +offSetX+"','"+offSetY+"')",100)
    }
  }

  function moveLAYER(layName,x,y){
      
      if(document.getElementById){         //Moz,NN6,IE5用
        document.getElementById(layName).style.left=x
        document.getElementById(layName).style.top=y
      }
      else if(document.all){
        document.all(layName).style.pixelLeft=x    //IE4用
        document.all(layName).style.pixelTop=y
      }
      else if(document.layers){
        document.layers[layName].moveTo(x,y)
                                                   //NN4用
      }
  }