function getRefToDivNest( divID, oDoc ) {
if( !oDoc ) { oDoc = document; }
if( document.layers ) {
if( oDoc.layers[divID] ) { return oDoc.layers[divID]; } else {
for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) {
y = getRefToDivNest(divID,oDoc.layers[x].document); }
return y; } }
if( document.getElementById ) { return document.getElementById(divID); }
if( document.all ) { return document.all[divID]; }
return document[divID];
}
function drawLogo(l,b,w,h,p,xOf,yOf,s) {
window.logoCount = ( typeof( window.logoCount ) == 'number' ) ? window.logoCount + 1 : 0;
if( document.layers ) {
document.write( '<layer id="logoNum' + window.logoCount + '" height="'+h+'" width="'+w+'" left="0" top="0"'+(b?' bgcolor="'+b+'"':'')+'>'+l+'</layer>' );
} else {
document.write( '<div id="logoNum' + window.logoCount + '" style="position:absolute;left:0px;top:0px;'+(b?'background-color:'+b+';':'')+'height:'+h+'px;width:'+w+'px;">'+l+'</div><br>' );
}
window.setInterval('aniLogo(' + p + ',' + s + ',' + w + ',' + h + ',' + xOf + ',' + yOf + ',' + window.logoCount + ')',50);
}
function aniLogo(p,s,w,h,xOf,yOf,n) {
var myLogo = getRefToDivNest('logoNum'+n);
if( !myLogo ) { return; }
if( myLogo.style ) { myLogo = myLogo.style; }
var scrW = 0, scrH = 0, scrOfX = 0, scrOfY = 0;
if( typeof( window.innerWidth ) == 'number' ) { scrW = window.innerWidth; scrH = window.innerHeight; } else {
if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
scrW = document.documentElement.clientWidth; scrH = document.documentElement.clientHeight; } else {
if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
scrW = document.body.clientWidth; scrH = document.body.clientHeight; } } }
if( typeof( window.pageYOffset ) == 'number' ) { scrOfY = pageYOffset; scrOfX = pageXOffset; } else {
if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) { scrOfY = document.body.scrollTop; scrOfX = document.body.scrollLeft; } else {
if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) { scrOfY = document.documentElement.scrollTop; scrOfX = document.documentElement.scrollLeft; } }
}
var oPix = document.childNodes ? 'px' : 0;
myLogo.left = ( xOf + ( ( p % 2 ) ? 0 : scrW - w ) + ( s ? scrOfX : 0 ) ) + oPix;
myLogo.top = ( yOf + ( ( p < 3 ) ? 0 : scrH - h ) + ( s ? scrOfY : 0 ) ) + oPix;
}