brand2csv 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,12 @@
1
+ * Work on 2013.06.02
2
+
3
+ * Checked mechanize source code. Code for posting the request seems okay
4
+ * Before sending an email to the mechanize mailing list, I decided to make a
5
+ ** simple example for the search (see swissreg.rb)
6
+ ** this simple example gives correct results
7
+ ** Differences are in how the session is setup. I don't see the exact reason however
8
+ * Adapted lib/brand2csv.rb accordingly
9
+
1
10
  * Work on 2013.05.27
2
11
 
3
12
  * Should be able to fetch up to 10'000 hits.
@@ -0,0 +1,29 @@
1
+ #encoding : utf-8
2
+ require 'rspec'
3
+ require 'pp'
4
+ require 'tempfile'
5
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib/','brand2csv.rb'))
6
+
7
+ include Brand2csv
8
+
9
+ describe 'Csv' do
10
+ before :each do
11
+ dataDir = File.expand_path(File.join(File.dirname(__FILE__), 'data'))
12
+ session = Swissreg.new("01.01.1990", 'Branding')
13
+ filename = "#{dataDir}/vereinfachte_detail_33.html"
14
+ File.exists?(filename).should be_true
15
+ doc = Nokogiri::Slop(File.open(filename))
16
+ @marke = Swissreg::getMarkenInfoFromDetail(doc)
17
+ end
18
+
19
+ it "must be able to create a correct csv file" do
20
+ results = [@marke]
21
+ file = Tempfile.new('foo')
22
+ Swissreg::emitCsv(results, file.path)
23
+ inhalte = IO.readlines(file.path)
24
+ inhalte[0].chomp.should == 'name;markennummer;inhaber;land;hinterlegungsdatum;zeile_1;zeile_2;zeile_3;zeile_4;zeile_5;plz;ort'
25
+ inhalte[1].chomp.should == 'https://www.swissreg.ch/srclient/images/loadImage?Action=LoadImg&ItemType=tm&ImageType=print&ImageHash=F431E13A9D8F363BD06604796634142A18A5BA7C.jpeg;00135/2013;Peter Löcker Bauart, Trollstrasse 20, 8400 Winterthur;Schweiz;13.03.2013;Peter Löcker Bauart;Trollstrasse 20;;;;8400;Winterthur'
26
+ inhalte[2].should == nil
27
+ end
28
+
29
+ end
@@ -0,0 +1,434 @@
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
14
+ <html xmlns="http://www.w3.org/1999/xhtml" lang="de">
15
+
16
+ <head>
17
+ <title>Swissreg - Eidg. Institut für Geistiges Eigentum</title>
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
26
+ <meta http-equiv="cache-control" content="private,no-cache,no-store"/>
27
+ <meta http-equiv="language" content="de, fr, it, en" />
28
+ <meta name="keywords" content="Recherchen, Datenbankrecherche, Patentinformation, Patentrecherche, Patent, Patentamt, IGE, Eidgen�ssisches Institut f�r Geistiges Eigentum, Infocenter, Patentsammlung, Patentdokument, Register, Schutzrecht, Patentgesetz, Patentverordnung, Markengesetz, Haager Abkommen, Erfindungen, Erfinder, Marktanalyse, Informationsvermittlung, unlauterer Wettbewerb, Erfindungspatent, Herkunftsbezeichnungen, SHAB, PMMBl, Handelsamtsblatt, Markenschutz, Marke, Namen, domain, domainnamen, Markenanmeldung, Urheberrecht, Suisa, Pro Literis, SSA, SMCC, Suissimage, Verwertungsgesellschaften, Topographien, Immaterialgüterrecht, espacenet, Gratisdatenbank, Design, Designschutz, Muster und Raubkopien, Geschmacksmuster, Gebrauchsmuster, ESZ, Schutzzertifikate"/>
29
+ <meta name="description" content="Schweizer Patentamt, Patente, Marken, Design, ESZ, Urheberrecht, Recherchen, Topographie, Datenbanken"/>
30
+ <meta name="abstract" content=" Datenbankrecherchen, Patentrecherchen, Markenschutz, Markenrecherchen, Design, Muster Modelle, Designrecherche, Urheberrecht"/>
31
+ <meta name="robots" content="noindex" />
32
+ <meta name="robots" content="nofollow" />
33
+ <meta name="publisher" content="Eidg. Institut f&uuml;r Geistiges Eigentum"/>
34
+ <link rel="shortcut icon" href='/srclient/img/favicon.ico'/>
35
+ <link rel="stylesheet" type="text/css" href='/srclient/css/base.css' media="screen" />
36
+ <link rel="stylesheet" type="text/css" href='/srclient/css/print.css' media="print" />
37
+ <script type="text/javascript" src='/srclient/js/sr2.js'></script>
38
+
39
+
40
+ </head>
41
+ <body onload=";setFocus();">
42
+ <form id="id_swissreg" name="id_swissreg" method="post" action="/srclient/faces/jsp/trademark/sr1.jsp" enctype="application/x-www-form-urlencoded">
43
+
44
+ <div id="base">
45
+
46
+
47
+
48
+
49
+ <div id="header"><table class="wMax"><tbody><tr><td class="textLeft"><span class="textLeft">
50
+ <a name="anchor_home" id="anchor_home"></a>
51
+ <a id="id_swissreg:sub_language:link_home" name="id_swissreg:sub_language:link_home" href="http://www.ige.ch/de.html" accesskey="0" target="_blank"><img id="id_swissreg:sub_language:logswissreg" src="/srclient/img/ige_logo_86.png" alt="Logo IPI" /></a></span></td><td class="center"><span id="id_swissreg:sub_language:breadcrum" class="breadcrum"><a id="id_swissreg:sub_language:breadcrum_link" name="id_swissreg:sub_language:breadcrum_link" href="http://www.ige.ch/de.html" target="_blank">ige.ch</a> &gt; elektronische Schutzrechtdatenbank</span></td><td class="right"><div id="language"><div id="header_app_name">swissreg</div>
52
+
53
+ <script type="text/javascript"><!--
54
+
55
+
56
+ function oamSetHiddenInput(formname, name, value)
57
+ {
58
+ var form = document.forms[formname];
59
+ if(typeof form.elements[name]=='undefined')
60
+ {
61
+ var newInput = document.createElement('input');
62
+ newInput.setAttribute('type','hidden');
63
+ newInput.setAttribute('name',name);
64
+ newInput.setAttribute('value',value);
65
+ form.appendChild(newInput);
66
+ }
67
+ else
68
+ {
69
+ form.elements[name].value=value;
70
+ }
71
+
72
+ }
73
+
74
+
75
+ function oamClearHiddenInput(formname, name, value)
76
+ {
77
+ var form = document.forms[formname];
78
+ if(typeof form.elements[name]!='undefined')
79
+ {
80
+ form.elements[name].value=null;
81
+ }
82
+
83
+ }
84
+
85
+ function oamSubmitForm(formName, linkId, target, params)
86
+ {
87
+
88
+ var clearFn = 'clearFormHiddenParams_'+formName.replace(/-/g, '\$:').replace(/:/g,'_');
89
+ if(typeof eval('window.'+clearFn)!='undefined')
90
+ {
91
+ eval('window.'+clearFn+'(formName)');
92
+ }
93
+
94
+ if(typeof window.getScrolling!='undefined')
95
+ {
96
+ oamSetHiddenInput(formName,'autoScroll',getScrolling());
97
+ }
98
+
99
+ var oldTarget = '';
100
+ if((typeof target!='undefined') && target != null)
101
+ {
102
+ oldTarget=document.forms[formName].target;
103
+ document.forms[formName].target=target;
104
+ }
105
+ if((typeof params!='undefined') && params != null)
106
+ {
107
+ for(var i=0; i<params.length; i++)
108
+ {
109
+ oamSetHiddenInput(formName,params[i][0], params[i][1]);
110
+ }
111
+
112
+ }
113
+
114
+ oamSetHiddenInput(formName,formName +':'+'_idcl',linkId);
115
+
116
+ if(document.forms[formName].onsubmit)
117
+ {
118
+ var result=document.forms[formName].onsubmit();
119
+ if((typeof result=='undefined')||result)
120
+ {
121
+ document.forms[formName].submit();
122
+ }
123
+
124
+ }
125
+ else
126
+ {
127
+ document.forms[formName].submit();
128
+ }
129
+ if(oldTarget==null) oldTarget='';
130
+ document.forms[formName].target=oldTarget;
131
+ if((typeof params!='undefined') && params != null)
132
+ {
133
+ for(var i=0; i<params.length; i++)
134
+ {
135
+ oamClearHiddenInput(formName,params[i][0], params[i][1]);
136
+ }
137
+
138
+ }
139
+
140
+ oamClearHiddenInput(formName,formName +':'+'_idcl',linkId);return false;
141
+ }
142
+
143
+
144
+ //--></script><a href="#" onclick="return oamSubmitForm('id_swissreg','id_swissreg:sub_language:languageList:0:_idJsp15');" id="id_swissreg:sub_language:languageList:0:_idJsp15"><strong>de</strong></a>
145
+ <input type="hidden" name="autoScroll" />
146
+ <span id="id_swissreg:sub_language:languageList:0:nbsp_0">&nbsp;|</span>
147
+ <a href="#" onclick="return oamSubmitForm('id_swissreg','id_swissreg:sub_language:languageList:1:_idJsp15');" id="id_swissreg:sub_language:languageList:1:_idJsp15">fr</a><span id="id_swissreg:sub_language:languageList:1:nbsp_0">&nbsp;|</span>
148
+ <a href="#" onclick="return oamSubmitForm('id_swissreg','id_swissreg:sub_language:languageList:2:_idJsp15');" id="id_swissreg:sub_language:languageList:2:_idJsp15">it</a><span id="id_swissreg:sub_language:languageList:2:nbsp_0">&nbsp;|</span>
149
+ <a href="#" onclick="return oamSubmitForm('id_swissreg','id_swissreg:sub_language:languageList:3:_idJsp15');" id="id_swissreg:sub_language:languageList:3:_idJsp15">en</a>
150
+ </div></td></tr>
151
+ </tbody></table></div>
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+ <div id="navigation"><a href="#" onclick="return oamSubmitForm('id_swissreg','id_swissreg:sub_header:link_header_home');" id="id_swissreg:sub_header:link_header_home" accesskey="0" title="zur Startseite">Home</a>&nbsp;|&nbsp;<a id="id_swissreg:sub_header:link_header_ige" name="id_swissreg:sub_header:link_header_ige" href="http://www.ige.ch/de.html" target="ipi">ige.ch</a>&nbsp;|&nbsp;</div>
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+ <table border="0" cellpadding="0" cellspacing="0">
183
+ <tr>
184
+ <td>
185
+
186
+ <div id="subnavigation_outer">
187
+ <h1>Marken</h1>
188
+
189
+ <div id="subnavigation"><div class="left">
190
+ <ul>
191
+ <li class="selected"><a href="#" onclick="return oamSubmitForm('id_swissreg','id_swissreg_sub_nav_ipiNavigation_item0');" id="id_swissreg_sub_nav_ipiNavigation_item0" class="selected"><span id="id_swissreg_sub_nav_ipiNavigation_txt0">Marken</span></a><ul>
192
+ <li class="selected"><a href="#" onclick="return oamSubmitForm('id_swissreg','id_swissreg_sub_nav_ipiNavigation_item0_item1');" id="id_swissreg_sub_nav_ipiNavigation_item0_item1" class="selected"><span id="id_swissreg_sub_nav_ipiNavigation_item0_txt1">» Suche Register</span></a></li>
193
+ <li><a href="#" onclick="return oamSubmitForm('id_swissreg','id_swissreg_sub_nav_ipiNavigation_item0_item2');" id="id_swissreg_sub_nav_ipiNavigation_item0_item2"><span id="id_swissreg_sub_nav_ipiNavigation_item0_txt2">» Suche Publikation</span></a></li>
194
+ <li><a href="#" onclick="return oamSubmitForm('id_swissreg','id_swissreg_sub_nav_ipiNavigation_item0_item3');" id="id_swissreg_sub_nav_ipiNavigation_item0_item3"><span id="id_swissreg_sub_nav_ipiNavigation_item0_txt3">» Erweiterte Suche</span></a></li>
195
+ <li><a href="#" onclick="return oamSubmitForm('id_swissreg','id_swissreg_sub_nav_ipiNavigation_item0_item4');" id="id_swissreg_sub_nav_ipiNavigation_item0_item4"><span id="id_swissreg_sub_nav_ipiNavigation_item0_txt4">» Standard Suchen</span></a></li></ul></li>
196
+ <li><a href="#" onclick="return oamSubmitForm('id_swissreg','id_swissreg_sub_nav_ipiNavigation_item5');" id="id_swissreg_sub_nav_ipiNavigation_item5"><span id="id_swissreg_sub_nav_ipiNavigation_txt5">Patente</span></a><ul></ul></li>
197
+ <li><a href="#" onclick="return oamSubmitForm('id_swissreg','id_swissreg_sub_nav_ipiNavigation_item10');" id="id_swissreg_sub_nav_ipiNavigation_item10"><span id="id_swissreg_sub_nav_ipiNavigation_txt10">ESZ</span></a><ul></ul></li>
198
+ <li><a href="#" onclick="return oamSubmitForm('id_swissreg','id_swissreg_sub_nav_ipiNavigation_item15');" id="id_swissreg_sub_nav_ipiNavigation_item15"><span id="id_swissreg_sub_nav_ipiNavigation_txt15">Design</span></a><ul></ul></li>
199
+ <li><a href="https://www.ige.ch/index.php?id=486&amp;L=0" target="_blank"><span id="id_swissreg_sub_nav_ipiNavigation_txt20">Topographien</span></a></li>
200
+ <li><a href="http://www.ige.ch/de/news-archiv/news.html" target="_blank"><span id="id_swissreg_sub_nav_ipiNavigation_txt21">News</span></a></li>
201
+ </ul></div>
202
+ <ul class="mypage">
203
+ <li class="selected"><a href="#" onclick="return oamSubmitForm('id_swissreg','id_swissreg_sub_nav_ipiMypNavigation_item0');" id="id_swissreg_sub_nav_ipiMypNavigation_item0" class="selected"><span id="id_swissreg_sub_nav_ipiMypNavigation_txt0">mypage</span></a><ul class="mypage">
204
+ <li><a href="#" onclick="return oamSubmitForm('id_swissreg','id_swissreg_sub_nav_ipiMypNavigation_item0_item1');" id="id_swissreg_sub_nav_ipiMypNavigation_item0_item1"><span id="id_swissreg_sub_nav_ipiMypNavigation_item0_txt1">» Anmelden</span></a></li></ul></li>
205
+ </ul></div>
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+ </div>
220
+ </td>
221
+ <td>
222
+
223
+ <div id="content_outer">
224
+ <span></span><!-- work around for iexplorer -->
225
+
226
+
227
+ <h1>Suche Register<span class="info">Was Sie über <a id="id_swissreg:sub_title:_idJsp38" href="https://www.swissreg.ch/help/de/trademark/sr1000.shtm#anchor_simple" target="_blank" style="cursor:help;"><strong>diese Suche</strong></a> wissen sollten.</span></h1>
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+ <div id="content">
247
+
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+ <fieldset><legend>Suchkriterien</legend><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="w200 formular">Marken Nr.</td><td class="w300"><input id="id_swissreg:mainContent:id_txf_tm_no" name="id_swissreg:mainContent:id_txf_tm_no" type="text" value="" class="autoFocus" /><a id="id_swissreg:mainContent:_idJsp50" href="https://www.swissreg.ch/help/de/trademark/sr3000.shtm#tm_no" target="_blank" style="cursor:help;"><img id="id_swissreg:mainContent:_idJsp50" src="/srclient/img/icon_help.png" title="Hilfe und Beispiele aufrufen" width="20" height="20" /></a></td><td class="w100 example">&nbsp;</td></tr>
275
+ <tr><td class="w200 formular">Gesuch Nr.</td><td class="w300"><input id="id_swissreg:mainContent:id_txf_app_no" name="id_swissreg:mainContent:id_txf_app_no" type="text" value="" /><a id="id_swissreg:mainContent:_idJsp56" href="https://www.swissreg.ch/help/de/trademark/sr3000.shtm#app_no" target="_blank" style="cursor:help;"><img id="id_swissreg:mainContent:_idJsp56" src="/srclient/img/icon_help.png" title="Hilfe und Beispiele aufrufen" width="20" height="20" /></a></td><td class="w100 example">&nbsp;</td></tr>
276
+ <tr><td class="w200 formular">Wortlaut der Marke</td><td class="w300"><input id="id_swissreg:mainContent:id_txf_tm_text" name="id_swissreg:mainContent:id_txf_tm_text" type="text" value="" /><a id="id_swissreg:mainContent:_idJsp62" href="https://www.swissreg.ch/help/de/trademark/sr3000.shtm#tm_text" target="_blank" style="cursor:help;"><img id="id_swissreg:mainContent:_idJsp62" src="/srclient/img/icon_help.png" title="Hilfe und Beispiele aufrufen" width="20" height="20" /></a></td><td class="w100 example">&nbsp;</td></tr>
277
+ <tr><td class="w200 formular">Inhaber/in</td><td class="w300"><input id="id_swissreg:mainContent:id_txf_applicant" name="id_swissreg:mainContent:id_txf_applicant" type="text" value="" /><a id="id_swissreg:mainContent:_idJsp68" href="https://www.swissreg.ch/help/de/trademark/sr3000.shtm#applicant" target="_blank" style="cursor:help;"><img id="id_swissreg:mainContent:_idJsp68" src="/srclient/img/icon_help.png" title="Hilfe und Beispiele aufrufen" width="20" height="20" /></a></td><td class="w100 example">&nbsp;</td></tr>
278
+ </tbody></table></fieldset><fieldset><legend>Darstellung Trefferliste</legend><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="w200 formular">Leere Trefferliste anzeigen</td><td class="w300"><input type="checkbox" name="id_swissreg:mainContent:empty_hits:_idJsp154" value="true" /><a id="id_swissreg:mainContent:empty_hits:_idJsp155" href="https://www.swissreg.ch/help/de/trademark/sr3000.shtm#empty_hits" target="_blank" style="cursor:help;"><img id="id_swissreg:mainContent:empty_hits:_idJsp155" src="/srclient/img/icon_help.png" title="Hilfe und Beispiele aufrufen" width="20" height="20" /></a></td><td class="w100 example">&nbsp;</td></tr>
279
+ </tbody></table></fieldset><fieldset><legend>Senden</legend><table><tbody><tr><td><input id="id_swissreg:mainContent:sub_fieldset:id_submit" name="id_swissreg:mainContent:sub_fieldset:id_submit" type="submit" value="suchen" onclick="if(typeof window.clearFormHiddenParams_id_swissreg!='undefined'){clearFormHiddenParams_id_swissreg('id_swissreg');}if(typeof window.getScrolling!='undefined'){oamSetHiddenInput('id_swissreg','autoScroll',getScrolling());}" onmousedown="cursorProgress('id_swissreg:mainContent:sub_fieldset:id_submit'); return false;" class="send" />&nbsp;&nbsp;<input id="id_swissreg:mainContent:sub_fieldset:id_reset" name="id_swissreg:mainContent:sub_fieldset:id_reset" type="submit" value="zurücksetzen" onclick="if(typeof window.clearFormHiddenParams_id_swissreg!='undefined'){clearFormHiddenParams_id_swissreg('id_swissreg');}if(typeof window.getScrolling!='undefined'){oamSetHiddenInput('id_swissreg','autoScroll',getScrolling());}" onmousedown="cursorProgress('id_swissreg:mainContent:sub_fieldset:id_reset'); return false;" class="send" /></td></tr>
280
+ </tbody></table></fieldset>
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+ </div>
360
+ </div>
361
+ </td>
362
+ </tr>
363
+ </table>
364
+
365
+
366
+
367
+ <div id="footer"><a id="id_swissreg:sub_footer:link_footer_top_of_page" name="id_swissreg:sub_footer:link_footer_top_of_page" href="#anchor_home" title="Seitenanfang">Seitenanfang</a>&nbsp;|&nbsp;<a id="id_swissreg:sub_footer:link_footer_help" name="id_swissreg:sub_footer:link_footer_help" href="https://www.swissreg.ch/help/de/sr2000.shtm" accesskey="6" target="_blank" title="Hilfe">Hilfe</a>&nbsp;|&nbsp;<a id="id_swissreg:sub_footer:link_footer_contact" name="id_swissreg:sub_footer:link_footer_contact" href="mailto:contactcenter@ipi.ch" accesskey="3" title="Kontakt">Kontakt</a>&nbsp;|&nbsp;<a href="#" onclick="return oamSubmitForm('id_swissreg','id_swissreg:sub_footer:link_footer_impressum');" id="id_swissreg:sub_footer:link_footer_impressum" title="Impressum">Impressum</a>&nbsp;|&nbsp;</div>
368
+
369
+
370
+
371
+
372
+
373
+
374
+
375
+
376
+
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+ </div>
386
+
387
+ <div id="session"></div>
388
+
389
+ <input type="hidden" name="id_swissreg_SUBMIT" value="1" /><input type="hidden" name="id_swissreg:_idcl" /><input type="hidden" name="id_swissreg:_link_hidden_" /><script type="text/javascript"><!--
390
+
391
+ function clear_id_5Fswissreg()
392
+ {
393
+ clearFormHiddenParams_id_swissreg('id_swissreg');
394
+ }
395
+
396
+ function clearFormHiddenParams_id_swissreg(currFormName)
397
+ {
398
+ var f = document.forms['id_swissreg'];
399
+ f.elements['id_swissreg:_idcl'].value='';
400
+ f.elements['id_swissreg:_link_hidden_'].value='';
401
+ f.target='';
402
+ }
403
+
404
+ clearFormHiddenParams_id_swissreg();
405
+ //--></script><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="rO0ABXVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAAN0AAEycHQAFi9qc3AvdHJhZGVtYXJrL3NyMS5qc3A=" /></form>
406
+ <!-- MYFACES JAVASCRIPT -->
407
+
408
+ <script type="text/javascript"><!--
409
+
410
+ function getScrolling()
411
+ {
412
+ var x = 0; var y = 0;if (self.pageXOffset || self.pageYOffset)
413
+ {
414
+ x = self.pageXOffset;
415
+ y = self.pageYOffset;
416
+ }
417
+ else if ((document.documentElement && document.documentElement.scrollLeft)||(document.documentElement && document.documentElement.scrollTop))
418
+ {
419
+ x = document.documentElement.scrollLeft;
420
+ y = document.documentElement.scrollTop;
421
+ }
422
+ else if (document.body)
423
+ {
424
+ x = document.body.scrollLeft;
425
+ y = document.body.scrollTop;
426
+ }
427
+ return x + "," + y;
428
+ }
429
+
430
+ //--></script>
431
+
432
+ </body>
433
+
434
+ </html>