// detect browser start // end hide JavaScript //detect browser end function addToBasket(table,content) { var variable ='count'+'-'+table+'-'+content; var variable2='width'+'-'+table+'-'+content; var count = document.getElementById(variable).value; if(document.getElementById(variable2) == null){ var width = "null"; }else{ var width = document.getElementById(variable2).value; } document.getElementById('loadbar').style.display="block"; location.href='/order/add/'+table+'/'+content+'/?count='+count+'&width='+width; } function menu() { if(document.getElementById('menu').style.display == "block"){ document.getElementById('menu').style.display = "none"; document.getElementById('menucontrol').src="/images/open.gif"; if(is_nav6up || is_ie6up || is_opera5up){ document.getElementById('content').style.marginLeft = "60px" } if(is_ie6){ document.getElementById('content').style.marginLeft = "30px" } }else{ document.getElementById('menucontrol').src="/images/close.gif"; document.getElementById('menu').style.display = "block" if(is_nav6up || is_ie6up || is_opera5up){ document.getElementById('content').style.marginLeft = "0px"; } if(is_ie6){ document.getElementById('content').style.marginLeft = "-30px" } } } function fix() { if (parseInt(navigator.appVersion)>3) { if (navigator.appName=="Netscape" || navigator.appName=="Opera") { winW = window.innerWidth; winH = window.innerHeight; } if (navigator.appName.indexOf("Microsoft")!=-1) { winW = document.body.offsetWidth; winH = document.body.offsetHeight; } } if(winW > '1050') { document.getElementById('buttonControlMenu').style.display="none"; document.getElementById('menu').style.display = "block"; document.getElementById('menu').style.marginLeft = "0px"; document.getElementById('content').style.marginLeft = "0px"; } } function showAddResult() { if(checkResponce("messagebox")){ document.getElementById("content").innerHTML = Ajax.responseText; document.getElementById('basket').innerHTML = ' Ваш заказ'; document.getElementById("messagebox").innerHTML =' '; } } function updateBasket(table,content,index) { var variable='count'+'-'+table+'-'+content+'-'+index; var count = document.getElementById(variable).value; sendRequestXmlGet('GET','/order/update/'+index+'?value='+count,showUpdateResult) } function updateBasketWidth(table,content,index) { var variable='width'+'-'+table+'-'+content+'-'+index; var count = document.getElementById(variable).value; sendRequestXmlGet('GET','/order/update/'+index+'?width='+count,showUpdateResult) } function smartUpdateBaskest(index,param,value) { sendRequestXmlGet('GET','/order/update/'+index+'?smart=true&'+param+'='+value,showUpdateResult) } function showUpdateResult() { if(checkResponce("messagebox")){ document.getElementById("messagebox").innerHTML = Ajax.responseText; } } var Ajax = createRequestObject(); function createRequestObject() { var xmlhttp; try { xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");} catch(f) { xmlhttp=null; } } if(!xmlhttp&&typeof XMLHttpRequest!="undefined") { xmlhttp=new XMLHttpRequest(); } return xmlhttp; } function sendRequestXmlGet(method,url,callback) { Ajax.open(method,url); Ajax.setRequestHeader('Content-Type', "text/xml"); Ajax.onreadystatechange = callback; Ajax.send(null); } function checkResponce(messagebox) { if(Ajax.readyState == 1 || Ajax.readyState == 2 || Ajax.readyState == 3){ document.getElementById(messagebox).innerHTML = '

Загрузка

Обработка Запроса
';return false;} if(Ajax.readyState == 4){if(Ajax.status == 200){return true;}} }