home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 January
/
Chip_2004-01_cd1.bin
/
tema
/
pjsoft
/
js
/
main.js
Wrap
Text File
|
2003-04-03
|
2KB
|
83 lines
var basicHeight = 0;
var minimalHeight = 549;
var minimalWidth = 770;
var pageBorders = 121;
function mergeWidth() {
// minimalHeight = document.getElementById('main').offsetHeight + pageBorders;
if (bottomBar == 0) bottomBar = document.getElementById("bottomBar");
if (document.body.clientHeight > minimalHeight) {
document.getElementById('myBody').style.height = document.body.clientHeight + "px";
document.getElementById('main').style.height = (document.body.clientHeight - pageBorders) + "px";
} else {
document.getElementById('myBody').style.height = minimalHeight + "px";
document.getElementById('main').style.height = (minimalHeight - pageBorders) + "px";
}
if (document.body.clientWidth < minimalWidth) {
document.getElementById("myBody").style.width = minimalWidth + "px";
if (bottomBar) {
document.getElementById("bottomBar").style.width = minimalWidth + "px";
}
} else {
document.getElementById("myBody").style.width = "100%";
if (bottomBar) {
document.getElementById("bottomBar").style.width = "100%";
}
}
}
var bottomBar = 0;
var lastPosition = 0;
var set = 0;
function floatBottomBar() {
set = 0;
if (bottomBar == 0) {
bottomBar = document.getElementById("bottomBar");
}
var newPos = document.body.clientHeight-24+document.body.scrollTop;
if (bottomBar) {
if (lastPosition != newPos) {
bottomBar.style.top=newPos+"px";
lastPosition = bottomBar.style.top;
}
} else {
return;
}
if (!document.all) {
if (set==0) {
setTimeout("floatBottomBar()", 1);
set=1;
}
}
}
var activeBar = "none";
function changeLinkBar(barname) {
document.getElementById("linkbarWrapper").style.display = "block";
if (activeBar != "none" ) {
document.getElementById(activeBar).style.display = "none";
}
activeBar = barname;
document.getElementById(activeBar).style.display = "block";
}
function hl(chooseWrapper) {
if (document.all) {
chooseWrapper.style.backgroundImage="url(img/li_b.gif)";
chooseWrapper.style.cursor="hand";
}
}
function dl(chooseWrapper) {
if (document.all) {
chooseWrapper.style.backgroundImage="url(img/li_a.gif)";
chooseWrapper.style.cursor="auto";
}
}