<!doctype html public "-//w3c//dtd html 3.2//ja">
<html>
<head>
<title>back_bone_script</title>
<meta http-equiv=content-type content="text/html; charset=x-euc-jp">

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin



function scwidth(){
	return screen.width
  }
function scheight(){
	return screen.height
  }


var win_size = 300;

function wid_capacity(){
	var scwidth = screen.width;
	var wid_cap = scwidth / win_size;
	wid_cap = Math.floor(wid_cap);
	return wid_cap;
  }

function hei_capacity(){
	var scheight = screen.height;
	var hei_cap = scheight / win_size;
	hei_cap = Math.floor(hei_cap);
	return hei_cap;
  }

var test = "1";

var list_back = new Array;
var list_back_tmp  = new Array;


function win_tmp_set(){
  if(document.forms['yng_brother']){
  list_back_tmp = document.forms['yng_brother'];


//	alert(list_back_tmp);
	
	for(var i=0;i<list_back_tmp.length;i++){
	alert(list_back_tmp[i]);
	list_back.push(list_back_tmp[i]);
	}
	
	}else{
//	alert("no");
	}
}

function win_close_all(){
	alert(list_back);


while(true)
{
	var element=(list_back.shift());
	if (element==undefined)
	{
		break;
	}
	element.close();
}
}

var mes = "on going"

function transfer_loop(){
	while(document.forms['yng_brother']){
	setTimeout("win_tmp_set()",10000);
	}
}



//END -->
</script>
</head>

<body >



<form name="windata" >
<SCRIPT LANGUAGE="JavaScript">

document.write('<INPUT TYPE="text" NAME="win_size_trf" value="' + win_size + '">'); 

document.write('<INPUT TYPE="text" NAME="scwidth" value="' + scwidth() + '">'); 
document.write('<INPUT TYPE="text" NAME="scheight" value="' + scheight() + '">'); 

document.write('<INPUT TYPE="text" NAME="wid_capacity" value="' + wid_capacity() + '">'); 
document.write('<INPUT TYPE="text" NAME="hei_capacity" value="' + hei_capacity() + '">'); 

	var tile_data_wid = new Object();
	var tile_data_hei = new Object();

	var scwidth = scwidth();
	var scheight = scheight();
	var wid_capacity_count = wid_capacity() ;
	var hei_capacity_count = hei_capacity() ;
	
	var win_colum_sum_count = wid_capacity_count * hei_capacity_count;
	
	document.write('<INPUT TYPE="text" NAME="win_colum_sum" value="' + win_colum_sum_count + '">win_colum_sum'); 

	var win_idx = 1;
	var wid_point = 0;
	var hei_point = 0;

for (var i = 0; i < hei_capacity_count ; i++) {
	for (var j = 0; j < wid_capacity_count ; j++) {
    tile_data_wid[win_idx] = wid_point ;
	tile_data_hei[win_idx] = hei_point ;
	wid_point = wid_point + win_size;
	win_idx = win_idx + 1;
	}
	hei_point = hei_point + win_size;
	wid_point = 0;
}

var xname = "";
var yname = "";

for (var k = 1; k < win_colum_sum_count + 1 ; k++) {
	xname = 'xvalue' + k;
	yname = 'yvalue' + k;
	document.write( '<INPUT TYPE="text" NAME="' + xname + '" value="' + tile_data_wid[k] + '">' + xname); 
	document.write( '<INPUT TYPE="text" NAME="' + yname + '" value="' + tile_data_hei[k] + '">' + yname); 
}

var now_pos_x = 1;
var now_pos_y = 1;
	
	document.write( '<INPUT TYPE="text" NAME="now_pos_x" value="' + now_pos_x + '">'); 
	document.write( '<INPUT TYPE="text" NAME="now_pos_y" value="' + now_pos_y + '">'); 

</script>

<INPUT TYPE="text" NAME="test" value="10"> 

</form>

window control
<FORM NAME="win_ctl">
<SCRIPT LANGUAGE="JavaScript">
document.write('<INPUT TYPE="text" NAME="win_count" value="0">');
document.write('<INPUT TYPE="text" NAME="now_pos"  value="1">');



document.forms['yng_brother'];


</SCRIPT>
</form>


<INPUT TYPE="BUTTON" VALUE="get val" onClick="
  list_back_tmp = parent.report.document.forms['brother'];


	alert(list_back_tmp);
	
	for(var i=0;i<list_back_tmp.length;i++){
	alert(list_back_tmp[i]);
	list_back.push(list_back_tmp[i]);
	}

	alert(list_back);

/*	
for(var i=0;i<list_back.length;i++){
	alert(list_back[i]);
	if(!list_back[i].closed){
	list_back[i].close();
	}
*/

while(true)
{
	var element=(list_back.shift());
	if (element==undefined)
	{
		break;
	}
	element.close();
}

}
">

<br>
<INPUT TYPE="BUTTON" VALUE="get set" onClick="win_tmp_set()">


<INPUT TYPE="BUTTON" VALUE="get del" onClick="win_close_all()">


</body>
</html>