<?php
if(file_exists('install') && !file_exists('onezdata/install.lock')){
  header('location:install.php');
  exit();
}
include_once( "include/common.inc.php" );
if(option('showmode')=='full'){
  header('location:robot.php');
  exit();
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=option('homename')?></title>
<link href="themes/dialog/<?=$dialogTheme?>/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script type="text/javascript">
var client="";
var theskin="<?=$dialogTheme?>";
OnezDivCount=28;
</script>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jqDnR.js"></script>
<script type="text/javascript" src="js/frame.js"></script>
<!--[if IE 6]>
<script type="text/javascript" src="js/DD_belatedPNG.js"></script>
<script type="text/javascript">DD_belatedPNG.fix('*'); </script> 
<![endif]-->


<div id="cloud"></div>
<!--嵌入开始-->
<div id="robot" class="OnezBox" style="position: absolute; width: <?=(int)option('dialogWidth')+4?>px; height: <?=(int)option('dialogHeight')+37?>px; z-index: 0; margin:0px" owidth="<?=(int)option('dialogWidth')+4?>" oheight="<?=(int)option('dialogHeight')+37?>" state="0" onmousedown="SetTop('robot')">
  <div class="tl">
    <div class="tr">
      <div class="tc" ondblclick="FrameMax('robot')">
        <div class="caption"><?=option('homename')?></div>
        <div class="titleBtns"><a href="javascript:void(0)" class="min" onclick="FrameMin('robot')"></a><a href="javascript:void(0)" class="max" onclick="FrameMax('robot')"></a><a href="javascript:void(0)" class="close" onclick="FrameMin('robot')"></a></div>
      </div>
    </div>
  </div>
  <div class="cl">
    <div class="cr">
      <div class="cc">
      <iframe id="robot_body" style="width:<?=(int)option('dialogWidth')?>px;height:<?=(int)option('dialogHeight')?>px;position:relative;top:-4px;border:0" frameborder="0" marginwidth="0" marginheight="0" src="robot.php" outx="4" outy="37"></iframe>
      </div>
    </div>
  </div>
  <div class="bl"><div class="br"><div class="bc"></div></div></div>
</div>
<!--嵌入结束-->
<ul id="minwins"></ul>
<script type="text/javascript">
$(document).ready(function(){
  var obj=$('#robot');
  var t=(pageHeight()-obj.height())/2;
  if(t<0)t=0;
  obj.css({
    'left':(pageWidth()-obj.width())/2+'px',
    'top':t+'px'
  }).jqDrag();
});
function resetCloud(){
  $('#cloud').css({left:-$('#cloud').width()+'px'});
  moveCloud();
}
function moveCloud(){
  $('#cloud').animate({left:pageWidth()+'px'},pageWidth()/2*100,'linear',resetCloud);
}
moveCloud();
</script>
</body>
</html>