| 269 | | <script type="text/javascript"> |
| | 269 | <script type="text/javascript"> |
| | 270 | (function() |
| | 271 | { |
| | 272 | var d = document.domain ; |
| | 273 | |
| | 274 | while ( true ) |
| | 275 | { |
| | 276 | // Test if we can access a parent property. |
| | 277 | try |
| | 278 | { |
| | 279 | var test = window.top.opener.document.domain ; |
| | 280 | break ; |
| | 281 | } |
| | 282 | catch( e ) {} |
| | 283 | |
| | 284 | // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... |
| | 285 | d = d.replace( /.*?(?:\.|$)/, '' ) ; |
| | 286 | |
| | 287 | if ( d.length == 0 ) |
| | 288 | break ; // It was not able to detect the domain. |
| | 289 | |
| | 290 | try |
| | 291 | { |
| | 292 | document.domain = d ; |
| | 293 | } |
| | 294 | catch (e) |
| | 295 | { |
| | 296 | break ; |
| | 297 | } |
| | 298 | } |
| | 299 | })() ; |
| | 300 | |