1/* Beauty Contact Popup form */ 2 3var TagPopup_Form=null; 4 5function TagPopup_OpenForm(TagPopup_FormContainer_Id,TagPopup_FormContainerBody_Id,TagPopup_FormContainerFooter_Id) 6{ 7 var bgdiv = document.getElementById(TagPopup_FormContainerFooter_Id); 8 bgdiv.style.display="block"; 9 10 var formdiv = document.getElementById(TagPopup_FormContainer_Id); 11 formdiv.style.display="block"; 12 13 var pt = window.center({width:390,height:350}); 14 15 formdiv.style.top = pt.y + "px"; 16 formdiv.style.left = pt.x + "px"; 17 18 formdiv.handlerobj = new TagPopup_Move(formdiv); 19 20 var containerdiv = document.getElementById(TagPopup_FormContainerBody_Id); 21 if(containerdiv && containerdiv.SavedInnerHTML) 22 { 23 containerdiv.innerHTML = containerdiv.SavedInnerHTML; 24 } 25 26} 27 28function TagPopup_HideForm(TagPopup_FormContainer_Id,TagPopup_FormContainerFooter_Id) 29{ 30 var formdiv = document.getElementById(TagPopup_FormContainer_Id); 31 formdiv.style.display="none"; 32 33 var bgdiv = document.getElementById(TagPopup_FormContainerFooter_Id); 34 bgdiv.style.display="none"; 35} 36 37function TagPopup_Move(div_obj) 38{ 39 var _div_obj = div_obj; 40 //div_obj.handlerobj = this; 41 42 var downposX = 0; 43 var downposY = 0; 44 var dragging = false; 45 46 this.isIE = false; 47 this.isNS = false; 48 49 this.Init = function() 50 { 51 if (navigator.userAgent.indexOf("MSIE") >= 0 || 52 navigator.userAgent.indexOf("Opera") >= 0) 53 { 54 this.isIE = true; 55 } 56 else 57 { 58 this.isNS = true; 59 } 60 } 61 62 _div_obj.onmousedown = function(event) 63 { 64 var x=0; 65 var y=0; 66 67 _this = this.handlerobj; 68 69 if (_this.isIE) 70 { 71 x = window.event.clientX + 72 document.documentElement.scrollLeft + 73 document.body.scrollLeft; 74 75 y = window.event.clientY + 76 document.documentElement.scrollTop + 77 document.body.scrollTop; 78 } 79 else 80 { 81 x = event.clientX + window.scrollX; 82 y = event.clientY + window.scrollY; 83 } 84 85 var top = parseInt(this.style.top, 10); 86 87 var client_y = y - top; 88 if(!(client_y>0 && client_y<30)) 89 { 90 return; 91 } 92 93 _this.cursorStartX = x; 94 _this.cursorStartY = y; 95 _this.divStartX = parseInt(this.style.left, 10); 96 _this.divStartY = top; 97 98 if (this.handlerobj.isIE) 99 { 100 document.attachEvent("onmousemove", _this.onmousemove); 101 document.attachEvent("onmouseup", _this.onmouseup); 102 window.event.cancelBubble = true; 103 window.event.returnValue = false; 104 } 105 else 106 { 107 document.addEventListener("mousemove", _this.onmousemove, true); 108 document.addEventListener("mouseup", _this.onmouseup, true); 109 event.preventDefault(); 110 } 111 112 TagPopup_Form = _this; 113 _this._div_obj = this; 114 115 } 116 117 this.onmousemove = function(event) 118 { 119 _this = TagPopup_Form; 120 121 var x = 0; 122 var y = 0; 123 124 125 if (_this.isIE) 126 { 127 x = window.event.clientX + document.documentElement.scrollLeft 128 + document.body.scrollLeft; 129 y = window.event.clientY + document.documentElement.scrollTop 130 + document.body.scrollTop; 131 } 132 else 133 { 134 x = event.clientX + window.scrollX; 135 y = event.clientY + window.scrollY; 136 } 137 138 _this._div_obj.style.left = (_this.divStartX + x - _this.cursorStartX) + "px"; 139 _this._div_obj.style.top = (_this.divStartY + y - _this.cursorStartY) + "px"; 140 141 if (_this.isIE) 142 { 143 window.event.cancelBubble = true; 144 window.event.returnValue = false; 145 } 146 else 147 { 148 event.preventDefault(); 149 } 150 } 151 152 this.onmouseup = function() 153 { 154 _this = TagPopup_Form; 155 if (_this.isIE) 156 { 157 document.detachEvent("onmousemove", _this.onmousemove); 158 document.detachEvent("onmouseup", _this.onmouseup); 159 } 160 else 161 { 162 document.removeEventListener("mousemove", _this.onmousemove, true); 163 document.removeEventListener("mouseup", _this.onmouseup, true); 164 } 165 TagPopup_Form = null; 166 167 } 168 169 this.Init(); 170} 171 172window.size = function() 173{ 174 var w = 0; 175 var h = 0; 176 177 if(!window.innerWidth) 178 { 179 if(!(document.documentElement.clientWidth == 0)) 180 { 181 w = document.documentElement.clientWidth; 182 h = document.documentElement.clientHeight; 183 } 184 else 185 { 186 w = document.body.clientWidth; 187 h = document.body.clientHeight; 188 } 189 } 190 else 191 { 192 w = window.innerWidth; 193 h = window.innerHeight; 194 } 195 return {width:w,height:h}; 196} 197 198window.center = function() 199{ 200 var hWnd = (arguments[0] != null) ? arguments[0] : {width:0,height:0}; 201 202 var _x = 0; 203 var _y = 0; 204 var offsetX = 0; 205 var offsetY = 0; 206 207 if(!window.pageYOffset) 208 {
209 if(!(document.documentElement.scrollTop == 0)) 210 { 211 offsetY = document.documentElement.scrollTop; 212 offsetX = document.documentElement.scrollLeft; 213 } 214 else 215 { 216 offsetY = document.body.scrollTop; 217 offsetX = document.body.scrollLeft; 218 } 219 } 220 else 221 { 222 offsetX = window.pageXOffset; 223 offsetY = window.pageYOffset; 224 } 225 226 _x = ((this.size().width-hWnd.width)/2)+offsetX; 227 _y = ((this.size().height-hWnd.height)/2)+offsetY; 228 229 return{x:_x,y:_y}; 230}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.