var popUpWin=0;
function popUpWindow(tid, left, top, width, height)
{
var URLStr = "http://rttw.ru/forum/index.php?s=&act=Stats&CODE=about_pc&t="+tid;
popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}


var from_time = new Date();
from_time = from_time.getTime();
function  show_loading_time()
{
var to_time = new Date();
to_time = to_time.getTime();
var how_many_secs = (to_time - from_time) /1000;
if(document.getElementById){
document.getElementById("ttt").innerHTML = "Время загрузки страницы: " + how_many_secs + " сек.";
}
else if(document.all){
document.all("ttt").innerHTML = "Время загрузки страницы: " + how_many_secs + " сек.";
}
else if(document.layers){
document.layers["ttt"].innerHTML = "Время загрузки страницы: " + how_many_secs + " сек.";
}
}

function openClose(id)
{
var obj = "";
var imgobj = "";
var imgid = id+"-img";

// Check browser compatibility
if(document.getElementById){
obj = document.getElementById(id).style;
imgobj = document.getElementById(imgid);
//divobj = document.getElementById(divid);
}
else if(document.all){
obj = document.all[id];
imgobj = document.all[imgid];
//divobj = document.all[divid];
}
else if(document.layers){
obj = document.layers[id];
imgobj = document.layers[imgid];
//divobj = document.layers[divid];
}
else{
return 1;
}
			
// Do the magic :)
if(obj.display == ""){
 obj.display = "none";
 imgobj.src="style_images/rttw/spoiler_plus.gif";
 imgobj.alt="+ Открыть";
// divobj.innerHTML = "&nbsp;&nbsp;<img src='http://forum.rttw.ru/style_images/rttw/spoiler_plus.gif' border=0 alt='+ Открыть' id='"+imgid+"'>&nbsp;&nbsp;скрытый текст";
}
 else if(obj.display != "none")
{
 obj.display = "none";
 imgobj.src="style_images/rttw/spoiler_plus.gif";
 imgobj.alt="+ Открыть";
// divobj.innerHTML = "&nbsp;&nbsp;<img src='http://forum.rttw.ru/style_images/rttw/spoiler_plus.gif' border=0 alt='+ Открыть' id='"+imgid+"'>&nbsp;&nbsp;скрытый текст (развернуть)";

}
else 
{
 obj.display = "block";
 imgobj.src="style_images/rttw/spoiler_minus.gif";
 imgobj.alt="- Закрыть";
// divobj.innerHTML = "&nbsp;&nbsp;<img src='http://forum.rttw.ru/style_images/rttw/spoiler_minus.gif' border=0 alt='- Закрыть' id='"+imgid+"'>&nbsp;&nbsp;скрытый текст (свернуть)";

}


}