function op_cl(item){try{
obj=document.getElementById?document.getElementById(item):document.all[item]obj.style.display=(obj.style.display=='none')?'':'none';
}catch(e){}}

function atw(oid) {
stl=window.open("savetolater.asp?add=1&id="+oid+'',"stl","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,,height=400,width=450");
}

function nextm(j,c) {
if (document.getElementById) {
nextmc=document.getElementById('modeli'+c)
nextmj=document.getElementById('modeli'+j)	
} else if(document.all) {
nextmc=document.all['modeli'+c]
nextmj=document.all['modeli'+j]
} else return;
nextmc.style.display='none';
nextmj.style.display='';
}

function checkEmpty() {
th=document.forms['thf'];
if (!th['qs'].value) {
selTh=th['parent'].options[th['parent'].selectedIndex].value;
document.location='large.asp?parent='+selTh;
return 0;
}
}

function show_fpo(i) {	
if (document.getElementById('fpoid'+i))
document.getElementById('fpoid'+i).style.display=''; 
}
function hide_fpo(i) {	
if (document.getElementById('fpoid'+i))
document.getElementById('fpoid'+i).style.display='none'; 
}

function shfpo(oid) {
for(i=0;i<6;i++){
	if (i==oid) {
		if(document.getElementById('fpop'+i))document.getElementById('fpop'+i).style.fontWeight='bold';
		show_fpo(2*i);
		show_fpo(1+2*i);
	}
	else {
		if (document.getElementById('fpop'+i))document.getElementById('fpop'+i).style.fontWeight='normal';
		hide_fpo(2*i);
		hide_fpo(1+2*i);
	}
}
}

var pgsid=0;var pgsi=0;
function ClearPGS(){if(pgsid){clearInterval(pgsid);pgsid=0;}}
function SetPGS(){pgsid=setInterval("ScrollPGS()",4000);}
function ScrollPGS(){if(++pgsi==6)pgsi=0;shfpo(pgsi);}

ajaxWall = {
handleFailure:function(o){},
handleSuccess:function(o){
if(!o.responseText)return;
firm_id=o.responseText.replace('wall-f-','');
document.getElementById(o.responseText).innerHTML='<input type="button" class="wall-btnu" value="Приятел" onclick="ajaxWall.unfollow('+firm_id+')">';
},
handleSuccess2:function(o){
if(!o.responseText)return;
firm_id=o.responseText.replace('wall-f-','');
document.getElementById(o.responseText).innerHTML= 
'<input type="button" class="wall-btn" value="Следвай!" onclick="ajaxWall.makeFriend('+firm_id+')">';
},
makeFriend:function(friend) {
YAHOO.util.Connect.asyncRequest(
'POST','/a2/pub/wall-status.asp',callbackWall,"friend="+friend);
},
unfollow:function(friend) {
YAHOO.util.Connect.asyncRequest(
'POST','/a2/pub/wall-status.asp',callbackWall2,"friend="+friend);
}
};

var callbackWall=
{
success:ajaxWall.handleSuccess,
failure:ajaxWall.handleFailure,
scope:ajaxWall,
cache:false
};

var callbackWall2=
{
success:ajaxWall.handleSuccess2,
failure:ajaxWall.handleFailure,
scope:ajaxWall,
cache:false
};

function WallAnswerTo(answer_id,firm){
document.getElementById('answer-to').innerHTML='Отговор към '+firm;
document.getElementById('poststatus')['answer_to'].value=answer_id;
document.getElementById('poststatus')['status'].focus();
}

function getCookie(Name){var search=Name+"="
if(document.cookie.length>0){offset=document.cookie.indexOf(search)
if(offset!=-1){offset+=search.length
end=document.cookie.indexOf(";",offset)
if(end==-1)end=document.cookie.length
return unescape(document.cookie.substring(offset,end))}}}
function setCookie(name,value,expire){var bb=name+"="+escape(value)
+((expire==null)?"":("; expires="+expire.toGMTString()))
document.cookie=bb}

//banInc.js
var allStr="";function getBanners(urlPath,website,place,page,holding,area,types,activity,locality,trademark,lang,firm)
{if(lang=="bg"||lang=="eng"||lang=="de"||lang=="ru")lang=lang;else lang="bg";if(firm<1)firm=0;var allStr="";var fullUrl="http://"+urlPath+"/gb.asp?ws="+website+"&pl="+place+"&pg="+page+"&ho="+holding+"&ar="+area+"&ty="+types+"&ac="+activity+"&lo="+locality+"&tm="+trademark+"&lang="+lang;allStr=getFileScriptOutput(fullUrl);if(allStr!="")document.write(allStr);else{if(website==1)
{if(place==11&&holding<1)
{callUrl="/packages/misc_ret/brOfrs_roll.aspx?lang="+lang+"";if(holding>0)callUrl+="&ho="+holding;else if(firm>0)callUrl+="&fi="+firm;allStr=getFileScriptOutput(callUrl);}
if(place==34&&holding>0)
{callUrl="/packages/misc_ret/tgList_roll.aspx?lang="+lang+"&";if(holding>0)callUrl+="ho="+holding;else if(firm>0)callUrl+="fi="+firm;else callUrl+="fi=15";allStr=getFileScriptOutput(callUrl);}
if(allStr!="")document.write(allStr);}}}
function getFileScriptOutput(fullUrl)
{return;var retStr="";if(fullUrl=="")return"";if(document.all)
{try
{var xml=new ActiveXObject("Microsoft.XMLHTTP");xml.Open("GET",fullUrl,false);xml.Send()
retStr=xml.responseText;}
catch(e){var xml=new ActiveXObject("MSXML2.XMLHTTP.4.0");xml.Open("GET",fullUrl,false);xml.Send()
retStr=xml.responseText;}}
else
{var xml=new XMLHttpRequest();xml.open("GET",fullUrl,false);xml.send(null);retStr=xml.responseText;}
return retStr;}
function MovingGroups(stand,lang){return;callUrl="/packages/misc_ret/tgList_roll.aspx?lang="+lang+"&stand="+stand;allStr=getFileScriptOutput(callUrl);document.write(allStr);}

//rtm.js
function rtm(t,id){
window.frames['rtm_frame'].document.location='/a2/pub/rtm.asp?otype='+t+'&onum='+id;
document.getElementById('hh'+id).style.display='none';
alert('Съобщението е докладвано на модератор.');
}