function LoadImages(){
  var d=document; if(d.images){ if(!d.BB_p) d.BB_p=new Array();
    var i,j=d.BB_p.length,a=LoadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.BB_p[j]=new Image; d.BB_p[j++].src=a[i];}}
}

function RestoreImage(){
  var i,x,a=document.BB_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function FindObj(n, d){
  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=FindObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function SwapImage(){
  var i,j=0,x,a=SwapImage.arguments; document.BB_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=FindObj(a[i]))!=null){document.BB_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}



function OpenNewWindow(url) {
  window.open(url,"","height=650,width=456,status=no,toolbar=no,menubar=no,location=no,top=10,left=30");
}
function OpenLogoWindow(url,height) {
  window.open("big_brother_" + url + ".html","","height=" + height + ",width=500,status=no,toolbar=no,menubar=no,location=no,top=10,left=30");
}
function OpenCameraWindow(cam, speed) {
  window.open("live.php?camera=" + cam + "&speed=" + speed,"Camera","height=420,width=372,status=no,toolbar=no,menubar=no,location=no,top=10,left=30");
}


function fullscreen(url){
	var width = screen.width;
	var height = screen.height;
	var others = "width=" + width + ",height=" + height + ",fullscreen=yes,channelmode=no,status=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,titlebar=no";
	window.open(url,"BigBrother",others);
}

