Exibe Divs de site 1 e 2
Autor: alex | Publicado: 2011-11-25T19:31:00-08:00


<!--
.dragme{position:relative;}
-->






var ie=document.all;
var nn6=document.getElementById&&!document.all;
var isdrag=false;
var x,y;
var dobj;

function movemouse(e)
{
  if (isdrag)
  {
    dobj.style.left = nn6 ? tx + e.clientX - x : tx + event.clientX - x;
    dobj.style.top  = nn6 ? ty + e.clientY - y : ty + event.clientY - y;
    return false;
  }
}

function selectmouse(e)
{
  var fobj       = nn6 ? e.target : event.srcElement;
  var topelement = nn6 ? "HTML" : "BODY";
  while (fobj.tagName != topelement && fobj.className != "dragme")
  {
    fobj = nn6 ? fobj.parentNode : fobj.parentElement;
  }

  if (fobj.className=="dragme")
  {
    isdrag = true;
    dobj = fobj;
    tx = parseInt(dobj.style.left+0);
    ty = parseInt(dobj.style.top+0);
    x = nn6 ? e.clientX : event.clientX;
    y = nn6 ? e.clientY : event.clientY;
    document.onmousemove=movemouse;
    return false;
  }

}

document.onmousedown=selectmouse;
document.onmouseup=new Function("isdrag=false");


  
function min(ID){
document.getElementById(ID).style.width = "120px";
document.getElementById(ID).style.height = "30px";

                   }


function max(ID){               
document.getElementById(ID).style.width = "100%";                               
document.getElementById(ID).style.height = "100%";

                   }

function restore(ID){               
document.getElementById(ID).style.width = "200px";                               
document.getElementById(ID).style.height = "200px";


                   }
       

function fecha(ID){
document.getElementById(ID).style.display = "none";
       
                   }


function showHide(ID){
document.getElementById(ID).style.display= "";
  
                       }



Abrir site 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Abrir site 2

<input type="button" id="restore1" style="width:120px; height:30px; align:center;display:none;"
onclick="restore('teste');restore('site');showHide('site');showHide('max');showHide('min');showHide('fecha');fecha('restore1')" value="UOL" title="UOL" />

<input type="button" id="min" style="width:25px; height:25px; align:center;"
onclick="min('teste');fecha('site');fecha('max');fecha('min');fecha('fecha');fecha('restore');showHide('restore1')" value="_" title="Minimizar" />

<input type="button" id="restore" style="width:25px; height:25px; align:center; display:none;"
onclick="restore('teste');restore('site');showHide('site');showHide('max');fecha('restore')" value="[-]" title="Restaurar abaixo" />

<input type="button" id="max" style="width:25px; height:25px; align:center;"
onclick="max('teste');max('site');showHide('site');showHide('restore');fecha('max')" value="[+]" title="Maximizar" />

<input type="button" id="fecha" style="color:red; width:25px; height:25px; align:center;"
onclick="fecha('teste')" value="x" title="Fechar" />

     


<input type="button" id="restore3" style="width:120px; height:30px; align:center;display:none;"
onclick="restore('teste1');restore('site1');showHide('site1');showHide('max1');showHide('min1');showHide('fecha1');fecha('restore3')" value="GLOBO.COM" title="UOL" />

<input type="button" id="min1" style="width:25px; height:25px; align:center;"
onclick="min('teste1');fecha('site1');fecha('max1');fecha('min1');fecha('fecha1');fecha('restore2');showHide('restore3')" value="_" title="Minimizar" />

<input type="button" id="restore2" style="width:25px; height:25px; align:center; display:none;"
onclick="restore('teste1');restore('site1');showHide('site1');showHide('max1');fecha('restore2')" value="[-]" title="Restaurar abaixo" />

<input type="button" id="max1" style="width:25px; height:25px; align:center;"
onclick="max('teste1');max('site1');showHide('site1');showHide('restore2');fecha('max1')" value="[+]" title="Maximizar" />

