﻿n6 = (document.getElementById && !document.all); n4 = (document.layers); ie = (document.all); d = (n4 || ie) ? "document." : 'document.getElementById("'; a = (n4 || n6) ? "" : "all."; n6r = (n6) ? '")' : ""; s = (n4) ? "" : ".style"; browser = ""; if (navigator.appName.indexOf("Microsoft") != -1) { browser = "ie" } if (navigator.appName.indexOf("Netscape") != -1) { browser = "net" } function ietruebody() { return (document.compatMode && document.compatMode != "BackCompat") ? document.documentElement : document.body } var http_request = false; var Get_http_response; function new_xmlhttp() { if (window.XMLHttpRequest) { http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { http_request.overrideMimeType("text/xml") } } else { if (window.ActiveXObject) { try { http_request = new ActiveXObject("Msxml2.XMLHTTP") } catch (b) { try { http_request = new ActiveXObject("Microsoft.XMLHTTP") } catch (b) { } } } } if (!http_request) { alert("Cannot create an XMLHTTP instance"); return false } return http_request } function createVals(k) { var i = document.getElementById(k); var l = i.elements; var o = ""; var j = ""; var g = new Array(); for (var b = 0; b < i.length; b++) { try { if ((l[b].name != "__LASTFOCUS") && (l[b].name != "__VIEWSTATE") && (l[b].name != "__EVENTTARGET") && (l[b].name != "__EVENTARGUMENT") && (l[b].name != "__EVENTVALIDATION")) { if ((l[b].type == "text") || (l[b].type == "hidden") || (l[b].type == "password") || (l[b].type == "textarea") || (l[b].type == "select-one") || (l[b].type == "radio") || (l[b].type == "checkbox")) { if ((l[b].type == "select-one")) { var p = l[b].options[l[b].selectedIndex].text; var h = l[b].name + "_TEXT"; o = escape(h) + "=" + escape(p.replace(/%2B/g, "%u002B")); g.push(o); var p = l[b].value; var h = l[b].name; o = escape(h) + "=" + escape(p.replace(/%2B/g, "%u002B")); g.push(o) } else { if (l[b].type == "radio") { if (l[b].checked == true) { var p = l[b].value; var h = l[b].name; o = escape(h) + "=" + escape(p.replace(/%2B/g, "%u002B")); g.push(o) } } else { if (l[b].type == "checkbox") { if (l[b].checked == true) { var p = l[b].value; var h = l[b].name; o = escape(h) + "=" + escape(p.replace(/%2B/g, "%u002B")); g.push(o) } } else { var p = l[b].value; var h = l[b].name; o = escape(h) + "=" + escape(p.replace(/%2B/g, "%u002B")); g.push(o) } } } } } } catch (m) { } } if (g.length > 0) { j = g.join("&") } return j } function post(h, g, c) { if (g != "null") { document.getElementById(g).innerHTML = '<div align="center" ><table height="100%" border="0" cellpadding="0" cellspacing="0" ><tr><td valign="middle"><img src="images/loading.gif" ></tr></table></div>' } else { var f = document.getElementById(g) } var e = new_xmlhttp(); e.abort(); var b = new String(""); e.open("POST", c, true); if (h != "null") { e.setRequestHeader("Content-type", "application/x-www-form-urlencoded;charset=iso-8859-9"); e.setRequestHeader("Content-type", "application/x-www-form-urlencoded;language=tr"); b = createVals(h); e.send(b) } else { e.send(null) } return e } function createWindow(k, i, j, g, b, f) { var h = ie && !window.opera ? ietruebody().clientWidth : window.innerWidth - 20; var e = ie && !window.opera ? ietruebody().clientHeight : window.innerHeight - 20; if (!document.getElementById("modal")) { var c = document.body.appendChild(document.createElement("DIV")); c.className = "modalContainer"; c.style.visibility = "hidden"; c.id = "windowContainer"; c.style.left = Math.round((parseInt(h) - parseInt(g)) / 2) + "px"; c.style.top = Math.round((parseInt(e) - parseInt(b)) / 2) + "px"; var c = document.body.appendChild(document.createElement("DIV")); c.className = "modal"; c.style.visibility = "visible"; c.style.position = "absolute"; c.style.width = "100%"; c.style.height = e; c.id = "modal" } document.getElementById("windowContainer").innerHTML = ""; document.getElementById("windowContainer").style.width = g; document.getElementById("windowContainer").style.height = b; document.getElementById("windowContainer").innerHTML = '<div style="width: 550px !important" class="modalPopup2"><div class="mpTitle"><table width="100%" class="modalTitle"><tr><td><div id="popTitle" style="font-family : Arial, Helvetica, sans-serif; font-weight : bold; font-size:14px;">' + i + '</div></td><td><a href="Javascript:closeWindow()"><img src="styles/images/close.gif" alt="Kapat" class="mpClose" /></a></td></tr></table><hr /><iframe name=\'' + k + "' frameborder=\"0\" id='" + k + '\' scrolling="no" style="overflow-x : hidden;" width=\'' + g + "' height='" + b + "' src='" + j + "'></iframe></div></div>"; if (browser == "" || browser == "ie") { } if (browser == "net") { document.getElementById(k).onload = function() { } } document.getElementById("windowContainer").style.visibility = f; document.getElementById("modal").style.visibility = "visible" } function createWindow2(k, i, j, g, b, f) { var h = ie && !window.opera ? ietruebody().clientWidth : window.innerWidth - 20; var e = ie && !window.opera ? ietruebody().clientHeight : window.innerHeight - 20; if (!document.getElementById("modal")) { var c = document.body.appendChild(document.createElement("DIV")); c.className = "modalContainer"; c.style.visibility = "hidden"; c.style.display = "none"; c.id = "windowContainer"; var c = document.body.appendChild(document.createElement("DIV")); c.className = "modal"; c.style.visibility = "visible"; c.style.position = "absolute"; c.style.width = "100%"; c.style.height = e; c.id = "modal" } document.getElementById("windowContainer").innerHTML = ""; document.getElementById("windowContainer").innerHTML = '<div style="width: 100px !important" class="modalPopup2"><div class="mpTitle"><table width="100%" class="modalTitle"><tr><td><div id="popTitle" style="font-family : Arial, Helvetica, sans-serif; font-weight : bold; font-size:14px;">' + i + '</div></td><td><a href="Javascript:closeWindow()"><img src="styles/images/close.gif" alt="Kapat" class="mpClose" /></a></td></tr></table><hr /><iframe name=\'' + k + "' frameborder=\"0\" id='" + k + '\' scrolling="no" style="overflow-x : hidden;" width=\'' + 100 + "' height='" + 100 + "' src='" + j + "'></iframe></div></div>"; document.getElementById("windowContainer").style.visibility = f; document.getElementById("windowContainer").style.display = "none"; document.getElementById("modal").style.visibility = "hidden"; document.getElementById("modal").style.display = "none" } function closeWindow() { document.getElementById("windowContainer").innerHTML = ""; document.getElementById("modal").style.visibility = "hidden" } var xmlCom; var timerId; var divAjax; var objDiv; function MakeRequest() { xmlCom = false; if (window.XMLHttpRequest) { xmlCom = new XMLHttpRequest(); if (xmlCom.overrideMimeType) { xmlCom.overrideMimeType("text/xml") } } else { if (window.ActiveXObject) { try { xmlCom = new ActiveXObject("Msxml2.XMLHTTP") } catch (b) { try { xmlCom = new ActiveXObject("Microsoft.XMLHTTP") } catch (b) { } } } } if (!xmlCom) { alert("Cannot create XMLHTTP instance"); return false } return true } function LoadProduct(c, g) { if (document.getElementById(g).innerHTML != "") { return } var b = new Date(); var f = b.getTime(); var e = ""; divAjax = g; Loader("show", "loaderbox", 175, 0); if (!MakeRequest()) { return } e = c + "&time=" + f; xmlCom.onreadystatechange = Control; xmlCom.open("GET", e, true); xmlCom.send(null) } function Control() { if (xmlCom.readyState == 4) { if (xmlCom.status == 200) { clearInterval(timerId); document.getElementById(divAjax).innerHTML = xmlCom.responseText; Loader("hide", "loaderbox", 175, 0) } else { Loader("hide", "loaderbox", 175, 0) } } } function LoadProduct2(c, g) { var b = new Date(); var f = b.getTime(); var e = ""; objDiv = g; if (!MakeRequest()) { return } e = c + "&time=" + f; xmlCom.onreadystatechange = Control2; xmlCom.open("GET", e, true); xmlCom.send(null) } function Control2() { if (xmlCom.readyState == 4) { if (xmlCom.status == 200) { clearInterval(timerId); if (objDiv) { objDiv.innerHTML = xmlCom.responseText; ClickAccordion(null, 0) } } else { } } } function Loader(c, e, b, f) { if (c == "show") { sm(e, b, f) } else { hm(e) } HideAllSelect(e) } function LoadLocation(f, i) { var c = 0; try { c = document.getElementById("LocCityID").value } catch (j) { } var b = new Date(); var h = b.getTime(); var g = ""; divAjax = i; if (c > 0) { Loader("show", "mbd", 333, 240); return } Loader("show", "loaderbox", 175, 0); if (!MakeRequest()) { return } g = f + "&time=" + h; xmlCom.onreadystatechange = Control3; xmlCom.open("GET", g, true); xmlCom.send(null) } function Control3() { if (xmlCom.readyState == 4) { if (xmlCom.status == 200) { clearInterval(timerId); document.getElementById(divAjax).innerHTML = xmlCom.responseText; Loader("hide", "loaderbox", 175, 0); Loader("show", "locationbox", 333, 240) } else { Loader("hide", "loaderbox", 175, 0) } } } function LoadLocation2(c, g) { var b = new Date(); var f = b.getTime(); var e = ""; divAjax = g; if (!MakeRequest()) { return } e = c + "&time=" + f; xmlCom.onreadystatechange = Control4; xmlCom.open("GET", e, true); xmlCom.send(null) } function Control4() { if (xmlCom.readyState == 4) { if (xmlCom.status == 200) { clearInterval(timerId); if (xmlCom.responseText == "ok") { document.location = "suppliers.aspx"; return } document.getElementById(divAjax).innerHTML = xmlCom.responseText } else { } } } function LoadMulti(c, g, h) { var b = new Date(); var f = b.getTime(); var e = ""; divAjax = g; kapat = h; if (!MakeRequest()) { return } e = c + "&time=" + f; xmlCom.onreadystatechange = Control5; xmlCom.open("GET", e, true); xmlCom.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=UTF-8"); xmlCom.send(null) } function Control5() { if (xmlCom.readyState == 4) { if (xmlCom.status == 200) { clearInterval(timerId); if (kapat == "1") { document.getElementById("dOdemeTipi").style.display = ""; Loader("hide", "popupop", 100, 100) } else { document.getElementById(divAjax).innerHTML = xmlCom.responseText; Loader("show", "popupop", 420, 250) } } else { } } } function LoadPopup(c, g) { var b = new Date(); var f = b.getTime(); var e = ""; divAjax = g; Loader("show", "loaderbox", 175, 0); if (!MakeRequest()) { return } e = c + "&time=" + f; xmlCom.onreadystatechange = Control6; xmlCom.open("GET", e, true); xmlCom.send(null) } function Control6() { if (xmlCom.readyState == 4) { if (xmlCom.status == 200) { clearInterval(timerId); document.getElementById(divAjax).innerHTML = xmlCom.responseText; Loader("hide", "loaderbox", 175, 0); Loader("show", "popupop", 590, 325) } else { Loader("hide", "loaderbox", 175, 0) } } } function LoadReklam(c, g) { var b = new Date(); var f = b.getTime(); var e = ""; divAjax = g; if (!MakeRequest()) { return } e = c + "&time=" + f; xmlCom.onreadystatechange = Control7; xmlCom.open("GET", e, true); xmlCom.send(null) } function Control7() { if (xmlCom.readyState == 4) { if (xmlCom.status == 200) { clearInterval(timerId); document.getElementById("divReklam").innerHTML = xmlCom.responseText; Loader("show", "divReklam", 590, 325) } else { } } } function LoadFavori(c) { var b = new Date(); var f = b.getTime(); var e = ""; if (!MakeRequest()) { return } e = c + "&time=" + f; xmlCom.onreadystatechange = ControlFavori; xmlCom.open("GET", e, true); xmlCom.send(null) } function ControlFavori() { } var g_PopupIFrame = null; function getIEVersionNumber() { var c = navigator.appName; var g = navigator.appVersion; var b = parseFloat(g); var f = navigator.userAgent; var e = f.indexOf("MSIE "); if (c == "Microsoft Internet Explorer") { if (e == -1) { return b } else { return parseFloat(f.substring(e + 5, f.indexOf(";", e))) } } else { return 11 } } function HideAllSelect(e) { e = document.getElementById(e); var c = getIEVersionNumber(); if (c <= 6 && c > 0) { if (e.style.visibility == "visible") { e.style.zIndex = e.style.zIndex + 1; var b = null; if (g_PopupIFrame != null) { b = g_PopupIFrame } else { b = document.createElement("IFRAME") } b.setAttribute("src", ""); b.style.position = "absolute"; b.style.left = e.offsetLeft + "px"; b.style.top = e.offsetTop + "px"; b.style.width = e.offsetWidth + "px"; b.style.height = e.offsetHeight + "px"; document.body.appendChild(b); g_PopupIFrame = b } else { if (g_PopupIFrame != null) { document.body.removeChild(g_PopupIFrame) } g_PopupIFrame = null } } } function LoadBkAdres(c, g) { var b = new Date(); var f = b.getTime(); var e = ""; divAjax = g; if (!MakeRequest()) { return } e = c + "&time=" + f; xmlCom.onreadystatechange = Control8; xmlCom.open("GET", e, true); xmlCom.send(null) } function Control8() { if (xmlCom.readyState == 4) { if (xmlCom.status == 200) { clearInterval(timerId); document.getElementById("popupop2").innerHTML = xmlCom.responseText; Loader("show", "popupop2", 350, 500) } else { } } };
