home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2003 December
/
Chip_2003-12_cd1.bin
/
chplus
/
digiman
/
digi.js
< prev
next >
Wrap
Text File
|
2003-07-08
|
5KB
|
125 lines
//window.onload = init
var Opera = (window.navigator.userAgent.match('Opera')=='Opera')
function init() {
objects()
height()
}
var LB
var CB
var MM
function objects() {
LB = gEBI('leftmenu')
CB = gEBI('inner')
MM = gEBI('main')
}
function auto() {
// RB.style.height = 'auto'
LB.style.height = 'auto'
}
function gEBI(id) {
if(Boolean(document.getElementById)) {
return document.getElementById(id);
} else if(Boolean(document.all)) {
return eval('document.all.'+id);
}
}
function height() {
var leftH = LB.offsetHeight
var contentH = CB.offsetHeight
var m, maxi
m = leftH
// if (leftH > rightH) { m = leftH } else { m = rightH }
if (contentH > m) { maxi = contentH } else { maxi = m }
if (!(Opera && leftH > contentH))
LB.style.height = (maxi)+'px'
CB.style.height = (maxi)+'px'
}
function osa_caption() {
document.writeln('<table cellspacing=0 cellpadding=0 border=0 width=100% class="osa">')
document.write('<tr><td class="caption"><nobr>Časová osa</nobr></td><td class="bar">')
for(var _p=1;_p< arguments.length;_p=_p+2) {
if (arguments[0]==arguments[_p]) {
document.write(' '+arguments[_p]+'')
}
else {
document.write(' <a href="'+arguments[_p+1]+'">'+arguments[_p]+'</a>')
}
}
document.writeln('</td></tr>')
document.writeln('</table>')
}
function osa_begin() {
document.writeln('<div class="osa">')
document.writeln('<table cellspacing=0 cellpadding=0 border=0>')
document.writeln('<tr><td><img src="images/osa_top3_1.gif"></td><td style="background:url(images/osa_top3_2_a.gif); width:30px; height:24px"> </td><td style="background:url(images/osa_top3_2_a.gif); height:24px"> </td><td><img src="images/osa_top3_3.gif"></td></tr>')
}
function osa_end() {
document.writeln('</table>')
document.writeln('</div>')
}
function osa_row() {
if (arguments.length==2) {
document.writeln('<tr><td class="c1"> </td><td class="c2"> </td><td class="c2">'+arguments[0]+' </td><td class="c3"> <a href="product.jsp?doc='+arguments[1]+'" target="_blank">param</a></td></tr>');
}
if (arguments.length==3) {
if (arguments[2]==true)
document.writeln('<tr><td class="c1"> </td><td class="c2"> </td><td class="c2x">'+arguments[0]+' </td><td class="c3"> <a href="product.jsp?doc='+arguments[1]+'" target="_blank">param</a></td></tr>');
else
document.writeln('<tr><td class="c1"> </td><td class="c2"> </td><td class="c2">'+arguments[0]+' </td><td class="c3"> <a href="product.jsp?doc='+arguments[1]+'" target="_blank">param</a></td></tr>');
}
}
function osa_day() {
if (arguments.length==3) {
document.writeln('<tr><td class="c1"> </td><td class="c2"><img src="images/dot.gif" align=absmiddle> '+arguments[0]+' </td><td class="c2">'+arguments[1]+'</td><td class="c3"> <a href="product.jsp?doc='+arguments[2]+'" target="_blank">param</a></td></tr>')
}
if (arguments.length==4) {
if (arguments[3]==true)
document.writeln('<tr><td class="c1"> </td><td class="c2"><img src="images/dot.gif" align=absmiddle> '+arguments[0]+' </td><td class="c2x">'+arguments[1]+'</td><td class="c3"> <a href="product.jsp?doc='+arguments[2]+'" target="_blank">param</a></td></tr>')
else
document.writeln('<tr><td class="c1"> </td><td class="c2"><img src="images/dot.gif" align=absmiddle> '+arguments[0]+' </td><td class="c2">'+arguments[1]+'</td><td class="c3"> <a href="product.jsp?doc='+arguments[2]+'" target="_blank">param</a></td></tr>')
}
}
function osa_month() {
if (arguments.length==1) {
document.writeln('<tr><td class="c0">'+arguments[0]+'</td><td class="c2" style="background:url(images/prouzek_sedy_3_a.gif); width:30px; height:17px"> </td><td style="background:url(images/prouzek_sedy_3_a.gif); height:17px"> </td><td class="c3"> </td></tr>')
}
if (arguments.length==2) {
if (arguments[1]==true)
document.writeln('<tr><td class="c0">'+arguments[0]+'</td><td class="c2"> </td><td class="c2"> </td><td class="c3"> </td></tr>')
else
document.writeln('<tr><td class="c0">'+arguments[0]+'</td><td class="c2" style="background:url(images/prouzek_sedy_3_a.gif); width:30px; height:17px"> </td><td style="background:url(images/prouzek_sedy_3_a.gif); height:17px"> </td><td class="c3"> </td></tr>')
}
}
function caption_bar(caption) {
var rnd = Math.floor(Math.random()*10000)
document.writeln('<table cellspacing=0 cellpadding=0 border=0 style="width:100%; padding:0px 0px">')
document.writeln('<tr><td valign=top style="font-size:13px; height:19px; font-weight:bold; color:black; width:1%" id="'+rnd+'a"><nobr>'+caption+' </nobr></td><td valign=top style="background:url(images/pas3b.gif) repeat-x; width:100%" id="'+rnd+'b"><img src="images/pas3a.gif"></td></tr>')
document.writeln('</table>')
var a = gEBI(rnd+'a')
var b = gEBI(rnd+'b')
var w = a.offsetWidth
if (w>500) {
a.innerHTML=caption+' '
a.style.width='500px'
b.style.width='70px'
}
}