function AjaxLoad(url, tag, data) {var xmlHttp = false;
                             try {xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");} catch (e) {
                             try {xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e2) {xmlHttp = false;}}
                             if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {xmlHttp = new XMLHttpRequest();}
                             if (url.search(/\?+/)==-1){url=url+"?"+Sid+"";} else {url=url+"&"+Sid+"";}
                             var include=document.getElementById (tag);
                             //include.innerHTML = "<CENTER><img src='images/AjaxLoad.gif' width=8 height=8 border=0></CENTER>";
                             xmlHttp.onreadystatechange = function() {AjaxDone(tag,xmlHttp);};
                             xmlHttp.open("POST", url, true);
                             xmlHttp.setRequestHeader("Content-Type", "text/xml; charset=windows-1251");
                             xmlHttp.send(data);}
function AjaxDone(tag,xmlHttp){if (xmlHttp.readyState == 4) {
                                 if (xmlHttp.status == 200) {
                                   var include=document.getElementById (tag);
                                   var reg=/<!--RUN:(.*)-->(.*)/;
                                   var arr=new Array();
                                   var arr=reg.exec(xmlHttp.responseText);
                                   if (arr){include.innerHTML=arr[2];eval(arr[1]);
                                 } else {include.innerHTML = xmlHttp.responseText;}}}}
function viewBigPhoto(code, title){inner='<img src="images/products/'+code+'-big.jpg" width=500 height=500 border=0 alt="большое фото: '+title+'">';
                                   document.getElementById('bigPhoto').innerHTML=inner;}

function viewExtPhoto(code, num, id, title){inner='<p><B>'+title+'</B></p><img src="images/products/'+code+'-'+num+'.jpg" width=500 border=0 alt="дополнительное фото: '+title+'"><Div id="PhotoText'+num+'"></div>';
                                            AjaxLoad('photo/'+id+'/'+num, 'PhotoText'+num);
                                            document.getElementById('Photo'+num).innerHTML=inner;}