function getFlashMovieObject(movieName) {
	if (window.document[movieName]) {
		return window.document[movieName];
	}
	if (navigator.appName.indexOf("Microsoft Internet")==-1) {
		if (document.embeds && document.embeds[movieName])
			return document.embeds[movieName];
	} else {
		return document.getElementById(movieName);
	}
}
function clock_active() {
	
	
	document.getElementById('alert_wrap').style.height= xDocSize() + "px";
	document.getElementById('alert_wrap').style.display = "block";
	startAnim();
}
function alert_close() {
	document.getElementById('alert_wrap').style.display = "none";
}
function startAnim() {
	t = setTimeout('startAnim()', 1000);
	var flashMovie = getFlashMovieObject("alert");
	flashMovie.launchFlashAnim();
}
function animActive() {
	clearTimeout(t);
}



// xDocSize r1, Copyright 2007 Michael Foster (Cross-Browser.com)
// Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL

function xDocSize()
{
  var b=document.body, e=document.documentElement;
  var esw=0, eow=0, bsw=0, bow=0, esh=0, eoh=0, bsh=0, boh=0;
  if (e) {
    esw = e.scrollWidth;
    eow = e.offsetWidth;
    esh = e.scrollHeight;
    eoh = e.offsetHeight;
  }
  if (b) {
    bsw = b.scrollWidth;
    bow = b.offsetWidth;
    bsh = b.scrollHeight;
    boh = b.offsetHeight;
  }
  //alert('compatMode: ' + document.compatMode + '\n\ndocumentElement.scrollHeight: ' + esh + '\ndocumentElement.offsetHeight: ' + eoh + '\nbody.scrollHeight: ' + bsh + '\nbody.offsetHeight: ' + boh + '\n\ndocumentElement.scrollWidth: ' + esw + '\ndocumentElement.offsetWidth: ' + eow + '\nbody.scrollWidth: ' + bsw + '\nbody.offsetWidth: ' + bow);
  //return {w:Math.max(esw,eow,bsw,bow),h:Math.max(esh,eoh,bsh,boh)};
  return 	esh;
}



//okienko rokbox
if(typeof HTMLElement!='undefined'&&!HTMLElement.prototype.click){
    HTMLElement.prototype.click=function()
    {
        var evt = this.ownerDocument.createEvent('MouseEvents');
        evt.initMouseEvent('click', true, true, this.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
        this.dispatchEvent(evt);
    }
}

function showrokbox()
{     
	document.getElementById('nowy-sieciak').click();
}

function showComments()
{
	
	divID = "hidden_comments";
	if (document.getElementById(divID).style.display == 'block'){
		document.getElementById(divID).style.display = 'none';
		document.getElementById('btn_hide').style.display = 'block';
		document.getElementById('btn_show').style.display = 'none';
	}else{
		document.getElementById(divID).style.display = 'block';
		document.getElementById('btn_hide').style.display = 'none';
		document.getElementById('btn_show').style.display = 'block';
		
		
	}//end if
	return false; 
}

function addComments()
{
	
	divID = "add_comments";
	if (document.getElementById(divID).style.display == 'block'){
		document.getElementById(divID).style.display = 'none';
		
	}else{
		document.getElementById(divID).style.display = 'block';
		
		
		
	}//end if
	return false; 
}

