var DragHandler = { // private property. _oElem : null, // public method. Attach drag handler to an element. attach : function(oElem) { oElem.onmousedown = DragHandler._dragBegin; // callbacks oElem.dragBegin = new Function(); oElem.drag = new Function(); oElem.dragEnd = new Function(); return oElem; }, // private method. Begin drag process. _dragBegin : function(e) { var oElem = DragHandler._oElem = this; if (isNaN(parseInt(oElem.style.left))) { oElem.style.left = '0px'; } if (isNaN(parseInt(oElem.style.top))) { oElem.style.top = '0px'; } var x = parseInt(oElem.style.left); var y = parseInt(oElem.style.top); e = e ? e : window.event; oElem.mouseX = e.clientX; oElem.mouseY = e.clientY; oElem.dragBegin(oElem, x, y); document.onmousemove = DragHandler._drag; document.onmouseup = DragHandler._dragEnd; return false; }, // private method. Drag (move) element. _drag : function(e) { var oElem = DragHandler._oElem; var x = parseInt(oElem.style.left); var y = parseInt(oElem.style.top); e = e ? e : window.event; oElem.style.left = x + (e.clientX - oElem.mouseX) + 'px'; oElem.style.top = y + (e.clientY - oElem.mouseY) + 'px'; oElem.mouseX = e.clientX; oElem.mouseY = e.clientY; oElem.drag(oElem, x, y); return false; }, // private method. Stop drag process. _dragEnd : function() { var oElem = DragHandler._oElem; var x = parseInt(oElem.style.left); var y = parseInt(oElem.style.top); oElem.dragEnd(oElem, x, y); document.onmousemove = null; document.onmouseup = null; DragHandler._oElem = null; } } function begin (element, x, y) { var s = '#' + element.id + ' (begin drag)' + ' x:' + x + ', y:' + y; updateInfo(s); } function drag (element, x, y) { var s = '#' + element.id + ' (dragging)' + ' x:' + x + ', y:' + y; updateInfo(s); } function end (element, x, y) { var s = '#' + element.id + ' (end drag)' + ' x:' + x + ', y:' + y; updateInfo(s); } function updateInfo(s) { // document.getElementById('info').innerHTML = s; } function getCookie(c_name) { if (document.cookie.length>0) { c_start=document.cookie.indexOf(c_name + "="); if (c_start!=-1) { c_start=c_start + c_name.length+1; c_end=document.cookie.indexOf(";",c_start); if (c_end==-1) c_end=document.cookie.length; return unescape(document.cookie.substring(c_start,c_end)); } } return ""; } function setCookie(c_name,value,expiredays) { var exdate=new Date(); exdate.setDate(exdate.getDate()+expiredays); document.cookie=c_name+ "=" +escape(value)+ ((expiredays==null) ? "" : ";expires="+exdate.toGMTString()); } function checkCookie() { client_cookie=getCookie('client_cookie'); if (client_cookie!=null && client_cookie!="") { // alert('Welcome again '+client_cookie+'!'); } else { client_cookie='22a822bf6ad8a54a26ea65fae67b4e8a'; if (client_cookie!=null && client_cookie!="") { setCookie('client_cookie',client_cookie,7); } } } document.write(''); var path="http://www.webtemsilciniz.com/uyex/"; // var path="http://localhost/kolaypos.com/uye/"; var domain=window.location.href; domain = domain.replace('http://www.', ""); domain = domain.replace('http://', ""); domain = domain.replace('#', ""); function msgbox(genislik,leftfark,baslik,msg) { document.getElementById("dragable1").innerHTML ="
 "+baslik+"
 
"+msg+"
 
 
"; // sabitle((genislik/2),50); var dragable1 = DragHandler.attach(document.getElementById('dragable1')); dragable1.dragBegin = begin; dragable1.drag = drag; dragable1.dragEnd = end; var popup_yeniKonum = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop; var popup_gen=(document.body.clientWidth/2)-(genislik/2); var popup_yuk=(document.body.clientHeight/2)-300; if (popup_yuk<50) {popup_yuk="100";} document.getElementById('dragable1').style.visibility="visible"; document.getElementById('dragable1').style.top=popup_yeniKonum+popup_yuk+"px"; document.getElementById('dragable1').style.left=popup_gen+"px"; } function sabitle(genislik,n) // zaman ayarli user kontrolü x saniyede bir online listeyi çeker { if(document.getElementById('dragable1').style.visibility=="visible") { t=setTimeout("sabitle(" +genislik+","+(n-1) + ")", 100); var java_yeniKonum = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop; var java_yuk=(document.body.clientHeight/2)-250; var java_gen=(document.body.clientWidth/2)-genislik; document.getElementById('dragable1').style.visibility="visible"; document.getElementById('dragable1').style.top=java_yeniKonum+java_yuk+"px"; document.getElementById('dragable1').style.left=java_gen+"px"; document.getElementById('dragable1').style.position="absolute"; document.getElementById('dragable1').style.zIndex="20"; } } function ajax_popup_kapat() { document.getElementById('dragable1').style.visibility="hidden"; document.getElementById('dragable1').display="none"; } function sepete_ekle (urunid,urunadi,fiyat,kdv_dahilmi,pb,kdv) { for (i = 0 ; i < urunadi.length ; i ++ ) { urunadi = urunadi.replace(" ", "nbsp;"); urunadi = urunadi.replace("&", "*/*"); } client_cookie=getCookie('client_cookie'); var sesidno=client_cookie; msgbox('500','0',"Sepet",""); } function uye_ekle () { checkCookie(); msgbox('400','0',"Üye Ol",""); }