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 - 60) + "px";
		document.getElementById("navi").style.display = "block";
	}
}

var getBrowserHeight2 = 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 funcMoveNavi2 = function(){
	var scroll_value = document.body.scrollTop || document.documentElement.scrollTop;
	var browser_height = getBrowserHeight2();

	if (Number(scroll_value) != NaN && Number(browser_height) != NaN && browser_height != 0){
		document.getElementById("navi2").style.top = "" + (browser_height + scroll_value - 560) + "px";
		document.getElementById("navi2").style.display = "block";
	}
}

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_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_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 OpenWin(img,w,h){
win=window.open(img,"new1","resizable=1,status=1,scrollbars=1,width="+w+",height="+h+"\"");
}




//------  セルの背景色  ------// 
function cellBGC1(ce1,ce2,ce3,c1)
		{
			document.getElementById(ce1).style.backgroundColor =c1;
			document.getElementById(ce2).style.backgroundColor =c1;
			document.getElementById(ce3).style.backgroundColor =c1;
		}  //--- onMouseover ---//

function cellBGC2(ce1,ce2,ce3,c2)
		{
			document.getElementById(ce1).style.backgroundColor =c2;
			document.getElementById(ce2).style.backgroundColor =c2;
			document.getElementById(ce3).style.backgroundColor =c2;
		}  //--- onMouseOut ---//
		
function cellBGC3(ce1,ce2,c1)
		{
			document.getElementById(ce1).style.backgroundColor =c1;
			document.getElementById(ce2).style.backgroundColor =c1;
		}  //--- onMouseover ---//

function cellBGC4(ce1,ce2,c2)
		{
			document.getElementById(ce1).style.backgroundColor =c2;
			document.getElementById(ce2).style.backgroundColor =c2;
		}  //--- onMouseOut ---//

function cellBGC5(ce1,c1)
		{
			document.getElementById(ce1).style.backgroundColor =c1;
		}  //--- onMouseover ---//

function cellBGC6(ce1,c2)
		{
			document.getElementById(ce1).style.backgroundColor =c2;
		}  //--- onMouseOut ---//

function cellBGC7(ce1,ce2,ce3,ce4,ce5,c1)
		{
			document.getElementById(ce1).style.backgroundColor =c1;
			document.getElementById(ce2).style.backgroundColor =c1;
			document.getElementById(ce3).style.backgroundColor =c1;
			document.getElementById(ce4).style.backgroundColor =c1;
			document.getElementById(ce5).style.backgroundColor =c1;
		}  //--- onMouseover ---//

function cellBGC8(ce1,ce2,ce3,ce4,ce5,c1)
		{
			document.getElementById(ce1).style.backgroundColor =c1;
			document.getElementById(ce2).style.backgroundColor =c1;
			document.getElementById(ce3).style.backgroundColor =c1;
			document.getElementById(ce4).style.backgroundColor =c1;
			document.getElementById(ce5).style.backgroundColor =c1;
		}  //--- onMouseOut ---//

function cellBGC9(ce1,ce2,ce3,ce4,c1)
		{
			document.getElementById(ce1).style.backgroundColor =c1;
			document.getElementById(ce2).style.backgroundColor =c1;
			document.getElementById(ce3).style.backgroundColor =c1;
			document.getElementById(ce4).style.backgroundColor =c1;
		}  //--- onMouseover ---//

function cellBGC10(ce1,ce2,ce3,ce4,c1)
		{
			document.getElementById(ce1).style.backgroundColor =c1;
			document.getElementById(ce2).style.backgroundColor =c1;
			document.getElementById(ce3).style.backgroundColor =c1;
			document.getElementById(ce4).style.backgroundColor =c1;
		}  //--- onMouseOut ---//
		
function cellBGC11(ce1,ce2,ce3,ce4,ce5,ce6,ce7,c1)
		{
			document.getElementById(ce1).style.backgroundColor =c1;
			document.getElementById(ce2).style.backgroundColor =c1;
			document.getElementById(ce3).style.backgroundColor =c1;
			document.getElementById(ce4).style.backgroundColor =c1;
			document.getElementById(ce5).style.backgroundColor =c1;
			document.getElementById(ce6).style.backgroundColor =c1;
			document.getElementById(ce7).style.backgroundColor =c1;
		}  //--- onMouseover ---//

function cellBGC12(ce1,ce2,ce3,ce4,ce5,ce6,ce7,c1)
		{
			document.getElementById(ce1).style.backgroundColor =c1;
			document.getElementById(ce2).style.backgroundColor =c1;
			document.getElementById(ce3).style.backgroundColor =c1;
			document.getElementById(ce4).style.backgroundColor =c1;
			document.getElementById(ce5).style.backgroundColor =c1;
			document.getElementById(ce6).style.backgroundColor =c1;
			document.getElementById(ce7).style.backgroundColor =c1;
		}  //--- onMouseOut ---//

function cellBGC13(ce1,c1)
		{
			document.getElementById(ce1).style.backgroundColor =c1;
		}


//------  カラー選択  ------//
//cloth1//
function setData1(v){window.opener.document.myForm.no1.value=v;}

function setData2(v){window.opener.document.myForm.no2.value=v;}

function setURL1(i){window.opener.no3.location.href =i;}

//cloth2//
function setData3(v){window.opener.document.myForm.no4.value=v;}

function setData4(v){window.opener.document.myForm.no5.value=v;}

function setURL2(i){window.opener.no6.location.href =i;}

//cloth3//
function setData5(v){window.opener.document.myForm.no7.value=v;}

function setData6(v){window.opener.document.myForm.no8.value=v;}

function setURL3(i){window.opener.no9.location.href =i;}

//cloth4//
function setData7(v){window.opener.document.myForm.no10.value=v;}

function setData8(v){window.opener.document.myForm.no11.value=v;}

function setURL4(i){window.opener.no12.location.href =i;}

//cloth5//
function setData9(v){window.opener.document.myForm.no13.value=v;}

function setData10(v){window.opener.document.myForm.no14.value=v;}

function setURL5(i){window.opener.no15.location.href =i;}


//------  入力確認  ------//
function checkContents1(a,b,c,d,e,f,g,h,i,j)
{
document.getElementById(a). disabled = false;
document.getElementById(b). disabled = false;
document.getElementById(c). disabled = false;
document.getElementById(d). disabled = false;
document.getElementById(e). disabled = false;
document.getElementById(f). disabled = false;
document.getElementById(g). disabled = false;
document.getElementById(h). disabled = false;
document.getElementById(i). disabled = false;
document.getElementById(j). disabled = false;
document.test.submit();
}
