Hello,
Below is the code of my "default.php"
Code:
<?php include ("header-execute.php"); ?>
<script src="privatec.js" />
<html>
<head>
<title>Private Chat</title>
</head>
<body>
<map id="close" name="close">
<area shape="rect" coords="262, 3, 282, 18" href="closeWin();">
</map>
<div id="mainWIN">
<center><img src="_logo_.bmp"><center>
<br />
<br />
Welcome, <b><?= $_COOKIE["FFBPCName"]; ?></b>
<br />
<br />
</div>
<div id="hide" style="display:none; position:absolute">
<div id="top">
<img src="about:blank" usemap="#close" id="tI" width="22">
</div>
<div id="bottom">
<iframe width="22" src="about:blank" height="200" id="bI">
</div>
</div>
</body>
</html>
<?php include ("checklogin.php"); ?>
And the "privatec.js" contains:-
Code:
// FaceFunBook JScript file
// FaceFunBook Private Chat JScript File
// Using the file without permission is highly punitive
// Thanks to
// http://www.dynamicdrive.com/forums/showthread.php?t=23936
var Centralize = {
init:function(id)
{
obj = document.getElementById(id);
this.MoveObject(obj);
},
MoveObject:function(obj)
{
this.GetCentralPoints() //Get current viewpoint numbers
obj.style.left = this.scroll_left+(this.docwidth-obj.offsetWidth)/2+"px";
obj.style.top = this.scroll_top+(this.docheight-obj.offsetHeight)/2+"px";
},
GetCentralPoints:function(){ //get window viewpoint numbers
var ie=document.all && !window.opera
var domclientWidth=document.documentElement && parseInt(document.documentElement.clientWidth) || 100000 //Preliminary doc width in non IE browsers
this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
this.scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
this.scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
this.docwidth=(ie)? this.standardbody.clientWidth : (/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth, window.innerWidth-16)
this.docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
}
};
// Declaration - Start
var timer1;
var timer2;
var run = 0;
var login = false;
// Declarations - End
// Functions - Start
function loginInvoke()
{
login = true;
run = 2;
document.background = "bg_off.bmp";
document.getElementById("bI").src = "http://privchat.facefunbook.com/login.php";
document.getElementById("tI").src = "http://privchat.facefunbook.com/ajax/imgs/login.bmp";
document.getElementById("hide").style.display = "";
document.getElementById("mainWIN").style.display = "none";
Centralize.init('hide');
window.onscroll = "Centralize.init('hide');";
document.onscroll = "Centralize.init('hide');";
}
function closeInvoke()
{
if ( login == true )
{
document.background = "";
location.replace("http://www.facefunbook.com/");
}
else
{
document.background = "";
document.getElementById("bI").src = "about:blank";
document.getElementById("tI").src = "about:blank";
document.getElementById("hide").style.display = "none";
document.getElementById("mainWIN").style.display = "";
window.onscroll = "";
document.onscroll = "";
}
}
function logoutInvoke()
{
login = false;
run = 1;
document.background = "bg_off.bmp";
document.getElementById("bI").src = "http://privchat.facefunbook.com/logout.php";
document.getElementById("tI").src = "http://privchat.facefunbook.com/ajax/imgs/logout.bmp";
document.getElementById("hide").style.display = "";
document.getElementById("mainWIN").style.display = "none";
Centralize.init('hide');
window.onscroll = "Centralize.init('hide');";
document.onscroll = "Centralize.init('hide');";
}
function cStatusInvoke()
{
login = false;
run = 3;
document.background = "bg_off.bmp";
document.getElementById("bI").src = "http://privchat.facefunbook.com/status.php";
document.getElementById("tI").src = "http://privchat.facefunbook.com/ajax/imgs/status.bmp";
document.getElementById("hide").style.display = "";
document.getElementById("mainWIN").style.display = "none";
Centralize.init('hide');
window.onscroll = "Centralize.init('hide');";
document.onscroll = "Centralize.init('hide');";
}
// Functions - End
Thanks a lot !!