<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>座席設定</title>
<link rel="stylesheet" type="text/css" href="move1-1.css"><script type="text/javascript">
function load() {
var x=30;
var y=30;
var w=80;
var h=60;
var i;
i =parseInt(i);
var j;
j =parseInt(j);
for(i=0;i<6;i++){
add(30+i*150,30,80,120,'');
}
for(j=1;j<6;j++){
for(i=0;i<4;i++){
 add(30+j*150,110+i*80,80,60,'');
 add(90+j*150,110+i*80,80,60,'');
 add(30+j*150,520+i*80,80,60,'');
 add(90+j*150,520+i*80,80,60,'');
}
}add(30,110,80,60,'');
add(30,190,80,60,'');
add(30,270,80,60,'');
add(30,350,80,60,'');add(90,110,80,60,'');
add(90,190,80,60,'');
add(90,270,80,60,'');
add(90,350,80,60,'');add(30,520,80,60,'');
add(30,600,80,60,'');
add(30,680,80,60,'');
add(30,760,80,60,'');add(90,520,80,60,'','杜鵬');
add(90,600,80,60,'','王芳');
add(90,680,80,60,'','许越飞');
add(90,760,80,60,'','');
/////////addDoor(700,899,20,80,'入り口');
addDoor(120,899,20,80,'入り口');
}// 添加一个座位
function add( x, y,w,h,name, person) {
var top = parseInt(x);
var left = parseInt(y);
var width = parseInt(w);
var height = parseInt(h);
var color1 = "Silver";
var textNode  = document.createTextNode(name);
var div = document.createElement("span");
div.style.position = 'absolute';
div.style.top = x + 'px';
div.style.left = y + 'px';
div.style.width = w + 'px';
div.style.height = h + 'px';
div.style.margin=0;
div.style.padding=0;
div.style.float='left';
div.style.height = h + 'px';
div.style.backgroundColor = color1; div.appendChild(textNode);
div.style.border = '1px solid #7d7d7d';
document.getElementById("bigdiv").appendChild(div);
if(person) {
 var e = document.createElement("div");
 e.className="divpic";
 e.setAttribute('name','newdiv1');
 e.style.width='57px'
 e.style.height='28px'
 e.style.cursor = "hand";
 e.style.left='840px';
 e.style.top='760px';
 if(person=='吳昊'){
  e.id="current";
 }
 else{
  e.id="current1";
 }
 e.setAttribute("onclick", function() { open_info();});
 var newText=document.createTextNode(person);  
 e.appendChild(newText);
 div.appendChild(e);
 var ee = document.createElement("div");
 ee.className="divpic";
 ee.setAttribute('name','newdiv1');
 ee.style.width='57px'
 ee.style.height='28px'
 ee.style.cursor = "hand";
 ee.style.left='840px';
 ee.style.top='760px';
 if(person=='吳昊'){
  ee.id="current2";
 }
 else{ 
  ee.id="current1";
}
 ee.setAttribute("onclick", function() {open_kimset();});
 if(person=='许越飞'){
  var newText=document.createTextNode("退社");
 }else{
  var newText=document.createTextNode("出勤");
 }
 ee.appendChild(newText);
 div.appendChild(ee); }
}
//////////////////////
 function   open_info(){   
       var window_height = 400;   
       var window_width = 400;   
       var window_left = 500;   
       var window_top = 200;   
       var window_dimensions ="height="+ window_height + ",width=" + window_width + ",left=" + window_left + ",top=" + window_top + ",scrollbars"
   window.open("staffInfo.html","窗口名字",window_dimensions);   
  }
  
   function  open_kimset(){          var obj=new Object();
   obj.id
       var window_height = 400;   
       var window_width = 400;   
       var window_left = 500;   
       var window_top = 200;   
       var window_dimensions ="height="+ window_height + ",width=" + window_width + ",left=" + window_left + ",top=" + window_top + ",scrollbars"
   window.open("dutyStatus.html","",window_dimensions);   
  }
//////////////////////////////////////////function addDoor( x, y,w,h,name, person) {
var top = parseInt(x);
var left = parseInt(y);
var width = parseInt(w);
var height = parseInt(h);
var color1 = "Silver";
var textNode  = document.createTextNode(name);
var div = document.createElement("span");
div.style.position = 'absolute';
div.style.top = x + 'px';
div.style.left = y + 'px';
div.style.width = w + 'px';
div.style.height = h + 'px';
div.style.margin=0;
div.style.padding=0;
div.style.float='left';
div.style.height = h + 'px';
div.style.backgroundColor = color1;
div.appendChild(textNode);
div.style.border = '1px solid #7d7d7d';
document.getElementById("bigdiv").appendChild(div);
}// 旋轉...
function goto() {
var top, left, width, height, color, text, textNode;
var divs = document.getElementById("bigdiv").childNodes;
for(var i = 0; i < divs.length; i++) {
top = divs[i].style.left;
left = 920 - parseInt(divs[i].style.top) - parseInt(divs[i].style.height);
width = divs[i].style.height;
height = divs[i].style.width;
divs[i].style.top = top;
divs[i].style.left = left;
divs[i].style.width = width;
divs[i].style.height = height;
}
}//增加一个人
function addPerson(left,top,name)
{
 var board = document.getElementById("bigdiv");
 var e = document.createElement("div");
 e.className="divpic";
 e.setAttribute('name','newdiv1');
 e.style.left=left+'px';
 e.style.top=top+'px';
 e.style.width='60px'
 e.style.height='60px'
 e.style.cursor = "hand";
 e.setAttribute("onmousedown", function() {active(this);});
 var newText=document.createTextNode(name);
 e.appendChild(newText);
 board.appendChild(e);
}</script>
</head>
<!--<body  onmouseup="releaseDiv()" onmousemove="moveDiv()" onselectstart="return false" onLoad="load()"> -->
<body   onLoad="load()"   bgcolor=Lavender>
<table border="0" width="900px" align="left">
  <tr height ="20px" > 
   <td width ="195" align ="left" > <font color="#0080ff" size=5px > 座席表示 </font></td>
   <td width ="245"></td>
   <td width ="400"></td>
   <td></td>
  </tr>
  <tr height ="20px">  
        <td align ="right" ></td>
<td align ="letf"  ><font size=4px> 2階開發室</font></td>
<td align ="right" > <input name="button2" type="button" value="90度回転" onClick="goto()" style="width:80; height:30"></td>
<td></td>
  </tr>
  <tr height ="950px" align ="left" >
<td align ="center">
  <div id="bigdiv" style="position:absolute; top:90; left:100; width:920; height:920; border:1px solid #7d7d7d" />
</td>
  </tr>
</table>
</body>
</html>