<input type="button" id="fecha1" style="color:red; width:25px; height:25px; align:center;"
onclick="fecha('teste1')" value="x" title="Fechar" />

     



 
<!--
.dragme{position:relative;}
-->






var ie=document.all;
var nn6=document.getElementById&&!document.all;
var isdrag=false;
var x,y;
var dobj;

function movemouse(e)
{
  if (isdrag)
  {
    dobj.style.left = nn6 ? tx + e.clientX - x : tx + event.clientX - x;
    dobj.style.top  = nn6 ? ty + e.clientY - y : ty + event.clientY - y;
    return false;
  }
}

function selectmouse(e)
{
  var fobj       = nn6 ? e.target : event.srcElement;
  var topelement = nn6 ? "HTML" : "BODY";
  while (fobj.tagName != topelement && fobj.className != "dragme")
  {
    fobj = nn6 ? fobj.parentNode : fobj.parentElement;
  }

  if (fobj.className=="dragme")
  {
    isdrag = true;
    dobj = fobj;
    tx = parseInt(dobj.style.left+0);
    ty = parseInt(dobj.style.top+0);
    x = nn6 ? e.clientX : event.clientX;
    y = nn6 ? e.clientY : event.clientY;
    document.onmousemove=movemouse;
    return false;
  }

}

document.onmousedown=selectmouse;
document.onmouseup=new Function("isdrag=false");


  
function min(ID){
document.getElementById(ID).style.width = "120px";
document.getElementById(ID).style.height = "30px";

                   }


function max(ID){               
document.getElementById(ID).style.width = "100%";                               
document.getElementById(ID).style.height = "100%";

                   }

function restore(ID){               
document.getElementById(ID).style.width = "200px";                               
document.getElementById(ID).style.height = "200px";


                   }
       

function fecha(ID){
document.getElementById(ID).style.display = "none";
       
                   }


function showHide(ID){
document.getElementById(ID).style.display= "";
  
                       }



Abrir site 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Abrir site 2

<input type="button" id="restore1" style="width:120px; height:30px; align:center;display:none;"
onclick="restore('teste');restore('site');showHide('site');showHide('max');showHide('min');showHide('fecha');fecha('restore1')" value="UOL" title="UOL" />

<input type="button" id="min" style="width:25px; height:25px; align:center;"
onclick="min('teste');fecha('site');fecha('max');fecha('min');fecha('fecha');fecha('restore');showHide('restore1')" value="_" title="Minimizar" />

<input type="button" id="restore" style="width:25px; height:25px; align:center; display:none;"
onclick="restore('teste');restore('site');showHide('site');showHide('max');fecha('restore')" value="[-]" title="Restaurar abaixo" />

<input type="button" id="max" style="width:25px; height:25px; align:center;"
onclick="max('teste');max('site');showHide('site');showHide('restore');fecha('max')" value="[+]" title="Maximizar" />

<input type="button" id="fecha" style="color:red; width:25px; height:25px; align:center;"
onclick="fecha('teste')" value="x" title="Fechar" />

     


<input type="button" id="restore3" style="width:120px; height:30px; align:center;display:none;"
onclick="restore('teste1');restore('site1');showHide('site1');showHide('max1');showHide('min1');showHide('fecha1');fecha('restore3')" value="GLOBO.COM" title="UOL" />

<input type="button" id="min1" style="width:25px; height:25px; align:center;"
onclick="min('teste1');fecha('site1');fecha('max1');fecha('min1');fecha('fecha1');fecha('restore2');showHide('restore3')" value="_" title="Minimizar" />

<input type="button" id="restore2" style="width:25px; height:25px; align:center; display:none;"
onclick="restore('teste1');restore('site1');showHide('site1');showHide('max1');fecha('restore2')" value="[-]" title="Restaurar abaixo" />

<input type="button" id="max1" style="width:25px; height:25px; align:center;"
onclick="max('teste1');max('site1');showHide('site1');showHide('restore2');fecha('max1')" value="[+]" title="Maximizar" />

<input type="button" id="fecha1" style="color:red; width:25px; height:25px; align:center;"
onclick="fecha('teste1')" value="x" title="Fechar" />