var folded_box=new Array();
var folded_box_view=new Array();
var skins_working=0;
window.onload=function(){
parseMail();
};
function showHiddenSections(){
var _1=document.getElementById("box-search-sections").childNodes[0];
var _2=_1.getElementsByTagName("li");
for(var i=0;i<_2.length;i++){
_2[i].style.display="block";
if(_2[i].className=="section-showBtn"){
_2[i].style.display="none";
}
}
return true;
}
function hideSections(){
var _4=document.getElementById("box-search-sections").childNodes[0];
var _5=_4.getElementsByTagName("li");
for(var i=0;i<_5.length;i++){
if(_5[i].className=="section-hidden"){
_5[i].style.display="none";
}
if(_5[i].className=="section-showBtn"){
_5[i].style.display="block";
}
}
return true;
}
function hideShow(_7){
var _8=document.getElementById(_7);
if("block"==_8.style.display){
_8.style.display="none";
}else{
_8.style.display="block";
}
return false;
}
function showFold(id){
var _a=$("folds");
for(var i=0;i<_a.childNodes.length;i++){
if(_a.childNodes[i].getAttribute("id")=="fold-content-"+id){
$("fold-menu-"+(i+1)).className="menuItemSelected";
Element.show(_a.childNodes[i]);
}else{
$("fold-menu-"+(i+1)).className="menuItem";
Element.hide(_a.childNodes[i]);
}
}
if(2==id){
Element.hide($("current-fs"));
}else{
Element.show($("current-fs"));
}
$("search-autocomplete").focus();
}
function mshowFold(id,_d){
var _e=$("folds");
for(var i=0;i<3;i++){
if(_e.childNodes[i].getAttribute("id")=="fold-content-"+id){
$("fold-menu-"+(i+1)).className=i+1==1?"menuItemSelectedF":"menuItemSelected";
Element.show(_e.childNodes[i]);
}else{
$("fold-menu-"+(i+1)).className=i+1==1?"menuItemF":"menuItem";
Element.hide(_e.childNodes[i]);
}
}
_d.blur();
}
function fav_add(_10){
var _11={method:"post",postBody:"func=fav_add&url_sw="+_10,onSuccess:function(r){
if(!r.responseText.match(/^[0-9]+$/)&&r.responseText!="CHYBA"){
location.href=r.responseText;
}else{
if(r.responseText.match(/^[0-9]+$/)){
alert("Program byl p\u0159id\xe1n mezi v\xe1\u0161 obl\xedben\xfd software!");
$("uqi-fav-info").getElementsByTagName("strong")[0].innerHTML=r.responseText;
}else{
alert("Software ji\u017e pat\u0159\xed mezi v\xe1\u0161 obl\xedben\xfd!");
}
}
}};
add=new Ajax.Request("/direct/ajax/",_11);
}
function fav_change_info(_13,_14,_15,_16){
var _17={method:"post",postBody:"func=fav_change_info&url_sw="+_13+"&user="+_14+"&value="+_15,onSuccess:function(r){
if(r.responseText=="OK"){
var _19=$("item-"+_13).getElementsByTagName("select")[0];
_19.blur();
fav_remove_alert();
$("favourite-alert").innerHTML="<div class=\"greenBox\">OK: Stav upozon\u011bn\xed na software "+_16+" byl zm\u011bn\u011bn na \""+_19.options[_19.selectedIndex].firstChild.nodeValue+"\"!</div>";
}else{
fav_remove_alert();
$("favourite-alert").innerHTML="<div class=\"redBox\">Chyba: Nepoda\u0159ilo se upravit stav upozorn\u011bn\xed na software "+_16+", opakujte akci pozd\u011bji. D\u011bkujeme za pochopen\xed!</div>";
}
}};
remove=new Ajax.Request("/direct/ajax/",_17);
}
function fav_remove(_1a,_1b){
var _1c={method:"post",postBody:"func=fav_remove&url_sw="+_1a+"&user="+_1b,onSuccess:function(r){
if(r.responseText=="OK"){
var _1e=$("fav-list").removeChild($("item-"+_1a));
fav_remove_alert();
$("favourite-alert").innerHTML="<div class=\"greenBox\">OK: Software byl odebr\xe1n ze seznamu va\u0105ich obl\xedben\xfdch!</div>";
}else{
fav_remove_alert();
$("favourite-alert").innerHTML="<div class=\"redBox\">Chyba: Nepoda\u0159ilo se smazat software z obl\xedben\xfdch, opakujte akci pozd\u011bji. D\u011bkujeme za pochopen\xed!</div>";
}
}};
remove=new Ajax.Request("/direct/ajax/",_1c);
}
function fav_remove_alert(){
$("favourite-alert").innerHTML="";
}
function rate_rating(_1f,_20,cid){
var _22=new Ajax.Request("/direct/ajax/",{parameters:"func=rate_rating&rateId="+_1f+"&skore="+_20+"&cid="+cid,onComplete:function(r){
if("hlasovano"==r.responseText){
alert("U\u017e jste hlasoval(a)!");
}else{
if("CHYBA"!=r.responseText){
$("rr-"+_1f).innerHTML="<strong>D\u011bkujeme, v\xe1\u0161 hlas byl ulo\u017een!</strong>";
}
}
}});
}
function rate_rating_service(_24,_25,cid){
var _27=new Ajax.Request("/direct/ajax/",{parameters:"func=rate_rating_service&rateId="+_24+"&skore="+_25+"&cid="+cid,onComplete:function(r){
if("hlasovano"==r.responseText){
alert("U\u017e jste hlasoval(a)!");
}else{
if("CHYBA"!=r.responseText){
$("rate-rating-"+_24).innerHTML="<strong>D\u011bkujeme, v\xe1\u0161 hlas byl ulo\u017een!</strong>";
}
}
}});
}
function username_changed(){
var _29={method:"post",postBody:"func=username_changed",onSuccess:function(_2a){
if(2==_2a.responseText){
alert("Omlouv\xe1ma se, ale na serveru se vyskytla chyba, kter\xe1 znemo\u017e\u0148uje zm\u011bnu Va\u0161eho nastaven\xed. Na oprav\u011b se usilovn\u011b pracuje, d\u011bkujeme za pochopen\xed!");
}else{
$("username_changed_infobox").className="blueBox";
$("username_changed_infobox").innerHTML="OK: U\u017e nebudete upozor\u0148ov\xe1n(a) na zm\u011bnu va\u0161\xed p\u0159ezd\xedvky.";
}
}};
var _2b=new Ajax.Request("/direct/ajax/",_29);
}
function check_username(_2c){
var _2d={method:"post",postBody:"func=username_check&username="+_2c,onSuccess:function(_2e){
if(1==_2e.responseText){
$("desired_username").style.borderColor="Green";
alert("Zadan\xe1 p\u0159ezd\xedvka je v tuto chv\xedli voln\xe1!");
}else{
$("desired_username").style.borderColor="Crimson";
alert("Omlouv\xe1me se, ale na Stahuj.cz ji\u017e existuje u\u017eivatel s touto p\u0159ezd\xedvkou!");
}
}};
var _2f=new Ajax.Request("/direct/ajax/",_2d);
}
function mailAnchor(_30,_31,_32,_33){
email=_30+"@"+_31;
if(typeof (_32)=="undefined"){
_32=email;
}
if(typeof (_33)!="undefined"){
_33=" title=\""+_33+"\"";
}
document.write("<a href=\"mailto:"+email+"\""+_33+">"+_32+"</a>");
}
function parseMail(){
var _34="bezpecny-email";
var _35=document.getElementsByTagName("a");
for(var i=0;i<_35.length;i++){
if(_35[i].className!=_34){
continue;
}else{
var _37=_35[i].getAttribute("href").replace(/\(te[cè]ka\)/gi,".").replace(/\(na\)/gi,"@");
_35[i].setAttribute("href",_37);
if(null==_35[i].getAttribute("title")||""==_35[i].getAttribute("title")){
_35[i].firstChild.nodeValue=_37.substr(7);
}else{
}
}
}
}
function parseMailClick(_38){
var _38=_38.replace(/\(te[cè]ka\)/gi,".").replace(/\(na\)/gi,"@");
location.href="mailto:"+_38;
}
function diskuseReagovat(_39){
$("f_text").value=_39+": "+$("f_text").value;
$("f_text").focus();
}
function diskuseSmazat(id){
if(confirm("Opravdu chcete smazat tento p\u0159\xedsp\u011bvek?")){
$("f_admin_delete").value=id;
$("f_admin_form").submit();
}
}
function article_rate_show(_3b){
var _3c=new Array("Bezcenn\xfd","\u0160patn\xfd","Pr\u016fm\u011brn\xfd","Dobr\xfd","Skv\u011bl\xfd");
for(i=1;i<6;i++){
if(i<=_3b){
$("user-rating-"+i).src=$("user-rating-"+i).src.replace(/star\_[01]/i,"star_1");
$("user-rating-info").innerHTML=_3c[i-1];
}else{
$("user-rating-"+i).src=$("user-rating-"+i).src.replace(/star\_[01]/i,"star_0");
}
}
}
function article_rate_clear(){
for(i=1;i<6;i++){
$("user-rating-"+i).src=$("user-rating-"+i).src.replace(/star\_[01]/i,"star_0");
}
$("user-rating-info").innerHTML=" ";
}
function article_rate(_3d,_3e){
var _3f=new Ajax.Request("/direct/ajax/",{parameters:"func=article_rate&articleId="+_3d+"&mark="+_3e,onComplete:function(r){
if("hlasovano"!=r.responseText){
tmp=r.responseText.split("/");
znamka=Math.floor(parseFloat(tmp[0]));
pocet=tmp[1];
$("user-rating-count").innerHTML="("+pocet+" \u010dten\xe1\u0159\u016f)";
for(i=1;i<=znamka;i++){
$("rating-"+i).src=$("rating-"+i).src.replace(/star\_[01]/i,"star_1");
}
for(i=i;i<=5;i++){
$("rating-"+i).src=$("rating-"+i).src.replace(/star\_[01]/i,"star_0");
}
$("user-rating-container").onmouseout=null;
$("user-rating-container").innerHTML="D\u011bkujeme za V\xe1\u0161 hlas!";
}else{
$("user-rating-container").innerHTML="U\u017e jste hlasoval!";
}
$("user-rating-info").innerHTML=" ";
}});
}
function hratelne_rate(_41,_42){
var _43=new Ajax.Request("/direct/ajax/",{parameters:"func=hratelne_rate&articleId="+_41+"&mark="+_42,onComplete:function(r){
if("hlasovano"!=r.responseText){
tmp=r.responseText.split("/");
znamka=Math.floor(parseFloat(tmp[0]));
pocet=tmp[1];
$("user-rating-count").innerHTML="("+pocet+" \u010dten\xe1\u0159\u016f)";
for(i=1;i<=znamka;i++){
$("rating-"+i).src=$("rating-"+i).src.replace(/ico\-starH\-[01]/i,"ico-starH-1");
}
for(i=i;i<=5;i++){
$("rating-"+i).src=$("rating-"+i).src.replace(/ico\-starH\-[01]/i,"ico-starH-0");
}
$("user-rating-container").onmouseout=null;
$("user-rating-container").innerHTML="D\u011bkujeme za V\xe1\u0161 hlas!";
}else{
$("user-rating-container").innerHTML="U\u017e jste hlasoval!";
}
$("user-rating-info").innerHTML=" ";
}});
}
function hratelne_rate_show(_45){
var _46=new Array("Bezcenn\xfd","\u0160patn\xfd","Pr\u016fm\u011brn\xfd","Dobr\xfd","Skv\u011bl\xfd");
for(i=1;i<6;i++){
if(i<=_45){
$("user-rating-"+i).src=$("user-rating-"+i).src.replace(/ico\-starH\-[01]/i,"ico-starH-1");
$("user-rating-info").innerHTML=_46[i-1];
}else{
$("user-rating-"+i).src=$("user-rating-"+i).src.replace(/ico\-starH\-[01]/i,"ico-starH-0");
}
}
}
function software_rate_show(_47){
var _48=new Array("Bezcenn\xfd","\u0160patn\xfd","Pr\u016fm\u011brn\xfd","Dobr\xfd","Skv\u011bl\xfd");
for(i=1;i<6;i++){
if(i<=_47){
$("user-rating-"+i).src=$("user-rating-"+i).src.replace(/star\_[01]/i,"star_1");
$("user-rating-info").innerHTML=_48[i-1];
}else{
$("user-rating-"+i).src=$("user-rating-"+i).src.replace(/star\_[01]/i,"star_0");
}
}
}
function software_rate_show_mark(_49){
var _4a=new Array("Bezcenn\xfd","\u0160patn\xfd","Pr\u016fm\u011brn\xfd","Dobr\xfd","Skv\u011bl\xfd");
for(i=1;i<6;i++){
if(i<=_49){
$("user-rating-"+i).src=$("user-rating-"+i).src.replace(/star\-[01]/i,"star-1");
$("user-rating-info").innerHTML=_4a[i-1];
}else{
$("user-rating-"+i).src=$("user-rating-"+i).src.replace(/star\-[01]/i,"star-0");
}
}
}
function software_frate_clear(){
var _4b=new Array("Bez hodnocen\xed","Bezcenn\xfd","\u0160patn\xfd","Pr\u016fm\u011brn\xfd","Dobr\xfd","Skv\u011bl\xfd");
var _4c=$("mark").value;
for(i=1;i<6;i++){
if(i<=_4c){
$("user-rating-"+i).src=$("user-rating-"+i).src.replace(/star\_[01]/i,"star_1");
$("user-rating-info").innerHTML=_4b[i-1];
}else{
$("user-rating-"+i).src=$("user-rating-"+i).src.replace(/star\_[01]/i,"star_0");
}
}
$("user-rating-info").innerHTML=_4b[_4c];
}
function software_rate_clear(){
for(i=1;i<6;i++){
$("user-rating-"+i).src=$("user-rating-"+i).src.replace(/star\_[01]/i,"star_0");
}
$("user-rating-info").innerHTML=" ";
}
function software_rate(_4d){
var _4e=$("rate-software");
$("mark").value=_4d;
_4e.submit();
}
function software_frate(_4f){
$("mark").value=_4f;
}
function gallery_showPhoto(id,_51){
gallery_clearSelected();
var _52=$("nahled-"+id);
if(null==_52){
return;
}else{
_52.className="selected";
if(_52.src.match(/katalog-mobil/)){
var _53=_52.src.replace(/^(.*\-\-)[^\.]+(.*)$/i,"$1--x-$2");
}else{
if(_51){
if(_51=="stahuj"){
var _53=_52.src.replace(/^(.*\-\-)[^\.]+(.*)$/i,"$1mm580x464$2");
}else{
var _53=_52.src.replace(/^(.*\-\-)[^\.]+(.*)$/i,"$1mm300x225$2");
}
}else{
var _53=_52.src.replace(/^(.*\-\-)[^\.]+(.*)$/i,"$1mm580x464$2");
}
}
var _54=$("photo-detail").getElementsByTagName("img")[0];
_54.style.visibility="hidden";
_54.removeAttribute("width");
_54.parentNode.setAttribute("href",_52.src.replace(/^(.*)\-\-[^\.]+(.*)$/i,"$1$2"));
gallery_showAlert();
_54.src=_53;
_54.onload=function(){
_54.style.visibility="visible";
gallery_hideAlert();
};
_54.setAttribute("id","photo-"+id);
_54.setAttribute("alt",_52.getAttribute("alt"));
_54.setAttribute("longdesc",_52.getAttribute("longdesc"));
_54.parentNode.setAttribute("title",_52.getAttribute("alt"));
var _55=null!=_52.getAttribute("longdesc")&&""!=_52.getAttribute("longdesc")?_52.getAttribute("longdesc"):_52.getAttribute("alt");
$("photo-text").innerHTML=_55;
if($("photo-aktual-number")){
$("photo-aktual-number").innerHTML=gallery_aktualNumberFoto();
}
if(!_51){
gallery_showPrewName();
gallery_showNextName();
}
gallery_updateAddress(id);
if(null!=$("photo-show-full")){
$("photo-show-full").href=_52.src.replace(/^(.*)\-\-[^\.]+(.*)$/i,"$1$2");
}
_52.blur();
}
}
function gallery_showAlert(){
return;
}
function gallery_hideAlert(){
return;
}
function gallery_aktualNumberFoto(){
var _56=gallery_getPhotosList();
curId=$("photo-detail").getElementsByTagName("img")[0].id.replace(/photo\-([0-9]+)/,"$1");
var cur=_56.indexOf(curId)+1;
return cur;
}
function gallery_showPrewName(){
var _58=gallery_getPhotosList();
curId=$("photo-detail").getElementsByTagName("img")[0].id.replace(/photo\-([0-9]+)/,"$1");
var cur=_58.indexOf(curId);
if(0==cur){
var _5a=_58.last();
}else{
var _5a=_58[cur-1];
}
if($("prevName")){
if($("nahled-"+_5a)){
$("prevName").innerHTML=$("nahled-"+_5a).getAttribute("alt")!=""?$("nahled-"+_5a).getAttribute("alt"):"P\u0159echoz\xed fotka";
}else{
$("prevName").innerHTML="P\u0159edchoz\xed fotka";
}
}
}
function gallery_showNextName(){
var _5b=gallery_getPhotosList();
curId=$("photo-detail").getElementsByTagName("img")[0].id.replace(/photo\-([0-9]+)/,"$1");
var cur=_5b.indexOf(curId);
if(_5b.length-1==cur){
var _5d=_5b[0];
}else{
var _5d=_5b[cur+1];
}
if($("nextName")){
if($("nahled-"+_5d)){
$("nextName").innerHTML=$("nahled-"+_5d).getAttribute("alt")!=""?$("nahled-"+_5d).getAttribute("alt"):"Dal\u0161\xed fotka";
}else{
$("nextName").innerHTML="Dal\u0161\xed fotka";
}
}
}
function gallery_showNext(_5e){
var _5f=gallery_getPhotosList();
curId=$("photo-detail").getElementsByTagName("img")[0].id.replace(/photo\-([0-9]+)/,"$1");
var cur=_5f.indexOf(curId);
if(_5f.length-1!=cur){
gallery_showPhoto(_5f[cur+1],_5e);
}else{
gallery_showPhoto(_5f[0],_5e);
}
}
function gallery_showPrev(_61){
var _62=gallery_getPhotosList();
curId=$("photo-detail").getElementsByTagName("img")[0].id.replace(/photo\-([0-9]+)/,"$1");
var cur=_62.indexOf(curId);
if(0!=cur){
gallery_showPhoto(_62[cur-1],_61);
}else{
gallery_showPhoto(_62.last(),_61);
}
}
function gallery_fullPhoto(elm){
window.open(elm.href);
}
function gallery_updateAddress(id){
if(-1==location.href.indexOf("#")){
location.href=location.href+"#"+id;
}else{
location.href=location.href.replace(/^(.*)#[0-9]+$/i,"$1#"+id);
}
}
function gallery_detectPhoto(){
if(-1!=location.href.indexOf("#")){
res=location.href.match(/.*#([0-9]+)$/);
if(null!=res&&null!=$("photo-detail")){
gallery_showPhoto(res[1]);
}
}
}
function gallery_clearSelected(){
var _66=gallery_getPhotosList();
for(var i=0;i<_66.length;i++){
$("nahled-"+_66[i]).className="";
}
}
function gallery_getPhotosList(){
var _68=new Array();
var _69=$("photos-row").getElementsByTagName("img");
for(var i=0;i<_69.length;i++){
var res=_69[i].id.match(/\-([0-9]+)$/i);
_68[i]=res[1];
}
return _68;
}
function get_cookie(_6c){
var _6d=document.cookie.indexOf(_6c+"=");
var len=_6d+_6c.length+1;
if((!_6d)&&(_6c!=document.cookie.substring(0,_6c.length))){
return null;
}
if(_6d==-1){
return null;
}
var end=document.cookie.indexOf(";",len);
if(end==-1){
end=document.cookie.length;
}
return unescape(document.cookie.substring(len,end));
}
function set_cookie(_70,_71,_72,_73,_74,_75){
var _76=new Date();
_76.setTime(_76.getTime());
if(_72){
_72=_72*1000*60*60*24;
}
var _77=new Date(_76.getTime()+(_72));
document.cookie=_70+"="+escape(_71)+((_72)?";expires="+_77.toGMTString():"")+((_73)?";path="+_73:"")+((_74)?";domain="+_74:"")+((_75)?";secure":"");
}
function zobrazit(elm){
var box=elm.parentNode.parentNode;
var _7a=document.getElementsByClassName("box-content",box)[0];
if(true==Element.visible(_7a)){
elm.className="folded";
set_cookie(box.id,0,365,"/","","");
Element.hide(_7a);
}else{
elm.className="unfolded";
set_cookie(box.id,1,365,"/","","");
Element.show(_7a);
}
elm.blur();
}
function load_fold_status(){
var _7b=document.getElementsByClassName("box");
for(var i=0;i<_7b.length;i++){
var _7d=document.getElementsByClassName("box-title",_7b[i]);
if(_7d.length<=0){
continue;
}else{
if(_7d[0].firstChild.nodeName=="SPAN"){
_7d=_7d[0].firstChild;
}else{
continue;
}
}
var _7e=document.getElementsByClassName("box-content",_7b[i])[0];
var _7f=get_cookie(_7b[i].id);
if(typeof (_7f)=="string"){
_7f=_7f;
}else{
_7f=null;
}
if(_7f==0||(_7f==null&&_7d.className=="folded")){
_7d.className="folded";
Element.hide(_7e);
}else{
_7d.setAttribute("class","unfolded");
}
}
}
function in_array(_80,_81){
for(var i=0;i<_80.length;i++){
if(_80[i]==_81){
return true;
}
}
return false;
}
function checkFreeSoftware(id){
var _84=$("fs-"+id);
if(_84.checked){
return true;
}else{
alert("Pro z\xedsk\xe1n\xed software zdarma mus\xedte odsouhlasit podm\xednky nab\xeddky!");
return false;
}
}
function moveSky(){
if(document.documentElement.scrollTop>160){
$("banner-skyscraper").style.top=document.documentElement.scrollTop+5+"px";
}else{
$("banner-skyscraper").style.top=160+"px";
}
setTimeout("moveSky()",20);
}
function inquiry_vote(_85,_86,cid){
var _88=new Ajax.Request("/direct/ajax/",{parameters:"func=inquiry_vote&aid="+_85+"&oid="+_86+"&cid="+cid,onComplete:inquiry_vote_process});
}
function inquiry_vote_process(r){
var _8a=r.responseText;
var _8b=0;
if(_8a!="hlasovano"){
var tmp=_8a.split("||");
_8b=tmp[0];
for(var i=1;i<tmp.length;i++){
var _8e=tmp[i].split("-");
var _8f=$("inq-"+_8e[0]).firstChild.removeChild($("inq-"+_8e[0]).firstChild.firstChild);
$("inq-"+_8e[0]).firstChild.appendChild(Builder.node("span",_8f.firstChild.nodeValue));
var _90=Math.round(_8e[1]/_8b*100);
var _91=$("inq-"+_8e[0]).getElementsByTagName("img");
for(var j=0;j<3;j++){
if(j==1){
_91[j].setAttribute("width",_90);
}
_91[j].setAttribute("onclick","");
}
var _8a=$("inq-"+_8e[0]).getElementsByTagName("span")[2].firstChild;
_8a.nodeValue=" "+_90+"%";
}
$("inq-alert").innerHTML="D\u011bkujeme za hlas!";
}else{
$("inq-alert").innerHTML="U\u017e jste hlasoval(a)!";
}
}
function fullImage(url,w,h){
var _96=window.open("","obrazek","width="+(w)+",height="+(h));
_96.document.title="Obr\xe1zek - Digit\xe1ln\u011b Stahuj.cz";
if(typeof (_96.document.body.childNodes.length)=="number"&&_96.document.body.childNodes.length>0){
_96.document.body.innerHTML="";
}
_96.document.write("<a href=\"#\" onclick=\"window.top.close();\"><img border=\"0\" src=\""+url+"\" alt=\"\" width=\""+w+"\" height=\""+h+"\" /></a>");
_96.document.body.style.margin="0";
_96.focus();
}
function checkDiscussionAdd(_97){
var _98=new RegExp("^[_a-zA-Z0-9.-]+@[_a-zA-Z0-9.-]+.[a-zA-Z]{2,6}$","i");
if($("upozornit").checked){
if(!_98.test($("f_email").value)){
alert("Pokud chcete b\xfdt upozorn\u011bn(a) na odpov\u011bdi na v\xe1\u0161 p\xedsp\u011bvek, mus\xedte zadat spr\xe1vnou elektronickou adresu!");
$("f_email").focus();
return false;
}else{
return true;
}
}else{
return true;
}
}
function checkDiscsussionForm(){
if($F("f_text")==""||$F("f_text").match(/^\s+$/)){
alert("Mus\xedte vyplnit text va\u0161eho p\u0159\xedsp\u011bvku!");
return false;
}else{
return true;
}
}
function addToFav(){
var _99=window.document.title;
var url=window.location;
if(window.sidebar){
window.sidebar.addPanel(_99,"http://www.stahuj.cz/?from-fav","");
}else{
if(window.external){
window.external.AddFavorite("http://www.stahuj.cz/?from-fav",_99);
}else{
if(window.opera&&window.print){
alert("Pro ulo\u017een\xed Stahuj.cz do obl\xedben\xfdch stiskn\u011bte CTRL + D!");
}
}
}
}
function setAsHP(){
if(navigator.appName!="Netscape"){
document.body.style.behavior="url(#default#homepage)";
document.body.setHomePage("http://www.stahuj.cz/?from-fav");
return false;
}else{
return true;
}
}
function rss_news_load(_9b){
Element.show("rss-ind");
var _9c=new Ajax.Request("/direct/ajax/",{parameters:"func=rss_news_load&pocet="+_9b,onSuccess:function(r){
Element.hide("rss-ind");
$("rss-cont").innerHTML=r.responseText;
setTimeout("rss_news_refresh()",10000);
}});
}
function rss_news_refresh(){
var _9e=new Ajax.Request("/direct/ajax/",{parameters:"func=rss_news_refresh&last="+$("f_rss-last").value,onSuccess:rss_news_refresh_cb});
}
function rss_news_refresh_cb(r){
if(""!=r.responseText){
var tmp=r.responseText.split("|||");
for(var i=0;i<(tmp.length-1);i++){
var li=document.createElement("li");
li.innerHTML=tmp[i];
li.style.display="none";
$("rss-list").insertBefore(li,$("rss-list").firstChild);
new Effect.BlindDown($("rss-list").firstChild,{duration:0.5,afterFinish:function(obj){
obj.element.display="block";
$("rss-list").removeChild($("rss-list").lastChild);
}});
}
$("f_rss-last").value=tmp[tmp.length-1];
}
setTimeout("rss_news_refresh()",10000);
}
function skins_sh_list(_a4){
var elm=$("skins-menu");
if(elm.style.display=="block"){
elm.style.display="none";
}else{
elm.style.display="block";
}
if(_a4.tagName.toLowerCase()=="a"){
_a4.blur();
}
}
function skins_icon_over(_a6){
$("skins-show").src=$("skins-show").src.replace(/userbar_change[12]/i,"userbar_change"+_a6);
}
function skins_select(id,_a8){
if(0>skins_working){
return;
}else{
if(Element.visible("f_user_conf")){
Element.hide("f_user_conf");
}
}
skins_working++;
skins_show_alert();
var _a9=document.getElementsByTagName("link");
skinCount=0;
for(var i=0;i<_a9.length;i++){
if(_a9[i].getAttribute("rel")=="stylesheet"&&_a9[i].className=="userstyle"){
var _ab=_a9[i].parentNode.removeChild(_a9[i]);
}
}
if(_a8==true){
var _ac=$("skins-menu").getElementsByTagName("img");
for(i=0;i<_ac.length;i++){
_ac[i].parentNode.className="";
}
if(id!=0){
_ac[id-2].parentNode.className="selected";
$("change-theme-ico").src=_ac[id-2].src;
}else{
_ac[id].parentNode.className="selected";
$("change-theme-ico").src=_ac[id].src;
}
}
var url="http://"+location.host.replace(/diskuse/,"www");
var _ae=document.createElement("link");
_ae.setAttribute("rel","stylesheet");
_ae.setAttribute("type","text/css");
_ae.setAttribute("media","screen");
_ae.setAttribute("class","userstyle");
_ae.className="userstyle";
_ae.setAttribute("href",url+"/direct/css/userstyle.php?style="+id);
document.getElementsByTagName("head")[0].appendChild(_ae);
var _af=new Ajax.Request("/direct/ajax/",{parameters:"func=style_set&style="+id,onSuccess:skins_hide_alert});
}
function skins_show_alert(){
Element.hide("uqi-fav-info");
Element.show("f_user_alert");
if($("f_skins_ualert")){
Element.show("f_skins_ualert");
}
}
function skins_hide_alert(){
skins_working--;
Element.hide("f_user_alert");
Element.show("f_user_conf");
if($("f_skins_ualert")){
Element.hide("f_skins_ualert");
}
setTimeout("skins_hide_conf()",1000);
}
function skins_hide_conf(){
new Effect.Fade("f_user_conf",{duration:1,afterFinish:function(){
Element.hide("f_user_conf");
if(0==skins_working){
Element.show("uqi-fav-info");
}
}});
}
var JobsScroll={offset:1,maxCount:300,count:0,curMode:"down",timer:null,start:function(_b0){
JobsScroll.maxCount=350;
JobsScroll.curMode=_b0;
JobsScroll.timer=setTimeout("JobsScroll.scroll(\""+_b0+"\")",10000);
},scroll:function(_b1){
if(_b1=="down"){
$("jobs-viewport").scrollTop=$("jobs-viewport").scrollTop+JobsScroll.offset;
}else{
$("jobs-viewport").scrollTop=$("jobs-viewport").scrollTop-JobsScroll.offset;
}
if(JobsScroll.count++<JobsScroll.maxCount){
JobsScroll.timer=setTimeout("JobsScroll.scroll(\""+_b1+"\")",1);
}else{
JobsScroll.count=0;
var _b2=_b1=="up"?"down":"up";
JobsScroll.curMode=_b2;
JobsScroll.timer=setTimeout("JobsScroll.scroll(\""+_b2+"\")",10000);
}
},stop:function(){
clearTimeout(JobsScroll.timer);
},restart:function(){
JobsScroll.timer=setTimeout("JobsScroll.scroll(\""+JobsScroll.curMode+"\")",1);
}};
function newsletter_check(_b3,_b4){
var _b5=document.getElementsByName(_b4);
for(var i=0;i<_b5.length;i++){
if(Element.visible(_b5[i].parentNode.parentNode)){
Element.hide(_b5[i].parentNode.parentNode);
}else{
Element.show(_b5[i].parentNode.parentNode);
}
_b5[i].disabled=!_b3;
}
}
var tempFunc=window.onload;
window.onload=function(){
if(typeof (tempFunc)=="function"){
try{
tempFunc();
}
catch(e){
}
}
gallery_detectPhoto();
};
function jeCislo(elm){
if(elm.value!=""){
if(parseInt(elm.value)!=elm.value){
elm.value="";
elm.focus();
alert("Odpov\u011bd\xed na ot\xe1zku mus\xed b\xfdt \u010d\xedslo");
}
}
}
var Video={indicatorStart:function(){
var elm=$("video-indicator");
elm.value="Na\u010d\xedt\xe1m...";
Element.show($("prubeh"));
elm.disabled=true;
},indicatorStop:function(){
var elm=$("video-indicator");
elm.value="St\xe1hnout";
Element.hide($("prubeh"));
elm.disabled=false;
},download:function(url){
this.indicatorElm=$("video-indicator");
this.indicatorStart();
var _bb={method:"post",postBody:"func=video_downloader&url="+encodeURIComponent(url),onSuccess:function(r){
Video.indicatorStop();
var _bd=new String(r.getResponseHeader("X-Status"));
if("ERROR"==_bd){
alert(r.responseText);
}else{
location.href=r.responseText;
}
}};
add=new Ajax.Request("/direct/ajax/",_bb);
}};
var AlertTextBox={active:false,show:function(_be,_bf,_c0){
if(_c0){
InlineNotifikator.create(_c0);
}
var _c1=new Ajax.Request("/direct/ajax/",{parameters:"func="+_bf,onComplete:function(r){
AlertBox.show(_be,r.responseText);
if(_c0){
InlineNotifikator.destroy(_c0);
}
}});
}};
var InlineNotifikator={inClassName:"inline-not",create:function(elm){
var _c4=this.createNewElement();
var _c5=elm.childNodes;
var i;
for(i=0;i<_c5.length;i++){
if(1==_c5[i].nodeType){
Element.hide(_c5[i]);
}
}
elm.insertBefore(_c4,elm.firstChild);
},destroy:function(elm){
elm.removeChild(document.getElementsByClassName(this.inClassName,elm)[0]);
var _c8=elm.childNodes;
var i;
for(i=0;i<_c8.length;i++){
if(1==_c8[i].nodeType){
Element.show(_c8[i]);
}
}
},createNewElement:function(){
return Builder.node("span",{"className":this.inClassName},[Builder.node("img",{"src":"/direct/css/image/inline-notification.gif","width":21,"height":5,"alt":"Na\u010d\xedt\xe1m..."})]);
}};
function getPageSize(){
var _ca,_cb;
if(window.innerHeight&&window.scrollMaxY){
_ca=window.innerWidth+window.scrollMaxX;
_cb=window.innerHeight+window.scrollMaxY;
}else{
if(document.body.scrollHeight>document.body.offsetHeight){
_ca=document.body.scrollWidth;
_cb=document.body.scrollHeight;
}else{
_ca=document.body.offsetWidth;
_cb=document.body.offsetHeight;
}
}
var _cc,_cd;
if(self.innerHeight){
if(document.documentElement.clientWidth){
_cc=document.documentElement.clientWidth;
}else{
_cc=self.innerWidth;
}
_cd=self.innerHeight;
}else{
if(document.documentElement&&document.documentElement.clientHeight){
_cc=document.documentElement.clientWidth;
_cd=document.documentElement.clientHeight;
}else{
if(document.body){
_cc=document.body.clientWidth;
_cd=document.body.clientHeight;
}
}
}
if(_cb<_cd){
pageHeight=_cd;
}else{
pageHeight=_cb;
}
if(_ca<_cc){
pageWidth=_ca;
}else{
pageWidth=_cc;
}
arrayPageSize=new Array(pageWidth,pageHeight,_cc,_cd);
return arrayPageSize;
}
var AlertBox={topOffset:150,arrayPageSize:null,scrollTimer:null,show:function(_ce,_cf){
this.arrayPageSize=this.arrayPageSize||getPageSize();
this.showOverlay();
var elm=this.createNewElement();
elm.style.top=this.topOffset+"px";
elm.style.left=((this.arrayPageSize[0]-592)/2)+"px";
document.getElementsByClassName("title",elm)[0].innerHTML=_ce;
document.getElementsByClassName("content",elm)[0].innerHTML=_cf;
this.scrollCheck();
Element.show(elm);
},hide:function(){
this.scrollCheckStop();
Element.hide("blackbox");
new Effect.Fade("overlay",{duration:0});
},scrollCheck:function(){
var _d1=AlertBox.createNewElement();
if(document.documentElement.scrollTop>0){
_d1.style.top=(document.documentElement.scrollTop+AlertBox.topOffset)+"px";
}else{
_d1.style.top=AlertBox.topOffset+"px";
}
AlertBox.scrollTimer=setTimeout(AlertBox.scrollCheck,200);
},scrollCheckStop:function(){
if(null!=this.scrollTimeout){
clearTimeout(this.scrollTimeout);
}
},showOverlay:function(){
var _d2=document.getElementsByTagName("body").item(0);
var _d3=document.createElement("div");
_d3.setAttribute("id","overlay");
_d3.style.display="none";
_d3.onclick=function(){
AlertBox.hide();
};
_d2.appendChild(_d3);
$("overlay").style.width=this.arrayPageSize[0]+"px";
$("overlay").style.height=this.arrayPageSize[1]+"px";
new Effect.Appear("overlay",{duration:0,from:0,to:0.8});
},createNewElement:function(){
var elm=$("blackbox");
if(!elm){
var _d5=Builder.node("div",{"id":"blackbox","style":"display: none; position: absolute; z-index: 91;"},[Builder.node("div",{"className":"header"},""),Builder.node("div",{"className":"body"},[Builder.node("h3",{"className":"title"},"titulek"),Builder.node("span",{"className":"close"},[Builder.node("img",{"src":"/direct/css/image/close-m.gif","width":"18","height":"18","alt":"Zav\u0159\xedt okno!","onclick":"AlertBox.hide(); return false;","onmouseover":"AlertBox.closeOver(this, 'close-a');","onmouseout":"AlertBox.closeOver(this, 'close-m');"})]),Builder.node("div",{"className":"content"},"")]),Builder.node("div",{"className":"footer"},"")]);
_d5.firstChild.innerHTML="&nbsp;";
_d5.lastChild.innerHTML="&nbsp;";
document.body.appendChild(_d5);
return document.body.lastChild;
}else{
return elm;
}
},closeOver:function(elm,img){
elm.src=elm.src.replace(/close\-[am]/,img);
}};
var Check={emailRegExp:new RegExp("^[_a-z0-9.-]+@[_a-z0-9.-]+.[a-z]{2,5}$","i"),emptyRegExp:new RegExp("^s+$"),webRegExp:new RegExp("http://[_a-zA-Z0-9.-]+.[a-zA-Z]{2,4}[-_~&=?.a-z0-9/]","i"),email:function(str){
str=str.replace(/\s+/,"");
if(-1==str.indexOf(",")){
return this.testRe(str,this.emailRegExp);
}else{
var tmp=str.split(/, ?/);
for(var i=0;i<tmp.length;i++){
if(!this.testRe(tmp[i],this.emailRegExp)){
return false;
}
}
return true;
}
},webPage:function(str){
if(str==""){
return false;
}else{
if(this.testRe(str,this.webRegExp)){
return true;
}else{
return false;
}
}
},empty:function(str){
if(str==""){
return true;
}else{
if(this.testRe(str,this.emptyRegExp)){
return true;
}else{
return false;
}
}
},testRe:function(str,_de){
var _df=null==str.match(_de)?false:true;
return _df;
}};
var Notifikator={previousElm:null,timer:null,zobrazVelkyUser:function(elm,id){
if(null!=this.previousElm&&this.previousElm!=id){
this.hide(this.previousElm);
}
Notifikator.hideMess(id);
this.previousElm=id;
this._zobrazVelky(elm,id);
elm.blur();
},zobrazVelky:function(elm,id){
if(null!=this.previousElm&&this.previousElm!=id){
this.hide(this.previousElm);
}
Notifikator.hideMess(id);
UserList.hideAll();
this.previousElm=id;
this._zobrazVelky(elm,id);
elm.blur();
},_zobrazVelky:function(elm,id){
if(Element.visible(id)){
Element.hide(id);
}else{
var _e6=$(id).style,_e7=new Array(2);
_e6.position="absolute";
_e6.visibility="hidden";
Element.show(id);
_e7[0]=$(id).offsetWidth;
_e7[1]=$(id).offsetHeight;
Element.hide(id);
_e6.visibility="visible";
var _e8=Position.cumulativeOffset(elm);
_e6.top=(_e8[1]+20)+"px";
var _e9=this._getWindowSize();
if(_e8[0]+_e7[0]>_e9[0]){
_e6.left=(_e9[0]-_e7[0]-30)+"px";
}else{
_e6.left=(_e8[0]-30)+"px";
}
if(_e8[1]+_e7[1]>_e9[1]){
_e6.top=(_e8[1]-_e7[1])+"px";
}else{
_e6.top=(_e8[1]+20)+"px";
}
Element.show(id);
}
},_getWindowSize:function(){
var _ea=0,_eb=0;
if(typeof (window.innerWidth)=="number"){
_ea=window.innerWidth;
_eb=window.innerHeight;
}else{
if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){
_ea=document.documentElement.clientWidth;
_eb=document.documentElement.clientHeight;
}else{
if(document.body&&(document.body.clientWidth||document.body.clientHeight)){
_ea=document.body.clientWidth;
_eb=document.body.clientHeight;
}
}
}
return [_ea,_eb];
},hide:function(id){
Element.hide(id);
},showMess:function(elm,_ee,_ef){
var _f0=document.getElementsByClassName("notifikator-mess",elm)[0];
if(_f0){
_f0.innerHTML=_ee;
_f0.className=_ef+" notifikator-mess";
Element.show(_f0);
}
},showError:function(elm,_f2){
Notifikator.showMess(elm,_f2,"redBox");
},showOk:function(elm,_f4){
Notifikator.showMess(elm,_f4,"greenBox");
},hideMess:function(elm){
var elm=$(elm);
var _f6=document.getElementsByClassName("notifikator-mess",elm),i;
for(i=0;i<_f6.length;i++){
Element.hide(_f6[i]);
_f6[i].innerHTML="";
Element.addClassName(_f6[i],"redBox");
}
},clearValues:function(_f8){
var _f9=$(_f8).getElementsByTagName("textarea"),i;
for(i=0;i<_f9.length;i++){
_f9[i].value="";
}
}};
function sendInfoMessage(elm,_fc){
if(!Check.email(_fc.od_mail.value)){
Notifikator.showError($(elm),"CHYBA: Va\u0161e elektronick\xe1 adresa nen\xed ve spr\xe1vn\xe9m form\xe1tu!");
}else{
if(Check.empty(_fc.text.value)){
Notifikator.showError($(elm),"CHYBA: text informace nebyl vypln\u011bn!");
}else{
_fc.submit.value="Odes\xedl\xe1m...";
var _fd=new Ajax.Request("/direct/ajax/",{parameters:"func=odesli_info_mail&adresa="+location.href+"&text="+encodeURIComponent(_fc.text.value)+"&od_email="+encodeURIComponent(_fc.od_mail.value),onComplete:function(r){
if("ok"==r.responseText){
Notifikator.showOk($(elm),"OK: Zpr\xe1va byla \xfasp\u011b&scaron;n\u011b odesl\xe1na!");
Notifikator.clearValues(elm);
}else{
Notifikator.showError($(elm),"CHYBA: "+r.responseText);
}
}});
}
}
}
function sluzba_rate_show(_ff){
var text=new Array("Bezcenn\xe1","\u0160patn\xe1","Pr\u016fm\u011brn\xe1","Dobr\xe1","Skv\u011bl\xe1");
for(i=1;i<6;i++){
if(i<=_ff){
$("user-rating-"+i).src=$("user-rating-"+i).src.replace(/ico\-star\-[01]/i,"ico-star-1");
$("user-rating-info").innerHTML=text[i-1];
}else{
$("user-rating-"+i).src=$("user-rating-"+i).src.replace(/ico\-star\-[01]/i,"ico-star-0");
}
}
}
function sluzba_rate_show_mark(_101){
var text=new Array("Bezcenn\xe1","\u0160patn\xe1","Pr\u016fm\u011brn\xe1","Dobr\xe1","Skv\u011bl\xe1");
for(i=1;i<6;i++){
if(i<=_101){
$("user-rating-"+i).src=$("user-rating-"+i).src.replace(/ico\-star\-[01]/i,"ico-star-1");
$("user-rating-info").innerHTML=text[i-1];
}else{
$("user-rating-"+i).src=$("user-rating-"+i).src.replace(/ico\-star\-[01]/i,"ico-star-0");
}
}
}
function sluzba_rate_clear(){
for(i=1;i<6;i++){
$("user-rating-"+i).src=$("user-rating-"+i).src.replace(/ico\-star\-[01]/i,"ico-star-0");
}
$("user-rating-info").innerHTML=" ";
}
function sluzba_frate_clear(){
var text=new Array("Bez hodnocen\xed","Bezcenn\xe1","\u0160patn\xe1","Pr\u016fm\u011brn\xe1","Dobr\xe1","Skv\u011bl\xe1");
var _104=$("mark").value;
for(i=1;i<6;i++){
if(i<=_104){
$("user-rating-"+i).src=$("user-rating-"+i).src.replace(/ico\-star\-[01]/i,"ico-star-1");
$("user-rating-info").innerHTML=text[i-1];
}else{
$("user-rating-"+i).src=$("user-rating-"+i).src.replace(/ico\-star\-[01]/i,"ico-star-0");
}
}
$("user-rating-info").innerHTML=text[_104];
}
function sluzba_rate(mark){
var form=$("rate-software");
$("mark").value=mark;
form.submit();
}
function sluzba_frate(mark){
$("mark").value=mark;
}
function nejArticle_show(id){
var _109=$("nejImageArticle-"+id);
if(null==_109){
return;
}else{
link=$("nejArticle-"+id).getAttribute("href");
nadpis=_109.getAttribute("alt");
title="<h3><a href=\""+link+"\">"+nadpis+"</a></h3>";
perex="<p>"+_109.getAttribute("longdesc")+"</p>";
obrazek="<img src=\""+_109.getAttribute("src")+"\" alt=\""+nadpis+"\" />";
celyClanek="<span class=\"allArticle\"><a href=\""+link+"\">Cel\xfd \u010dl\xe1nek</a></span>";
$("showNejArticleHere").innerHTML="<div>"+obrazek+title+perex+celyClanek+"</div>";
}
}
function newPhotogallery_show(id){
var _10b=$("newPhotogallery-"+id);
if(null==_10b){
return;
}else{
link=$("newPhotogalleryLink-"+id).getAttribute("href");
nadpis=_10b.getAttribute("alt");
title="<div class=\"box-fotoclanky-nadpis\"><a href=\""+link+"\">"+nadpis+"</a></div>";
obrazek="<img src=\""+_10b.getAttribute("src")+"\" alt=\""+nadpis+"\" />";
$("showNewPhotogalleryHere").innerHTML="<div class=\"box-fotoclanky-foto\">"+obrazek+title+"</div>";
}
}
function newPhotogallery_show_next(){
$("next").style.display="block";
$("first").style.display="none";
$("prevLink").style.display="block";
$("nextLink").style.display="none";
}
function newPhotogallery_show_prev(){
$("next").style.display="none";
$("first").style.display="block";
$("prevLink").style.display="none";
$("nextLink").style.display="block";
}
function showOtherCategory(div){
if($(div).style.display=="none"){
$(div).style.display="block";
}else{
$(div).style.display="none";
}
}
function showReportButton(){
if($("report").value=="null"){
$("reportButton").style.display="none";
}else{
$("reportButton").style.display="block";
}
}
function add_report(_10d){
var _10e={method:"post",postBody:"func=add_report&url_sw="+_10d+"&report="+$("report").value,onSuccess:function(r){
if(r.responseText!="CHYBA"){
$("report-box").innerHTML="D\u011bkujeme za zasl\xe1n\xed Va\u0161eho podn\u011btu.";
}else{
alert("Nahl\xe1\u0161en\xed probl\xe9mu se nezda\u0159ilo");
}
}};
add=new Ajax.Request("/direct/ajax/",_10e);
}
function savesw(type,url){
var _112={method:"post",postBody:"func=save_sw&type="+type,onSuccess:function(r){
window.location.href=url;
}};
add=new Ajax.Request("/direct/ajax/",_112);
}
function savedownload(type,url){
var _116={method:"post",postBody:"func=save_download&type="+type,onSuccess:function(r){
window.location.href=url;
}};
add=new Ajax.Request("/direct/ajax/",_116);
}
var google_num_ads=0;
var google_last_ad_type="";
function google_ad_request_done(_118){
var s;
if(_118.length==0){
return;
}
google_num_ads+=_118.length;
google_last_ad_type=_118[0].type;
s="<div class=\"ad_header\"><a class=\"ad_attribution\" href=\""+google_info.feedback_url+"\">Reklamy Google</a></div>";
if(_118[0].type=="image"){
s+="<a href=\""+_118[0].url+"\" target=\"_top\" title=\"go to "+_118[0].visible_url+"\"><img border=\"0\" src=\""+_118[0].image_url+"\"width=\""+_118[0].image_width+"\"height=\""+_118[0].image_height+"\"></a>";
}else{
if(_118[0].type=="html"){
s+=_118[0].snippet;
}else{
if(_118[0].type=="text"){
if(_118.length==1){
ad_title_class="ad_title_large";
ad_text_class="ad_text_large";
ad_url_class="ad_url_large";
}else{
ad_title_class="ad_title";
ad_text_class="ad_text";
ad_url_class="ad_url";
}
for(var i=0;i<_118.length;i++){
if(i==(_118.length-1)){
last=" last";
}else{
last="";
}
s+="<div class=\"ad_ads"+last+"\"><a class=\""+ad_title_class+"\" href=\""+_118[i].url+"\" >"+_118[i].line1+"</a><br><span class=\""+ad_text_class+"\">"+_118[i].line2+" "+_118[i].line3+"</span><br>"+"<a class=\""+ad_url_class+"\" href=\""+_118[i].url+"\" >"+_118[i].visible_url+"</a></div>";
}
}
}
}
document.write(s);
return;
}


