// JavaScript Document
function zakladki(){var dobizbranoe=document.getElementById('zakladki');
	if((navigator.appVersion.indexOf("MSIE")>0) && (parseInt(navigator.appVersion)>=4))
{ dobizbranoe.innerHTML+='<a href="#" onClick="geits()">ДОБАВИТЬ В ИЗБРАННОЕ</a>';}
    if(navigator.appName.indexOf("Netscape")!=-1) 
{dobizbranoe.innerHTML+='<a href="#" onClick="firfoks()">ДОБАВИТЬ В ЗАКЛАДКИ</a>';}
	}
function geits(){window.external.AddFavorite(location.href, document.title);}
function firfoks(){window.sidebar.addPanel(document.title,location.href,"");}
$(document).ready(function(){zakladki();})
var pic=new Array();
for (var imi=0; imi<mas_hed.length; imi++){pic[imi]=new Image(); pic[imi].src=mas_hed[imi];}

function proces(a){ alert('a');
if(xmlHttp){try{
xmlHttp.open('POST',"na.php",true);
xmlHttp.onreadystatechange=handleRequestState;
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlHttp.send("cat="+a);}
catch(e){alert('Невозможно соеденится с сервером '+ e.toString());}}}

function handleRequestState(){
var md=document.getElementById('content');
if(xmlHttp.readyState==1){md.innerHTML='Состаяние запроса: 1 (отправляется) <br />';}
else if(xmlHttp.readyState==4){if(xmlHttp.status==200){try{var response=xmlHttp.responseText;  md.innerHTML=response;}
catch(e){alert('Ошибка чтения ответа '+e.toString());}} 
else{alert('Возникла ошибка при получении данных '+xmlHttp.statusText); }}}
