From: "Saved by Windows Internet Explorer 9" Subject: Scopus preview - Scopus - Document details Date: Fri, 6 Jan 2012 10:02:20 +0800 MIME-Version: 1.0 Content-Type: multipart/related; type="text/html"; boundary="----=_NextPart_000_0000_01CCCC5A.479C2480" X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18463 This is a multi-part message in MIME format. ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Location: http://www.scopus.com/record/display.url?eid=2-s2.0-33646107181&origin=inward&txGid=tbxbCgRPSejffaKEckuOTQW%3a6 =EF=BB=BF Scopus preview - = Scopus -=20 Document details
3D"SciVerse
3D"Scopus
This=20 is a preview of Scopus.
Clic= k=20 here to learn more about accessing Scopus with our=20 Integration Services. Visit also our
Scopus Info = Site
=
1 of = 1
 
3D""

Cited by since 1996

This article has been cited 34=20 timesin Scopus:
(Showing the 2 = most recent)=20
Garc=C3=ADa,=20 V., S=C3=A1nchez,=20 J.S., Mollineda,=20 R.A.
On the = effectiveness of=20 preprocessing methods when dealing with different levels of class = imbalance
(2012) Knowledge-Based = Systems
Gao,=20 M., Hong,=20 X., Chen,=20 S.
On combination of = SMOTE and=20 particle swarm optimization based radial basis function classifier for=20 imbalanced problems
(2011) = Proceedings of=20 the International Joint Conference on Neural = Networks
View details of all 34 citations

Inform me when this document is cited in=20 Scopus:
| Create=20 feed

Related documents

Find more = related=20 documents in Scopus based on:
Artificial=20 Intelligence in Medicine
Volume 37, Issue 1, = May 2006,=20 Pages = 7-18
  

ISSN: = 09333657
CODEN:=20 AIMEE
DOI: 10.1016/j.artmed.2005.03.002
PubMed ID: = 16233974
Document Type: Article
Source = Type: Journal

3D""View=20 references
3D""
View at publisher|

Learning from imbalanced data in = surveillance of=20 nosocomial infection


Cohen,=20 G.a 3D""=203D"Email, Hilario,=20 M.b ,=20 Sax,=20 H.c ,=20 Hugonnet,=20 S.c ,=20 Geissbuhler,=20 A.a3D"Correspondence

Medical=20 Informatics Service, University Hospital of Geneva, Geneva, = Switzerland
b Artificial Intelligence = Laboratory,=20 University of Geneva, Geneva, Switzerland
c Department of Internal = Medicine,=20 University Hospital of Geneva, Geneva, Switzerland


Abstract

Objective: An important problem that arises in hospitals is the = monitoring=20 and detection of nosocomial or hospital acquired infections (NIs). = This paper=20 describes a retrospective analysis of a prevalence survey of NIs done = in the=20 Geneva University Hospital. Our goal is to identify patients with one = or more=20 NIs on the basis of clinical and other data collected during the = survey.=20 Methods and material: Standard surveillance strategies are = time-consuming and=20 cannot be applied hospital-wide; alternative methods are required. In = NI=20 detection viewed as a classification task, the main difficulty resides = in the=20 significant imbalance between positive or infected (11%) and negative = (89%)=20 cases. To remedy class imbalance, we explore two distinct avenues: (1) = a new=20 resampling approach in which both oversampling of rare positives and=20 undersampling of the noninfected majority rely on synthetic cases = (prototypes)=20 generated via class-specific subclustering, and (2) a support vector = algorithm=20 in which asymmetrical margins are tuned to improve recognition of rare = positive cases. Results and conclusion: Experiments have shown both = approaches=20 to be effective for the NI detection problem. Our novel resampling = strategies=20 perform remarkably better than classical random resampling. However, = they are=20 outperformed by asymmetrical soft margin support vector machines which = attained a sensitivity rate of 92%, significantly better than the = highest=20 sensitivity (87%) obtained via prototype-based resampling. =C2=A9 = 2005.

Language of original = document

English

3D""
3D""3D""3D""

Author keywords

Data imbalance; Machine learning; Nosocomial infection; Support = vector=20 machines

Index Keywords

Engineering controlled terms: Algorithms; Data=20 acquisition; Hospitals; Patient monitoring; Random processes; = Vectors

Engineering uncontrolled terms: Data imbalance; = Nosocomial=20 infection; Support vector machines

Engineering main heading: Learning systems

EMTREE medical terms: algorithm; article; = automation;=20 epidemiological data; health care cost; health survey; hospital = infection;=20 infection rate; infection risk; information processing; information = processing=20 device; mathematical computing; medical informatics; monitoring; = patient=20 identification; priority journal; reproducibility; retrospective = study;=20 sampling; statistical significance; Switzerland; university = hospital

MeSH: Algorithms; Artificial Intelligence; Cluster = Analysis; Cross Infection; Cross-Sectional Studies; Hospitals, = University;=20 Humans; Infection Control; Models, Statistical; Population = Surveillance;=20 Retrospective Studies; ROC Curve; Switzerland
Medline is the = source for=20 the MeSH terms of this document.

3D"Correspondence=20 Cohen, G.; Medical Informatics Service, University Hospital of Geneva, = Geneva,=20 Switzerland;
=C2=A9 Copyright 2008 Elsevier B.V., All rights = reserved.=C2=A9 MEDLINE=C2=AE=20 is the source for the MeSH terms of this document.


Artificial=20 Intelligence in Medicine
Volume 37, Issue 1, = May 2006,=20 Pages = 7-18
  
1 of = 1
 

Copyright =C2=A9 2012 Elsevier B.V. All rights reserved. SciVerse=C2=AE = is a=20 registered trademark of Elsevier Properties S.A., used under license. = Scopus=C2=AE is=20 a registered trademark of Elsevier = B.V.

------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: image/gif Content-Transfer-Encoding: base64 Content-Location: http://www.scopus.com/static/images/logo_SciVerse_preview.gif R0lGODlhagBYAPeEADaaRgdnNf///5nMAMzMAKysrA+aSDKnNpTJnFSzJJuzDSSHQIKmFGy1d5rK C1GnX6e0gTKjO6W4bBidRPL480OhUix6KwpqNjOXRaiyjKHQqd7e3nm2IMDJBeTy5p7EK6O8Vlat LYW5G122IIjGCZ3AEqnDDkWHJJDJBcDGA6uuoXm8hK/XtV6ua7+/v4bCkA1tNxudRKe5CkOtLaG+ S2qaG/7+/h+BPiqNQm6zJLzdwe/v7ymjO1GNIdfr2m68FyB0LsnkzmW5G/z8/J3GIPr6+qqwl8jI yBl6O5vIFhx9PBBxODCUROTk5CGEP12THhNtMhN0OS2QQ6DAQaS6YdDQ0La2tnfAEkuwKSeKQUqq Mn/DDo6sEbTGCT6nNhZ3Ovf39/n5+erq6mKwKZ/CNunp6b6+vpG8F9jY2Pv7+9/f3/39/dfX193d 3eLi4uzs7PX19dLS0re3t+fn5+Xl5a6ursfHx/j4+Nzc3MHBwb29vby8vMPDw62tre7u7u3t7dHR 0ePj48/Pz8nJyQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAIQALAAAAABqAFgA AAj/AAkJHEiQkIA3BRJOGcBwwAwDEEN0IECRgAwLATJqzLjEiRQAIEOKHBlSipMlGzdakFGRQIcQ EA3MaDhgSsICOwToLMizp0E4N2nQfAiRQ8sUT1JmhHGDCcmnUEMyuQFDaYAnKVpyiDmzIY2bYHQK 8OlTZxorCSUMjSmi5UWlMBZEnUt3QdWUK1uK4EpTQkIrQ8SSLSj2SEIIaw3EaFuRAZSUF+TSnTx3 wYWUUBjojQGxK0MICY8IHixQbJOEKhw0FBLzTMsaSpVgoEw7KgYlSmvojSmkoQMVCZuMJiu2yM0P DX+wbdkDMo7a0KPiuLyxx26IPxp+uFlkeE+xLhKC/2hIYkJR5imjzI7OniSGKCmtV9xqYAKJhiAS uvBOWKeYhBnQxENE6G2ERHsIPoVEfC3BZAAPNGWQkBj8laaTDcc1lABEEUxEEWwbSZbgiCEtkJJu FHUQAUQJaHeTDTvxJNYGaTW0BUQxmNBYSiKS6KOJG2lGkQmcGbBFQ34VsAF/xaGmGkMDGmAURTI8 plGPPv64ERQsUUQfhAz9llAYMVqoEyDiNTQCRF5UlAJGGh2Y5ZwgLaiRBVlR5AVEI+CXUBXDiTWE kwyhYJ4BOlKUlEZR0OkoAPBp9ERFJkA0AQphAldAYGMZJJYaaTK0oQEhVCTDRhes92iWGFCXUZcE OP/YIkP5KSmYWALc9KShinlIAJwZPbcqnTioVFEHnF0a5k236rRDjaJClMOOGikx7KO4aSQkATmw iGRCOeEqQHgFENHQob4CoVGq1zraqkZAHGtpQ0ToJ+6gBRixGoEUMRBiu48CmdG2DvbGkBEJcaoT HQkJxdABECVKgLpLAbzqXQHEOyREB3gVHK7kJsEQCRxWxMW/FjsqcABcVLSiAfcNkIS9FwKo5nkU naARDClfrNEJ8/HZkIQFwCjAswVQ0RDEBnRBUQob3dDzozdslGcXHDdEBbg6oZEQcgOgUHK/Gzk1 NZ1MBOkyRJgOQEZCbOhEbnLSVqQzR2c/ilJGQFP/NAZ2DdmLYQEBMoQFRCVUtJETeTvqxEYVlQAR FkMnZINxBaj1MEQVKbDRR+094IEHDzRe0kYKVJQ1Q0neUUbDDY1NAIgBXDASAh7oFMQKcyGgEwJB CNDASBoI8ALArqJIwMseF+AGjQWATbIBWtit0RciBS/u8FCJ7kELuov0gE46APzFzxVpAVHM2xUQ RxUJmTvAFXVTBKzUIL0grk68T6Z96SDxnfEAVrWMWKAi3TLAFRhSrwLwwTAFuJkBXEORjWQhJCzQ CQsCiACRCFAAHazA6CqgPxCGJHcUqEAFiicADxwPJMFDgA8EsIIHZFAAPugfAFYwQwGwAIAgyQLk /yiyFwP0iSEJ0cNNNIS4p21EWABgoQae0kOxIKAB/AMABVoIEiz6UHTi2mAFwpg7XA3vgzqhQAtC UiyN5ElyBpjVAG5is2gZIHEE8JxGVPWALepEAy8EABr/6MXjsXB4N2zBDcX1gvFZEXziQoAjxeWB kGAAdRSBoxyJdpilcY4ieszISB7AQp18T4sCoMDwHiDJQgLAkSyowBZ9MEYBlA8ALchdEBzpgQoA oJa8QwALWlA8VYLkkCHBJEVWNwDQ3AQxmzNA5zYCFWKa0pFTFIkrARA8CgjwivtLoyM72EUKeNOX 3AynCUGiTAIw05mdjOY0NTIXHeikhNkMyTZLuP/FFK5Anbv83UheYM/yVXF7ydRI6pZpgI59ho7Q HADT5inKkLQAAZLEpR8b0M/hXfQB25SlWMRIPl+uUAAaGGcXfejLGWqgmP3jIQWA2M53QtST0gQl NTEYzhQucqTbjKJYuKc9celApUI1qhf3t0Z2KlR1DW0IPAsQ0YnqlJ4hGeQ9f3lQEHpRh5D0QUjA iCs11pKckMRVMPe3wYRmZKHujOpDb1K4AYwKj6EMgKp2aE/ycS+AaQzhCEViTx3+spQIQKc9m4rL vuYwJDzUnWEv+VQCaLJydGTiHZ2oESiaLkttzMgbvYXE0CREghQkgAU/SychaqQiRTziHAuwB/j/ FUBk86vfrzSCP9b6qIABOCBFErjAATQwD9CTHkSql7Pr+TZL5+Nb+tbHkPaZ4XUFcNgAZEc72z2X RMlbmwH8VIA6hAFaEv1kHj/33QRJoaZyHUCSCLGGOg7gcJutoEYY1972PO61mZwcZg2ClggyRDkG GIP18NZf9uwtAH0jwN8MkJ3SFsAgbPhaoWTnL42YrcG0SZu2xNu2tyXEIH5IiNKi6TQCQI23IK4N cANwNWZu7cIGGVxd1ySlBQeAZzGmDMYiTB/ZEs1CZkgIbqcXAZOhLMhRWVnLKPKymM3sxKUJBOyi KTGK/RjKc8GYxghQqfh+BcsGSUNC9MUQ1pCK/1oZwRKYQbIygkHEYANAGI4HIoAkl+tcEEnXuvY6 53dlZMwdmBcDb0KYP6B3VNMiW7XmLJJsDQyBpJUvmvmcq4Tsyjwx8BWwAuBZKIc2uMdKVtscwGgZ tSFUduWXRVBFaBAb+lUVkRV590wQAai5AKkp1KEktqiMNArMkcrIpDZWn1VrijiCgDWP2/S0Ucsp xnYyYJ4IsCcj7po45wX2kwYQpSlZxEpxjvHKuBS0B/nm2cQRAPQ0N4AbKUZiHb5Sg1cWgG0RCSJH Yl2riTO46Gm2QxWhXbq/y2/lqSjT7eN1WQSA3bqSW9YEaI6BnpvtjMiHIg4C08ES0gfSWIhc4/8Z 2aHMnfH01Dpl72FQu+1DXjmY3ELhNviBl1MRja+r1BabjsyJGJMKDyDiN+f0acS9L4gw5kOxefmj bpOb6xgAz2IqQBuSbiYIRtQhOHo6ARwDGTmrzFUZycxmOkMTZ9qhTDfXyRAKTG+wO90to16K2Ulk F6XkBbZ8+VYBAAP3uAsADEFJTI9bUuyNMOXDCZoKxjay7HbLhCZnLkBYCm9ysSCtAAtpCFFI5SuL 5F0jHQEddEzyYLzAyiUOunxDbMK1CnVeJ9ADPU3cbIAISKxfXlbKBb5wgyzgoNYYwEEWbvAFtKcE CNsa0suuThPa2wpXXO817m8S+gMfKgYsB77/VcZP/vFDvyVeKtIEjF6TmywJ+9nXvrwTT54oGcAL v6cIF+5W/v6n5ART1hIm0G0PEjMMkXnvZ3vZNyM3UXexFhMSgX4uxgD8539WcQIMsG3HEntxRBOa lhAJyHnx5ynbdxjjVm/2FwM5UHotoQA1cAKn53cnUANwhX4dkANF8iABFybwFIKdMoIy4nk3oQJg oyaHEhH5J4EpoABM2IRMqIESSGYcOAGyVV2aghPiAoTxphNgUGAFkHINgQIJcIS9xwEtFoVomIZd wAHTVx8J0DZacxNWsHkKqIVmIgBDAEGEU4SFMoYxwSFjgEdpmIYlMAZt6IZwWF16VgCDoDAi/2iH 8qcTS5cWJ9hmTPOHvacFOSACJSCIkVMCIpADWnCIHINnDZEESfIx8AeJt6cTRUAuwAYClTgAJDAC l4iJuJiLmHgAI2CAvgECV+gC3bGKrNiK/kFHKiCLHlgoP4AFt6iLuHgAWPADifiLV1gAc5CFxbiA uGIDuZcW8rOMI3MFI5AACXAA6JiO5jgCV+CLy0gEqZgQeLAG2riN8ScuYWBbN2EENIBb4viPAEkT SUADi/gnw/iD9miH9/KNAEIFZDCLAbmMDkAGVMBJN6EGRvOICQmE4rIDsEhHGSABIPAB4QiQRPAB ICABFnkTLhAu9biR23gvTfCRdERXEHCTOD65kjVZAC7QBI5IjDBpj/tjAzuABjS5k0hJRy6ABjuQ kfsTlFB5h91YBGKwAVWgh0h5BFWwAWJQBE4ZTlAZEAA7 ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: image/gif Content-Transfer-Encoding: base64 Content-Location: http://www.scopus.com/static/images/logo_Scopus_preview.gif R0lGODlhUQBQAPfQAJjMAwBjcgFicqutrK2rrICxtwBjb6ysrqurq0yXOgBkbgBib3KyHqysqgBh cAFjbr/Y26usrgJicCd9VQBicQJicv7//62rrpmkowBkcq2trf7+/rGxsf///ayqqqqsqgBkc//+ /zV7e6urra2sqgBlcY/FCt/r7UGKlDqLRwJkca/O0hFteQBlbqytqO/19qyurYOemfr6+QpqacvL y66srRRrddXV1by8vABibXy4GANjcQJibs/i5K+rq1+kLGGepgBjbY+6wEiFgRRwYmmrJa2trzGA i6mtrDCETq2tqx13WyF3ggBjcyVyfZ/EyfX19R1veqyrsApoc3Gor0WGgQBlb+Dg4f/9/l+QjVae M0ORQK2sqC14eSVzegFicyhyetDQ0ebl5oW/Ea6tq+/v7wpmdMbGxV+QigBjcWGPiaqurcHBwra2 tj2Af/Dv7XCYkKmuqihyfdzb3AFjbEWGfk+Lha+qrgRhcVOKhMDBv/z6+x1vdwhndmGQiamtrra1 uABlcyl2eRtwdwBkdAFhbQBkbKytr1GUna6srwBicix2fO7w7qqxkKisq6yuqyh4ePz//9/h4AFj dQJkbwJjbKyqrcLAwSZ0eCBveix2eXGWk7CsrMLCxOnq6urq7BdqeCp3d8jGxzB3ewBja3KXjx54 Wa2uqfr79tXV0+Xl46itqe7o6tjU0xNuYvz/+wBkbwNgb7GvsObm6Lu8wOHg3qqurw1ncM7P0Xu4 GAtocOfj5Li2uf7+/66uruHf4BFqeODe30yXO12RhcbGx6qvq7Gxr0OSQO/v8TuEfd7g362xsKys rABkcP///wFjcP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAANAALAAAAABRAFAA AAj/AKEJHEiwoEGBzhImtJCQkaQbnXAMYKaBGbOJEQjg0HPjypsOHSyE6ODsoMmTKFNCU5iwgwxJ NDgQGKABATMYFpkRiMCMDAINB5ghOMCBRrA9zhiWVMm0KUKWzsSc0WAkwgASBJitIWCz5wCuF4yM sEiAyx+rDc6IIZnQqduDUGXcaDOgQQMCRoR+HQEnSxURgAFnURNDK4wDBJRYXMOszQ0Zbd++jXuD A0WhSHwMKOXGCzAreJoZaLagGQgHLZ4J4OFklB0MLjwY+ZBVA4fHSyUzhXrFck6Lm7rYeGbgmYTS GQQ8a9ZMgIA0JRY8Wx7gmZNkGJR8vczhSmTdJ0Um/4SiZ8CFBsxGYKhiI0AzHgIU8ZhOv7796aIF ZKi0KIvdoDfpAUVu4BWU1EjKcHABAgMcgIEIUzwTgHsGUNCMAvdlSN8CKkjQTHUtOKEGAR5UZJt3 BRb0SgjOyEADTmQNYUMFGSiyQw4GBFIdBRpqKIB7zBEnQQZexMDFBRY1QIMMKSLEIio4GJGVCzE4 0cwzQXzBQ2nVSVdCjxk6N+GVlAQhgAJ9iJAIAi5YhIMMWKTI0BuAEHCACxEMMYUCBuwQwAMZZADC AhxeCeZ9qTkggQoLONBEBQu00MwgMRwy1AFtMBKnbiGEUMYyBEgRAQaa8ECBAzukkcED07HKnHOH 2v/3qmhXMleBaDuYgQYBLpjHwRsWgPcGBweMMGoUAThwZRqEYKgAc+498IChsU7nAAj6/ShdMzk0 0Qwsy1VxAAkNclBGsJJxAAOvGERR2pcGKPCAAFfCappy1dJH7wMtSDCaaAEsYIWE03ZxZ1AcQEag Sji0OUC71OYr8cTPVCDIuI8cQIvCTb3YIAZ8KPAFxSTnG6kbHtiJAA0KMcXMAR5EkMkCEjyTQck4 98ijAVUgQEJQc7SMUiJ3aQCJBBMqIF3OTNvngApTwMHgBRwMuHBB5g3gQh2GLkBv02A/M+0zC9iA QU5sCH2QD3GMEIMZ7vFQgqJhN/2qapAw44FFQTv/s8FBWSFAgBMS3PqFAiCwWnfOBlRQXDMOZAEg B0j5XdAH6NkyhKGkVaDs4jmDIMGXAUhgAxI53aC2QDl9MBzoi19pIQ8gUCJCAwMMkPCBAzXCzAUe iOAA7LGr1swDFVBwCwYHXDCC6pYLpJ1W7RFfN77NkA6CCLnrzmIIAzEjxSl1lG593V2CEMQDTZih NxcR1BIJuo18VcMgdAx/ftMKBPDlvg5QQBWQQIALnKEXf4PGBwbgg004CgT7s5sA4uUACzFHDuj5 AzOgAD5oXGAACOhCwDR0hAIUAAgsiOChdhAvCT1HORioQUZ+EazfUQRZQbJPAVjygiOosFrvwdIz /6pwEQIQowPQYEYDLhCDElzoPkxwxguAgIIVOAMCP5RYdTD4Ew4E6yoIqAPSKmYfFDijB9NhAQSw mEYqrBEI9WGBGyFAhRROBwUFQAEQIPAEOz7DhHfMI332yEcf3mcKcfDFBz5QBmiQiBld+JDN7MOC FzjjBEJAhH0gcMYTOKMAaezBJUXZAzvu8ASoPCN9EjKdHYLyj5fk5AuYUJ9mqCADMajNFXB3FTmo pjj3OYInE3ICQ5oRi1FcwXSo4AxlPsOKVGjlJafjSU0+g5WwfCUn4UiFJ6Cglo3Lg1AIEIYIeAAG A5hWAFTQIzx68gXSfGV9OPnNZxwznvi8pjPyuf9DKa4AjrWsDvdwxwYS1OADEQiN45Y2yBXU8xmi /KYr70PPO16Rn5+cDjYnOp09KkSe0xHAAxbBjA/AAAclrYEf0kAaFVSnPkK46DNY4EkfIqKZ1OwB LWP6yh0KQZpstCJAE5LCJ2T0jxBI4Q7ZiJ9nqMALBICBByZyET+M0AD4og8TLHkCCFiSqZ58ghXZ uFVnPCGmLzBlQlZg1LRSs5lCsOQrY9qDAogSpM9oAQWg6oED4C4CDfBDMzJQna+xczpHsKIU+6hV xa7Aj4ldKy2lKQRO9sCQzxCmM4TgRoA+I65S/GkA6ICf5DiBAAQgAW0u4AM1HIdeL1WE9Tias2b/ OC45BlDBA2T4lZkMAA0t7Z+kBkY82uIsXs9azjOmYAmrCKUGHkADj5aDLeJYD48PxVkJhkSvH3nB IjUYCgE0gAYgNccBX8tiyQrhnpAGAAwz8UANpMSMYUDKf7OjwAT2u18igI4IE/BvyShAiGc8izlO YEYNLtIVI1zopZICAQAmTGEGzKBuCQBAAnCmgtH4rxlWIOk5kdAJigzADDyoTnOeQYEJJyABWjCB hus2gQRMAGcLKAGPmsFCEWiGGZc4QxHBkIMfie1DE6ZPEgDAgOmkIAFLKMIPpjMDLTDgB0ugz4vp 82T/1vjG01nCDxighQs/IwkJEHACUjCdCQjD/xRAgqAdLHKAM9xAcAOIpLI+dKUkT2cLACjCdBgA ABkLegYyZoCMwVwEANwY0Sa4cIY3/IwJFJrQkX5GCma8hEIPGgCuuNIOlBUDEjDjDjcQg2IIkIfq ANM5E2YAA3Qw4SR8Wgf7fQagN2xpQZ8ZAFPe9JSfMenpNPrGGd7CM2YAAB0Qe9HMzgV9DPAAUPTK PLOQAQmQ8LAATsdCD6DwhHXA5k/b+tM/eLGfnzEGEzyj0Vkm9oyf4eIE/IDJxgbADHRQBBNoYcnH eEBhFSCIl5ELMjhAzACiQBwBtABD67YPocH8DELrQNay1jIANu3s6RSb3kzGuBacDABAp+AHOv+4 NxFME9Ih3GEEJMABQ8IAMw24YQcKcA6sAaChidPn3mxewhbi/QwiNHvjGqf0GADg3ySkQMDPMMHS Z7DkMTQ5PxLCwCMG8IEwYCEqIyiG2+jwgB38qBkRr4/Pw1zoBNC63PnOtMfnDWgdJEDGUL+3s5m9 8Qq09xnwJZcRdqEQY1iEE04oQQn6F4CMZ8jKRD/z0k1AafpMgAGV1zQD4H53AIzh3G3e/HSsPAMB OCADpKhAHpCAgDt4kSQhCINOGjCEDGAoAxFTr8QgRy8bMIMEH8TFBpTCCHOaExRXYqjuJ9acnA/h A0JpADI6wCK/sSFJVXDAaL+0/IkFoQk5sAH/AcjgCDJcwhkkgYYFOsAKZnBBCnGwAeQCWKuadf8+ xzOAAaxggEkMAXWc0ACfgH7Bgn7OgAMlQgBZ8Cci5S2pcX8ZklvOkQF8ECpKhAPOEAJY0EEj4Qnc NgIDAAbK4R4VIHAQaB8T5B7KAQdf8ROfsAHOgAVIBA0sYgFscACagQF9ICmDVQGHdYLTIQEQJABB IALA1wA+kDYhwRADAYNQAELnkQUiZQAeknsQmFwCMAhWYSwbBBIGSBB+cwNkwQwisAAgADmStBxY 9XfE0wwtoD8LsAM0Y3tTUGoHxQzQszrQAIMbgANdMQJdQAEPoADeciU5wE79cz6mIiH9Q1i2/yUA anABa9AAUoADMOg3CVQQTsgBDYAEDQAyFWBgLHYvObAAeHA+ATAazzAJQWAFDuAADzAEY/EBRGE1 MHgSCSEGmgEDx+IelaAjpUEBt4KKjvMAQfAMRaYAdfABieAIiKEKCZGJuOgMczAAI6AEPtAuP2II AnAjAWOFoEOFOUccsrhgF6AEc8AWTeEMkUADFuECNYABgvAjAaAcQcCGsBMEHxIAp9EHecAVfjUA NIAFTOgWFkADE7ETLiACHlIIIGAAePCAbchisdAMmQAHH4AA2rEyLLIpb9EBNHAAPGERWWADX5AD d3M+VNgMmIABAEkuNEAS0ugWCSF7FjECLv9AKmP0I3NDL81wjBMzhSDAjfhBCLpgB9oRFDYRBno4 Gc5wBRZhBB/0W16gLBJAASVQAZIyMhMTAIWgI8pBATcjAi6Jg4rBDN5xi00Cg2VAFxpAVQQgIxRg BfRylSQTAKGIkssRCoWBADAwAgsGCGVwiU1CEBsgA6IgFEGhASMgBWoABsejAIbQBC+VL6LhUjYg AjHgAUjIbR/ABTRQOYVpELkICAcwACXyMgMQA24QBQ6QA9xnmVMQCnZgUjYRByQAAxfAC54gEqOZ Eq3AAQiwClUBfZ+oYhMDBpaAWg2AAIcwAKIiC6nwm25xB4fgAgRwFz0hB/U4MTEAA39AAB864AIi mRXUqRsH8BOnKQWYkEP5wgwRwAXNYxHn2SRKNBFmkAOhKDEx8BMgWJ/UKQJfkIb5IgIACg0BAQA7 ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: image/gif Content-Transfer-Encoding: base64 Content-Location: http://www.scopus.com/static/images/s.gif R0lGODlhAQABAIAAAP//////zCH5BAUUAAAALAAAAAABAAEAAAICRAEAOw== ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: image/gif Content-Transfer-Encoding: base64 Content-Location: http://www.scopus.com/static/images/arrowdown_over.gif R0lGODlhEAAQALMNAFy/up7a1ari25LQzHu+vkiwrrHn4IXGxeXr6nDPx4Lc0o7l2tTp5+vr6wAA AAAAACH5BAEAAA0ALAAAAAAQABAAAAQtsMlJq704a42Y/6BHGUtpnkYlKGzLCleQzHSQDUAODNtR FIeNhEAQGo/IpDICADs= ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: image/gif Content-Transfer-Encoding: base64 Content-Location: http://www.scopus.com/static/images/email_over.gif R0lGODlhEAAQANUqAKnh25zY06Pd15bTz63l3o/Ny4jIxrnm4Lbj3sjd3cPd3LHf25bLypHHx8vj 4eXr6qzb2Mnh4Mbf3qHT0bHn4JvPzd/q6dLo5qbX1Lfo4c7l48Db2tDn5L7Z2aXOzm3MxYHb0XfU y2LEvojh1o7l2le7t0yzsDiko0GrqV+xsuvr6wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACoALAAAAAAQABAAAAZyQJVw SCwaj8jk0KKikJ7QaEb1OBBUhJF2q70SLggQQAUAmc/jMmcRCglUgnb7HQ9pIJ98QBXQ8/MfDhgi hCIDKgOHA4UiERMlkJAFQgWRkBIVJpqbBgabmwoMKKOkpaUbDSeqq6ysHR4psbKzswlKt7dBADs= ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: image/gif Content-Transfer-Encoding: base64 Content-Location: http://www.scopus.com/static/images/correspondence-address_over.gif R0lGODlhEAAQAMQfAIjh1oHb0b7Z2Y7l2pTa08Pd3Mjd3cDb2m3MxYjc043Uz5bTz+Lo6MPh39Tp 54XSzNnq6I7d1LTd2qbX1Mfk4c/i4bHn4NXn5bfo4WLEvjiko1e7t0GrqV+xskyzsOvr6yH5BAEA AB8ALAAAAAAQABAAAAVI4CeOZGme6Ag5KYkNg9WKQA3MXxQECX4RBMqsoUAgHpLUJMNsLk6MjXQq rZgKnqw2WzAdOOAw+GASaM7os8Bk6LjfbgNu3goBADs= ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: application/octet-stream Content-Transfer-Encoding: base64 Content-Location: http://sc.elsevier.com/avail?sid=33646107181&type=H&chk=0f8f58ee5685b385a0db1e741f56b9c8 R0lGODlhAQABAIAAAP//////zCH5BAUUAAAALAAAAAABAAEAAAICRAEAOw== ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: application/octet-stream Content-Transfer-Encoding: base64 Content-Location: http://sc.elsevier.com/avail?sid=33646107181&type=S&chk=cc3b7229999d1085820eddc0a12d240a R0lGODlhAQABAIAAAP//////zCH5BAUUAAAALAAAAAABAAEAAAICRAEAOw== ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: application/octet-stream Content-Transfer-Encoding: base64 Content-Location: http://sc.elsevier.com/avail?sid=33646107181&type=R&chk=58e80697ca524ae7c5bc472096e8aeeb R0lGODlhAQABAIAAAP//////zCH5BAUUAAAALAAAAAABAAEAAAICRAEAOw== ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: image/gif Content-Transfer-Encoding: base64 Content-Location: http://www.scopus.com/static/images/logo_Elsevier.gif R0lGODlhQQBHAPcAAPHx8ZKSkoGBgcbGxqSkpHBwcNfX1/Dx8aGhoaWlpYuLi5ycnI+Pj6ioqJSU lLW1tWtra5ubm5qampeXl7m5uV9fX+9qAIeHh+7u7qysrOLi4u/s4ZOTk+7x6/B0AIaGhpWVlWVl ZYqKinl5efHMp5aWlpmZmdbW1uyYM5GRkeyyZaurq5+fn9PT05iYmL29ve7cwYODg7+/v6+vr2Fh YXp6eqampvG6g9zc3ImJiZ2dnZCQkNDQ0Le3t39/f6KiotLS0qOjo3R0dI6OjtjY2PDs5Ojo6MHB wYKCgu2EC56entXV1aCgoNHR0e3SqvDw8O65eqmpqb6+vtnZ2WJiYlhYWHx8fN/f36enp29vb8vL y8rKyrCwsOzs7BsbG/GcTMPDw+7KmVtbW+bm5mhoaLS0tNra2s/Pz83NzcLCwmdnZ/FZAPGaRDU1 Nezo1ba2toiIiMjIyI2Nje7x8W5uboCAgLi4uLy8vK2trdTU1ODg4Glpae69gk1NTXJycikpKerq 6oWFhYyMjMTExHZ2dl1dXbu7u+Tk5EVFRX5+fs7OzuuNGrq6uvBuALGxsbOzs+9wAC4uLszMzLKy smxsbDw8PMnJyXd3d6qqqm1tbfF7BXFxccXFxe9jAHh4eK6uruHh4YSEhFJSUl5eXu3NoFZWVnNz c8DAwGZmZvGVOvDk1MfHx+np6TExMe/l0e/Xuu/ZveyUKfFjAFRUVE9PT+6eQnt7e+7q3u/izu3g xUFBQe+NIk5OTjg4OPDo2O/hyfHFmeyhQ+7Cje/Aiu/Glu22cUNDQ+3o2O3auiUlJe/VtfHm2/G1 ee2kTEhISEtLS+1+AT8/P+upU/CJIO+qWyEhIe6JFu7Gku3JleqgPOy0au/v6OiyXjMzM+9+Bu3Z uOzdv/CBCvF+Cu94AOuuWuuvXvDIn+yvYu/CkPGYPvDGlu7BhfCRK/Ly8vDx8Ozs2u/x7e+kU++J G+24de7gyOisTOyuXfDAj+x8AOzmz+zjyOyqWO2qXhQUFO+FF+7x5yH5BAAAAAAALAAAAABBAEcA AAj/AAEIHMhqoEEAn17I4AGmBYAGFAAY4mGgDgA9LRAI5MLkAgAtJwAooaCBRZchAzgFAYChwcAz Bg4afDIDAIiQnAB0uVLjARklEMyYCLCFi5IGERCEODWAiJgBAypQARBEhq1PGbYEQMMFwJgJEBQA eJICgK0uCD4MkgnAiEgTAuIA2MPqwRAAU04pIETBhpEqOX5MQOXgSoQEExpU8IQ3hYkyPbaEsJJB DIAMaHSUSMDiBAcAq0QQWPHmlJYgYwSOeBNZhIMIpww5AiDADA4/VngQEJMoAI4LfoiEAvCgW54j VSxpiGOiAZZJCkZlmITHwYIuLHz0ECKpjo8EEnYs/xCzJU8Cg0oEXBCS6YqMIQUSKBA0oISMNyIM DQogElSTKj1MQEUod4zSAx4n4HAEJRn8UIUCT7QjhA12mBIAEQFgwMMHaTwghzMvIBBAam354IIM HKABAAOSfFIGAzMUEMQkagRgwxB2/FABJY4oYYADy53BAgFMpAEAFyJU8dEqTSAwCCZEEICFDTtk IkAQaTwyCQESGHKHFgsIpEFEIgKAAB4KwLEDAQM4cgVejowixRFlBMCABpI4AIABewCQQBMLSMCC ABKYYMMlWBASgR0ZPKFAAD0QAEQMOzzygxVVsAAEKiYQIBAGLOEAABAmcFGHAai8QEAPZ8TAyQ50 XP9QgCEAoFGCCx8AcMUQEqgxAgMPYGFAGnhMAAAnJswwQQhZDABCClkgoccqhBQwwlojfBJDHgKJ gAkPLuBQBRAA0IHBGJcEwEMaQ6lXEwM1DCHCFi24MEYEDgDxQwkZGGICKEBUcIcjigBgZwYAYKFI DHXMsEMBD2RQAgBR8EuQEjY4EMMKCUhxng2KfMbEAHbA8cIEpyghhwKX9GAJGTKAAUcXKRxhQJ6e 3EHEAx8gkcMAOtBRAgNKTDCAH4G88ckROBhQQABxUDCAQESoIUYTXAwhSAgBmJCAADm8IIghek5i SApWaBEAAnEQMEtHCwiABCEByJCHAAvUEMAAI3z/cEYCpnywQwYXACLACiMIAAAcagwhQwYxGZHF DzwAkAkoAjCSxgVVcNECHgIEMoYGmIgBURBaTLHFDELEEYEEU+cAgREUuMRFAJMg8cAjOiQwAAQm wGGGJ02A0EMaObSABAgyUZAFADgIUQMeWAQgCgBpnCGgA3AsQFqMSOhwBhNRUPCAAFOsAgEAFNQw gA0rfDLBBYFIIAAnQNjAAAcpyAEHExxggAIsIQGWGMQHABhBAn5ACwpQ4hNyYEAATLEKTkQhDgVw mQioMIIpAEAKdEhEHn5gC1+xYAg8CIUCEPA8AFygBwjgwhKCEAQrYIEKHOiCn1oVgU4ZBANRkIMP /4Kwgjtk4AMSoETFnrECHAygDGSwwyMwIAApAIADA6BDGZogAQ7UQAvmQYAEWAGEBjhiAUC4wKNw gIMgbAIPXYiDCwjwGgJYEQAziAIAIkALnTSADAzYAgBYMIEPaEEQY5hCJjbxhAfUAAwASAEFfsAB HVgBDBcwggMsIQY0bIEJRsDBIyqAgAoQQBEhcIAJBsEBMmAABwVQABBEwIjZAIARNcACA6aQHUM0 QRGm0ILBBDADEIjABFJwgCBOMYUq6EAOBdiEDE6QCRdcIQpGKMUHFlAFUSBhFazIwQzAIIFTrKth aUAAIRjggB6AggucMAWJAICHHegCBxqQ4B7sQP8IWlXAVnfLGxYQkIMmkAEALhCAIwJwhD4IwBIi IMMTPHIGF1CgAIz4gBFWQIUFLKEMCYgCGkLxgS1wohQhkMtAPmADArwhACeIQB908IMfeAoJPwjA G8zkBxm4YAGOcA0jykAATJxCEiIYQBumpoUyvCAIFLEDCAJhBRsoAS41qCIAQlADAMhgmzt4Qa1i gAM9EIADdcCCDxbgiRpIIQKKiILcBtEABlAiD3iYhSMg0IUmnII/dtCAJ3QxCS08AAk9uMOAcoAG UFxBDomIwA4akIEzUMAKDhiSAPZAEoNcoAFbiEECZtCCO+SAC3LYwwDOMIAciCADcvBDg/wwAEL/ PEAGlDDADBQBAT0cAQlZGIIA/JCFAEyAEzx4hAOsIIhQvIEVnPCEAiqQgjckQpbDEQgCdtCFGGiA BjZwQRCugKuhCeISaIjAAkDgCUqg4geKC4QnTgCBE1SmAAyIQQFEgQUADGCFgaACFupwh1AIQhFM OIIelpeGADgABA8YAKh0IhAlBOEB+H3AKiSgALGIYAQAeAEEUJEAG9BCAVIoCxOq4IIomEIAuoCD H04BABtI4Qw5YEBMCgCAHoDhB4VYgFsCUYcE2KEBvXHLQU5ggDiUwAhCGMQOTAGCLGjgCTkwQQ6O QKIUBCAFgrgIFYLAAltUIBQteKIWjvCBMdAi/yQumJgdGFACEMSBCwJgwRkeQoEBHgQIAwCFD2oy gkfoIQoDKKAUHvECA1BAAA0wlkB2IAQDnIBQhLgiL5swRSXcQQ84+AAOIiACkRxhLSlowQq6sqJD LLkPdWjAGHhliSkEIQfEcUEFAFAIAJzioM4AMQCKugINaAUPaIAAFnAQADpo4AWfAE0W9tAEIGSg IDw+iKBlUskHXOINkkCCD7CAAVBEVgZCuMMdXiAJJtgkGQLhRLQjcAeacmAPT7AJAGA9BVD4ZNiR kIRARHWQfMuEC30Q1Ar2gAkrhAkDqGjAAiA6gio8BXTJCAkA6oAJLoWgFEpIAxWosGtMCCARfv8q gwzEYIXPsOXltywADWgQghYEYXlSQAAIWFgBWphgCQ6ApAYqsQIAECFXGDCFHcgQ7UBkYgAFsIJA LmCCMSyACH1AhCVgLpMJyEAgcTCGkvXQA0Z0oQcRmEoNhPACDpTABBB4hJh0oASHGAMBM7hCNI4g B1djoAJlUAAlrqCISGSb6wKRwQiIwIUpTKAsnxpICtIA+QzsIQVDiMMOBhABADShEEM4wxVoEIge YGIMjPDCWiTAhDxQQQ1fr8CuET9pCkgAB3kggJIz0IdA2AAArLiEDkSBawAsgAkJwMECNJAFAuzg DlZIQQJ0AIBD6OABoaBFGsigAM8wAAhdEIX/EAiOeEAQwgcv0AIjJuApJQFBAb8HgBAQYAs/AAAM LFgBHURwBAFcwgZCJANjkANioCQIBQJtUAEBwAQasBaJQAiPRHsCIQaCcAErwAgUEAPpJQoYoAcK 8AlaoAN6oAiewAA/0ACEgAYPMAGPwDcdowjrFwIZMAM8EAMBUAAsgCwyIAcAgAhwMAFrIYGXwQBW kG9wUHRG4nlD4AKTMAG68ABdUAJn0AMXMAkXkAV5kAhl8AAAQAnO8AxPAAcQEAICUAMnAgGTcEWU IAgB4BJCKBBI4AmgUAd3ZBDG9gcA4AjXczbJMAktQAWlUAMUEBIhkAhKhgoRMQNLwAOZNAFi/5AC QdAHfSKEW9AALtAHBeApbOEDEPB3E+AQESEQFUADdhABoiIKEyMTdFABDyAGfsAAgvABYyiEWgAB LBAIVWBwbLEF/eAFungQUkABXCAFPEALlWAHajEQiYAAszAAH4YAasACl9BCiBcB1RAIhXA9iAcK E8YWaTgBPvADgcAILyAKFABiEVAHR3ABGqBMPgACMTALwoZ4ZcA8SzAK5PKGMjEEb5AzOxAFYFAC PeAnriYHEEB9WKADDgABlJAJk8h1QHRQ0eNB+ngQbvEDdHAEm1AIMYAHg1AGAmECrVACYFAAeyAH BOACm3AJv8gWRrAHQlCRiEcaMbAHhuAHO/8AAloAKhhgAI02c3aQAxOgAFnQjTJ5lF4BSVTgA0wA AoSQApugEQLRAuulCxqRB1aDlFopEL93BRVnBc+TdCTCBQhAAGEBAD6QOFv5ciugBwInExPWXxog Bn2AAW/ABG9QBTEBAB+gB5kwCLtWAiVwCWt5EEugBjpAA25oEEZABYAQBfxRLpaxJwCgAQNRCodA CEbQC37QTmqgZGuZAKGACgXgCUiQANxiEIBgCLsRmQVAB2yxBOdxPQSwCQKQJIWJliGgBpuQCRxA BDCnAEzAg8NWAAtAB2qQGgVBBC7hDKlRABanBrm5BM8gCHBQAJ9AA0oAc6sQA4LUhWLAADr/AElZ AAi6BQCRIBABQAOFUGpJiJQvEAdBUANKQAB9QANIsAQy0QXkggcvgAesIASigAnV0wQKQAAn8AZd 0AYCsQlZIAZlIAFyZxA4kI8SOAqsaAsjsAKzNxBGoBGKEAEsUAJndk0NgAijUAc1QAMRMARXYAQG YAzQgwq0UAoxsACuNRBkwAsfkAlcSHuTAAGZQFWjoItXgAPWYQsNUHQAIBYzwAgC0QbO0AcOkAIh UAmWcAF9EgdkAAEBcAEjEARgEAUxwAG6oAMF4AJvyRaW2QIJcAWcIwQcIANGcARMwALVwB8DYKMC AQZGUAJEwAKtoEMcsJt+UAU0AABIUAiM/6BYogABvSkEHzAFcDAEhjA1oKBHMmEJXWADL6ADMzAE mzALpGQKlRAJqMCnlRkJRwAAZxAAZnoRdCAKL4ADOWAKPsCkBSAAlbAKcFAFiEoDVRAC4hcCBXAC IDAAYKBDA5cIZjAKDfAECSAEHlQBajADTPACUQAHl7ADeFAwGCBWUlB0IUALszEKIeADOcBSMVAD YjAKECABfTBsFSAAEJAIthACFRACGFoABeAMPzAVApEB9gcAEYUBUrADAlEDS4ABO/dTZWAAOIAJ jvAImNAArWoHEoAEdZAeANACYyAJZHAJhCAKiTAEegAAkvAMViABKUAJQlAIdLAJalABdP+QqMBp Bl7wB23QDb1QCcnwB7qQDF5QCdHgBbpQCX/QCr3QBpXQDW2ACH2gtNXwB6LQBtXQCtHQBq3QCpXQ BtGgC17bClLrBckQCZFQCV3rDJGQtL3wDH+ACgPxBDZzAjzAAy0wBXlAEUtwBktgAGjQAkRwAi3Q AjzQBE3gSRRhAC0AEmbAuCdQbYrQBEuwBERgAETAA5LwtzhABH9LBHkwBUtwAp6LBm+Sm6ibuqq7 uqzbugDwC/TQATDwCrTrCwDwDduACzBwEAcABXywAa/rCtsAC7QLC0UADkXgC7kgEPAADr4ADjCQ u/TgCzDQAblAu6+gCrd7C7egDMpwDAf/YBC+EAydUAx8wAdQ4AEH4ASdwA5uYBDuMA5OgAyNAAVz sAuQcL58oAJJ8A2dIA//IBAHIAwW8A5OIAuxcAvbwA+yoALD4LuQcAv54AHhoAzrMA7hEL4DgQsW oMEAAA6uAAAeQAoHEQwqIBC3kA0AcAPqOxDmAADU0MICoQ7XIBCN8MIAAA+dYBCuoAwAkArpIMCy IA0GAQuN4MFFAAAH4AFhcBDN4AFzIBCwAADMIMNKDABz0AkkLBCLMBCNAAwCcQwWoItJ/MOpIBBz 4A0qPBCwAAn0oArLoA3EoMQegA28CwmN8A0DwQzjcAu4sAzSEMIHgAJJEL5OsA9eDMYA/3AMjZC9 ywAFNyAQqcAGSuwEa7C8AwEDHlAO9qAC+EACdGzHBzEH1rAGwRC+NzAOKkAO54AP2yAQv7AGIRwL ZQwAXxzGHrAP5aAN0HAPAvEF8qAN0xAL8HAQRqzB8OAEofxyxbAGtXAAVTwQ+oALAgwN8TAHKGAQ t7zIFjAQB4DD6ZAKB2AN3iATRlzM3rzETTwQ+bDFAAAFsnAALOzBAAC8AEAMHpAN2pvIYWwBy2AQ rwzEWAwJ3kDPHEzP5CDC7gwA3IAC6LwBOzwMVrwN3CDAkDAN9HzDAtEBO2wQ9QAA4YzGnVALA3EL 5yAOUEAMw3AN1kACuRAOtRAG6DAM+EDgC6SgCciQC/KgDHNQC/4gDOgw09BguwJxDj4sEO5ACuLQ DLfQAcWgCfOg0tewC8PQAdOwC/ogEK7QCOcAAAEBADs= ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: text/css; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Location: http://www.scopus.com/gzip_N1616068661/bundles/AllCSS.css .btn { border-width: 1px; border-style: solid none none solid; margin: 0px; = padding: 2px 5px 5px; color: rgb(0, 0, 0); font-family: Arial, Verdana, = Helvetica, sans-serif; text-decoration: none; } .btn-B { border-width: 1px; border-style: solid none none solid; margin: 0px; = padding: 2px 5px 5px; color: rgb(0, 0, 0); font-weight: normal; = text-decoration: none; } .controlHeight { height: 5px; } .btnSq { margin: 0px; padding: 2px 5px 5px; border: 1px solid rgb(8, 90, 165); = color: rgb(0, 0, 0); font-size: smaller; font-weight: bold; = text-decoration: underline; background-color: rgb(183, 219, 244); } .preSort { border-color: rgb(0, 99, 112) currentColor rgb(0, 99, 112) rgb(0, 99, = 112); margin: 0px; padding: 2px 5px 5px; color: rgb(255, 255, 255); = font-family: Arial, Verdana, Helvetica, sans-serif; text-decoration: = underline; border-top-width: 1px; border-right-width: medium; = border-left-width: 1px; border-top-style: solid; border-right-style: = none; border-left-style: solid; background-color: rgb(0, 99, 112); } .btnNoLine { border-width: 1px; border-style: solid; border-color: rgb(255, 255, = 255) rgb(8, 90, 165) rgb(8, 90, 165) rgb(255, 255, 255); margin: 0px; = padding: 2px 5px 5px; color: rgb(0, 0, 0); font-size: smaller; = font-weight: bold; background-color: rgb(183, 219, 244); } .btnOnNoPtr { margin: 0px; padding: 2px 5px 5px; border: 1px solid rgb(8, 90, 165); = color: rgb(255, 255, 255); font-size: smaller; font-weight: bold; = text-decoration: none; background-color: rgb(8, 90, 165); } .btnOffNoPtr { border-width: 1px; border-style: solid; border-color: rgb(255, 255, = 255) rgb(8, 90, 165) rgb(8, 90, 165) rgb(255, 255, 255); margin: 0px; = padding: 2px 5px 5px; color: rgb(0, 0, 0); font-size: smaller; = font-weight: bold; text-decoration: underline; background-color: = rgb(183, 219, 244); } .btnOnNoPtrPad { margin: 0px; padding: 2px 0px 5px 5px; border: 1px solid rgb(8, 90, = 165); height: 4px; color: rgb(255, 255, 255); font-size: 10pt; = font-weight: bold; text-decoration: none; background-color: rgb(8, 90, = 165); } .btnOnOver { border-width: 1px; border-style: solid; border-color: rgb(8, 90, 165) = rgb(255, 255, 255) rgb(8, 90, 165) rgb(8, 90, 165); margin: 0px; = padding: 2px 5px 5px; color: rgb(255, 255, 255); font-size: smaller; = font-weight: bold; cursor: pointer; background-color: rgb(8, 90, 165); } .btnOver { border-width: 1px; border-style: solid; border-color: rgb(255, 255, = 255) rgb(8, 90, 165) rgb(8, 90, 165) rgb(255, 255, 255); margin: 0px; = padding: 2px 5px 5px; color: rgb(0, 0, 0); font-size: smaller; = font-weight: bold; cursor: pointer; background-color: rgb(183, 219, = 244); } .btnNoSort { border-width: 1px; border-style: solid; border-color: rgb(255, 255, = 255) rgb(8, 90, 165) rgb(8, 90, 165) rgb(255, 255, 255); margin: 0px; = padding: 2px 5px 5px; color: rgb(0, 0, 0); font-size: smaller; = font-weight: normal; text-decoration: none; background-color: rgb(230, = 244, 253); } .arrow { border-width: 1px; border-style: solid; border-color: rgb(255, 255, = 255) rgb(8, 90, 165) rgb(8, 90, 165) rgb(255, 255, 255); margin: 0px; = padding: 2px 5px 5px; color: rgb(0, 0, 0); font-size: smaller; = font-weight: bold; cursor: pointer; background-color: rgb(183, 219, = 244); } .arrowOn { margin: 0px; padding: 2px 5px 5px; border: 1px solid rgb(8, 90, 165); = color: rgb(255, 255, 255); font-size: smaller; font-weight: bold; = cursor: pointer; background-color: rgb(8, 90, 165); } .arrowOnNoPtr { margin: 0px; padding: 2px 5px 5px; border: 1px solid rgb(8, 90, 165); = color: rgb(255, 255, 255); font-size: smaller; font-weight: bold; = background-color: rgb(8, 90, 165); } .colheadDbMb-LRTB { margin: 0px; padding: 4px 6px; border: 1px solid rgb(8, 90, 165); = font-size: smaller; font-weight: bold; background-color: rgb(183, 219, = 244); } .colheadDbMb-LTB { border-width: 1px 0px 1px 1px; border-style: solid none solid solid; = border-color: rgb(8, 90, 165) currentColor rgb(8, 90, 165) rgb(8, 90, = 165); margin: 0px; padding: 4px 6px; background-color: rgb(183, 219, = 244); } .colheadLbMb-LTB { border-width: 1px 0px 1px 1px; border-style: solid none solid solid; = border-color: rgb(0, 99, 112) currentColor rgb(155, 155, 155) rgb(0, 99, = 112); margin: 0px; padding: 2px 4px 5px; font-weight: normal; = background-color: rgb(204, 254, 243); } .colheadDbMb-LTN { border-width: 1px 0px 1px 1px; border-style: solid none solid solid; = border-color: rgb(8, 90, 165) currentColor rgb(8, 90, 165) rgb(8, 90, = 165); margin: 0px; padding: 4px 6px; font-size: smaller; font-weight: = normal; background-color: rgb(183, 219, 244); } .colheadDbMb-LRTN { margin: 0px; padding: 4px 6px; border: 1px solid rgb(8, 90, 165); = font-size: smaller; font-weight: normal; background-color: rgb(183, 219, = 244); } .colheadDbMb-DropDown-LTB { border-width: 1px 0px 1px 1px; border-style: solid none solid solid; = border-color: rgb(8, 90, 165) currentColor rgb(8, 90, 165) rgb(8, 90, = 165); margin: 0px; padding: 0px; background-color: rgb(183, 219, 244); } .colheadDbMb-DropDown-LRTB { margin: 0px; padding: 0px; border: 1px solid rgb(8, 90, 165); = background-color: rgb(183, 219, 244); } .colheadDbMb-RTB { border-width: 1px 1px 1px 0px; border-style: solid; border-color: = rgb(8, 90, 165); margin: 0px; padding: 2px; font-size: smaller; = font-weight: bold; background-color: rgb(183, 219, 244); } .ieFixImgBtn { margin: 0px; padding: 0px; border: 0px currentColor; top: 0px; = position: relative; } .ieFixImgBtn img { margin: 0px; padding: 0px; top: 0px; position: relative; } .tableB { margin: 0px; padding: 0px; border: 0px currentColor; background-color: = rgb(0, 0, 0); } .tableLb { margin: 0px; padding: 0px; border: 0px currentColor; background-color: = rgb(232, 232, 232); } .tableMb { margin: 0px; padding: 0px; border: 0px currentColor; background-color: = rgb(183, 219, 244); } .tableMb-LR { border-width: 0px 1px; border-style: none solid; border-color: = currentColor rgb(155, 155, 155); margin: 0px; padding: 0px; = background-color: rgb(183, 219, 244); } .tableWh-LR { border-width: 0px 1px; border-style: none solid; border-color: = currentColor rgb(155, 155, 155); margin: 0px; padding: 0px; = background-color: rgb(255, 255, 255); } .tableDefaultSize { padding: 0px; border: 0px currentColor; width: 100%; } .tableWh-B { border-width: 0px 0px 1px; border-style: none none solid; border-color: = currentColor currentColor rgb(155, 155, 155); margin: 0px; padding: 0px; = background-color: rgb(255, 255, 255); } .tableMb-B { border-width: 0px 0px 1px; border-style: none none solid; border-color: = currentColor currentColor rgb(155, 155, 155); margin: 0px; padding: 0px; = background-color: rgb(232, 232, 232); } .tableDbLb-L { border-width: 0px 0px 0px 1px; border-style: none none none solid; = border-color: currentColor currentColor currentColor rgb(155, 155, 155); = margin: 0px; padding: 0px; background-color: rgb(232, 232, 232); } .tableDbLb-R { border-width: 0px 1px 0px 0px; border-style: none solid none none; = border-color: currentColor rgb(155, 155, 155) currentColor currentColor; = margin: 0px; padding: 0px; background-color: rgb(232, 232, 232); } .tableDbLb-T { border-width: 1px 0px 0px; border-style: solid none none; border-color: = rgb(155, 155, 155) currentColor currentColor; margin: 0px; padding: 0px; = background-color: rgb(232, 232, 232); } .tableDbLb-Tpd { border-width: 1px 0px 0px; border-style: solid none none; border-color: = rgb(155, 155, 155) currentColor currentColor; margin: 0px; = padding-right: 1px; background-color: rgb(232, 232, 232); } .tableDbLb-B { border-width: 0px 0px 1px; border-style: none none solid; border-color: = currentColor currentColor rgb(155, 155, 155); margin: 0px; padding: 0px; = background-color: rgb(232, 232, 232); } .tableDbLb-W { border-width: 0px 0px 1px; border-style: none none solid; border-color: = currentColor currentColor rgb(155, 155, 155); margin: 0px; padding: 0px; = background-color: rgb(255, 255, 255); } .tableDbLb-B-va { border-width: 0px 0px 1px; border-style: none none solid; border-color: = currentColor currentColor rgb(102, 102, 102); margin: 0px; padding: 0px = 0px 4px; background-color: rgb(255, 255, 255); } .tableDbLb-LB { border-width: 0px 0px 1px 1px; border-style: none none solid solid; = border-color: currentColor currentColor rgb(155, 155, 155) rgb(155, 155, = 155); margin: 0px; padding: 0px; background-color: rgb(232, 232, 232); } .tableDbLb-RB { border-width: 0px 1px 1px 0px; border-style: none solid solid none; = border-color: currentColor rgb(155, 155, 155) rgb(155, 155, 155) = currentColor; margin: 0px; padding: 0px; background-color: rgb(232, 232, = 232); } .tableDbLb-RT { border-width: 1px 1px 0px 0px; border-style: solid solid none none; = border-color: rgb(155, 155, 155) rgb(155, 155, 155) currentColor = currentColor; margin: 0px; padding: 0px; background-color: rgb(232, 232, = 232); } .tableDbLb-LT { border-width: 1px 0px 0px 1px; border-style: solid none none solid; = border-color: rgb(155, 155, 155) currentColor currentColor rgb(155, 155, = 155); margin: 0px; padding: 0px; background-color: rgb(232, 232, 232); } .tableDbLb-LR { border-width: 0px 0px 0px 1px; border-style: none none none solid; = border-color: currentColor currentColor currentColor rgb(155, 155, 155); = margin: 0px; padding: 0px; background-color: rgb(232, 232, 232); } .tableDbLb-TB { border-width: 1px 0px; border-style: solid none; border-color: rgb(155, = 155, 155) currentColor; margin: 0px; padding: 0px; background-color: = rgb(232, 232, 232); } .tableDbLb-LRTB { margin: 0px; padding: 4px 6px; border: 1px solid rgb(155, 155, 155); = background-color: rgb(232, 232, 232); } .tableDbLb-LRB { border-width: 1px; border-style: solid; border-color: rgb(255, 255, = 255) rgb(155, 155, 155) rgb(155, 155, 155); margin: 0px; padding: 4px = 6px; background-color: rgb(232, 232, 232); } .tableDbLb-LTB { border-width: 1px 0px 1px 1px; border-style: solid none solid solid; = border-color: rgb(155, 155, 155) currentColor rgb(155, 155, 155) = rgb(155, 155, 155); margin: 0px; padding: 4px 6px; background-color: = rgb(232, 232, 232); } .tableDbMb-R { border-width: 0px 1px 0px 0px; border-style: none solid none none; = border-color: currentColor rgb(155, 155, 155) currentColor currentColor; = margin: 0px; padding: 0px; background-color: rgb(232, 232, 232); } .tableDbMb-L { border-width: 0px 0px 0px 1px; border-style: none none none solid; = border-color: currentColor currentColor currentColor rgb(155, 155, 155); = margin: 0px; padding: 0px; background-color: rgb(232, 232, 232); } .tableDbMb-T { border-width: 1px 0px 0px; border-style: solid none none; border-color: = rgb(155, 155, 155) currentColor currentColor; margin: 0px; padding: 0px; = background-color: rgb(232, 232, 232); } .tableDbMb-B { border-width: 0px 0px 1px; border-style: none none solid; border-color: = currentColor currentColor rgb(102, 102, 102); margin: 0px; padding: 0px; = background-color: rgb(232, 232, 232); } .tableDbMb-LB { border-width: 0px 0px 1px 1px; border-style: none none solid solid; = border-color: currentColor currentColor rgb(155, 155, 155) rgb(155, 155, = 155); margin: 0px; padding: 0px; background-color: rgb(232, 232, 232); } .tableDbMb-RB { border-width: 0px 1px 1px 0px; border-style: none solid solid none; = border-color: currentColor rgb(155, 155, 155) rgb(155, 155, 155) = currentColor; margin: 0px; padding: 0px; background-color: rgb(232, 232, = 232); } .tableDbMb-RT { border-width: 1px 1px 0px 0px; border-style: solid solid none none; = border-color: rgb(155, 155, 155) rgb(155, 155, 155) currentColor = currentColor; margin: 0px; padding: 0px; background-color: rgb(232, 232, = 232); } .tableDbMb-LT { border-width: 1px 0px 0px 1px; border-style: solid none none solid; = border-color: rgb(155, 155, 155) currentColor currentColor rgb(155, 155, = 155); margin: 0px; padding: 0px; background-color: rgb(232, 232, 232); } .tableDbMb-LTB { border-width: 1px 0px 1px 1px; border-style: solid none solid solid; = border-color: rgb(155, 155, 155) currentColor rgb(155, 155, 155) = rgb(155, 155, 155); margin: 0px; padding: 0px; background-color: = rgb(232, 232, 232); } .tableDbMb-LRTB { margin: 0px; padding: 0px; border: 1px solid rgb(155, 155, 155); = background-color: rgb(232, 232, 232); } .tableMbLb-B { border-width: 0px 0px 1px; border-style: none none solid; border-color: = currentColor currentColor rgb(183, 219, 244); margin: 0px; padding: 0px; = background-color: rgb(232, 232, 232); } .tableDbLb-LRB { border-width: 0px 1px 1px; border-style: none solid solid; = border-color: currentColor rgb(155, 155, 155) rgb(155, 155, 155); = margin: 0px; padding: 0px; background-color: rgb(232, 232, 232); } .tableDbWh-T { border-width: 1px 0px 0px; border-style: solid none none; border-color: = rgb(155, 155, 155) currentColor currentColor; margin: 0px; padding: 0px; = background-color: rgb(255, 255, 255); } .tableDbWh-LR { border-width: 0px 1px; border-style: none solid solid; border-color: = currentColor rgb(155, 155, 155); margin: 0px; padding: 0px; = background-color: rgb(255, 255, 255); } .tableDbWh-B { border-width: 0px 0px 1px; border-style: none none solid; border-color: = currentColor currentColor rgb(155, 155, 155); margin: 0px; padding: 0px; = background-color: rgb(255, 255, 255); } .tableDbWh-R { border-width: 0px 1px 0px 0px; border-style: none solid none none; = border-color: currentColor rgb(155, 155, 155) currentColor currentColor; = margin: 0px; padding: 0px; background-color: rgb(255, 255, 255); } .tableDbWh-LT { border-width: 1px 0px 0px 1px; border-style: solid none none solid; = border-color: rgb(155, 155, 155) currentColor currentColor rgb(155, 155, = 155); margin: 0px; padding: 0px; background-color: rgb(255, 255, 255); } .tableDbWh-RT { border-width: 1px 1px 0px 0px; border-style: solid solid none none; = border-color: rgb(155, 155, 155) rgb(155, 155, 155) currentColor = currentColor; margin: 0px; padding: 0px; background-color: rgb(255, 255, = 255); } .tableDbWh-LB { border-width: 0px 0px 1px 1px; border-style: none none solid solid; = border-color: currentColor currentColor rgb(155, 155, 155) rgb(155, 155, = 155); margin: 0px; padding: 0px; background-color: rgb(255, 255, 255); } .tableDbWh-Lg { margin: 0px; padding: 0px; border-top-color: currentColor; = border-right-color: currentColor; border-left-color: currentColor; = border-top-width: 0px; border-right-width: 0px; border-left-width: = medium; border-top-style: none; border-right-style: none; = border-left-style: none; background-color: rgb(255, 255, 255); } .tableDbWh-LB-DG { border-width: 0px 0px 1px 1px; border-style: none none solid solid; = border-color: currentColor currentColor rgb(155, 155, 155) rgb(155, 155, = 155); margin: 0px; padding: 0px; background-color: rgb(204, 204, 204); } .tableDbWh-RB { border-width: 0px 1px 1px 0px; border-style: none solid solid none; = border-color: currentColor rgb(155, 155, 155) rgb(155, 155, 155) = currentColor; margin: 0px; padding: 0px; background-color: rgb(255, 255, = 255); } .tableDbWh-RB-DG { border-width: 0px 1px 1px 0px; border-style: none solid solid none; = border-color: currentColor rgb(155, 155, 155) rgb(155, 155, 155) = currentColor; margin: 0px; padding: 0px; background-color: rgb(204, 204, = 204); } .tableBlWh-B { border-width: 0px 0px 1px; border-style: none none solid; border-color: = currentColor currentColor rgb(0, 0, 0); margin: 0px; padding: 0px; = background-color: rgb(255, 255, 255); } .controlWidth { width: 725px; } .alertAlignmentTxt { left: 150px; text-decoration: none; position: absolute; } .alertAlignmentTxtRed { color: rgb(255, 0, 0); font-weight: normal; } .alertAlignment { left: 150px; position: absolute; } .tableFormLb { margin: 0px; padding: 0px 4px 2px 0px; border: 0px currentColor; = background-color: rgb(232, 232, 232); } .tableFormWh { margin: 0px; padding: 0px 4px 2px 0px; border: 0px currentColor; = background-color: rgb(255, 255, 255); } .tableDbWh-LRB { border-width: 0px 1px 1px; border-style: none solid solid; = border-color: currentColor rgb(155, 155, 155) rgb(155, 155, 155); = margin: 0px; padding: 0px; background-color: rgb(255, 255, 255); } .tableDbWh-LRB-DG { border-width: 0px 1px 1px; border-style: none solid solid; = border-color: currentColor rgb(155, 155, 155) rgb(155, 155, 155); = margin: 0px; padding: 0px; background-color: rgb(204, 204, 204); } .tableDbMb-RTB { border-width: 1px 1px 1px 0px; border-style: solid solid solid none; = border-color: rgb(155, 155, 155) rgb(155, 155, 155) rgb(155, 155, 155) = currentColor; margin: 0px; padding: 0px; background-color: rgb(232, 232, = 232); } .tableDbLb-LRTBlite { margin: 0px; padding: 0px; border: 1px solid rgb(155, 155, 155); = background-color: rgb(232, 232, 232); } .tableDbLb-RTBlite { border-width: 1px 1px 1px 0px; border-style: solid; border-color: = rgb(155, 155, 155); margin: 0px; padding: 0px; background-color: = rgb(232, 232, 232); } .tableDbWh-MbWh-RB-L { border-width: 0px 1px 1px; border-style: none solid solid; = border-color: currentColor rgb(155, 155, 155) rgb(155, 155, 155) = rgb(183, 219, 244); margin: 0px; padding: 0px; background-color: = rgb(255, 255, 255); } .tableDbWh-MbWh-B-L { border-width: 0px 1px 1px; border-style: none none solid solid; = border-color: currentColor rgb(155, 155, 155) rgb(155, 155, 155) = rgb(183, 219, 244); margin: 0px; padding: 0px; background-color: = rgb(255, 255, 255); } .tableDbWh-MbWh-BL { border-width: 0px 0px 1px 1px; border-style: none none solid solid; = border-color: currentColor currentColor rgb(155, 155, 155) rgb(155, 155, = 155); margin: 0px; padding: 0px; background-color: rgb(255, 255, 255); } .tableDgWh-MgWh-g-L { margin: 0px; padding: 0px; border-top-color: currentColor; = border-right-color: rgb(156, 156, 156); border-left-color: rgb(156, 156, = 156); border-top-width: 0px; border-right-width: 1px; border-left-width: = 1px; border-top-style: none; border-right-style: none; = border-left-style: solid; background-color: rgb(255, 255, 255); } .tableDgWh-MgWh-RB-L { margin: 0px; padding: 0px; border-top-color: currentColor; = border-right-color: currentColor; border-left-color: rgb(156, 156, 156); = border-top-width: 0px; border-right-width: medium; border-left-width: = 1px; border-top-style: none; border-right-style: none; = border-left-style: solid; background-color: rgb(255, 255, 255); } .tableResultsWh { margin: 0px; padding: 4px; border: 0px currentColor; font-size: = smaller; vertical-align: top; background-color: rgb(255, 255, 255); } .tableResultsGr { margin: 0px; padding: 4px; border: 0px currentColor; vertical-align: = top; background-color: rgb(239, 239, 239); } .tableResultsWhNF { margin: 0px; padding: 4px; border: 0px currentColor; vertical-align: = top; background-color: rgb(255, 255, 255); } .tableResultsWhNF-DG { margin: 0px; padding: 4px; border: 0px currentColor; vertical-align: = top; background-color: rgb(204, 204, 204); } .tableResultsGrNF { margin: 0px; padding: 4px; border: 0px currentColor; vertical-align: = top; background-color: rgb(239, 239, 239); } .tableResultsSmall { margin: 0px; border: 0px currentColor; padding-left: 4px; font-size: = xx-small; vertical-align: top; } .tableResultsSmallNoAlign { margin: 0px; border: 0px currentColor; padding-left: 4px; font-size: = xx-small; } .tableResultsSmallNoPadding { margin: 0px; border: 0px currentColor; font-size: xx-small; = vertical-align: top; } .tableResultsSmallCheck { margin: 0px; padding: 0px 2px; border: 0px currentColor; = vertical-align: top; } .tableResultsWh-First { margin: 0px; padding: 0px 6px 4px 0px; border: 0px currentColor; = vertical-align: top; background-color: rgb(255, 255, 255); } .tableResultsGr-First { margin: 0px; padding: 0px 6px 4px 0px; border: 0px currentColor; = vertical-align: top; background-color: rgb(239, 239, 239); } .tableResultsLb { margin: 0px; padding: 4px 6px 4px 0px; border: 0px currentColor; = vertical-align: top; background-color: rgb(236, 245, 249); } .tableResultsLr { margin: 0px; padding: 4px 6px 4px 0px; border: 0px currentColor; = vertical-align: top; background-color: rgb(249, 240, 244); } .tableResultsMb { margin: 0px; padding: 4px 6px 4px 0px; border: 0px currentColor; = vertical-align: top; background-color: rgb(221, 230, 233); } .tableResultsMr { margin: 0px; padding: 4px 6px 4px 0px; border: 0px currentColor; = vertical-align: top; background-color: rgb(233, 225, 229); } .tableResultsGr-All { margin: 0px; padding: 4px 0px; border: 0px currentColor; = vertical-align: top; background-color: rgb(239, 239, 239); } .tableResultsWh-All { margin: 0px; padding: 4px 0px; border: 0px currentColor; = vertical-align: top; background-color: rgb(255, 255, 255); } .tableResultsGr-AllNF { margin: 0px; padding: 4px 0px; border: 0px currentColor; = vertical-align: top; background-color: rgb(239, 239, 239); } .tableResultsWh-AllNF { margin: 0px; padding: 4px 0px; border: 0px currentColor; = vertical-align: top; background-color: rgb(255, 255, 255); } .tableResults { margin: 0px; padding: 4px; border: 0px currentColor; vertical-align: = top; } .tableResultsDetails { margin: 0px; border: 0px currentColor; padding-top: 6px; padding-left: = 4px; vertical-align: top; } .tableResultsCount { margin: 0px; border: 0px currentColor; padding-top: 2px; padding-left: = 5px; vertical-align: top; } .fldNumPad { padding: 3px 0px 0px; float: right; } .fldtextPad { padding: 4px; } .fldtextPadDummy { padding: 4px; color: rgb(102, 102, 102); } .fldtextPadShowAbstract { padding: 4px; } .fldtextPadMatchLevel { padding-top: 2px; padding-left: 4px; } .resultsPerPage { margin: 0px; border: 0px currentColor; width: 600px; padding-top: 2px; = background-color: rgb(255, 255, 255); } .resultsTable { width: 995px; } .tab { padding-left: 25px; } .tableMbTab { margin: 0px; padding: 0px; border: 0px currentColor; color: rgb(0, 0, = 0); font-size: smaller; text-decoration: underline; background-color: = rgb(183, 219, 244); } .tableResultsDgWh-L { border-width: 0px 0px 0px 1px; border-style: none none solid solid; = border-color: currentColor currentColor currentColor rgb(153, 153, 153); = margin: 0px; padding: 4px; background-color: rgb(255, 255, 255); } .tableResultsDgWh-L-DG { border-width: 0px 0px 0px 1px; border-style: none none solid solid; = border-color: currentColor currentColor currentColor rgb(153, 153, 153); = margin: 0px; padding: 4px; background-color: rgb(204, 204, 204); } .tableResultsDgLg-L { border-width: 0px 0px 0px 1px; border-style: none none solid solid; = border-color: currentColor currentColor currentColor rgb(153, 153, 153); = margin: 0px; padding: 4px; background-color: rgb(239, 239, 239); } .tableResultsDgLg-L-DG { border-width: 0px 0px 0px 1px; border-style: none none solid solid; = border-color: currentColor currentColor currentColor rgb(153, 153, 153); = margin: 0px; padding: 4px; background-color: rgb(204, 204, 204); } .tableResultsDbLg-L { border-width: 0px 0px 0px 1px; border-style: none none solid solid; = border-color: currentColor currentColor currentColor rgb(155, 155, 155); = margin: 0px; padding: 4px; background-color: rgb(239, 239, 239); } .tableResultsDbLg-L-DG { border-width: 0px 0px 0px 1px; border-style: none none solid solid; = border-color: currentColor currentColor currentColor rgb(155, 155, 155); = margin: 0px; padding: 4px; background-color: rgb(239, 239, 239); } .tableResultsLg { border-width: 0px; border-style: none none solid; border-color: = currentColor; margin: 0px; padding: 4px; background-color: rgb(239, 239, = 239); } .tableResultsLg-DG { border-width: 0px; border-style: none none solid; border-color: = currentColor; margin: 0px; padding: 4px; background-color: rgb(204, 204, = 204); } .tableResultsDbWh-L { border-width: 0px 0px 0px 1px; border-style: none none none solid; = border-color: currentColor currentColor currentColor rgb(155, 155, 155); = margin: 0px; padding: 4px; background-color: rgb(255, 255, 255); } .tableResultsDbWh-L-DG { border-width: 0px 0px 0px 1px; border-style: none none none solid; = border-color: currentColor currentColor currentColor rgb(155, 155, 155); = margin: 0px; padding: 4px; background-color: rgb(255, 255, 255); } .tableResultsDgDbWh-LR { border-width: 0px 1px; border-style: none solid; border-color: = currentColor rgb(155, 155, 155) currentColor rgb(153, 153, 153); margin: = 0px; padding: 4px; background-color: rgb(255, 255, 255); } .tableResultsDgDbWh-LR-DG { border-width: 0px 1px; border-style: none solid; border-color: = currentColor rgb(155, 155, 155) currentColor rgb(153, 153, 153); margin: = 0px; padding: 4px; background-color: rgb(204, 204, 204); } .tableResultsDgDbLg-LR { border-width: 0px 1px; border-style: none solid; border-color: = currentColor rgb(155, 155, 155) currentColor rgb(153, 153, 153); margin: = 0px; padding: 4px; background-color: rgb(239, 239, 239); } .tableResultsDgDbLg-LR-DG { border-width: 0px 1px; border-style: none solid; border-color: = currentColor rgb(155, 155, 155) currentColor rgb(153, 153, 153); margin: = 0px; padding: 4px; background-color: rgb(204, 204, 204); } .tableResultsDbMb-TB { border-width: 1px 0px; border-style: solid none; border-color: rgb(155, = 155, 155) currentColor; margin: 0px; padding: 4px; background-color: = rgb(183, 219, 244); } .tableDb-T { border-width: 0px 0px 0px 1px; border-style: none none none solid; = border-color: currentColor currentColor currentColor rgb(155, 155, 155); = margin: 0px; padding: 0px; background-color: rgb(155, 155, 155); } .ctoDocsPerPage { margin: 0px; padding: 0px; border-top-color: rgb(155, 155, 155); = border-right-color: currentColor; border-left-color: currentColor; = border-top-width: 1px; border-right-width: 0px; border-left-width: 0px; = border-top-style: solid; border-right-style: none; border-left-style: = none; white-space: nowrap; background-color: rgb(232, 232, 232); } .tableTextLink { padding: 0px; border: 0px currentColor; width: 101px; } .tableTextLinkBorder { width: 1px; border-top-color: rgb(0, 0, 206); border-bottom-color: = rgb(0, 0, 206); border-left-color: rgb(0, 0, 206); border-top-width: = 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: = solid; border-bottom-style: solid; border-left-style: solid; } .tableTextLinkUnderline { width: 100px; border-bottom-color: rgb(0, 0, 206); border-bottom-width: = 1px; border-bottom-style: solid; } .tableDbMb-TB { border-width: 1px 0px; border-style: solid; border-color: rgb(155, 155, = 155); margin: 0px; padding: 0px; background-color: rgb(232, 232, 232); } .tableResultsDbLg-LR { border-width: 0px 1px; border-style: none solid solid; border-color: = currentColor rgb(155, 155, 155); margin: 0px; padding: 4px; = background-color: rgb(239, 239, 239); } .tableResultsDbLg-LR-DG { border-width: 0px 1px; border-style: none solid solid; border-color: = currentColor rgb(155, 155, 155); margin: 0px; padding: 4px; = background-color: rgb(204, 204, 204); } .tableResultsDbWh-LR { border-width: 0px 1px; border-style: none solid solid; border-color: = currentColor rgb(155, 155, 155); margin: 0px; padding: 4px; = background-color: rgb(255, 255, 255); } .tableResultsDbWh-LR-DG { border-width: 0px 1px; border-style: none solid solid; border-color: = currentColor rgb(155, 155, 155); margin: 0px; padding: 4px; = background-color: rgb(204, 204, 204); } .tableDbWh-LRB { border-width: 0px 1px 1px; border-style: none solid solid; = border-color: currentColor rgb(155, 155, 155) rgb(155, 155, 155); = margin: 0px; padding: 4px; background-color: rgb(255, 255, 255); } .tableDbWh-LRB-DG { border-width: 0px 1px 1px; border-style: none solid solid; = border-color: currentColor rgb(155, 155, 155) rgb(155, 155, 155); = margin: 0px; padding: 4px; background-color: rgb(204, 204, 204); } .tableDbWh-L { border-width: 0px 0px 0px 1px; border-style: none none none solid; = border-color: currentColor currentColor currentColor rgb(155, 155, 155); = margin: 0px; padding: 0px; background-color: rgb(255, 255, 255); } .tableDgDbWh-LRB { border-width: 0px 1px 1px; border-style: none solid solid; = border-color: currentColor rgb(155, 155, 155) rgb(155, 155, 155) = rgb(153, 153, 153); margin: 0px; padding: 0px; background-color: = rgb(255, 255, 255); } .tableDgDbWh-LB { border-width: 0px 0px 1px 1px; border-style: none none solid solid; = border-color: currentColor currentColor rgb(155, 155, 155) rgb(153, 153, = 153); margin: 0px; padding: 0px; background-color: rgb(255, 255, 255); } .tableResultsDbLg-R { border-width: 0px 1px 0px 0px; border-style: none solid solid none; = border-color: currentColor rgb(155, 155, 155) currentColor currentColor; = margin: 0px; padding: 4px; background-color: rgb(239, 239, 239); } .tableResultsDbLg-R-DG { border-width: 0px 1px 0px 0px; border-style: none solid solid none; = border-color: currentColor rgb(155, 155, 155) currentColor currentColor; = margin: 0px; padding: 4px; background-color: rgb(204, 204, 204); } .tableResultsDbWh { border-width: 0px; border-style: none none solid; border-color: = currentColor; margin: 0px; padding: 4px; background-color: rgb(255, 255, = 255); } .tableResultsDbLg { border-width: 0px; border-style: none none solid; border-color: = currentColor; margin: 0px; padding: 4px; background-color: rgb(239, 239, = 239); } .tableResultsDbWh-R { border-width: 0px 1px 0px 0px; border-style: none solid none none; = border-color: currentColor rgb(155, 155, 155) currentColor currentColor; = margin: 0px; padding: 4px; background-color: rgb(255, 255, 255); } .tableMbWh-T { border-width: 1px; border-style: solid none none; border-top-color: = rgb(217, 217, 217); } .tableMbWh-B { border-width: 1px; border-style: none none solid; border-bottom-color: = rgb(217, 217, 217); } .tableDgMb-R { border-width: 0px 1px 0px 0px; border-style: none solid none none; = border-color: currentColor rgb(102, 102, 102) currentColor currentColor; = margin: 0px; padding: 0px; background-color: rgb(183, 219, 244); } .tableDgMb-L { border-width: 0px 0px 0px 1px; border-style: none none none solid; = border-color: currentColor currentColor currentColor rgb(102, 102, 102); = margin: 0px; padding: 0px; background-color: rgb(183, 219, 244); } .tableDgMb-T { border-width: 1px 0px 0px; border-style: solid none none; border-color: = rgb(102, 102, 102) currentColor currentColor; margin: 0px; padding: 0px; = background-color: rgb(183, 219, 244); } .tableWH { margin: 0px; padding: 0px; border: 0px currentColor; background-color: = rgb(255, 255, 255); } .tableDgWh-B-va { border-width: 0px 0px 1px; border-style: none none solid; border-color: = currentColor currentColor rgb(102, 102, 102); margin: 0px; padding: 0px = 0px 4px; background-color: rgb(255, 255, 255); } .tbImage { background-image: url("/static/images/tabs.gif"); background-repeat: = no-repeat; } .tbLbMb-L { background-position: 0px -30px; border-width: 0px 0px 1px; = border-style: none none solid; border-color: currentColor currentColor = rgb(102, 102, 102); cursor: pointer; } .tbLbMb-R { background-position: 0px -798px; border-width: 0px 0px 1px; = border-style: none none solid; border-color: currentColor currentColor = rgb(102, 102, 102); cursor: pointer; } .tbLbMb-T { border-width: 1px 0px 0px; border-style: solid none none; border-color: = rgb(102, 102, 102) currentColor currentColor; margin: 0px; padding: 0px; = cursor: pointer; background-color: rgb(239, 239, 239); } .tbLbMb-L-End { background-position: 0px -689px; border-width: 0px 0px 1px; = border-style: none none solid; border-color: currentColor currentColor = rgb(102, 102, 102); cursor: pointer; } .tbLbWh-L { background-position: 0px -579px; border: 0px currentColor; } .tbLbWh-R { background-position: 0px -469px; border: 0px currentColor; } .tbLbWh-T { border-width: 1px 0px 0px; border-style: solid none none; border-color: = rgb(102, 102, 102) currentColor currentColor; margin: 0px; padding: 0px; = background-color: rgb(255, 255, 255); } .tbWhMb-B { border-width: 0px 0px 1px; border-style: none none solid; border-color: = currentColor currentColor rgb(155, 155, 155); margin: 0px; padding: 0px; = background-color: rgb(239, 239, 239); } .tbLbWh-L-End { background-position: 0px -359px; border: 0px currentColor; } .tbWhMb-L { background-position: 0px -30px; border-width: 0px 0px 1px; = border-style: none none solid; border-color: currentColor currentColor = rgb(155, 155, 155); } .tbWhMb-R { background-position: 0px -798px; border-width: 0px 0px 1px; = border-style: none none solid; border-color: currentColor currentColor = rgb(155, 155, 155); } .tbWhMb-T { border-width: 1px 0px 0px; border-style: solid none none; border-color: = rgb(155, 155, 155) currentColor currentColor; margin: 0px; padding: 0px; = background-color: rgb(239, 239, 239); } .tbWhMb-B { border-width: 0px 0px 1px; border-style: none none solid; border-color: = currentColor currentColor rgb(155, 155, 155); margin: 0px; padding: 0px; = background-color: rgb(239, 239, 239); } .tbWhMb-L-End { background-position: 0px -689px; border: 0px currentColor; = background-repeat: no-repeat; } .tbWhLb-L { background-position: 0px -907px; border: 0px currentColor; } .tbWhLb-R { background-position: 0px -139px; border: 0px currentColor; } .tbWhLb-T { border-width: 1px 0px 0px; border-style: solid none none; border-color: = rgb(155, 155, 155) currentColor currentColor; margin: 0px; padding: 0px; = background-color: rgb(232, 232, 232); } .tbWhLb-B { border-width: 0px 0px 1px; border-style: none none solid; border-color: = currentColor currentColor rgb(232, 232, 232); margin: 0px; padding: 0px; = background-color: rgb(232, 232, 232); } .tbWhLb-L-End { background-position: 0px -249px; padding: 0px; border: 0px = currentColor; margin-right: 0px; background-repeat: no-repeat; = background-color: rgb(255, 255, 255); } .tbWhWh-B { border-width: 0px 0px 1px; border-style: none none solid; border-color: = currentColor currentColor rgb(255, 255, 255); margin: 0px; padding: 0px; = background-color: rgb(255, 255, 255); } .tbMb { margin: 0px; border: 0px currentColor; color: rgb(0, 0, 0); = padding-right: 5px; padding-left: 2px; font-size: smaller; font-weight: = bold; cursor: pointer; background-color: rgb(239, 239, 239); } .tbWh { margin: 0px; border: 0px currentColor; color: rgb(0, 0, 0); = padding-right: 5px; padding-left: 2px; font-size: smaller; font-weight: = bold; background-color: rgb(255, 255, 255); } .tbLb { padding: 0px; border: 0px currentColor; color: rgb(0, 0, 0); font-size: = smaller; font-weight: bold; margin-right: 0px; margin-left: 0px; = background-color: rgb(232, 232, 232); } .tbDgMb-L { background-position: 0px -30px; border-width: 0px 0px 1px; = border-style: none none solid; border-color: currentColor currentColor = rgb(102, 102, 102); } .tbDgMb-R { background-position: 0px -798px; border-width: 0px 0px 1px; = border-style: none none solid; border-color: currentColor currentColor = rgb(102, 102, 102); } .tbDgMb-T { border-width: 1px 0px 0px; border-style: solid none none; border-color: = rgb(102, 102, 102) currentColor currentColor; margin: 0px; padding: 0px; = background-color: rgb(239, 239, 239); } .tbDgMb-L-End { background-position: 0px -689px; border-width: 0px 0px 1px; = border-style: none none solid; border-color: currentColor currentColor = rgb(102, 102, 102); } .tbLbMb-P { background-position: 0px -30px; border-width: 0px 0px 1px; = border-style: none none solid; border-color: currentColor currentColor = rgb(102, 102, 102); } .tbLbMb-TP { border-width: 1px 0px 0px; border-style: solid none none; border-color: = rgb(102, 102, 102) currentColor currentColor; margin: 0px; padding: 0px; = background-color: rgb(192, 192, 192); } .tableDbMb-BP { border-width: 0px 0px 1px; border-style: none none solid; border-color: = currentColor currentColor rgb(102, 102, 102); margin: 0px; padding: 0px; = background-color: rgb(192, 192, 192); } .tbMbP { margin: 0px; border: 0px currentColor; color: rgb(160, 160, 160); = padding-right: 5px; padding-left: 2px; font-size: smaller; font-weight: = bold; background-color: rgb(198, 195, 198); } .tbImagePL { background-image: url("/static/images/preview/preview_tabs_left.gif"); = background-repeat: no-repeat; } .tbImagePR { background-image: url("/static/images/preview/preview_tabs_right.gif"); = background-repeat: no-repeat; } .tbLbMb-B { margin: 0px 0px 0px -11px; width: 742px; border-top-color: rgb(155, = 155, 155); border-top-width: 1px; border-top-style: solid; position: = absolute; } .txtDummy { color: rgb(102, 102, 102); } .txtSmallBlue { color: rgb(8, 89, 166); font-weight: bold; } .txtSmallRedBold { color: rgb(255, 0, 0); font-weight: bold; } .txtSmallBold { font-weight: bold; } .txtSmallItalic { font-style: italic; } .txtBold { font-weight: bold; } .txtBoldBlue { color: rgb(8, 89, 166); line-height: 1.5em; font-size: 0.8em; = font-weight: bold; } .txtBoldOnly { font-weight: bold; } .txtBoldDummy { color: rgb(102, 102, 102); font-weight: bold; } .txtBoldOnlyDummy { color: rgb(102, 102, 102); font-weight: bold; } .txtRed { color: rgb(255, 0, 0); font-weight: normal; } .txtRedBold { color: rgb(255, 0, 0); font-weight: bold; } .txtRedBoldSpacing { margin: 0px; padding: 10px 0px; color: rgb(255, 0, 0); font-weight: = bold; } .txtRedOnly { color: rgb(255, 0, 0); } .header { font-size: larger; font-weight: bold; } .headerSmall { font-weight: bold; } .headerBlueBg { background-color: rgb(8, 90, 165); } .headerBlueAuthor { color: rgb(30, 53, 123); font-size: 1.25em; font-weight: bold; } .headerGreyAuthor { color: rgb(153, 153, 153); font-size: 0.8em; margin-left: 7px; } .txtOrangeBold { color: rgb(255, 102, 0); font-weight: bold; } .helpLinks { font-weight: bold; vertical-align: middle; } a.helpLinks:link { color: rgb(8, 93, 173); text-decoration: none; } a.helpLinks:visited { color: rgb(8, 93, 173); text-decoration: none; } a.helpLinks:hover { color: rgb(8, 93, 173); text-decoration: underline; } a.helpLinks:active { color: rgb(8, 93, 173); text-decoration: none; } .ScopusLightBg { margin: 0px; padding: 2px 5px; background-color: rgb(227, 239, 247); } .ScopusMedBg { margin: 0px; padding: 2px 5px 5px; background-color: rgb(212, 225, = 234); } .ScirusLightBg { margin: 0px; padding: 2px 5px; background-color: rgb(246, 230, 237); } .ScirusMedBg { margin: 0px; padding: 2px 5px; background-color: rgb(231, 212, 221); } .PatentLightBg { margin: 0px; padding: 2px 5px; background-color: rgb(255, 255, 255); } .PatentMedBg { margin: 0px; padding: 2px 5px; background-color: rgb(239, 239, 239); } .previewTxt { color: rgb(192, 192, 192) !important; } .previewTxt a { color: rgb(192, 192, 192) !important; } .previewTxt a:visited { color: rgb(192, 192, 192) !important; } a.previewTxt { color: rgb(192, 192, 192) !important; } .previewUnderline { color: rgb(192, 192, 192); font-weight: normal; } .prevLinkXXSm { color: rgb(192, 192, 192); font-weight: normal; text-decoration: = underline; } .prevLinkSmNm { color: rgb(192, 192, 192); text-decoration: underline; } .prevLinkS { color: rgb(192, 192, 192); text-decoration: underline; } .prevAuthLinkS { color: rgb(192, 192, 192); text-decoration: underline; } .prevLinkSm { color: rgb(192, 192, 192); font-weight: bold; text-decoration: = underline; } .prevLinkSB { color: rgb(192, 192, 192); font-weight: bold; text-decoration: = underline; } .printNote { top: -1px; color: rgb(255, 0, 0); font-weight: bold; margin-left: 10px; = position: relative; } a.noDecoration { text-decoration: none; } a.noDecoration img { border: 0px currentColor; } .SortTableStyle { padding: 2px 5px 5px; color: rgb(255, 255, 255); text-decoration: none; = border-top-color: rgb(0, 99, 112); border-right-color: rgb(0, 99, 112); = border-left-color: rgb(0, 99, 112); border-top-width: 1px; = border-right-width: 1px; border-left-width: 1px; border-top-style: = solid; border-right-style: solid; border-left-style: solid; cursor: = pointer; background-color: rgb(0, 99, 112); } .CheckboxArrow { padding-right: 4px; margin-bottom: -30px; position: relative; } .BasicCheckboxArrow { padding-right: 1px; margin-bottom: -30px; position: relative; } .DroppedQueryColor { color: rgb(187, 187, 187); } .divNoMargin { margin: 0px; } .divCentered { margin: 0px auto; padding: 0px; border: 0px solid rgb(255, 255, 255); = width: 98%; border-spacing: 0px 0px; } .divTextAlignLeft { text-align: left; margin-bottom: 0px; } .divTextAlignCenter { text-align: center; margin-bottom: 0px; } .divVerticalAlignMiddle { margin-bottom: 0px; vertical-align: middle; } .divResultsPerPage { width: 100%; text-align: left; padding-top: 5px; padding-bottom: 5px; = margin-bottom: 0px; margin-left: 0px; border-bottom-color: rgb(8, 90, = 165); border-bottom-width: 1px; border-bottom-style: solid; = background-color: rgb(183, 219, 244); } .divBottomResultsMetrics { margin: 17px auto 0px; padding: 0px; width: 98%; text-align: left; = border-spacing: 0px 0px; } .divPoweredByNextAndPrev { margin: 2px auto 0px; width: 100%; } .divTextLink { text-align: left; overflow: hidden; padding-top: 3px; max-height: 100%; } * html .divTextLink { text-align: left; overflow: hidden; padding-top: 5px; } td.poweredBy { width: 50%; text-align: left; } td.nextAndPrev { width: 50%; text-align: right; } #container { margin: 10px 0px; } div.searchContent { margin-right: 10px; margin-left: 10px; } div.row { margin: 0px auto; border: currentColor; padding-bottom: 0px; clear: = both; } * html div.row { padding-bottom: 0px; } div.row span.left { padding: 0px; border: currentColor; margin-top: 0px; margin-bottom: = 8px; margin-left: 7px; vertical-align: middle; float: left; } * html div.row span.left { padding: 0px; border: currentColor; margin-top: 18px; margin-bottom: = 8px; margin-left: 7px; vertical-align: middle; float: left; } div.row span.right { padding: 0px; border: currentColor; text-align: right; margin-top: = -14px; margin-right: 10px; margin-bottom: -14px; vertical-align: middle; = float: right; } * html div.row span.right { margin-top: 1px; margin-bottom: 0px; } div.navbar { border: currentColor; width: 100%; padding-top: 0px; padding-bottom: = 8px; padding-left: 0px; margin-right: 0px; margin-bottom: 0px; = vertical-align: bottom; display: inline; } * html div.navbar { border: currentColor; width: 100%; padding-top: 0px; padding-left: 7px; = margin-right: 0px; margin-bottom: 0px; vertical-align: bottom; display: = inline; } div.navbar span.left { border: currentColor; margin-left: 10px; float: left; } div.navbar span.left a { vertical-align: bottom; } div.navbar div.right { padding: 0px; border: 0px currentColor; text-align: center; = margin-right: 10px; margin-bottom: 0px; vertical-align: bottom; float: = right; display: inline; } div.headerbarpreview { padding: 6px 10px; clear: both; border-top-color: rgb(102, 102, 102); = border-bottom-color: rgb(102, 102, 102); border-top-width: 1px; = border-bottom-width: 1px; border-top-style: solid; border-bottom-style: = solid; background-color: rgb(247, 247, 247); } div.headerbar { padding: 6px 10px; height: 23px; clear: both; border-top-color: = rgb(102, 102, 102); border-bottom-color: rgb(102, 102, 102); = border-top-width: 1px; border-bottom-width: 1px; border-top-style: = solid; border-bottom-style: solid; background-color: rgb(247, 247, 247); } div.headerbar div { display: inline; } div.headerbar * { vertical-align: middle; } div.tagLine { height: 23px; vertical-align: middle; } div.headerbarleft { height: 23px; vertical-align: middle; float: left; } td.headerbarleft { height: 23px; vertical-align: middle; align: left; } td.headerbarright { color: rgb(8, 89, 166); font-size: xx-small; font-weight: bold; = vertical-align: middle; white-space: nowrap; align: right; } div.federatedSearch { height: 23px; vertical-align: middle; } div.quickSearch { height: 23px; color: black; font-size: 80%; vertical-align: middle; = white-space: nowrap; } div.footer { width: 100%; clear: both; } span.rightMargin { margin-right: 10px; float: right; position: relative; } span.vmiddle { vertical-align: middle; } span.vtop { vertical-align: text-top; } div.endrow { margin: 0px; padding: 0px; width: auto; clear: both; } form { margin: 0px; padding: 0px; } .centered { vertical-align: middle; } .hidden-label { left: 0px; top: -100px; width: 1px; height: 1px; visibility: hidden; = position: absolute; } div.navbar div.left { margin: 0px; padding-bottom: 8px; padding-left: 7px; } * html div.navbar div.left { margin: 0px; padding-bottom: 0px; padding-left: 0px; } a.cssnavcommon { margin: 0px; padding: 0px; border: 0px currentColor; height: 20px; = float: left; display: block; background-image: = url("/static/images/navbar.gif"); background-repeat: no-repeat; } img.cssimgnavcommon { margin: 0px; border: 0px currentColor; } a.cssnavsearch { background-position: 0px -420px; width: 61px; } a.cssnavsearch:hover { background-position: 0px -490px; } a.cssnavsearch_a { background-position: 0px -490px; width: 61px; } a.cssnavsources { background-position: 0px -560px; width: 74px; margin-left: 6px; } a.cssnavsources:hover { background-position: 0px -630px; } a.cssnavsources_a { background-position: 0px -630px; width: 74px; margin-left: 6px; } a.cssnavanalytics { width: 83px; margin-left: 6px; } a.cssnavanalytics:hover { background-position: 0px -70px; } a.cssnavanalytics_a { background-position: 0px -70px; width: 83px; margin-left: 6px; } a.cssnavmyalerts { background-position: 0px -140px; width: 84px; margin-left: 6px; } a.cssnavmyalerts:hover { background-position: 0px -210px; height: 20px; } a.cssnavmyalerts_a { background-position: 0px -210px; width: 84px; margin-left: 6px; } a.cssnavmysettings { background-position: 0px -280px; width: 105px; margin-left: 6px; } a.cssnavmysettings:hover { background-position: 0px -350px; } a.cssnavmysettings_a { background-position: 0px -350px; width: 105px; margin-left: 6px; } a.cssnavmylist { background-position: 0px -700px; width: 66px; margin-left: 6px; } a.cssnavmylist:hover { background-position: 0px -770px; } a.cssnavmylist_a { background-position: 0px -770px; width: 66px; margin-left: 6px; } div.cssnavmylist { margin: 0px 0px 0px 6px; padding: 0px; float: left; display: inline; = position: relative; background-image: = url("/static/images/topnav_mybasket_a.gif"); background-repeat: = no-repeat; } div#copyright { margin-top: 1px; margin-left: 10px; } div.navbarbottom { margin-bottom: 4px; } div#links { padding: 0px; border: currentColor; height: 25px; text-align: right; = bottom: 0px; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; = vertical-align: bottom; float: right; display: inline; } div#links * { vertical-align: bottom; } div#links ul { list-style: none; margin: 0px; padding: 0px; border: 0px currentColor; = height: 22px; vertical-align: bottom; } div#links li { margin: 0px; padding: 0px; text-align: center; vertical-align: bottom; = display: inline; } div#links img { margin: 0px 0px 0px 1px; padding: 0px; border: 0px currentColor; = vertical-align: -40%; } div#links .helpLinks { padding: 0px; border: 0px currentColor; text-align: center; = margin-right: 0px; margin-left: 3px; vertical-align: -20%; } .searchtips { padding-top: 3px; padding-right: 2px; padding-bottom: 2px; = margin-right: 0px; } .searchtips img { margin: 0px 0px 0px 1px; padding: 0px; border: 0px currentColor; = vertical-align: -65%; } .searchtips .helpLinks { margin: 0px; padding: 0px; border: 0px currentColor; vertical-align: = -70%; } .footerseparator { margin: 6px 0px 4px; border: 0px currentColor; width: 100%; height: = 1px; } div#loginOpen { vertical-align: middle; display: inline; } div#loginOpen img { margin-left: 4px; } div#loginOpen * { vertical-align: middle; } div#loginOpen input { height: 18px; vertical-align: middle; } div#loginClose { margin-top: 4px; } div#loginClose img { margin-left: 0px; } img#loginSymbol { margin: 0px; padding: 0px; border: 0px currentColor; width: 9px; = height: 9px; display: inline; } div#loginOpen div.t { background: url("/static/images/loginbardot.gif") repeat-x 0px 0px = rgb(230, 244, 253); width: 100%; z-index: 2; } div#loginOpen div.loginBarLine { background: url("/static/images/loginbardot.gif") repeat-x 0px 0px; = margin: 0px; padding: 0px; left: 4px; top: 86px; width: 300px; height: = 1px; right: 4px; font-size: 1px; font-weight: normal; position: = absolute; z-index: 2; } .treeMasterNone { background: url("/static/images/tree_01_none.gif") no-repeat; width: = 15px; } .treeMaster { background: url("/static/images/tree_01_master.gif") no-repeat; width: = 15px; } .treeMasterEnd { background: url("/static/images/tree_01_end.gif") no-repeat; width: = 15px; } .treeChildNone { background: url("/static/images/tree_02_none.gif"); width: 8px; } .treeChild { background: url("/static/images/tree_02_child.gif") no-repeat; width: = 8px; } .treeChildEnd { background: url("/static/images/tree_02_end.gif") no-repeat; width: = 8px; } .displayInline { display: inline; } .displayNone { display: none; } .paddingBot4 { padding-bottom: 4px; } .paddingTop4 { padding-top: 4px; } .valigntop { vertical-align: top; } .alignleft { align: left; } .alignright { align: right; } .valignbottom { vertical-align: bottom; } .valignmiddle { vertical-align: middle; } div#loginOpen div.loginBarLineWhite { background: url("/static/images/loginbardotwhite.gif") repeat-x 0px = 0px; margin: 0px; padding: 0px; left: 4px; top: 106px; width: 87px; = height: 1px; right: 4px; font-size: 1px; font-weight: normal; position: = absolute; z-index: 2; } .loginUserName { width: 138px; text-align: left; font-size: 10px; } .loginPassword { width: 109px; text-align: left; font-size: 10px; } div#loginOpen div.b { background: url("/static/images/loginbardot.gif") repeat-x 0px 100%; = z-index: 2; } div#loginOpen div.l { background: url("/static/images/loginbarleft.gif") repeat-y 0px 0px; = z-index: 2; } div#loginOpen div.r { background: url("/static/images/loginbarright.gif") repeat-y 100% 0px; = z-index: 2; } div#loginOpen div.bl { background: url("/static/images/login-bottomleft.gif") no-repeat 1px = 100%; z-index: 2; } div#loginOpen div.br { background: url("/static/images/login-bottomright.gif") no-repeat 307px = 100%; z-index: 2; } div#loginOpen div.tl { background: url("/static/images/login-topleft.gif") no-repeat 1px 0px; = z-index: 2; } div#loginOpen div.tr { background: url("/static/images/login-topright.gif") no-repeat 307px = 0px; z-index: 2; } div.loginForm { padding: 0px; width: 310px; vertical-align: middle; } div#userLogin { text-align: left; vertical-align: top; } div#userLogin { padding: 0px; border: 0px currentColor; margin-top: 0px; margin-right: = 0px; } div#loginOpen table { margin: 4px 0px 0px 4px; padding: 0px; border: 0px currentColor; = border-collapse: collapse; border-spacing: 0px; } div#loginOpen td { margin: 0px; padding: 0px; border: 0px currentColor; } .loginBarOpen { width: 310px; height: auto; overflow: visible; visibility: visible; = position: absolute; z-index: auto; } .loginBarLeftPane { left: 4px; top: 4px; width: 90px; height: 50%; position: absolute; } .loginBarRightPane { left: 99px; top: 4px; height: 70%; white-space: nowrap; position: = absolute; } .loginBarLinksPane { left: 7px; top: 89px; width: 304px; text-align: left; right: 7px; = padding-top: 2px; padding-bottom: 2px; padding-left: 2px; margin-top: = 2px; margin-bottom: 2px; margin-left: 2px; } a.register:link { color: rgb(255, 0, 0); font-weight: bold; } a.register:active { color: rgb(255, 0, 0); font-weight: bold; } a.register:visited { color: rgb(255, 0, 0); font-weight: bold; } a.register:hover { color: rgb(255, 0, 0); font-weight: bold; } a.activate:link { color: rgb(255, 0, 0); font-size: xx-small; font-weight: normal; } a.activate:active { color: rgb(255, 0, 0); font-size: xx-small; font-weight: normal; } a.activate:visited { color: rgb(255, 0, 0); font-size: xx-small; font-weight: normal; } a.activate:hover { color: rgb(255, 0, 0); font-size: xx-small; font-weight: normal; } ul#limitto { margin: 0px; padding: 0px; list-style-type: none; } ul#limitto li > input { vertical-align: -20%; } ul.subjectareas { list-style: none; margin: 3px 0px 0px; padding: 0px; border: 0px = currentColor; width: 250px; text-align: left; font-weight: normal; = float: left; } ul.subjectareas li { margin: 0px 0px 2px; padding: 0px; border: 0px currentColor; width: = 80px; text-align: left; white-space: nowrap; } ul.subjectares input { margin: 0px; padding: 0px; border: 0px currentColor; } ul.subjectareas li > input { vertical-align: -25%; } ul.subjectareas span { white-space: nowrap; } ul.subjectareas .comment { text-align: left; padding-top: 0px; margin-top: 0px; margin-left: 27px; = vertical-align: top; border-top-color: currentColor; border-top-width: = 0px; border-top-style: none; float: left; } ul#limitto li { margin-bottom: 6px; } #basicsearchtabs { margin-top: 10px; } #basicsearchform { =09 } .basicbuttons { padding: 4px; } #connector { =09 } .searchHistoryLogo { padding-left: 7px; } .searchHistory { vertical-align: top; } .combine { text-align: center; vertical-align: top; } .combine form { padding-left: 30px; } .dimension { float: left; } ul.refineResults { list-style: none; margin: 0px 0px 0px 7px; padding: 0px; } ul.refineResultsViewLink { list-style: none; margin: 8px 0px 10px 10px; padding: 0px; } ul.refineResults li { margin: 0px; padding: 0px; border: 1px solid rgb(255, 255, 255); } ul.refineResults li label { margin: 0px; } ul.refineResults li label input { margin: 0px; } ul.refineResults li label { display: block; } ul.refineResults li label input { margin: -1px 0px 0px; padding: 0px; width: 13px; height: 13px; = vertical-align: bottom; } ul.refineResults li label span { white-space: pre-wrap; } #navigator_size_3 { white-space: nowrap; } ul.refineResults .title { padding-top: 3px; padding-bottom: 3px; padding-left: 3px; font-size: = smaller; border-top-color: rgb(156, 156, 156); border-bottom-color: = rgb(156, 156, 156); border-top-width: 1px; border-bottom-width: 1px; = border-top-style: solid; border-bottom-style: solid; background-color: = rgb(247, 247, 247); } ul.refineResults .moreless { padding-top: 4px; padding-left: 24px; } ul.refineResults li > span { vertical-align: 20%; } ul.docLinks { margin: 0px; padding: 0px; border: 0px currentColor; height: 17px; = list-style-type: none; } ul.docLinks li { margin: 0px 3px 0px 0px; padding: 0px; border: 0px currentColor; = height: 17px; float: left; display: inline; } .rrTitle { text-align: left; padding-top: 3px; padding-bottom: 3px; padding-left: = 7px; font-weight: normal; border-top-color: rgb(156, 156, 156); = border-bottom-color: rgb(156, 156, 156); border-top-width: 1px; = border-bottom-width: 1px; border-top-style: solid; border-bottom-style: = solid; } .navigatorTitle { padding-top: 3px; padding-bottom: 3px; padding-left: 7px; font-weight: = normal; border-top-color: rgb(156, 156, 156); border-bottom-color: = rgb(156, 156, 156); border-top-width: 1px; border-bottom-width: 1px; = border-top-style: solid; border-bottom-style: solid; } .navigatorTitleClose { font-size: small; border-top-color: rgb(156, 156, 156); = border-bottom-color: rgb(156, 156, 156); border-top-width: 1px; = border-bottom-width: 1px; border-top-style: solid; border-bottom-style: = solid; } th.rrTitle { text-align: left; padding-top: 3px; padding-bottom: 3px; padding-left: = 7px; font-weight: normal; border-top-color: rgb(156, 156, 156); = border-bottom-color: rgb(156, 156, 156); border-top-width: 1px; = border-bottom-width: 1px; border-top-style: solid; border-bottom-style: = solid; background-color: rgb(232, 232, 232); } #boxPadding { margin-top: 4px; } * html #boxPadding { margin-top: 2px; } #goButton { top: 19px; right: 1px; position: absolute; } * html #goButton { top: 22px; right: 1px; padding-top: 1px; padding-bottom: 1px; = padding-left: 1px; position: absolute; } #forgottenPassword { left: 4px; top: 64px; padding-bottom: 4px; position: absolute; } * html #forgottenPassword { left: 4px; top: 64px; padding-bottom: 4px; position: absolute; } input.go { width: 23px; height: 18px; } input.dispSources { width: 97px; height: 18px; } .SourceHeader { color: rgb(0, 0, 0); text-decoration: none; } .ScopusBorderDefault { =09 } img { =09 } img.corners { margin: 0px; padding: 0px; border: 0px currentColor; width: 7px; = height: 7px; background-image: url("/static/images/corners.gif"); = background-repeat: no-repeat; } img.corner_top_right { background-position: 0px -30px; } img.corner_top_left { background-position: 0px -326px; } img.corner_top_right_trans { background-position: 0px -67px; } img.corner_top_left_home { background-position: 0px -104px; } img.corner_top_left_white { background-position: 0px -141px; } img.corner_bottom_left_white { background-position: 0px -178px; } img.corner_top_right_blue { background-position: 0px -215px; } img.corner_bottom_left_blue { background-position: 0px -252px; } img.corner_bottom_right_blue { background-position: 0px -289px; } img.corner_bottom_right { background-position: 0px -363px; } img.corner_bottom_right_white { background-position: 0px -400px; } img.corner_top_left_trans { background-position: 0px -437px; } img.corner_bottom_left { background-position: 0px -474px; } img.corner_top_left_blue { background-position: 0px -511px; } img.corner_top_right_white { background-position: 0px -548px; } .btn_search_result { background: url("/static/images/btn_srchres.gif") no-repeat; margin: = 0px; padding: 0px; border: 0px currentColor; height: 18px; } .btn_search_result_output { background-position: 0px -30px; width: 103px; } .btn_search_result_citedby { background-position: 0px -78px; width: 68px; } .btn_search_result_citation_tracker { background-position: 0px -126px; width: 106px; } .btn_search_result_addtolist { background-position: 0px -174px; width: 82px; } .btn_search_result_download { background-position: 0px -222px; width: 78px; } .btn_search_result_references { background-position: 0px -270px; width: 84px; } .btn_refine_result { background: url("/static/images/btn_refine.gif") no-repeat; margin: = 0px; padding: 0px; border: 0px currentColor; height: 18px; } .btn_limit_to { background-position: 0px -30px; width: 68px; } .btn_exclude { background-position: 0px -78px; width: 66px; } .btn_record_result { background: url("/static/images/record.gif") no-repeat; margin: 0px; = padding: 0px; border: 0px currentColor; } .btn_resultsList { background-position: 0px -30px; width: 85px; height: 18px; } .but_bookmark { background-position: 0px -258px; width: 80px; height: 18px; } .small_icons { background: url("/static/images/smallicons.gif") no-repeat; margin: = 0px; padding: 0px; border: 0px currentColor; } .abstractLink { white-space: nowrap; } .preview_display_dropdown { color: rgb(192, 192, 192); background-color: white; } .display_dropdown { text-align: center; vertical-align: middle; float: left; } .display_txt { font-size: smaller; vertical-align: middle; } .prev_next_left { vertical-align: middle; float: left; } .prev_next_left_txt { margin: -2px 0px 0px; padding: 2px; border: 1px solid rgb(155, 155, = 155); width: 30px; text-align: right; } .icon_help { background-position: 0px -30px; width: 19px; height: 18px; } .icon_scopus_labs { background-position: 0px -78px; width: 15px; height: 18px; } .btn_limit_to_center { padding-top: 4px; padding-left: 422px; float: left; } .preloadimage { display: none; } .FederatedSearchQuickLink { width: 18px; height: 22px; text-align: center; } .sourceMetricName { font-family: Verdana; font-size: smaller; white-space: nowrap; } .JournalAnalyzer { width: 127px; height: 18px; } .SourceBrowseEntitlementIcon { text-align: center; } .SourceBrowseLegendDisplay { width: 13px; height: 16px; } .SourceBrowseEntitlementIcon { width: 13px; height: 16px; } .SourceBrowseListDisplay { width: 13px; height: 16px; } a.iconHelpSmall { background: url("/static/images/help.gif") no-repeat left; padding: 2px = 7px; width: 13px; valign: bottom; } a { color: rgb(1, 86, 170); text-decoration: none; } a:link { color: rgb(1, 86, 170); text-decoration: none; } a:visited { color: rgb(1, 86, 170); text-decoration: none; } a:active { color: rgb(51, 51, 51); text-decoration: underline; } a:hover { color: rgb(1, 86, 170); text-decoration: underline; } a:focus { color: rgb(1, 86, 170); text-decoration: underline; } .InputText { width: 162px; color: rgb(153, 153, 153); line-color: #b2b2b2; } .Spacer { padding-right: 17px; } .SpacerForCombineQueries { padding-right: 7px; } .SpacerAfterHelpLink { padding-right: 5px; } .SpacerAfterCombineQueriesLink { padding-right: 12px; } .authFreeWidth { width: 266px; } .authFreeUL { margin: 5px 0px 0px; padding-left: 15px; } .authFreeLI { padding-bottom: 3px; _padding-bottom: 10px; } .paddingL17 { padding-left: 17px !important; } .paddingT145 { padding-top: 145px; } .documentSearchLink { border-width: 0px; padding: 3px 0px; color: rgb(1, 86, 170); = font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; = text-decoration: underline; cursor: pointer; background-color: inherit; } .affilIcon { padding-top: 0px; padding-right: 1px; padding-left: 1px; h-align: = right; } .affilSearchResultsZone { padding: 0px 5px; width: 745px; } .maintextbold { font-weight: bold; } .htext { color: rgb(255, 0, 0); font-weight: bold; } .errtext { color: rgb(255, 0, 0); font-weight: bold; } .errTextNonBold { color: rgb(255, 0, 0); } .errtext1 { padding: 4px; color: rgb(255, 0, 0); font-weight: bold; } a.errtext:link { color: rgb(255, 0, 0); text-decoration: underline; } a.errtext:active { color: rgb(255, 0, 0); text-decoration: underline; } a.errtext:visited { color: rgb(255, 0, 0); text-decoration: underline; } a.errtext:hover { color: rgb(255, 0, 0); text-decoration: underline; } .fldlabel { font-weight: bold; } .btnlnksm { border-width: 0px; color: rgb(0, 0, 0); font-weight: bold; = text-decoration: underline; background-color: rgb(223, 223, 223); } .btnlnkxsm { border-width: 0px; color: rgb(0, 0, 0); font-weight: bold; = text-decoration: underline; background-color: rgb(223, 223, 223); } .authorselectionhide { visibility: hidden; } .authorselectionshow { visibility: visible; } .mainheader { font-size: larger; font-weight: bold; } .smallheader { font-weight: bold; } .pageheader { color: rgb(8, 90, 165); font-size: larger; font-weight: bold; } .lineDbWh-T { border-width: 1px 0px 0px; border-style: solid none none; border-color: = rgb(8, 90, 165) currentColor currentColor; margin: 0px; padding: 0px; = background-color: rgb(230, 244, 253); } img.outwardLink { border: 0px currentColor; } img.outwardLinkMiddle { border: 0px currentColor; vertical-align: middle; } .citedByNoLink { color: rgb(102, 102, 102); text-decoration: underline; } .citedByLink { color: rgb(102, 102, 102); text-decoration: underline; } .noImageBorder { border: 0px currentColor; } img.imgCentered { vertical-align: middle; } a.jsLink:link { color: rgb(1, 86, 170); } a.jsLink:hover { color: rgb(1, 86, 170); } a.jsLink:active { color: rgb(102, 102, 102); } a.jsLink:visited { color: rgb(132, 0, 132); } a.tooltip { color: rgb(0, 0, 0); text-decoration: none; position: relative; = z-index: 24; } a.tooltip:visited { color: rgb(0, 0, 0); text-decoration: none; } a.tooltip:active { text-decoration: none; cursor: pointer; } a.tooltip span { text-decoration: none; } a.tooltip:hover { color: rgb(0, 0, 0); text-decoration: none; z-index: 25; = background-color: transparent; } a.tooltip span.tooltipText { color: rgb(0, 0, 0); text-decoration: none; display: none; } a.tooltip span.tooltipText:active { color: rgb(0, 0, 0); display: none; cursor: pointer; } a.tooltip:hover span.tooltipText { padding: 2px; border: 1px solid rgb(0, 0, 0); left: 0px; top: 25px; = width: 27em; text-align: left; color: rgb(0, 0, 0); text-decoration: = none; display: block; position: absolute; background-color: rgb(255, = 255, 221); } a.info { color: rgb(0, 0, 0); text-decoration: none; position: relative; = z-index: 24; } a.info:hover { text-decoration: underline; z-index: 25; background-color: transparent; } a.info span { display: none; } a.info:visited { text-decoration: none; } a.info:hover span { padding: 3px; border: 1px solid rgb(0, 0, 0); left: 28em; top: 1.5em; = width: 40em; text-align: left; color: rgb(0, 0, 0); text-decoration: = none; display: block; position: absolute; background-color: rgb(255, = 255, 221); } a.clickable { color: blue; text-decoration: underline; } a.clickable:active { color: red; background-color: rgb(255, 255, 204); } a.clickable:visited { color: purple; text-decoration: none; } a.clickable:hover { color: red; text-decoration: underline; } div.boxwrap { padding: 0px 15px 0px 0px; border: 1px solid rgb(8, 90, 165); color: = black; background-color: rgb(230, 244, 253); } div.ctoboxwrap { padding: 0px 15px 0px 0px; border: 1px solid rgb(8, 90, 165); width: = 480px; color: black; background-color: rgb(230, 244, 253); } div.boxcontent { background-color: rgb(230, 244, 253); } .tol { height: 7px; display: block; position: relative; } .tor { height: 7px; display: block; position: relative; } .bol { height: 7px; display: block; position: relative; } .bor { height: 7px; display: block; position: relative; } .tol { background: url("/static/images/corner_top_left_blue.gif") no-repeat = left top; left: -1px; top: -1px; width: 7px; float: left; } .bol { background: url("/static/images/corner_bottom_left_blue.gif") no-repeat = left bottom; left: -1px; top: 1px; width: 70px; float: left; } .tor { background: url("/static/images/corner_top_right_blue.gif") no-repeat = right top; left: 16px; bottom: 1px; } .bor { background: url("/static/images/corner_bottom_right_blue.gif") = no-repeat right bottom; left: 16px; top: 1px; } .footerseparator1 { border: 0px currentColor; width: 100%; height: 1px; margin-top: 15px; = margin-bottom: 19px; margin-left: 10px; } .ScopusDivBarColorBg { background-color: rgb(0, 99, 112); } .firstbox { margin-left: 10px; } .export { margin-left: 10px; table-layout: auto; } .print { margin-left: 10px; } .email { margin-left: 10px; table-layout: auto; } .secondBox { margin-left: 10px; table-layout: auto; } .thirdBox { =09 } .helpULHeaderScopus { margin-left: 20px; } .helpULHeader { margin-left: 20px; } .helpUL { margin-top: 5px; } .helpLI { list-style: url("/static/images/bullet.gif"); } .help { width: 535px; margin-left: 125px; } .helpScopus { width: 565px; margin-left: 32px; } .right { float: right; } ul.specifyFieldsUL { list-style: none; border: 0px currentColor; padding-top: 3px; = padding-left: 18px; margin-top: 5px; margin-left: 0px; } ul.specifyFieldsUL li > span { margin-left: 1px; vertical-align: 10%; } ul.specifyFieldsUL li { margin-top: 0px; } ul.specifyFieldsUL .specifyFieldsLI { margin-left: -20px; } .ctoPrintSummaryTable { width: 100%; } .ctoPrintReturnBtnDiv { width: 67px; vertical-align: top; } .ctoPrintBtnDiv { width: 107px; text-align: right; vertical-align: top; } .ctoPrintSummaryDiv { float: left; } .ctoPrintHirschBox { padding: 8px; border: 1px solid rgb(155, 155, 155); margin-top: 8px; } .ctoPrintSourceInfo { display: inline; } #hirsch_box_header { padding: 4px 8px; } .resultsCheckbox { border: 0px currentColor; padding-top: 3px; padding-right: 7px; = vertical-align: middle; float: right; } .basicresultsCheckbox { padding-top: 3px; padding-right: 2px; vertical-align: middle; float: = right; } .noPadBottom { padding-bottom: 0px; } .infobubble-container { position: relative; } .previewinfobox ul { list-style: none url("/static/images/preview/infobullet_greyed.gif"); = margin: 0px 0px 0px 15px; padding: 0px; text-indent: 3px; = vertical-align: middle; } .infobox ul { list-style: none; margin: 7px 0px 0px; padding: 0px; vertical-align: = middle; } .infobox li.none { list-style-image: url("/static/images/spacer.gif"); } .infobox ul li { margin: 0px 0px 5px; } .infobox ul li a { background: url("/static/images/relatedDocs.gif") no-repeat 0px 55%; = padding: 2px 7px 2px 21px; } .infobox ul li a:hover { background: url("/static/images/relatedDocs.gif") no-repeat 0px 55%; = padding: 2px 7px 2px 21px; } .infobubble ul li a { padding: 0px !important; } .infobox a { margin: 0px; padding: 0px; color: rgb(1, 86, 170); } .infobox a:hover { margin: 0px; padding: 0px; color: rgb(1, 86, 170); } .inforeldocbox ul { list-style: none; margin: 7px 0px 0px; padding: 0px; vertical-align: = middle; } .inforeldocbox li.none { list-style-image: url("/static/images/spacer.gif"); } .inforeldocbox ul li { margin: 0px 0px 5px; } .inforeldocbox a { background: url("/static/images/relatedDocs.gif") no-repeat 0px 55%; = padding: 2px 7px 2px 21px; } .inforeldocbox a:hover { background: url("/static/images/relatedDocs.gif") no-repeat 0px 55%; = padding: 2px 7px 2px 21px; } .infobubble { padding: 8px 30px 10px 18px; left: -209px; top: -38px; width: 209px; = height: 95px; text-indent: -1px; display: none; position: absolute; = background-image: url("/static/images/infobubble-small.gif"); = background-repeat: no-repeat; } .infobubbleCategoriesDown { left: -100px; bottom: 14px; display: none; position: absolute; z-index: = 1; _bottom: 5px; } .infobubbleCategoriesContent { background: white; width: 120px; text-indent: -1px; overflow: visible; = padding-top: 8px; padding-bottom: 10px; margin-right: 18px; margin-left: = 20px; } .infobubbleCategoriesDownLI { list-style-image: url("/static/images/infobubble-bullet.gif"); } .infobubbleCategoriesDownUL { margin: 3px 0px 0px 15px; padding: 0px; list-style-image: = url("/static/images/infobubble-bullet.gif"); } .infobubbleCategoriesDownSPAN { color: rgb(0, 0, 0); text-decoration: none; } div > .infobubble { width: 159px; height: 80px; z-index: 10; } .infobubble span { color: rgb(0, 0, 0); text-decoration: none; } .infobubble ul { margin: 3px 0px 0px 15px; padding: 0px; list-style-image: = url("/static/images/infobubble-bullet.gif"); } .infobubble li { list-style-image: url("/static/images/infobubble-bullet.gif"); } body { margin: 0px; font-family: Arial, verdana, helvetica, sans-serif; = font-size: 75%; } .bg1 { background-color: rgb(0, 99, 112) !important; } .bg2 { background-color: rgb(204, 255, 242) !important; } .bg3 { background-color: rgb(232, 232, 232) !important; } .bg4 { background-color: rgb(239, 239, 239) !important; } .bg5 { background-color: rgb(241, 241, 241) !important; } .ln1 { border-color: rgb(155, 155, 155) !important; } .ln2 { border-color: rgb(153, 153, 153) !important; } .ln3 { border-color: rgb(178, 178, 178) !important; } .ln4 { border-color: rgb(217, 217, 217) !important; } .ln5 { border-color: rgb(0, 99, 112) !important; } .hl1 { background-color: rgb(255, 255, 153) !important; } .borderB { border-width: 1px; border-style: none none solid; } .fontColorGrey { color: rgb(107, 107, 107) !important; } .bgWhite { background-color: rgb(255, 255, 255) !important; } .Bold { font-weight: bold; } .Spacer { padding-right: 17px; } #header { position: relative; z-index: 2; } h2 { margin: 0px; } p { margin: 0px; } .displayNone { display: none; } .noJs { display: none; } .margin0 { margin: 0px !important; } .margin { margin: 0px 5px 0px 2px; } .marginL10 { margin-left: 10px !important; } .marginL15 { margin-left: 15px !important; } .marginL20 { margin-left: 20px !important; } .marginL25 { margin-left: 25px !important; } .marginL30 { margin-left: 30px !important; } .marginL3 { margin-left: 3px !important; } .paddingR0 { padding-right: 0px !important; } .paddingL0 { padding-left: 0px !important; } .padding10 { padding: 10px; } .padding5 { padding: 5px; } .padding15 { padding: 15px; } .padding20 { padding: 20px; } .floatL { float: left; } .floatR { float: right; } #outerWrapper { min-width: 960px; _width: 100%; } #actions { _width: 100%; } #messageBar { background: url("/static/images/bg_QuickSearch.gif") repeat-x 100% = 100%; color: rgb(112, 112, 112) !important; } #messageBar .padding { padding: 10px 12px; } #quickSearch { background: url("/static/images/bg_QuickSearch.gif") repeat-x; color: = black !important; } #quickSearch .padding { padding: 9px 12px; } #quickSearch h3 { margin: 6px 0px 0px; position: absolute; } #quickSearch form { margin: 3px 108px 0px 0px; padding: 0px; } #quickSearch form p { margin: 0px; padding: 0px; line-height: 22px; white-space: nowrap; } #quickSearch form p span label span { width: 40px; text-align: right; display: inline-block; } #quickSearch label { =09 } #quickSearch label span { width: 85px; text-align: left; margin-right: 2px; display: = inline-block; } #quickSearch label input { margin: 0px; border: 1px solid rgb(178, 178, 178); height: 15px; } #quickSearch label input.small { margin: 0px; border: 1px solid rgb(178, 178, 178); width: 30px; } #quickSearch form p input.button { font-weight: bold; margin-left: 10px; } #quickSearch p.options { margin: 0px; padding: 0px; text-align: right; right: 10px; line-height: = 20px; position: absolute; } #quickSearch p.options a { color: rgb(1, 86, 170); text-decoration: none; } #quickSearch p.options a:link { color: rgb(1, 86, 170); text-decoration: none; } #quickSearch p.options a:hover { text-decoration: underline; } #content-container { font-size: 0.8em; margin-right: 8px; margin-left: 8px; } .content { padding: 10px; } #container { =09 } #footer { =09 } #footer .padding { padding: 7px 12px 11px; } #linkArea { background: rgb(241, 241, 241); margin: 0px 0px 1px; border: 1px solid = rgb(218, 218, 218); color: rgb(112, 112, 112); } #linkArea .padding { padding: 11px 16px 8px; white-space: nowrap; } #linkArea ul { margin: 0px 63px 0px 0px; padding: 0px; width: 157px; float: left; } #linkArea ul.logoElsevier { margin: 0px !important; width: 61px !important; } #linkArea ul li { margin: 0px; list-style-type: none; list-style-position: outside; } #linkArea ul li ul { margin: 0px; padding-left: 1px; float: none; } #linkArea a { color: rgb(1, 86, 170); text-decoration: none; } #copyrightArea a { color: rgb(1, 86, 170); text-decoration: none; } #linkArea a:hover { text-decoration: underline; } #copyrightArea a:hover { text-decoration: underline; } #copyrightArea { background: rgb(241, 241, 241); border: 1px solid rgb(218, 218, 218); = color: rgb(112, 112, 112); } #copyrightArea .padding { padding: 11px 16px 8px; } #copyrightArea p { margin: 0px; } #masthead { margin: 0px; padding: 0px; left: 13px; width: 179px; height: 102px; = position: relative; z-index: 1; } #logoSciVerse { margin: 0px; border: 0px currentColor; width: 106px; height: 88px; = display: block; position: relative; } #logoScopus { margin: 0px; border: 0px currentColor; left: 98px; top: 26px; width: = 81px; height: 80px; display: block; position: absolute; } #logoScopus902 { top: 40px; position: absolute; } #logoPreviewScopus902 { top: 26px; position: absolute; } #masthead img { border: 0px currentColor; } .broughtToYou { padding: 0px 30px 0px 60px; } #suites { left: 208px; top: 12px; position: absolute; } #suites ul.suites { margin: 0px; padding: 0px; } #suites ul.suites li { list-style: none; margin: 0px; padding: 0px; line-height: 12px; float: = left; } #suites ul.suites li.last { =09 } #suites ul.suites li a { background: url("/static/images/divider_suite.gif") no-repeat 100% 50%; = margin: 0px; padding: 0px 9px; color: rgb(66, 66, 66); text-decoration: = none; white-space: nowrap; } #suites ul.suites li a.selected { font-weight: bold; } #suites ul.suites li a.last { =09 } #login { background: rgb(255, 255, 255); top: 12px; right: 3px; position: = absolute; z-index: 2; } #login ul { margin: 0px; padding: 0px 0px 0px 10px; } #login ul li { background: url("/static/images/divider_login.gif") no-repeat 100% 50%; = list-style: none; margin: 0px; padding: 0px; line-height: 12px; float: = left; } #login ul li a { margin: 0px; padding: 0px 8px; color: rgb(1, 86, 170); text-decoration: = none; white-space: nowrap; } #login ul li.selected { font-weight: bold; } #login ul li.last { =09 } #login ul li.login { background: url("/static/images/divider_login.gif") no-repeat 100% 50%; = padding: 0px 4px 0px 3px; } #login ul li a.plus { background: url("/static/images/login_expand.gif") no-repeat 90% 50%; = padding: 5px 24px 5px 9px; border: 0px currentColor; position: relative; = _background: url(/static/images/login_expandie6.gif) no-repeat 90% 50%; } #login ul li a.minus { background: url("/static/images/login_collapse.gif") no-repeat 90% 50%; = padding: 4px 23px 4px 8px; border-top-color: rgb(214, 224, 223); = border-right-color: rgb(214, 224, 223); border-left-color: rgb(214, 224, = 223); border-top-width: 1px; border-right-width: 1px; border-left-width: = 1px; border-top-style: solid; border-right-style: solid; = border-left-style: solid; position: relative; z-index: 2; _background: = url(/static/images/login_collapseie6.gif) no-repeat 90% 50%; } #logout { background: rgb(255, 255, 255); top: 12px; right: 3px; position: = absolute; z-index: 2; } #logout ul { margin: 0px; padding: 0px 0px 0px 10px; } #logout ul li { background: url("/static/images/divider_login.gif") no-repeat 100% 50%; = list-style: none; margin: 0px; padding: 0px; line-height: 10px; float: = left; _line-height: 12px; } #logout ul li a { margin: 0px; padding: 0px 8px; color: rgb(1, 86, 170); text-decoration: = none; white-space: nowrap; } #logout ul li.selected { font-weight: bold; } #logout ul li.last { =09 } #logout ul li.logout { background: url("/static/images/divider_login1.gif") no-repeat 99% 50%; } #logout ul li.logout a { padding: 0px 4px 0px 8px; } #logout ul li.details a.logoutPlus { background: url("/static/images/login_expand.gif") no-repeat 40% 50%; = padding: 4px 10px 5px; border: 0px currentColor; left: 0px; position: = relative; } #logout ul li a.logoutMinus { background: url("/static/images/login_collapse.gif") no-repeat 50% 50% = rgb(204, 254, 243); padding: 4px 9px; left: 0px; border-top-color: = rgb(214, 224, 223); border-right-color: rgb(214, 224, 223); = border-left-color: rgb(214, 224, 223); border-top-width: 1px; = border-right-width: 1px; border-left-width: 1px; border-top-style: = solid; border-right-style: solid; border-left-style: solid; position: = relative; } #logout ul li span { padding: 0px 8px; } #logout ul li span span { margin-left: 4px; } #logout ul li span a.userPlus { background: url("/static/images/login_expand.gif") no-repeat 40% 50%; = padding: 4px 10px 5px; border: 0px currentColor; left: 0px; position: = relative; } #logout ul li span a.userMinus { background: url("/static/images/login_collapse.gif") no-repeat 50% 50% = rgb(204, 254, 243); padding: 4px 9px; left: 0px; border-top-color: = rgb(214, 224, 223); border-right-color: rgb(214, 224, 223); = border-left-color: rgb(214, 224, 223); border-top-width: 1px; = border-right-width: 1px; border-left-width: 1px; border-top-style: = solid; border-right-style: solid; border-left-style: solid; position: = relative; } #loginBox { border: 1px solid rgb(214, 224, 223); top: 27px !important; width: = 258px; right: 120px; font-size: 1em; position: absolute; z-index: 1; } #loginBox .padding { padding: 14px 15px 0px; } #loginBox a { color: rgb(1, 86, 170); text-decoration: none; } #loginBox a:hover { text-decoration: underline; } .login-box-form { margin: 0px; padding: 0px; } .login-box-form p { margin: 0px 0px 2px; } .login-box-form label { text-align: left; } .login-box-form label span { margin: 0px; width: 64px; display: inline-block; cursor: default; } .login-box-form label input { margin: 0px; border: 1px solid rgb(155, 155, 155); width: 157px; } .login-box-form p.remember { margin: 10px 0px 0px 68px; padding: 0px; _margin: 10px 0 0 64px; } .login-box-form p.remember input { margin: 0px; font-weight: bold; vertical-align: middle; } .login-box-form p.remember label { margin: 0px 0px 0px 5px; _margin: 0px; } .login-box-form p.submit { margin: 10px 0px 0px 68px; padding: 0px; line-height: 0; } .login-box-form p.submit span { margin: 2px 5px 0px 68px; line-height: 14px; display: block; _margin: = 2px 5px 0 66px; } .login-box-form p.submit input.button { margin: 0px 5px 0px 0px; font-weight: bold; } #loginBox p.forgotpass { margin: 17px 0px 10px; } #loginBox p.institutiontext { margin: 0px; padding: 10px 0px 10px 15px; border-top-color: rgb(204, = 209, 214); border-top-width: 1px; border-top-style: solid; } #logoutBox { background: rgb(204, 254, 243); border: 1px solid rgb(214, 224, 223); = top: 27px; width: 258px; right: 116px; position: absolute; z-index: 1; } #logoutBox .padding { padding: 14px; } #logoutBox a { color: rgb(1, 86, 170); text-decoration: none; } #logoutBox a:hover { text-decoration: underline; } #userBox { background: rgb(204, 254, 243); border: 1px solid rgb(214, 224, 223); = top: 27px; width: 258px; right: 186px; position: absolute; z-index: 1; } #userBox .padding { padding: 14px; } #userBox a { color: rgb(1, 86, 170); text-decoration: none; } #userBox a:hover { text-decoration: underline; } #userBox p { margin: 0px 0px 5px; } #banner-top { top: 34px; width: 234px; height: 60px; right: 12px; overflow: hidden; = position: absolute; } #banner-bottom { background: rgb(255, 255, 255); border: 1px solid rgb(217, 217, 217); = width: 145px; height: 60px; right: 28px; overflow: hidden; margin-top: = 10px; position: absolute; } .navigation { width: 100%; height: 29px; color: rgb(255, 255, 255); border-top-color: = rgb(153, 153, 153); border-bottom-color: rgb(215, 215, 215); = border-top-width: 4px; border-bottom-width: 2px; border-top-style: = solid; border-bottom-style: solid; position: relative; background-color: = rgb(0, 99, 112); } .preview { color: rgb(175, 170, 174); cursor: default; background-color: rgb(0, = 99, 112) !important; } .preview ul li span { padding: 0px 12px; } .preview ul li { background: url("/static/images/preview_divider_nav.gif") no-repeat = 100% 50% !important; } .preview ul li span.selected { font-weight: bold; } ul.main { height: 29px; float: left; } ul.misc { height: 29px; float: right; } ul.nav { margin: 0px; padding: 0px; } ul.nav li { background: url("/static/images/divider_nav.gif") no-repeat 100% 50%; = list-style: none; margin: 0px; padding: 8px 0px; line-height: 13px; = float: left; } ul.nav li a { margin: 0px; padding: 0px 12px; color: rgb(255, 255, 255); = text-decoration: none; white-space: nowrap; } ul.nav li a.selected { font-weight: bold; } ul.nav li a { color: rgb(255, 255, 255); } ul.nav li a:link { color: rgb(255, 255, 255); } ul.nav li a:hover { color: rgb(255, 255, 255); } ul.nav li a:visited { color: rgb(255, 255, 255); } ul.nav li a:hover { text-decoration: underline; } ul.nav li.last { =09 } #scTabs { top: 1px; height: 30px; white-space: nowrap; position: relative; = z-index: 2; } #scTabs ul { list-style: none; margin: 0px; padding: 0px; _position: relative; } #scTabs li { background: url("/static/images/scTabs.gif") no-repeat right top; = margin: 0px; padding: 0px 7px 0px 0px; float: left; white-space: nowrap; = position: relative; _width: 60px; } #scTabs a { background: url("/static/images/scTabs.gif") no-repeat left top; = margin: 0px; padding: 7px 10px 3px 12px; color: rgb(0, 0, 0); = line-height: 20px; text-decoration: none; float: left; display: block; = cursor: pointer !important; } #scTabs a span { height: 20px; line-height: 20px; display: block; } #scTabs a:visited { color: rgb(0, 0, 0); } #scTabs a:hover { color: rgb(51, 51, 51); } #scTabs li.selected { background: url("/static/images/scTabs.gif") no-repeat right top; = padding: 0px 7px 0px 0px; } #scTabs li.selected a { background: url("/static/images/scTabs.gif") no-repeat left top; = padding: 7px 10px 4px 12px; top: 1px; } #scTabs li.federatedOutwardSearchLink { =09 } #scTabs li.federatedOutwardSearchLink span { height: 20px; line-height: 20px; display: block; } #scTabs li.federatedOutwardSearchLink span a { color: rgb(1, 86, 170); } #scTabs li.greyBg { background: url("/static/images/scTabs.gif") no-repeat right bottom = !important; } #scTabs li.greyBg a { background: url("/static/images/scTabs.gif") no-repeat left bottom = !important; } #scTabs .noscript { position: relative; _top: 3px; } #scTabs .noscript input { top: -1px; position: relative; } #scTabs .noscript #docSearch { margin-left: 0px; } #scTabs .noscript #docSearchSelected { top: 0px; margin-left: 0px; } #scTabs .noscript #authSearch { =09 } #scTabs .noscript #authSearchSelected { top: 0px; position: relative; } #scTabs .noscript #affSearch { =09 } #scTabs .noscript #affSearchSelected { top: 0px; position: relative; } #scTabs .noscript #advSearch { =09 } #scTabs .noscript #advSearchSelected { top: 0px; position: relative; } .contentBody { margin: 0px 0px 10px; display: block; z-index: 1; } .bgGrey { background-color: rgb(232, 232, 232); } .contentBody .padding { padding: 10px; } .contentBody .top { background: url("/static/images/bg_top.gif") repeat-x; margin: 0px 7px = 0px 6px; height: 2px; position: relative; _margin: 0 5px 0 1px; = _overflow: hidden; } .contentBody .topLeft { background: url("/static/images/bg_topLeft.gif") no-repeat; left: -6px; = width: 6px; height: 3px; position: absolute; _left: -1px; } .contentBody .topRight { background: url("/static/images/bg_topRight.gif") no-repeat; width: = 7px; height: 3px; right: -7px; float: right; position: relative; } .contentBody .midLeft { background: url("/static/images/bg_midLeft.gif") repeat-y; } .contentBody .midRight { background: url("/static/images/bg_midRight.gif") repeat-y right; = margin: 0px 1px 0px 0px; } .contentBody .bottom { background: url("/static/images/bg_bottom.gif") repeat-x bottom; = margin: 0px 6px 0px 3px; height: 5px; display: block; position: = relative; _margin: 0 5px 0 1px; _overflow: hidden; } .contentBody .bottomLeft { background: url("/static/images/bg_bottomLeft.gif") no-repeat; left: = -3px; width: 7px; height: 5px; position: absolute; _bottom: 0; = _overflow: hidden; } .contentBody .bottomRight { background: url("/static/images/bg_bottomRight.gif") no-repeat; width: = 5px; height: 5px; right: -5px; float: right; position: relative; = _overflow: hidden; } .contentBody .margin { margin: 0px 5px 0px 2px; } .contentMain { border: 1px solid rgb(252, 252, 252); position: relative; = background-color: rgb(246, 246, 246); } .contentMain .contentShadow { border: 1px solid rgb(237, 237, 237); left: -1px; top: -1px; position: = relative; background-color: rgb(225, 225, 225); } .contentMain .contentBorders { background: rgb(255, 255, 255); border: 1px solid rgb(155, 155, 155); = left: -1px; top: -1px; position: relative; } .contentMain .contentPadding { padding: 8px; } div.hr { background: no-repeat center rgb(155, 155, 155); margin: 0px; height: = 1px; } div.hr hr { display: none; } .clearfix::after { height: 0px; clear: both; display: block; visibility: hidden; content: = "."; } .clearfix { zoom: 1; } .clear { height: 0px; clear: both; font-size: 0px; } .clearCluster { height: 0px; clear: both; font-size: 0px; } .zoomFix { zoom: 1; } .paddingT5 { padding-top: 5px; } .paddingR5 { padding-right: 5px; } .paddingB5 { padding-bottom: 5px; } .paddingL5 { padding-left: 5px; } .paddingT7 { padding-top: 7px !important; } .paddingR7 { padding-right: 7px !important; } .paddingB7 { padding-bottom: 7px !important; } .paddingL7 { padding-left: 7px !important; } .paddingT9 { padding-top: 9px !important; } .paddingT10 { padding-top: 10px !important; } .paddingR10 { padding-right: 10px !important; } .paddingB10 { padding-bottom: 10px !important; } .paddingL10 { padding-left: 10px !important; } .paddingT15 { padding-top: 15px; } .paddingR15 { padding-right: 15px; } .paddingB15 { padding-bottom: 15px; } .paddingL15 { padding-left: 15px; } .paddingT20 { padding-top: 20px; } .paddingR20 { padding-right: 20px !important; } .paddingB20 { padding-bottom: 20px; } .paddingL20 { padding-left: 20px; } .paddingT2 { padding-top: 2px; } .paddingR2 { padding-right: 2px; } .paddingB2 { padding-bottom: 2px; } .paddingL2 { padding-left: 2px; } .padding0 { padding: 0px !important; } .verticalAlignMid { vertical-align: middle; } .txtSmallest { font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 0.84em; } .txtSmaller { font-size: 0.92em; } .txtLarge { font-size: 1.09em; } .txtLarger { font-size: 1.17em; } .txtLargest { font-size: 1.35em; } .txtRequired { font-size: 1.5em; } .txtTitle { font-size: 1.75em; } .txtTitle small { color: rgb(153, 153, 153); font-size: 60%; font-weight: lighter; } a.iconDeleteSmall { background: url("/static/images/delete.gif") no-repeat left; padding: = 2px 7px 2px 21px !important; } a.iconEmailSmall { background: url("/static/images/email.gif") no-repeat left; padding: = 2px 7px 2px 21px !important; } a.iconSetalertSmall { background: url("/static/images/alert.gif") no-repeat left; padding: = 2px 7px 2px 21px !important; } a.iconSetfeedSmall { background: url("/static/images/icon_rss.gif") no-repeat left; padding: = 2px 7px 2px 20px !important; } a.iconEditSmall { background: url("/static/images/edit.gif") no-repeat left; padding: 2px = 7px 2px 21px !important; } a.iconSaveSmall { background: url("/static/images/save.gif") no-repeat left; padding: 2px = 7px 2px 21px !important; } a.iconShowSmall { background: url("/static/images/plus-Wh.gif") no-repeat right; padding: = 2px 14px 2px 7px !important; } a.iconHideSmall { background: url("/static/images/minus-Wh.gif") no-repeat right; = padding: 2px 14px 2px 7px !important; } a.iconEmptySmall { padding: 2px 7px !important; } div#combineQuery { margin: 32px 0px 0px 285px; display: inline; position: absolute; } #combinedSearch { padding: 4px; border: 1px solid currentColor; width: 162px; color: = rgb(155, 155, 155); font-size: 80%; } .colheadDbLb-LTB { border-width: 1px 0px 1px 1px; border-style: solid none solid solid; = border-color: rgb(0, 99, 112) currentColor rgb(155, 155, 155) rgb(0, 99, = 112); margin: 0px; padding: 5px 6px; background-color: rgb(204, 255, = 242); } .colheadDbLb-LRTB { border-width: 1px; border-style: solid; border-color: rgb(0, 99, 112) = rgb(0, 99, 112) rgb(155, 155, 155); margin: 0px; padding: 5px 6px; = background-color: rgb(204, 255, 242); } .tableDbWh-LRTB { margin: 0px; padding: 0px; border: 1px solid rgb(155, 155, 155); = background-color: rgb(255, 255, 255); } .textMargin { margin: 0px; padding: 5px; } .checkBoxMargin { margin: 0px; padding: 5px 1px; } .groupedCheckBoxMargin { margin: 0px; padding: 5px 1px 1px; } .textcl { background-color: rgb(232, 232, 232); } .textcl { background-color: rgb(250, 250, 250); } a.iconExportSmall { background: url("/static/images/export.gif") no-repeat left; padding: = 2px 7px 2px 21px !important; } a.iconPrintSmall { background: url("/static/images/print.gif") no-repeat 0px 2px; padding: = 2px 7px 2px 21px !important; } a.iconPrintSmall:hover { background: url("/static/images/print_over.gif") no-repeat 0px 2px; = padding: 2px 7px 2px 21px !important; } a.iconPrintSmallDisabled { background: url("/static/images/print_over.gif") no-repeat 0px 2px; = padding: 2px 7px 2px 21px !important; } a.moreInfo { color: rgb(0, 0, 255); font-size: xx-small; font-weight: bold; cursor: = pointer; ext-decoration: underline; } a.moreInfo:link { color: rgb(0, 0, 255); text-decoration: none; } a.moreInfo:visited { color: rgb(8, 93, 173); text-decoration: none; } a.moreInfo:hover { color: rgb(8, 93, 173); text-decoration: underline; cursor: pointer; } a.moreInfo:active { color: rgb(8, 93, 173); text-decoration: none; } #resultsHeader .padding { padding: 8px 5px 5px 35px; } #resultsFooter .padding { padding: 8px 5px 5px 35px; } #resultsBody { =09 } #resultsHeader .paddingSearch { padding: 8px 5px 5px 26px; position: relative; } .basiccontentMain { border: 1px solid rgb(252, 252, 252); position: static; = background-color: rgb(246, 246, 246); } .basiccontentMain .basiccontentShadow { border: 1px solid rgb(237, 237, 237); left: -1px; top: -1px; position: = static; background-color: rgb(225, 225, 225); } .basiccontentMain .basiccontentBorders { background: rgb(255, 255, 255); border: 1px solid rgb(155, 155, 155); = left: -1px; top: -1px; } .basiccontentMain .basiccontentPadding { padding: 8px; } .featuresRow { position: relative; } .featuresRow ul { list-style: none; margin: 0px; padding: 0px 0px 2px; line-height: 1.2; = vertical-align: middle; cursor: default; } .featuresRow ul li { background: url("/static/images/divider_features.gif") no-repeat 100% = 60%; margin: 0px 7px 0px 0px; padding: 0px; line-height: 20px; display: = inline; cursor: default; } .featuresRow ul li.groupAuthor { margin: 0px 2px 0px 0px; } .featuresRow ul li a { padding: 2px 7px 2px 0px; } .featuresRow ul li input { margin: 2px 7px -3px 0px; cursor: pointer; _position: relative; _top: = 3px; } .featuresRow ul li input.authorEval { margin: 2px 7px -4px 0px; } .featuresRow ul li span { padding: 2px 7px; } .featuresRow ul li.last { padding-right: 0px !important; } .featuresRow ul li.last a { padding-right: 0px !important; margin-right: 0px !important; } .featuresRow ul li.last input { margin-right: 0px !important; } .featuresRow ul li.last span { padding-right: 0px !important; margin-right: 0px !important; } input.iconLinkButton { padding: 2px 7px 2px 0px; margin-bottom: -5px; cursor: pointer; } .selectOptions { margin: 5px 0px 0px 30px; } .selectArrowDown { top: 35px; position: absolute; } .selectArrowUp { margin-top: -3px; position: absolute; } .selectArrowSearch { top: 45px; position: absolute; } .arrowLeft { margin-left: -9px; } span.selectArrow { width: 16px; display: block; } a.icon { margin: 0px; padding: 2px 7px 2px 21px; text-decoration: none; = white-space: nowrap; } a.iconToppageSmall { background: url("/static/images/topofpage.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a.iconToppageSmall:hover { background: url("/static/images/topofpage_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.iconToppageSmallDisabled { background: url("/static/images/topofpage_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.citationOverview { background: url("/static/images/citationoverview.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a span.citationOverview { background: url("/static/images/citationoverview.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a.citationOverview:hover { background: url("/static/images/citationoverview_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } a.citationOverviewDisabled { background: url("/static/images/citationoverview_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } a:hover span.citationOverview { background: url("/static/images/citationoverview_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } a span.citationOverviewDisabled { background: url("/static/images/citationoverview_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } a.showDocuments { background: url("/static/images/viewdocuments.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a span.showDocuments { background: url("/static/images/viewdocuments.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a.showDocuments:hover { background: url("/static/images/viewdocuments_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } a.showDocumentsDisabled { background: url("/static/images/viewdocuments_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } a:hover span.showDocuments { background: url("/static/images/viewdocuments_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } a span.showDocumentsDisabled { background: url("/static/images/viewdocuments_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } a.journalAnalyzer { background: url("/static/images/journalanalyzer.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a.journalAnalyzer:hover { background: url("/static/images/journalanalyzer_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } a.journalAnalyzerDisabled { background: url("/static/images/journalanalyzer_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } a.delete { background: url("/static/images/delete.gif") no-repeat left; padding: = 2px 5px 2px 21px !important; text-decoration: none; white-space: nowrap; } a.delete:hover { background: url("/static/images/delete_over.gif") no-repeat left; = padding: 2px 5px 2px 21px !important; } a.deleteDisabled { background: url("/static/images/delete_over.gif") no-repeat left; = padding: 2px 5px 2px 21px !important; } a.showSmall { background: url("/static/images/plus-Wh.gif") no-repeat right; padding: = 2px 14px 2px 7px !important; text-decoration: none; white-space: nowrap; } a.showSmall:hover { background: url("/static/images/plus-Wh.gif") no-repeat right; padding: = 2px 14px 2px 7px !important; } a.showSmallDisabled { background: url("/static/images/plus-Wh.gif") no-repeat right; padding: = 2px 14px 2px 7px !important; } a.hideSmall { background: url("/static/images/minus-Wh.gif") no-repeat right; = padding: 2px 14px 2px 7px !important; text-decoration: none; = white-space: nowrap; } a.hideSmall:hover { background: url("/static/images/minus-Wh.gif") no-repeat right; = padding: 2px 14px 2px 7px !important; } a.hideSmallDisabled { background: url("/static/images/minus-Wh.gif") no-repeat right; = padding: 2px 14px 2px 7px !important; } a.feedback { background: url("/static/images/feedback.gif") no-repeat left; padding: = 2px 7px 2px 21px !important; text-decoration: none; white-space: nowrap; } a.feedback:hover { background: url("/static/images/feedback_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.feedbackDisabled { background: url("/static/images/feedback_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.viewDocuments { background: url("/static/images/viewdocuments.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a.viewDocuments:hover { background: url("/static/images/viewdocuments_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } a.viewDocumentsDisabled { background: url("/static/images/viewdocuments_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } a.openpreview { background: url("/static/images/openpreview.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a.openpreview:hover { background: url("/static/images/openpreview_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.openpreviewDisabled { background: url("/static/images/openpreview_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.closepreview { background: url("/static/images/closepreview.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a.closepreview:hover { background: url("/static/images/closepreview_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.closepreviewDisabled { background: url("/static/images/closepreview_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.groupAuthor { background: url("/static/images/groupauthor.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a.groupAuthor:hover { background: url("/static/images/groupauthor_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.groupAuthorDisabled { background: url("/static/images/groupauthor_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.groupAffiliation { background: url("/static/images/groupaffiliation.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a.groupAffiliation:hover { background: url("/static/images/groupaffiliation_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } a.groupAffiliationDisabled { background: url("/static/images/groupaffiliation_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } a.disabled { color: rgb(153, 153, 153); cursor: default; } a.iconCitationOverviewSmall { background: url("/static/images/citationoverview.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.iconHGraphSmall { background: url("/static/images/hgraph.gif") no-repeat left; padding: = 2px 7px 2px 21px !important; } .headerGreyBg { background-color: rgb(232, 232, 232); } .ctoTableDbMb-LTB { border-width: 1px 0px; border-style: solid; border-color: rgb(51, 153, = 153); margin: 0px; padding: 0px; background-color: rgb(204, 255, 242); } .ctoTableDbMb-TRB { margin: 0px; padding: 0px; border-top-color: rgb(51, 153, 153); = border-right-color: rgb(51, 153, 153); border-left-color: rgb(51, 153, = 153); border-top-width: 1px; border-right-width: 1px; border-left-width: = 0px; border-top-style: solid; border-right-style: solid; = border-left-style: solid; background-color: rgb(204, 255, 242); } .ctoColheadDbMb-LTB { border-width: 1px 0px 1px 1px; border-style: solid none solid solid; = border-color: rgb(51, 153, 153) currentColor rgb(51, 153, 153) rgb(51, = 153, 153); margin: 0px; padding: 5px 6px; background-color: rgb(204, = 255, 242); } .ctoColheadDbMb-LRTB { margin: 0px; padding: 5px 6px; border: 1px solid rgb(51, 153, 153); = background-color: rgb(204, 255, 242); } .txtSmallerBold { font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 0.92em; = font-weight: bold; } a.save { background: url("/static/images/save.gif") no-repeat left; padding: 2px = 7px 2px 21px !important; text-decoration: none; white-space: nowrap; } a.save:hover { background: url("/static/images/save_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.saveDisabled { background: url("/static/images/save_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.edit { background: url("/static/images/edit.gif") no-repeat left; padding: 2px = 7px 2px 21px !important; text-decoration: none; white-space: nowrap; } a.edit:hover { background: url("/static/images/edit_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.editDisabled { background: url("/static/images/edit_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.saveAsAlert { background: url("/static/images/alert.gif") no-repeat left; padding: = 2px 7px 2px 21px !important; text-decoration: none; white-space: nowrap; } a.saveAsAlert:hover { background: url("/static/images/alert_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.saveAsAlertDisabled { background: url("/static/images/alert_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.setFeed { background: url("/static/images/rss_feed.gif") no-repeat left; padding: = 2px 7px 2px 20px !important; text-decoration: none; white-space: nowrap; } a.setFeed:hover { background: url("/static/images/rss_feed_over.gif") no-repeat left; = padding: 2px 7px 2px 20px !important; } a.setFeedDisabled { background: url("/static/images/rss_feed_over.gif") no-repeat left; = padding: 2px 7px 2px 20px !important; } a.searchHistory { background: url("/static/images/viewsearchhistory.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a.searchHistory:hover { background: url("/static/images/viewsearchhistory_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } a.searchHistoryDisabled { background: url("/static/images/viewsearchhistory_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } a.downloadPdf { background: url("/static/images/download_pdf.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a.downloadPdf:hover { background: url("/static/images/download_pdf_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.downloadPdfDisabled { background: url("/static/images/download_pdf_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.export { background: url("/static/images/export.gif") no-repeat left; padding: = 2px 7px 2px 21px !important; text-decoration: none; white-space: nowrap; } a.export:hover { background: url("/static/images/export_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.exportDisabled { background: url("/static/images/export_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } span.outputExport { background: url("/static/images/export.gif") no-repeat left; padding: = 2px 7px 2px 21px !important; text-decoration: none; white-space: nowrap; } span.outputPrint { background: url("/static/images/print.gif") no-repeat left; padding: = 2px 7px 2px 21px !important; text-decoration: none; white-space: nowrap; } span.outputEmail { background: url("/static/images/email.gif") no-repeat left; padding: = 2px 7px 2px 21px !important; text-decoration: none; white-space: nowrap; } span.outputQuikbib { background: url("/static/images/createbibliography.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a.print { background: url("/static/images/print.gif") no-repeat left; padding: = 2px 7px 2px 21px !important; text-decoration: none; white-space: nowrap; } a.print:hover { background: url("/static/images/print_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.printDisabled { background: url("/static/images/print_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.email { background: url("/static/images/email.gif") no-repeat left; padding: = 2px 7px 2px 21px !important; text-decoration: none; white-space: nowrap; } a.email:hover { background: url("/static/images/email_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.emailDisabled { background: url("/static/images/email_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.bookMark { background: url("/static/images/bookmark.gif") no-repeat left; padding: = 2px 7px 2px 21px !important; text-decoration: none; white-space: nowrap; } a.bookMark:hover { background: url("/static/images/bookmark_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.bookMarkDisabled { background: url("/static/images/bookmark_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.add2Collab { background: url("/static/images/add2collab.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a.add2Collab:hover { background: url("/static/images/add2collab_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.add2CollabDisabled { background: url("/static/images/add2collab_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.createBibliography { background: url("/static/images/createbibliography.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a.createBibliography:hover { background: url("/static/images/createbibliography_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } a.createBibliographyDisabled { background: url("/static/images/createbibliography_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } a.addToMyList { background: url("/static/images/addtomylist.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a.addToMyList:hover { background: url("/static/images/addtomylist_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.addToMyListDisabled { background: url("/static/images/addtomylist_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.viewCitations { background: url("/static/images/citation.gif") no-repeat left; padding: = 2px 7px 2px 21px !important; text-decoration: none; white-space: nowrap; } a.viewCitations:hover { background: url("/static/images/citation_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.viewCitationsDisabled { background: url("/static/images/citation_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.viewHGraph { background: url("/static/images/hgraph.gif") no-repeat left; padding: = 2px 7px 2px 21px !important; text-decoration: none; white-space: nowrap; } a.viewHGraph:hover { background: url("/static/images/hgraph_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.viewHGraphDisabled { background: url("/static/images/hgraph_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.addCategories { background: url("/static/images/edit.gif") no-repeat left; padding: 2px = 7px 2px 21px !important; text-decoration: none; white-space: nowrap; } a.addCategories:hover { background: url("/static/images/edit_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.addCategoriesDisabled { background: url("/static/images/edit_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.viewReferences { background: url("/static/images/viewreference.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a.viewReferences:hover { background: url("/static/images/viewreference_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } a.viewReferencesDisabled { background: url("/static/images/viewreference_over.gif") no-repeat = left; padding: 2px 7px 2px 21px !important; } .resultsMetrics { margin: 4px 0px; } .resultsMetrics .padding { padding: 10px; } .actionS { =09 } .actionS .col1 { width: 40%; text-align: left; float: left; } .actionS .col2 { width: 20%; text-align: center; float: left; } .actionS .col3 { width: 40%; text-align: right; float: right; } .bgRowColor { background-color: rgb(239, 239, 239); } .boxPadding8 { padding: 8px; } .boxPadding10 { padding: 10px; } .boxPadding-TB10 { padding: 10px 8px; } .boxPadding-TB15 { padding: 15px 8px; } .tableBorderGrey-T { border-width: 1px; border-style: solid none none; border-top-color: = rgb(155, 155, 155); } .tableBorderLight-T { border-width: 1px; border-style: solid none none; border-top-color: = rgb(217, 217, 217); } .marginR216 { margin-right: 216px; } .marginR220 { margin-right: 220px; } .marginR193 { margin-right: 193px; } .marginBN3 { vertical-align: bottom; } .marginBN4 { margin-bottom: -4px; } .marginB6 { margin-bottom: 6px !important; } .marginB7 { margin-bottom: 7px !important; } .marginB3 { margin-bottom: 3px !important; } .marginR8 { margin-right: 8px !important; } .aboutScopus { margin: 0px 0px 0px 10px; padding: 0px; width: 220px; } .aboutScopus h2 { margin: 0px 0px 3px; color: rgb(102, 102, 102); } .aboutScopus ul { list-style: none; margin: 0px 0px 20px; padding: 0px; } .aboutScopus li { margin: 0px 0px 3px; padding: 0px; } .aboutScopus a { text-decoration: none; } .scirusMarketingLink { width: 200px; float: right; } .referenceResults { width: 235px; float: right; } .ScopusResultsListRowColor { background-color: transparent; } .paddingLR-8 { padding: 0px 8px; } .paddingLR-10 { padding: 0px 10px; } .paddingB-10 { padding: 0px 8px 10px; } .paddingT-10 { padding: 10px 8px 0px; } a.showUnmatchedAuthors { background: url("/static/images/plus-Wh.gif") no-repeat left; padding: = 2px 7px 2px 14px !important; text-decoration: none; white-space: nowrap; } a.showUnmatchedAuthors:hover { background: url("/static/images/plus_greyed.gif") no-repeat left; = padding: 2px 7px 2px 14px !important; } a.showUnmatchedAuthorsDisabled { background: url("/static/images/plus_greyed.gif") no-repeat left; = padding: 2px 7px 2px 14px !important; } a.arrowDownOver { background: url("/static/images/arrow_down.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a.arrowDownOver:hover { background: url("/static/images/arrowdown_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.arrowDownOverDisabled { background: url("/static/images/arrowdown_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.hideUnmatchedAuthors { background: url("/static/images/minus-Wh.gif") no-repeat left; padding: = 2px 7px 2px 14px !important; text-decoration: none; white-space: nowrap; } a.hideUnmatchedAuthors:hover { background: url("/static/images/minus-Wh.gif") no-repeat left; padding: = 2px 7px 2px 14px !important; } a.hideUnmatchedAuthorsDisabled { background: url("/static/images/minus-Wh.gif") no-repeat left; padding: = 2px 7px 2px 14px !important; } .lightFontColor { color: rgb(153, 153, 153); } a.searchTips { background: url("/static/images/help.gif") no-repeat left; padding: 2px = 7px 2px 21px !important; text-decoration: none; white-space: nowrap; } a.searchTips:hover { background: url("/static/images/help_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.searchTipsDisabled { background: url("/static/images/help_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.iconHelpCombineSmall { background: url("/static/images/help.gif") no-repeat left; padding: 2px = 7px 2px 21px !important; } a.iconHelpCombineSmall:hover { background: url("/static/images/help_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.iconHelpCombineSmallDisabled { background: url("/static/images/help_over.gif") no-repeat left; = padding: 2px 7px 2px 21px !important; } a.addSearch { background: url("/static/images/addsearchfield.gif") no-repeat left; = padding: 2px 5px 2px 21px !important; text-decoration: none; = white-space: nowrap; } a.addSearch:hover { background: url("/static/images/addsearchfield_over.gif") no-repeat = left; padding: 2px 5px 2px 21px !important; } a.addSearchDisabled { background: url("/static/images/addsearchfield_over.gif") no-repeat = left; padding: 2px 5px 2px 21px !important; } .addsearchIE7 { _top: 0px; } .paddingR12 { padding-right: 12px !important; } .paddingB16 { padding-bottom: 16px !important; } .paddingB17 { padding-bottom: 5px !important; } .paddingL45 { padding-left: 45px !important; } .marginR266 { margin-right: 266px; } .height27 { height: 27px; } .height24 { height: 24px; } .height30 { height: 30px; } .marginL23 { margin-left: 23px; } .greyBottom { =09 } .marginB10 { margin-bottom: 10px !important; } .marginB15 { margin-bottom: 15px !important; } .marginB20 { margin-bottom: 20px !important; } .marginR7 { margin-right: 7px; } .marginT7 { margin-top: 7px; } .marginT5 { margin-top: 5px; } .marginT10 { margin-top: 10px; } .marginB5 { margin-bottom: 5px; } .Body { font-size: 100%; } .errText { background: url("/static/images/error.gif") no-repeat left; padding: = 10px 0px 10px 30px; } .warningText { background: url("/static/images/warning.gif") no-repeat left; padding: = 10px 0px 10px 30px; } .infoText { background: url("/static/images/info_message.gif") no-repeat left; = padding: 10px 0px 10px 30px; } .confirmText { background: url("/static/images/confirmation.gif") no-repeat left; = padding: 10px 0px 10px 30px; } .mainText { padding-left: 30px; } .marginR5 { margin-right: 5px !important; } .marginL5 { margin-left: 5px !important; } .marginL8 { margin-left: 8px !important; } .marginL7 { margin-left: 7px !important; } .marginT25 { margin-top: 25px !important; } .marginT20 { margin-top: 20px !important; } .marginT35 { margin-top: 35px !important; } .marginT30 { margin-top: 30px !important; } .marginR0 { margin-right: 0px !important; } .marginR10 { margin-right: 10px !important; } .marginL0 { margin-left: 0px !important; } #outputTypes label { text-indent: -15px; padding-left: 15px; display: inline-block; } #outputTypes input { margin: 0px; padding: 0px; top: -1px; width: 13px; height: 13px; = vertical-align: bottom; position: relative; } .marginT15 { margin-top: 15px !important; } .marginL0 { margin-left: 0px !important; } .marginT25 { margin-top: 25px !important; } .marginR7 { margin-right: 7px; } .marginT2 { margin-top: 2px; } .marginT3 { margin-top: 3px; } .tableWidth750 { width: 750px; } .width206 { width: 206px; } .width100 { width: 100%; } .modalWindow { background: 0px 0px rgb(204, 204, 204); margin: 0px; padding: 0px; = border: 0px currentColor; left: 0%; top: 0%; width: 100%; height: 100%; = color: rgb(204, 204, 204); filter: alpha(opacity=3D80); position: = absolute; z-index: 100; opacity: 0.8; } .modalWindowMsgBox { background: rgb(255, 255, 255); border: 1px solid rgb(153, 153, 153); = left: 250px; top: 195px; width: 500px; height: auto; position: absolute; = z-index: 200; } .modalRemoteAccessMessage { margin-bottom: 10px; } .modalRemoteAccessMargin { margin-left: 24px; } .modalRemoteAccessMessage { margin-left: 24px; } .mandatory { width: auto; text-align: left; color: rgb(255, 0, 0); padding-left: = 3px; } .zindexFront { z-index: 999; } .zindexBack { _z-index: -1; } .ScopusTermHighlight { font-weight: bold; } .ScopusTermHighlightColorBg { font-weight: bold; background-color: rgb(255, 255, 153); } #in { padding: 0px 5px; } #ssoregForm { =09 } #ssoregForm label { margin: 0px 0px 10px; display: block; } #ssoregForm label.error { margin: -7px 0px 10px; color: red; display: block; } #ssoregForm label span { width: 106px; text-align: right; padding-right: 8px; display: = inline-block; cursor: default; } #ssoregForm select.comboBox { width: 240px; font-family: Arial,verdana,helvetica,sans-serif; } #ssoregForm input.textBox { width: 236px; } #ssoregForm span.mandatory { width: auto; text-align: left; color: rgb(255, 0, 0); padding-left: = 3px; } #ssoregForm span.normal { width: auto; text-align: left; color: rgb(255, 0, 0); padding-left: = 0px; } #ssoregForm label span.userAgr { width: 0px !important; text-align: right; padding-right: 0px = !important; display: inline-block; cursor: default; } #ssoregForm label.hidden-label { top: -100px; width: 1px; height: 1px; padding-left: 114px; visibility: = hidden; position: absolute; } #ssoregForm .errText { background: url("/static/images/error.gif") no-repeat left; padding: = 0px 0px 10px 30px; } #ssoregForm .mainText { padding-left: 30px; } #ssoregForm label em { font-style: normal; } #ssoregForm .checklist { list-style: none; margin: 0px; padding: 0px; border: 1px solid rgb(204, = 204, 204); width: 356px; height: 143px; overflow: auto; = background-color: rgb(255, 255, 255); _height: 148px; } #ssoregForm .checklist label { margin: 0px; padding: 2px 0px 2px 6px; border-bottom-color: rgb(178, = 178, 178); border-bottom-width: 1px; border-bottom-style: solid; = display: block; } #ssoregForm .paddingL114 { padding-left: 114px; } #ssoregForm .paddingL26 { padding-left: 26px; } #ssoregForm .paddingR26 { padding-right: 26px; } #ssoregForm .paddingL140.input { padding-left: 140px; } #ssoregForm .hiddenLabel { visibility: hidden; } #ssoregForm .showOptFields { background: url("/static/images/plus-Wh.gif") no-repeat 100% 50%; = padding-right: 12px; } #ssoregForm .hideOptFields { background: url("/static/images/minus-Wh.gif") no-repeat 100% 50%; = padding-right: 12px; } a.tooltipLink { text-decoration: none; border-bottom-color: rgb(1, 86, 170); = border-bottom-width: 1px; border-bottom-style: dashed; position: = relative; z-index: 24; cursor: help; } a.tooltipLink:hover { text-decoration: none; border-bottom-color: currentColor; = border-bottom-width: medium; border-bottom-style: none; position: = relative; z-index: 25; -moz-outline-style: none; } a.tooltipLink:focus { text-decoration: none; position: relative; z-index: 25; cursor: help; = -moz-outline-style: none; } a.tooltipLink:active { text-decoration: none; position: relative; z-index: 25; cursor: help; = -moz-outline-style: none; } a.tooltipLink span { margin: 0px; left: 0px; top: 15px; color: rgb(0, 0, 0); display: none; = position: absolute; z-index: 26; } a.tooltipLink:hover span { margin: 0px; left: 0px; top: 15px; color: rgb(0, 0, 0); display: block; = position: absolute; z-index: 26; opacity: 1; } a.tooltipLink:focus span { margin: 0px; left: 15px; top: 15px; color: rgb(0, 0, 0); display: = block; position: absolute; z-index: 26; opacity: 1; } a.tooltipLink:active span { margin: 0px; left: 15px; top: 15px; color: rgb(0, 0, 0); display: = block; position: absolute; z-index: 26; opacity: 1; } span.topArrow { background: url("/static/images/infobubble-arrow-top.gif") no-repeat = 0px 0px; margin: 0px; left: 1px !important; top: 5px !important; width: = 62px !important; height: 25px; display: block; position: absolute; = z-index: 26; opacity: 1; } .tooltipLinkContent { background: rgb(255, 255, 255); margin: 25px 0px 0px; border: 1px solid = rgb(155, 155, 155); display: block; } .tooltipLinkContent strong { margin: 0px; padding: 0px 0px 5px; color: rgb(0, 0, 0); line-height: = 1.5em; font-size: 0.9em; font-style: normal; font-weight: bold; = border-bottom-color: rgb(153, 153, 153); border-bottom-width: 1px; = border-bottom-style: solid; display: block; } .tooltipLinkContent dfn.tooltipdfn { margin: 0px; padding: 12px 15px 10px; border: 4px solid rgb(240, 240, = 240); font-style: normal; display: block; } font { color: inherit; line-height: inherit; font-family: inherit; font-size: = 100%; font-style: inherit; font-variant: inherit; font-weight: inherit; = font-size-adjust: inherit; font-stretch: inherit; } basefont { color: inherit; line-height: inherit; font-family: inherit; font-size: = 100%; font-style: inherit; font-variant: inherit; font-weight: inherit; = font-size-adjust: inherit; font-stretch: inherit; } html { filter: expression(document.execCommand("BackgroundImageCache", false, = true)); } .inputTextColor { color: rgb(155, 155, 155); } .columnHeaderNoScript { padding: 4px 0px; } .verticalAlignMiddle { vertical-align: middle; } .verticalAlignTop { vertical-align: top; } .verticalAlignBottom { vertical-align: bottom; } span.divider { margin: 0px 7px; } cursorType { =09 } .surveyPopupTable { border: 1px solid rgb(0, 99, 112); } .surveyPopupTopLeft { background: url("/static/images/Popup_top-left.gif") no-repeat 0px 0px; = left: -1px; top: -1px; width: 5px; height: 6px; position: absolute; = z-index: 2; } .surveyPopupTopRight { background: url("/static/images/Popup_top-right.gif") no-repeat 0px = 0px; top: -1px; width: 5px; height: 6px; right: -1px; position: = absolute; z-index: 2; _right: -2px; } .surveyPopupBottomLeft { background: url("/static/images/Popup_bottom-left.gif") no-repeat 0px = 0px; left: -1px; width: 5px; height: 6px; bottom: -1px; position: = absolute; z-index: 2; _bottom: -11px; } .surveyPopupBottomRight { background: url("/static/images/Popup_bottom-right.gif") no-repeat 0px = 0px; width: 5px; height: 6px; right: -1px; bottom: -1px; position: = absolute; z-index: 2; _bottom: -11px; _right: -2px; } #sSearchWithin { padding: 12px 8px 5px; border-top-color: rgb(0, 0, 0); = border-top-width: 1px; border-top-style: solid; background-color: = rgb(232, 232, 232); } #sSearchWithin .searchbutton { margin: 0px; padding: 0px; clear: both; } #sSearchWithin .buttonWidth { width: 59px; } #sRefineResults { border-width: 1px; border-style: solid; border-color: rgb(0, 0, 0) = rgb(155, 155, 155) rgb(155, 155, 155); margin: 0px; padding: 0px; zoom: = 1; } #sRefineResults .top { padding: 9px 7px 6px 8px; color: rgb(0, 0, 0); font-weight: bold; = background-color: rgb(232, 232, 232); } #sRefineResults .authAffilTop { padding: 6px 7px 5px 8px; color: rgb(0, 0, 0); font-weight: bold; = background-color: rgb(232, 232, 232); } #previewsSearchWithin { padding: 9px 5px 5px 8px; border-top-color: rgb(0, 0, 0); = border-top-width: 1px; border-top-style: solid; background-color: = rgb(232, 232, 232); } #previewsSearchWithin .bottom { margin-bottom: 2px; } #previewsSearchWithin .searchButton { margin: 0px 0px 0px 2px; padding: 0px; width: 62px; clear: both; } .nojsBorder#previewsSearchWithin { border-top-color: currentColor; border-top-width: medium; = border-top-style: none; } #previewRefineHeader { padding: 6px 8px 5px 10px; color: rgb(0, 0, 0); background-color: = rgb(232, 232, 232); } #previewRefineFooter { padding: 8px; color: rgb(0, 0, 0); background-color: rgb(232, 232, = 232); } #previewRefineFooter .exportDiv { padding: 5px 0px 0px; text-align: right; } #clusterFooter .bot { padding: 6px 7px 5px 8px; color: rgb(0, 0, 0); font-weight: bold; = background-color: rgb(232, 232, 232); } #sRefineResults .head2 { margin: 0px; } #sRefineResults .buttons { width: 165px; padding-top: 2px; } .headerPadding { background: url("/static/images/header_bg.png") repeat-x; padding: 3px = 8px !important; min-height: 21px; } .colHeaderPadding { padding: 2px 4px !important; } .col18 { =09 } #sRefineResults .heading { padding: 5px 6px 5px 11px; color: rgb(107, 107, 107); font-weight: = bold; border-top-color: rgb(155, 155, 155); border-bottom-color: = rgb(155, 155, 155); border-top-width: 1px; border-bottom-width: 1px; = border-top-style: solid; border-bottom-style: solid; zoom: 1; = background-color: rgb(239, 239, 239); } .navigatorOverlay .headings { padding: 5px 6px 5px 11px; color: rgb(107, 107, 107); font-weight: = bold; border-bottom-color: rgb(155, 155, 155); border-bottom-width: 1px; = border-bottom-style: solid; background-color: rgb(239, 239, 239); } #sRefineResults .heading img { float: right; cursor: pointer; } .navigatorOverlay .heading img { float: right; cursor: pointer; } #sRefineResults .body { margin: 5px 0px 6px; } #sRefineResults .navigatorOverlay .body { margin: 5px 0px 4px; min-height: 60px; } .refineResults input { margin: 0px 5px 0px 0px; padding: 0px; top: 1px; vertical-align: = bottom; position: relative; } .refineResults .textCol { width: 182px; word-wrap: break-word; _width: 176px; } .refineResults .authAffilTextCol { width: 185px; word-wrap: break-word; _width: 178px; } #seachwithinresults { width: 125px; } .resultsHeaderSort { vertical-align: middle; display: table-cell; _margin-bottom: -15px; } .SortWidthJS { width: 180px; } .SortWidthNONJS { width: 222px; } .alignTextCenter { text-align: center; } .verticalAlignMiddle { vertical-align: middle; } .relativePos { position: relative; } .relativeStatic { position: static; } .navigatorLeft { position: absolute; z-index: 0; } .noNavigators { color: black; margin-left: 4px; display: none; } .navigatorHeader { cursor: pointer; } .navigatorCollapse { background: url("/static/images/header_bg.png") repeat-x; padding: 6px; = cursor: pointer; } .previewNavigatorCollapse { background: url("/static/images/header_bg.png") repeat-x; padding: 6px; } .navigatorCollapseDiv { border-top-color: rgb(204, 204, 204); border-bottom-color: rgb(204, = 204, 204); border-top-width: 1px; border-bottom-width: 1px; = border-top-style: solid; border-bottom-style: solid; float: right; } .resultList { margin-left: 225px; _margin-left: 222px; } .marginLeft5 { margin-left: 5px; } .navigatorOverlay { background: rgb(255, 255, 255); border: 1px solid rgb(155, 155, 155); = left: 0px; top: 0px; width: 842px; position: absolute; z-index: 9001; } .overlayHeading { border-top-color: currentColor; border-top-width: medium; = border-top-style: none; _width: 100%; } .overlayUL { _width: 200px; } .width336 { width: 336px; } .colWidth340 { width: 340px; } .marginR360 { margin-right: 360px; } .docSaveAsAlertMargin { margin-right: 15px !important; } .rightSideBar { width: 340px; } .leftBar { margin-right: 360px; } .toolbarHead h2 { background: rgb(235, 235, 235); padding: 3px 0px 3px 6px; font-size: = 1.35em; border-bottom-color: rgb(186, 186, 186); border-bottom-width: = 1px; border-bottom-style: solid; } .logoSciVerse { margin: 0px; border: 0px currentColor; width: 107px; height: 93px; = display: block; position: relative; } .logoScopus { margin: 0px; border: 0px currentColor; left: 108px; top: 26px; width: = 82px; height: 74px; display: block; position: absolute; } .borderT { border-top-color: rgb(155, 155, 155) !important; border-top-width: 1px = !important; border-top-style: solid !important; } .gadgetResultsWidth { width: 216px; } .restoreDiv { padding: 5px 6px 0px 0px; text-align: right; } .resultsPageNav { vertical-align: middle; display: inline-block; } .selectedText { padding: 5px 34px 5px 0px; } .scopusClusterHeader { width: 100%; height: 2.15em; text-align: right; color: rgb(107, 107, = 107); font-weight: bold; border-top-color: rgb(155, 155, 155); = border-bottom-color: rgb(155, 155, 155); border-top-width: 1px; = border-bottom-width: 1px; border-top-style: solid; border-bottom-style: = solid; background-color: rgb(239, 239, 239); } .dragDropBox { padding: 5px 0px 5px 11px; width: 150px; text-align: left; position: = absolute; } .clickBox { padding: 5px 8px 5px 0px; left: 160px; width: 50px; position: absolute; = cursor: pointer; } .navigatorOpenSideBar { background: url("/static/images/button_arrows_right.png") no-repeat 50% = 50%; padding: 6px 8px; border-top-color: rgb(0, 0, 0); = border-bottom-color: rgb(0, 0, 0); border-top-width: 1px; = border-bottom-width: 1px; border-top-style: solid; border-bottom-style: = solid; } .navigatorCollapseWidth { width: 35px; } .navigatorCollapseHeight { height: 900px; } .moveCursor { cursor: move; } .paddingLR8 { padding-right: 8px; padding-left: 8px; } .borderbotBlack { border-bottom-color: rgb(0, 0, 0); border-bottom-width: 1px; = border-bottom-style: solid; } .clearB { height: 0px; line-height: 0; clear: both; font-size: 0px; } .marginL4 { margin-left: 4px; } .marginL2 { margin-left: 2px !important; } .textCol .leftCol { width: 105px; _width: 103px; } .authAffilTextCol .leftCol { width: 105px; _width: 103px; } .pointer { cursor: pointer; } .greyArrow { color: rgb(153, 153, 153); font-weight: bold; } .greyArrow img { top: 2px; position: relative; } .overlayUL .textCol { width: 181px; _width: 172px; } .overlayUL .authAffilTextCol { width: 182px; _width: 175px; } #cib_Overlay { width: 486px; display: none; position: absolute; z-index: 9999; zoom: = 1; } #cib_Overlay .cib_Container { background: rgb(232, 232, 232); padding: 6px 7px 0px 12px; border: 1px = solid rgb(155, 155, 155); } #cib_Overlay .cib_Variable { zoom: 1; } #cib_Overlay .affColumn { width: 375px; } #cib_Overlay .variableRow { margin-top: 2px; margin-bottom: 10px; } #cib_Overlay .cib_Header { margin-top: 3px; } #cib_Overlay .cib_List { background: rgb(255, 255, 255); border: 1px solid rgb(155, 155, 155); = width: 456px; height: 195px; margin-top: 10px; overflow-y: auto; } #cib_Overlay .cib_Footer { margin: 10px 0px; } #cib_Overlay .cib_List .listPadding { padding-bottom: 12px; } #cib_Overlay .loadImage { margin-top: 76px; margin-left: 203px; } #cib_Overlay .cib_List .cibdocTitle { font-weight: bold; } #cib_Overlay .cib_List .cibotherDetails { font-style: italic; } #cib_Overlay .cib_List .noCIBResults { text-align: center; color: rgb(255, 0, 0); padding-top: 5px; = font-weight: bold; } #cib_Overlay .contentShadow { border: 1px solid rgb(232, 232, 232); background-color: rgb(232, 232, = 232); } #cib_Overlay .contentMain { border: currentColor; background-color: rgb(232, 232, 232); } #cib_Overlay #cib_leftImg { left: -14px; top: 17px; display: none; position: absolute; z-index: 4; } #cib_Overlay #cib_rightImg { top: 17px; right: -10px; display: none; position: absolute; z-index: 4; } #cibClose img { padding-left: 1px; vertical-align: top; } .savedSearchHeaderPadding { padding: 3px 8px 5px; } .savedSearchIcons { padding-top: 1px; margin-left: 5px; } .savedSearchHeader { margin-left: 45px; border-left-color: rgb(204, 204, 204); = border-left-width: 1px; border-left-style: solid; } .groupedAuthAffilHeader { margin-left: 52px; border-left-color: rgb(204, 204, 204); = border-left-width: 1px; border-left-style: solid; } .groupedAuthAffilFooter { padding: 6px 8px; margin-left: 27px; } .listHeaderPadding { padding: 3px 8px 5px 5px; } .groupHeaderPadding { padding: 5px 5px 5px 0px; } .previewPrevNextText { margin: 0px; padding: 2px; border: 1px solid rgb(155, 155, 155); width: = 30px; text-align: right; } .previewHeaderPadding { background: url("/static/images/header_bg.png") repeat-x; padding: 0px = 8px; min-height: 28px; } .previewHeaderPadding .leftCluster { padding-top: 6px; } div.titleDividerLine { background: no-repeat center rgb(232, 232, 232); margin: 0px; height: = 2px; } .exportRefine input { background: rgb(232, 232, 232) !important; margin: 0px; padding: 0px; = border: currentColor; text-align: right; color: rgb(1, 86, 170); = font-size: 11px; display: inline-block; cursor: pointer; } .exportRefine input:hover { text-decoration: underline; } .exportRefine { padding: 5px 6px 0px 0px; text-align: right; } .previewCursor { cursor: none !important; } .collapsedBorder { border-bottom-color: currentColor !important; border-bottom-width: = medium !important; border-bottom-style: none !important; } .previewResultsHeader { padding: 4px 8px 4px 5px; } .previewHeaderLeftCol { width: 57px; color: rgb(107, 107, 107) !important; padding-right: 0px; } .previewHeaderRightCol { width: 50px; text-align: right; padding-left: 0px; } .previewHeaderRightCol #sortBy { margin: 8px 0px 0px 5px; white-space: nowrap; } .previewHeaderIcons { border-right-color: rgb(204, 204, 204); border-left-color: rgb(204, = 204, 204); border-right-width: 1px; border-left-width: 1px; = border-right-style: solid; border-left-style: solid; } .previewHeaderIcons .textLinks { position: static; _display: inline-block; } .previewHeaderIcons .buttons { padding-bottom: 0px; margin-top: -2px; margin-left: 5px; } .previewFooterMiddle { border-left-color: rgb(204, 204, 204); border-left-width: 1px; = border-left-style: solid; } .previewFooterMiddle .textLinks { position: static; _display: inline-block; } .previewFooterMiddle .buttons { padding-bottom: 0px; margin-top: -2px; margin-left: 5px; } .previewDropDownBox { color: rgb(192, 192, 192); background-color: white; } .authSnippetMargin { padding: 5px 2px; } .authorWrap { white-space: pre-wrap; } .refineBorderNone { border-top-color: currentColor; border-top-width: medium; = border-top-style: none; } #overlay_screen { background: rgb(255, 255, 255); left: 230px; width: 100%; height: 100%; = display: none; filter: = progid:DXImageTransform.Microsoft.Alpha(opacity=3D1); position: = absolute; z-index: 9000; opacity: 0; } #overlay_screen_lefttop { background: rgb(255, 255, 255); width: 230px; height: 100%; display: = none; filter: progid:DXImageTransform.Microsoft.Alpha(opacity=3D1); = position: absolute; z-index: 9000; opacity: 0; } #overlay_screen_leftbot { background: rgb(255, 255, 255); width: 230px; height: 100%; display: = none; filter: progid:DXImageTransform.Microsoft.Alpha(opacity=3D1); = position: absolute; z-index: 9000; opacity: 0; } #navigatorOverlay { background: rgb(255, 255, 255); border: 1px solid rgb(161, 161, 161); = left: 11px; top: 0px; width: 842px; display: none; position: absolute; = z-index: 9001; } .paddingT3 { padding-top: 3px; } .cibListPadding { padding: 8px 0px 0px 8px; } .resultsLeftColumn { width: 220px; float: left; } .clearRight { clear: right; } .previewAbstract { display: inline-block; } .previewAuthorText { color: rgb(160, 160, 160); } .articlePressImg { vertical-align: text-bottom; } .articlePressTxt { margin-left: 5px; } .alertListClear { clear: right; } .clearAuthorNav { clear: right; } .endPage { margin: 0px 8px 0px 4px; } .goButtonMargin { margin-top: 2px; } .endPageFooter { margin: 0px 2px 0px 4px; } .authFreeResultsHeader { height: 35px; margin-right: 202px; margin-left: 57px; = border-left-color: rgb(204, 204, 204); border-left-width: 1px; = border-left-style: solid; } .authFreeFooterPadding { padding: 4px 8px 3px 5px; } .authFreeHeaderPadding { padding: 4px 8px 3px 5px; border-top-color: rgb(155, 155, 155); = border-top-width: 1px; border-top-style: solid; } .sortByBorder { height: 35px; border-left-color: rgb(204, 204, 204); border-left-width: = 1px; border-left-style: solid; float: right; } .sortByMargin { margin: 8px 0px 0px 5px; } a.cibClose { background: url("/static/images/cib_button_close.gif") no-repeat right; = padding: 2px 21px 2px 7px !important; text-decoration: none; = white-space: nowrap; } .authorProfileMessage { width: 550px; padding-top: 7px; white-space: normal; } .authorResultsLeftColumn { width: 220px; float: left; } .authorResultsRightColumn { padding-left: 0px; } .authorResultsShowDisplay { padding-left: 8px; display: block; } .verticalAlignTop { vertical-align: top; } .authorResultsMessage { width: 745px; padding-top: 2px; padding-left: 5px; white-space: normal; } .paddingL8 { padding-left: 8px; } td.alignPreviewColHeader { text-align: left; } td.alignHeader { text-align: left; } .previewSpacer { width: 28px; } .listColSpace { width: 30px; } img.bookseries { border: 0px currentColor; width: 13px; height: 13px; padding-right: = 3px; vertical-align: middle; } .previewCheckBoxAlign { margin: 0px; padding: 5px 1px; text-align: center; vertical-align: top; } .previewNavBar { float: right; } .previewNavBar .textBox { height: 15px; margin-top: 4px; } .previewNavBar .searchButton { height: 23px; position: relative; } .alignPreviewDocTitle { vertical-align: middle; } table#savedListTable { border: 0px currentColor; width: 100%; border-collapse: collapse; = border-spacing: 0px; } table#addlAuthTable { border: 0px currentColor; width: 100%; border-collapse: collapse; = border-spacing: 0px; } .addlAuthColSpace { width: 26px; } .authorResultsShowDoc { padding-left: 8px; } .authorResultsHideDoc { padding-left: 8px; vertical-align: top; } .authorResultsShowBottom { width: 230px; bottom: 0px; position: absolute; } .authorResultsShowProfile input { background: rgb(232, 232, 232) !important; margin: 0px; border: = currentColor; text-align: left; color: rgb(1, 86, 170); font-size: 12px; = display: inline-block; cursor: pointer; } .authorResultsShowProfile input:hover { text-decoration: underline; } .authorResultsShowProfile { padding: 5px 8px 0px 0px; text-align: left; } .alertColSpace { width: 28px; } table#alertListTable { border: 0px currentColor; width: 100%; border-collapse: collapse; = border-spacing: 0px; } #leftSideBar .contentBorders { border-top-color: currentColor; border-top-width: medium; = border-top-style: none; } .previewsRefineResults#sRefineResults { border-width: 1px medium medium; border-style: solid none none; = border-color: rgb(0, 0, 0) currentColor currentColor; } .borderBotGrey { border-bottom-color: rgb(155, 155, 155) !important; = border-bottom-width: 1px !important; border-bottom-style: solid = !important; } .marginR347 { margin-right: 347px; } .marginT8 { margin-top: 8px; } #RefineResults { border-top-color: rgb(0, 0, 0); border-top-width: 1px; = border-top-style: solid; } .previewRefineWidth { =09 } .borderTopBlack { border-top-color: rgb(0, 0, 0); border-top-width: 1px; = border-top-style: solid; } #SC_DLS1 .scopusDragHandle { cursor: move; } .advancedSearchBox { width: 756px; padding-bottom: 10px; } .advancedSearchBox .tipsHolder { text-align: right; padding-bottom: 12px; } .advancedSearchBox .formContainer { padding: 9px 10px 10px; } .advancedSearchBox .formContainer .compactQueryLink { margin-left: 3px; display: none; } .advancedSearchBox .formContainer .buttonOrLinksHolder { padding-top: 6px; float: right; } .advancedSearchBox .formContainer .tipsHolder .searchTips { padding-right: 3px; } .advancedSearchBox .formContainer .buttonOrLinksHolder .addSearch { margin-left: 3px; } .advancedSearchBox .formContainer .buttonOrLinksHolder .delete { padding-right: 3px; } .advancedSearchBox .textAreabg { background: rgb(221, 221, 221); border: 1px solid rgb(241, 241, 241); = width: 728px; } .advancedSearchBox #searchfield { background: rgb(255, 255, 255); margin: 4px 4px 10px 5px; width: 689px; = height: 200px; overflow-y: scroll; } .advancedSearchBox .searchButton { font-weight: bold; margin-left: 3px; vertical-align: middle; } .advancedSearchBox .outlineDisabled { background: url("/static/images/outline_disabled.gif") no-repeat 4px = 3px rgb(242, 242, 242); margin: 4px 7px 4px 15px; padding: 0px 0px 2px = 18px; border: 1px solid rgb(153, 153, 153); width: 125px; height: 24px; = color: rgb(204, 204, 204); font-weight: bold; vertical-align: middle; } .advancedSearchBox .outlineEnabled { background: url("/static/images/outline_a.gif") no-repeat 4px 3px = rgb(204, 204, 204); margin: 4px 3px 4px 15px; padding: 0px 0px 2px 18px; = border: 1px solid rgb(102, 102, 102); width: 125px; height: 24px; color: = rgb(0, 0, 0); font-weight: bold; vertical-align: middle; } .advancedSearchBox .outlineEnabled:hover { background: url("/static/images/outline_b.gif") no-repeat 4px 3px = rgb(204, 204, 204); margin: 4px 3px 4px 15px; padding: 0px 0px 2px 18px; = border: 1px solid rgb(102, 102, 102); width: 125px; height: 24px; color: = rgb(0, 0, 0); font-weight: bold; vertical-align: middle; } .advancedSearchBox .textWrapper { background: rgb(232, 232, 232); margin: 0px 10px 10px 15px; border: 1px = solid rgb(153, 153, 153); width: 694px; padding-right: 8px; position: = relative; } .scriptDisabled #searchfield { background: rgb(255, 255, 255); margin: 4px; width: 689px; height: = 200px; } .scriptDisabled .textWrapper { margin-top: 10px; } .advancedSearchBox .horizontalHandle { top: 70px; right: -8px; position: absolute; cursor: pointer; } .advancedSearchBox .verticalHandle { left: 318px; bottom: -8px; position: absolute; cursor: pointer; } .advancedSearchBox .cornerHandle { right: -6px; bottom: -6px; position: absolute; cursor: pointer; } .advancedSearchBox .advDataPadding { padding: 11px 12px 16px 10px; } .advancedSearchBox .advDataPadding .operatorsCode { float: left; } .advancedSearchBox .advDataPadding .operatorsDescription { margin-left: 40px; float: left; } .errorHighlightColor { background-color: rgb(244, 226, 224); } .errorHighlightColor span { background-color: rgb(244, 226, 224); } a.fieldCodes { background: url("/static/images/help.gif") no-repeat left; padding: 2px = 0px 2px 21px !important; text-decoration: none; white-space: nowrap; } a.fieldCodes:hover { background: url("/static/images/help_over.gif") no-repeat left; = padding: 2px 0px 2px 21px !important; } a.fieldCodesDisabled { background: url("/static/images/help_over.gif") no-repeat left; = padding: 2px 0px 2px 21px !important; } .codeSuggestor { width: 400px; height: 140px; margin-bottom: 25px; white-space: = pre-wrap; } .erroMsgDiv { padding: 8px 0px 15px 7px; border: 1px solid rgb(204, 1, 1); = margin-bottom: 15px; background-color: rgb(244, 226, 224); } .erroMsgDiv h2 { color: rgb(204, 1, 1); margin-bottom: 8px; } .erroMsgDiv p { padding-left: 28px; } .advErrText { background: url("/static/images/icon_error.gif") no-repeat left; = padding: 2px 0px 2px 28px; } .moreLink { display: inline-block; } .extraInfo { display: none; } .advSearchFieldIndent { text-indent: -30px; padding-left: 30px; display: block; } .overlayLoading { width: 100%; margin-top: 25px; border-right-color: rgb(155, 155, 155); = border-bottom-color: rgb(155, 155, 155); border-right-width: 1px; = border-bottom-width: 1px; border-right-style: solid; = border-bottom-style: solid; position: absolute; z-index: 9999; = background-color: rgb(255, 255, 255); } .imageLoading { top: 50%; margin-top: -20px; margin-left: 50%; vertical-align: middle; = position: absolute; } .rightShadowImage { background: url("/static/images/sidebar_right_shadow.gif") repeat-y = 100% 100%; } .bottomShadowImage { background: url("/static/images/sidebar_bottom_shadow.gif") repeat-x = 100% 100%; } .cornerShadow { padding-left: 217px; } .sideBarBorderBottom { border-bottom-color: currentColor !important; border-bottom-width: = medium !important; border-bottom-style: none !important; } .affilColSpaceWidth { width: 29px; } #ie_historyFrame { width: 0px; height: 0px; display: none; } #firefox_anchorDiv { width: 0px; height: 0px; display: none; } #safari_formDiv { width: 0px; height: 0px; display: none; } #safari_rememberDiv { width: 0px; height: 0px; display: none; } .bt-content { color: rgb(0, 0, 0); line-height: normal; font-size: small; } .bt-active { =09 } ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: text/css; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Location: http://www.scopus.com/gadgetcontext/gadgets/css/gadgets_ext.css .gadgets-gadget-chrome { margin: 0px; border: 1px solid rgb(194, 194, 194); width: 100%; height: = 100%; float: none; _height: 100px; } .gadgets-gadget { width: 100%; } ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: text/css; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Location: http://www.scopus.com/gadgetcontext/gadgets/css/gadgets.css .gadgets-gadget-chrome { border: 1px solid rgb(155, 155, 155); width: 99%; margin-bottom: 5px = !important; margin-left: 3px; float: left; } .gadgets-gadget { border: currentColor; width: 100%; } .gadgets-gadget-title-bar { margin: 0px !important; padding: 0px !important; width: 100%; height: = 20px; background-color: rgb(229, 236, 249); } .gadgets-gadget-title { text-align: left; color: rgb(51, 102, 204); font-weight: bold; float: = left; } .gadgets-gadget-title-button-bar { font-size: smaller; float: right; } .gadgets-gadget-user-prefs-dialog { background-color: rgb(229, 236, 249); } .gadgets-gadget-user-prefs-dialog-action-bar { padding: 2px 0px 4px 5px; text-align: left; } .gadgets-gadget-title-button { =09 } .gadgets-gadget-content { width: 100%; height: 100%; margin-top: 3px; } .gadgets-log-entry { =09 } .invisible { visibility: hidden; position: absolute !important; } ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: text/css; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Location: http://www.scopus.com/gadgetcontext/gadgets/css/toolbar.css Controlsbody { margin: 0px; font-family: Arial, verdana, helvetica, sans-serif; = font-size: 75%; } a { color: rgb(1, 86, 170); text-decoration: none; } a:link { color: rgb(1, 86, 170); text-decoration: none; } a:visited { color: rgb(132, 0, 132); } a:hover { color: rgb(1, 86, 170); text-decoration: underline; } a:focus { color: rgb(1, 86, 170); text-decoration: underline; } a:active { color: rgb(51, 51, 51); text-decoration: underline; } a.disabled { color: rgb(155, 155, 155); } a.diabled:link { color: rgb(155, 155, 155); } .disabled { color: rgb(155, 155, 155); } a.disabled:visited { color: rgb(155, 155, 155); } a.disabled:hover { color: rgb(155, 155, 155); } a.disabled:focus { color: rgb(155, 155, 155); } a.disabled:active { color: rgb(155, 155, 155); } img { border: 0px currentColor; } .boxYellow { border: 1px solid rgb(254, 199, 108); background-color: rgb(254, 255, = 187); -moz-border-radius: 2px 2px 2px 2px; } .boxGrey { border: 1px solid rgb(205, 205, 203); background-color: rgb(247, 247, = 247); -moz-border-radius: 2px 2px 2px 2px; } h1.gsHeading { margin: 0px; } h2.gsHeading { margin: 0px; } h3.gsHeading { margin: 0px; } h4.gsHeading { margin: 0px; } p.gsHeading { margin: 0px; } .toolbarHead { width: 100%; } .toolbarBody { background: white; padding: 0px; border: 1px solid rgb(186, 186, 186); = width: 100%; float: left; } .toolbarHoriShowHide { background: rgb(235, 235, 235); margin: 0px; padding: 0px; border: 1px = solid rgb(186, 186, 186); width: 100%; height: 18px; text-align: center; = color: rgb(1, 86, 170); clear: both; font-size: 12px; font-weight: = normal; text-decoration: none; cursor: pointer; } #toolbar { position: relative; } .toolbarfoot { margin: 0px; width: 100%; padding-bottom: 0px; float: left; position: = relative; } .toggleImg { background: repeat-y 0px 0px; padding: 0px 0px 5px; width: 15px; float: = left; cursor: pointer; _margin-left: -3px; } .toolbarHead h2 { background: rgb(235, 235, 235); padding: 3px 0px 3px 6px; font-size: = 1.17em; border-bottom-color: rgb(186, 186, 186); border-bottom-width: = 1px; border-bottom-style: solid; } .toolbarHead a { font-size: 1em; } .containerAddManage { background: rgb(235, 235, 235); width: 100%; border-bottom-color: = rgb(155, 155, 155); border-bottom-width: 1px; border-bottom-style: = solid; } .toolbarHeadFull { width: 100%; float: left; } .toolbarfootFull { margin: 0px 0px 5px; width: 100%; padding-bottom: 0px; float: left; } .toolbarBodyFull { padding: 0px 0px 5px; border: 1px solid rgb(186, 186, 186); width: = 100%; float: left; } .toolbarHeadFull h2 { background: rgb(235, 235, 235); padding: 6px 0px 0px 6px; font-size: = 1.17em; } .toolbarHeadFull a { font-size: 1em; } .containerAddManageFull { width: 100%; border-bottom-color: rgb(155, 155, 155); = border-bottom-width: 1px; border-bottom-style: solid; float: left; } .containerApplOver { margin: 5px 0px 0px; padding: 0px 2px; } .containerApplOver img.headingGadgetIcon { margin: 2px 0px 0px 4px; width: 20px; height: 20px; float: left; } .hooverTitle img.headingGadgetIcon { margin: 2px 0px 0px 4px; width: 20px; height: 20px; float: left; } .col1 { width: 33.3%; float: left; } .col2 { width: 33.3%; float: left; } .col3 { width: 33.3%; float: left; } .addManage { background: rgb(235, 235, 235); padding: 8px 0px 5px; float: left; } a.iconadd { background: no-repeat 0px 1px; margin: 0px 0px 0px 5px; padding: 0px = 0px 0px 15px; } .sgfhelp { margin: 6px 2px 5px 0px; float: right; } .help_horizontal { margin: 6px 2px 5px 0px; float: right; } .addManageHome { background: rgb(235, 235, 235); padding: 7px 0px 0px 1px; margin-right: = 6px; float: right; } .helpHome { margin: 6px 2px 5px 0px; float: right; } .containerAppl { margin: 5px 0px 0px; padding: 0px 0px 0px 4px; width: 240px; float: = left; } .containerAppl:hover { cursor: move; } .containerAppl img.headingGadgetIcon { padding: 0px 0px 0px 5px; float: left; } h3.elsevierTimeL { margin: 4px 0px 0px 5px; padding: 2px 0px 3px; width: 54%; text-align: = left; font-size: 12px; font-weight: normal; float: left; } h3.elsevierTimeLOver { margin: 3px 2px 0px 5px; padding: 2px 0px 3px; width: 54%; text-align: = left; font-size: 12px; font-weight: bold; float: left; } .Controls { margin-top: 0px; float: right; z-index: 1; zoom: 1; } .Controls ul { margin: 0px; padding: 5px 0px 0px; z-index: 1; zoom: 1; } .Controls ul li { margin: 0px 3px 0px 0px; display: inline; list-style-type: none; = z-index: 1; zoom: 1; } .containerAppDetails { border-width: 0px 1px 1px; border-style: solid; border-color: rgb(254, = 199, 109); zoom: 100%; } .containerAppDetails p { margin: 4px 0px 0px; } .containerAppDetailsCanvas { border-width: 0px 1px 1px; border-style: solid; border-color: rgb(254, = 199, 108); width: 99.8%; padding-bottom: 3px; margin-bottom: 5px; } .curveBoxleftCanvas { padding: 0px 0px 0px 4px; height: 25px; } .Controls ul .submenu { background: rgb(249, 249, 249); padding: 2px 0px; border: 1px solid = rgb(204, 204, 204); left: -110px; top: 10px; width: 105px; text-align: = left; clear: both; display: none; position: absolute; z-index: 2; } .Controls ul .submenu li { background: rgb(249, 249, 249); margin: 0px 2px 2px; border: 0px = currentColor; height: 18px; line-height: normal; float: none; display: = block; z-index: 1000; _margin: 0 2px 0px 2px; } .Controls .submenu li a { background: rgb(249, 249, 249); margin: 0px; padding: 3px; border: 0px = currentColor; height: auto; color: rgb(16, 92, 190); line-height: = normal; float: none; display: block; } .Controls .submenu li a:hover { background: rgb(227, 237, 239); } iframe.selectOverlap { margin: 0px; padding: 0px; border: 0px currentColor; left: 0px; top: = 0px; overflow: hidden; filter: = progid:DXImageTransform.Microsoft.Alpha(style=3D0,opacity=3D0); = position: absolute; z-index: -1; } .curveBoxleft { padding: 0px 0px 0px 4px; width: 92%; height: 25px; } .curveBoxBody { height: 25px; } .curveBoxRight { height: 25px; } .curveBoxRight img.headingGadgetIcon { margin: 2px 0px 0px 4px; width: 20px; height: 20px; float: left; } .CanvasControls { width: 65px; margin-top: 2px; float: right; position: relative; = z-index: 1; } .CanvasControls ul { margin: 0px; list-style-type: none; z-index: 1; } .CanvasControls ul li { margin: 4px 0px 0px; list-style-type: none; z-index: 1; } .CanvasControls ul .submenu { background: rgb(249, 249, 249); padding: 2px 0px; border: 1px solid = rgb(204, 204, 204); left: -145px; top: 10px; width: 140px; clear: both; = display: none; position: absolute; z-index: 2; } .CanvasControls ul .submenu li { background: rgb(249, 249, 249); margin: 0px 2px 2px; border: 0px = currentColor; height: 18px; line-height: normal; float: none; display: = block; z-index: 1000; _margin: 0 2px 0px 2px; } .CanvasControls .submenu li a { background: rgb(249, 249, 249); margin: 0px; padding: 3px; border: 0px = currentColor; height: auto; color: rgb(16, 92, 190); line-height: = normal; float: none; display: block; } .CanvasControls .submenu li a:hover { background: rgb(227, 237, 239); } .containerAppDetailsRes { border: 0px solid rgb(226, 205, 162); width: 99%; float: left; } .curveBoxleftOver { margin: 0px; padding: 0px; width: 99%; height: 25px; } .curveBoxBodyOver { margin: 0px; padding: 0px; height: 25px; } .curveBoxRightOver { margin: 0px; padding: 0px; height: 25px; } .space { padding: 5px 0px 0px; } .curveBoxleftNormal { margin: 0px; padding: 0px; height: 25px; cursor: move; } .curveBoxBodyNormal { margin: 0px; padding: 0px; height: 25px; } .curveBoxRightNormal { margin: 0px; padding: 0px; height: 25px; } #canvas { left: 0px; width: 99.7%; height: 99%; text-align: center; = padding-bottom: 25px; padding-left: 4px; position: absolute; z-index: = 101; background-color: rgb(255, 255, 255); } .truncateTitle { width: 58%; overflow: hidden; } .connectedSortable { min-height: 30px; } .linkText { border-bottom-color: rgb(186, 0, 0); border-bottom-width: 1px; = border-bottom-style: none; } .linkTextClicked { background-color: rgb(254, 255, 187); } .ui-widget-content_interAMP { =09 } .Controls_close { margin-top: 5px; margin-right: 5px; float: right; position: relative; = z-index: 1; } .sciverse_hoover .ui-icon-gripsmall-diagonal-se { background-position: -85px -224px; } #showLessApps { background: rgb(243, 243, 243); height: 30px; text-align: left; = border-top-color: rgb(186, 186, 186); border-top-width: 1px; = border-top-style: solid; cursor: pointer; } #showMoreApps { background: rgb(243, 243, 243); height: 30px; text-align: left; = border-top-color: rgb(186, 186, 186); border-top-width: 1px; = border-top-style: solid; cursor: pointer; } .ExtendedAreaApp { visibility: hidden; position: absolute !important; } .showMoreLessApps { margin-top: 8px; margin-left: 5px; display: inline-block; } .inactiveMenu { text-align: left; color: rgb(128, 128, 128); padding-top: 3px; = padding-left: 3px; cursor: pointer; } .ui-state-highlight { =09 } .width99 { width: 99%; } .width99 table { width: 99%; } .width99 table tbody { width: 99%; } .width99 table tbody tr { width: 99%; } .width10 { width: 20%; } .width99 table tbody tr td input { width: 98%; } ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: text/css; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Location: http://www.scopus.com/gadgetcontext/gadgets/css/jquery-ui-1.8.4.custom.css .ui-helper-hidden { display: none; } .ui-helper-hidden-accessible { left: -21474836.48px; position: absolute; } .ui-helper-reset { list-style: none; margin: 0px; padding: 0px; outline: 0px; border: 0px = currentColor; line-height: 1.3; font-size: 100%; text-decoration: none; } .ui-helper-clearfix::after { height: 0px; clear: both; display: block; visibility: hidden; content: = "."; } .ui-helper-clearfix { display: inline-block; } * html .ui-helper-clearfix { height: 1%; } .ui-helper-clearfix { display: block; } .ui-helper-zfix { left: 0px; top: 0px; width: 100%; height: 100%; filter: = Alpha(Opacity=3D0); position: absolute; opacity: 0; } .ui-state-disabled { cursor: default !important; } .ui-icon { text-indent: -99999px; overflow: hidden; display: block; = background-repeat: no-repeat; } .ui-widget-overlay { left: 0px; top: 0px; width: 100%; height: 100%; position: absolute; } .ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; = font-size: 1.1em; } .ui-widget .ui-widget { font-size: 1em; } .ui-widget input { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; = font-size: 1em; } .ui-widget select { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; = font-size: 1em; } .ui-widget textarea { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; = font-size: 1em; } .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; = font-size: 1em; } .ui-widget-content a { color: rgb(51, 51, 51); } .ui-widget-header { background: rgb(246, 168, 40); border: 1px solid rgb(231, 143, 8); = font-weight: bold; } .ui-state-default { background: url("../images/ui-bg_glass_100_f6f6f6_1x400.png") repeat-x = 50% 50% rgb(246, 246, 246); border: 1px solid rgb(204, 204, 204); color: = rgb(28, 148, 196); font-weight: bold; } .ui-widget-content .ui-state-default { background: url("../images/ui-bg_glass_100_f6f6f6_1x400.png") repeat-x = 50% 50% rgb(246, 246, 246); border: 1px solid rgb(204, 204, 204); color: = rgb(28, 148, 196); font-weight: bold; } .ui-widget-header .ui-state-default { background: url("../images/ui-bg_glass_100_f6f6f6_1x400.png") repeat-x = 50% 50% rgb(246, 246, 246); border: 1px solid rgb(204, 204, 204); color: = rgb(28, 148, 196); font-weight: bold; } .ui-state-default a { color: rgb(28, 148, 196); text-decoration: none; } .ui-state-default a:link { color: rgb(28, 148, 196); text-decoration: none; } .ui-state-default a:visited { color: rgb(28, 148, 196); text-decoration: none; } .ui-state-hover { background: url("../images/ui-bg_glass_100_fdf5ce_1x400.png") repeat-x = 50% 50% rgb(253, 245, 206); border: 1px solid rgb(251, 203, 9); color: = rgb(199, 116, 5); font-weight: bold; } .ui-widget-content .ui-state-hover { background: url("../images/ui-bg_glass_100_fdf5ce_1x400.png") repeat-x = 50% 50% rgb(253, 245, 206); border: 1px solid rgb(251, 203, 9); color: = rgb(199, 116, 5); font-weight: bold; } .ui-widget-header .ui-state-hover { background: url("../images/ui-bg_glass_100_fdf5ce_1x400.png") repeat-x = 50% 50% rgb(253, 245, 206); border: 1px solid rgb(251, 203, 9); color: = rgb(199, 116, 5); font-weight: bold; } .ui-state-focus { background: url("../images/ui-bg_glass_100_fdf5ce_1x400.png") repeat-x = 50% 50% rgb(253, 245, 206); border: 1px solid rgb(251, 203, 9); color: = rgb(199, 116, 5); font-weight: bold; } .ui-widget-content .ui-state-focus { background: url("../images/ui-bg_glass_100_fdf5ce_1x400.png") repeat-x = 50% 50% rgb(253, 245, 206); border: 1px solid rgb(251, 203, 9); color: = rgb(199, 116, 5); font-weight: bold; } .ui-widget-header .ui-state-focus { background: url("../images/ui-bg_glass_100_fdf5ce_1x400.png") repeat-x = 50% 50% rgb(253, 245, 206); border: 1px solid rgb(251, 203, 9); color: = rgb(199, 116, 5); font-weight: bold; } .ui-state-hover a { color: rgb(199, 116, 5); text-decoration: none; } .ui-state-hover a:hover { color: rgb(199, 116, 5); text-decoration: none; } .ui-state-active { background: url("../images/ui-bg_glass_65_ffffff_1x400.png") repeat-x = 50% 50% rgb(255, 255, 255); border: 1px solid rgb(251, 216, 80); color: = rgb(235, 143, 0); font-weight: bold; } .ui-widget-content .ui-state-active { background: url("../images/ui-bg_glass_65_ffffff_1x400.png") repeat-x = 50% 50% rgb(255, 255, 255); border: 1px solid rgb(251, 216, 80); color: = rgb(235, 143, 0); font-weight: bold; } .ui-widget-header .ui-state-active { background: url("../images/ui-bg_glass_65_ffffff_1x400.png") repeat-x = 50% 50% rgb(255, 255, 255); border: 1px solid rgb(251, 216, 80); color: = rgb(235, 143, 0); font-weight: bold; } .ui-state-active a { color: rgb(235, 143, 0); text-decoration: none; } .ui-state-active a:link { color: rgb(235, 143, 0); text-decoration: none; } .ui-state-active a:visited { color: rgb(235, 143, 0); text-decoration: none; } .ui-widget :active { =09 } .ui-state-highlight { background: url("../images/ui-bg_highlight-soft_75_ffe45c_1x100.png") = repeat-x 50% top rgb(255, 228, 92); border: 1px solid rgb(254, 210, 47); = color: rgb(54, 54, 54); } .ui-widget-content .ui-state-highlight { background: url("../images/ui-bg_highlight-soft_75_ffe45c_1x100.png") = repeat-x 50% top rgb(255, 228, 92); border: 1px solid rgb(254, 210, 47); = color: rgb(54, 54, 54); } .ui-widget-header .ui-state-highlight { background: url("../images/ui-bg_highlight-soft_75_ffe45c_1x100.png") = repeat-x 50% top rgb(255, 228, 92); border: 1px solid rgb(254, 210, 47); = color: rgb(54, 54, 54); } .ui-state-highlight a { color: rgb(54, 54, 54); } .ui-widget-content .ui-state-highlight a { color: rgb(54, 54, 54); } .ui-widget-header .ui-state-highlight a { color: rgb(54, 54, 54); } .ui-state-error { background: url("../images/ui-bg_diagonals-thick_18_b81900_40x40.png") = 50% 50% rgb(184, 25, 0); border: 1px solid rgb(205, 10, 10); color: = rgb(255, 255, 255); } .ui-widget-content .ui-state-error { background: url("../images/ui-bg_diagonals-thick_18_b81900_40x40.png") = 50% 50% rgb(184, 25, 0); border: 1px solid rgb(205, 10, 10); color: = rgb(255, 255, 255); } .ui-widget-header .ui-state-error { background: url("../images/ui-bg_diagonals-thick_18_b81900_40x40.png") = 50% 50% rgb(184, 25, 0); border: 1px solid rgb(205, 10, 10); color: = rgb(255, 255, 255); } .ui-state-error a { color: rgb(255, 255, 255); } .ui-widget-content .ui-state-error a { color: rgb(255, 255, 255); } .ui-widget-header .ui-state-error a { color: rgb(255, 255, 255); } .ui-state-error-text { color: rgb(255, 255, 255); } .ui-widget-content .ui-state-error-text { color: rgb(255, 255, 255); } .ui-widget-header .ui-state-error-text { color: rgb(255, 255, 255); } .ui-priority-primary { font-weight: bold; } .ui-widget-content .ui-priority-primary { font-weight: bold; } .ui-widget-header .ui-priority-primary { font-weight: bold; } .ui-priority-secondary { font-weight: normal; filter: Alpha(Opacity=3D70); opacity: 0.7; } .ui-widget-content .ui-priority-secondary { font-weight: normal; filter: Alpha(Opacity=3D70); opacity: 0.7; } .ui-widget-header .ui-priority-secondary { font-weight: normal; filter: Alpha(Opacity=3D70); opacity: 0.7; } .ui-state-disabled { filter: Alpha(Opacity=3D35); opacity: 0.35; background-image: none; } .ui-widget-content .ui-state-disabled { filter: Alpha(Opacity=3D35); opacity: 0.35; background-image: none; } .ui-widget-header .ui-state-disabled { filter: Alpha(Opacity=3D35); opacity: 0.35; background-image: none; } .ui-icon { width: 16px; height: 16px; background-image: = url("/images/ui-icons_222222_256x240.png"); } .ui-widget-content .ui-icon { =09 } .ui-widget-header .ui-icon { =09 } .ui-state-default .ui-icon { =09 } .ui-state-hover .ui-icon { =09 } .ui-state-focus .ui-icon { =09 } .ui-state-active .ui-icon { =09 } .ui-state-highlight .ui-icon { =09 } .ui-state-error .ui-icon { =09 } .ui-state-error-text .ui-icon { =09 } .ui-icon-carat-1-n { =09 } .ui-icon-carat-1-ne { background-position: -16px 0px; } .ui-icon-carat-1-e { background-position: -32px 0px; } .ui-icon-carat-1-se { background-position: -48px 0px; } .ui-icon-carat-1-s { background-position: -64px 0px; } .ui-icon-carat-1-sw { background-position: -80px 0px; } .ui-icon-carat-1-w { background-position: -96px 0px; } .ui-icon-carat-1-nw { background-position: -112px 0px; } .ui-icon-carat-2-n-s { background-position: -128px 0px; } .ui-icon-carat-2-e-w { background-position: -144px 0px; } .ui-icon-triangle-1-n { background-position: 0px -16px; } .ui-icon-triangle-1-ne { background-position: -16px -16px; } .ui-icon-triangle-1-e { background-position: -32px -16px; } .ui-icon-triangle-1-se { background-position: -48px -16px; } .ui-icon-triangle-1-s { background-position: -64px -16px; } .ui-icon-triangle-1-sw { background-position: -80px -16px; } .ui-icon-triangle-1-w { background-position: -96px -16px; } .ui-icon-triangle-1-nw { background-position: -112px -16px; } .ui-icon-triangle-2-n-s { background-position: -128px -16px; } .ui-icon-triangle-2-e-w { background-position: -144px -16px; } .ui-icon-arrow-1-n { background-position: 0px -32px; } .ui-icon-arrow-1-ne { background-position: -16px -32px; } .ui-icon-arrow-1-e { background-position: -32px -32px; } .ui-icon-arrow-1-se { background-position: -48px -32px; } .ui-icon-arrow-1-s { background-position: -64px -32px; } .ui-icon-arrow-1-sw { background-position: -80px -32px; } .ui-icon-arrow-1-w { background-position: -96px -32px; } .ui-icon-arrow-1-nw { background-position: -112px -32px; } .ui-icon-arrow-2-n-s { background-position: -128px -32px; } .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } .ui-icon-arrow-2-e-w { background-position: -160px -32px; } .ui-icon-arrow-2-se-nw { background-position: -176px -32px; } .ui-icon-arrowstop-1-n { background-position: -192px -32px; } .ui-icon-arrowstop-1-e { background-position: -208px -32px; } .ui-icon-arrowstop-1-s { background-position: -224px -32px; } .ui-icon-arrowstop-1-w { background-position: -240px -32px; } .ui-icon-arrowthick-1-n { background-position: 0px -48px; } .ui-icon-arrowthick-1-ne { background-position: -16px -48px; } .ui-icon-arrowthick-1-e { background-position: -32px -48px; } .ui-icon-arrowthick-1-se { background-position: -48px -48px; } .ui-icon-arrowthick-1-s { background-position: -64px -48px; } .ui-icon-arrowthick-1-sw { background-position: -80px -48px; } .ui-icon-arrowthick-1-w { background-position: -96px -48px; } .ui-icon-arrowthick-1-nw { background-position: -112px -48px; } .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } .ui-icon-arrowreturnthick-1-w { background-position: 0px -64px; } .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } .ui-icon-arrowreturn-1-w { background-position: -64px -64px; } .ui-icon-arrowreturn-1-n { background-position: -80px -64px; } .ui-icon-arrowreturn-1-e { background-position: -96px -64px; } .ui-icon-arrowreturn-1-s { background-position: -112px -64px; } .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } .ui-icon-arrow-4 { background-position: 0px -80px; } .ui-icon-arrow-4-diag { background-position: -16px -80px; } .ui-icon-extlink { background-position: -32px -80px; } .ui-icon-newwin { background-position: -48px -80px; } .ui-icon-refresh { background-position: -64px -80px; } .ui-icon-shuffle { background-position: -80px -80px; } .ui-icon-transfer-e-w { background-position: -96px -80px; } .ui-icon-transferthick-e-w { background-position: -112px -80px; } .ui-icon-folder-collapsed { background-position: 0px -96px; } .ui-icon-folder-open { background-position: -16px -96px; } .ui-icon-document { background-position: -32px -96px; } .ui-icon-document-b { background-position: -48px -96px; } .ui-icon-note { background-position: -64px -96px; } .ui-icon-mail-closed { background-position: -80px -96px; } .ui-icon-mail-open { background-position: -96px -96px; } .ui-icon-suitcase { background-position: -112px -96px; } .ui-icon-comment { background-position: -128px -96px; } .ui-icon-person { background-position: -144px -96px; } .ui-icon-print { background-position: -160px -96px; } .ui-icon-trash { background-position: -176px -96px; } .ui-icon-locked { background-position: -192px -96px; } .ui-icon-unlocked { background-position: -208px -96px; } .ui-icon-bookmark { background-position: -224px -96px; } .ui-icon-tag { background-position: -240px -96px; } .ui-icon-home { background-position: 0px -112px; } .ui-icon-flag { background-position: -16px -112px; } .ui-icon-calendar { background-position: -32px -112px; } .ui-icon-cart { background-position: -48px -112px; } .ui-icon-pencil { background-position: -64px -112px; } .ui-icon-clock { background-position: -80px -112px; } .ui-icon-disk { background-position: -96px -112px; } .ui-icon-calculator { background-position: -112px -112px; } .ui-icon-zoomin { background-position: -128px -112px; } .ui-icon-zoomout { background-position: -144px -112px; } .ui-icon-search { background-position: -160px -112px; } .ui-icon-wrench { background-position: -176px -112px; } .ui-icon-gear { background-position: -192px -112px; } .ui-icon-heart { background-position: -208px -112px; } .ui-icon-star { background-position: -224px -112px; } .ui-icon-link { background-position: -240px -112px; } .ui-icon-cancel { background-position: 0px -128px; } .ui-icon-plus { background-position: -16px -128px; } .ui-icon-plusthick { background-position: -32px -128px; } .ui-icon-minus { background-position: -48px -128px; } .ui-icon-minusthick { =09 } .ui-icon-close { background-position: -80px -128px; } .ui-icon-closethick { background-position: -96px -128px; } .ui-icon-key { background-position: -112px -128px; } .ui-icon-lightbulb { background-position: -128px -128px; } .ui-icon-scissors { background-position: -144px -128px; } .ui-icon-clipboard { background-position: -160px -128px; } .ui-icon-copy { background-position: -176px -128px; } .ui-icon-contact { background-position: -192px -128px; } .ui-icon-image { background-position: -208px -128px; } .ui-icon-video { background-position: -224px -128px; } .ui-icon-script { background-position: -240px -128px; } .ui-icon-alert { background-position: 0px -144px; } .ui-icon-info { background-position: -16px -144px; } .ui-icon-notice { background-position: -32px -144px; } .ui-icon-help { background-position: -48px -144px; } .ui-icon-check { background-position: -64px -144px; } .ui-icon-bullet { background-position: -80px -144px; } .ui-icon-radio-off { background-position: -96px -144px; } .ui-icon-radio-on { background-position: -112px -144px; } .ui-icon-pin-w { background-position: -128px -144px; } .ui-icon-pin-s { background-position: -144px -144px; } .ui-icon-play { background-position: 0px -160px; } .ui-icon-pause { background-position: -16px -160px; } .ui-icon-seek-next { background-position: -32px -160px; } .ui-icon-seek-prev { background-position: -48px -160px; } .ui-icon-seek-end { background-position: -64px -160px; } .ui-icon-seek-start { background-position: -80px -160px; } .ui-icon-seek-first { background-position: -80px -160px; } .ui-icon-stop { background-position: -96px -160px; } .ui-icon-eject { background-position: -112px -160px; } .ui-icon-volume-off { background-position: -128px -160px; } .ui-icon-volume-on { background-position: -144px -160px; } .ui-icon-power { background-position: 0px -176px; } .ui-icon-signal-diag { background-position: -16px -176px; } .ui-icon-signal { background-position: -32px -176px; } .ui-icon-battery-0 { background-position: -48px -176px; } .ui-icon-battery-1 { background-position: -64px -176px; } .ui-icon-battery-2 { background-position: -80px -176px; } .ui-icon-battery-3 { background-position: -96px -176px; } .ui-icon-circle-plus { background-position: 0px -192px; } .ui-icon-circle-minus { background-position: -16px -192px; } .ui-icon-circle-close { background-position: -32px -192px; } .ui-icon-circle-triangle-e { background-position: -48px -192px; } .ui-icon-circle-triangle-s { background-position: -64px -192px; } .ui-icon-circle-triangle-w { background-position: -80px -192px; } .ui-icon-circle-triangle-n { background-position: -96px -192px; } .ui-icon-circle-arrow-e { background-position: -112px -192px; } .ui-icon-circle-arrow-s { background-position: -128px -192px; } .ui-icon-circle-arrow-w { background-position: -144px -192px; } .ui-icon-circle-arrow-n { background-position: -160px -192px; } .ui-icon-circle-zoomin { background-position: -176px -192px; } .ui-icon-circle-zoomout { background-position: -192px -192px; } .ui-icon-circle-check { background-position: -208px -192px; } .ui-icon-circlesmall-plus { background-position: 0px -208px; } .ui-icon-circlesmall-minus { background-position: -16px -208px; } .ui-icon-circlesmall-close { background-position: -32px -208px; } .ui-icon-squaresmall-plus { background-position: -48px -208px; } .ui-icon-squaresmall-minus { background-position: -64px -208px; } .ui-icon-squaresmall-close { background-position: -80px -208px; } .ui-icon-grip-dotted-vertical { background-position: 0px -224px; } .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } .ui-icon-grip-solid-vertical { background-position: -32px -224px; } .ui-icon-grip-solid-horizontal { background-position: -48px -224px; } .ui-icon-gripsmall-diagonal-se { background-position: -85px -224px; } .ui-icon-grip-diagonal-se { background-position: -80px -224px; } .ui-corner-tl { border-top-left-radius: 4px; -moz-border-radius-topleft: 4px; = -webkit-border-top-left-radius: 4px; } .ui-corner-tr { border-top-right-radius: 4px; -moz-border-radius-topright: 4px; = -webkit-border-top-right-radius: 4px; } .ui-corner-bl { border-bottom-left-radius: 4px; -moz-border-radius-bottomleft: 4px; = -webkit-border-bottom-left-radius: 4px; } .ui-corner-br { border-bottom-right-radius: 4px; -moz-border-radius-bottomright: 4px; = -webkit-border-bottom-right-radius: 4px; } .ui-corner-top { border-top-left-radius: 4px; border-top-right-radius: 4px; = -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; = -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; } .ui-corner-bottom { border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; = -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: = 4px; -moz-border-radius-bottomright: 4px; = -webkit-border-bottom-right-radius: 4px; } .ui-corner-right { border-top-right-radius: 4px; border-bottom-right-radius: 4px; = -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; = -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: = 4px; } .ui-corner-left { border-top-left-radius: 4px; border-bottom-left-radius: 4px; = -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; = -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: = 4px; } .ui-corner-all { border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: = 4px; } .ui-widget-overlay { background: url("../images/ui-bg_diagonals-thick_20_666666_40x40.png") = 50% 50% rgb(102, 102, 102); filter: Alpha(Opacity=3D50); opacity: 0.5; } .ui-widget-shadow { background: url("../images/ui-bg_flat_10_000000_40x100.png") repeat-x = 50% 50% rgb(0, 0, 0); margin: -5px 0px 0px -5px; padding: 5px; = border-radius: 5px; filter: Alpha(Opacity=3D20); opacity: 0.2; = -moz-border-radius: 5px; -webkit-border-radius: 5px; } .ui-resizable { position: relative; } .ui-resizable-handle { font-size: 0.1px; display: block; position: absolute; z-index: 99999; } .ui-resizable-disabled .ui-resizable-handle { display: none; } .ui-resizable-autohide .ui-resizable-handle { display: none; } .ui-resizable-n { left: 0px; top: -5px; width: 100%; height: 7px; cursor: n-resize; } .ui-resizable-s { left: 0px; width: 100%; height: 7px; bottom: -5px; cursor: s-resize; } .ui-resizable-e { top: 0px; width: 7px; height: 100%; right: -5px; cursor: e-resize; } .ui-resizable-w { left: -5px; top: 0px; width: 7px; height: 100%; cursor: w-resize; } .ui-resizable-se { width: 12px; height: 12px; right: 1px; bottom: 1px; cursor: se-resize; } .ui-resizable-sw { left: -5px; width: 9px; height: 9px; bottom: -5px; cursor: sw-resize; } .ui-resizable-nw { left: -5px; top: -5px; width: 9px; height: 9px; cursor: nw-resize; } .ui-resizable-ne { top: -5px; width: 9px; height: 9px; right: -5px; cursor: ne-resize; } ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://www.scopus.com/gzip_1821116986/bundles/jquery-1.4.2.js =0A= (function(window,undefined){var = jQuery=3Dfunction(selector,context){return new = jQuery.fn.init(selector,context);},_jQuery=3Dwindow.jQuery,document=3Dwin= dow.document,rootjQuery,quickExpr=3D/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/= ,isSimple=3D/^.[^:#\[\.,]*$/,rnotwhite=3D/\S/,rtrim=3D/^(\s|\u00A0)+|(\s|= \u00A0)+$/g,rsingleTag=3D/^<(\w+)\s*\/?>(?:<\/\1>)?$/,userAgent=3Dnavigat= or.userAgent,browserMatch,readyBound=3Dfalse,readyList=3D[],DOMContentLoa= ded,toString=3DObject.prototype.toString,hasOwnProperty=3DObject.prototyp= e.hasOwnProperty,push=3DArray.prototype.push,slice=3DArray.prototype.slic= e,indexOf=3DArray.prototype.indexOf;jQuery.fn=3DjQuery.prototype=3D{init:= function(selector,context){var match,elem,ret,doc;if(!selector){return = this;}=0A= if(selector.nodeType){this.context=3Dthis[0]=3Dselector;this.length=3D1;r= eturn this;}=0A= if(selector=3D=3D=3D"body"&&!context){this.context=3Ddocument;this[0]=3Dd= ocument.body;this.selector=3D"body";this.length=3D1;return this;}=0A= if(typeof = selector=3D=3D=3D"string"){match=3DquickExpr.exec(selector);if(match&&(ma= tch[1]||!context)){if(match[1]){doc=3D(context?context.ownerDocument||con= text:document);ret=3DrsingleTag.exec(selector);if(ret){if(jQuery.isPlainO= bject(context)){selector=3D[document.createElement(ret[1])];jQuery.fn.att= r.call(selector,context,true);}else{selector=3D[doc.createElement(ret[1])= ];}}else{ret=3DbuildFragment([match[1]],[doc]);selector=3D(ret.cacheable?= ret.fragment.cloneNode(true):ret.fragment).childNodes;}=0A= return = jQuery.merge(this,selector);}else{elem=3Ddocument.getElementById(match[2]= );if(elem){if(elem.id!=3D=3Dmatch[2]){return rootjQuery.find(selector);}=0A= this.length=3D1;this[0]=3Delem;}=0A= this.context=3Ddocument;this.selector=3Dselector;return this;}}else = if(!context&&/^\w+$/.test(selector)){this.selector=3Dselector;this.contex= t=3Ddocument;selector=3Ddocument.getElementsByTagName(selector);return = jQuery.merge(this,selector);}else = if(!context||context.jquery){return(context||rootjQuery).find(selector);}= else{return jQuery(context).find(selector);}}else = if(jQuery.isFunction(selector)){return rootjQuery.ready(selector);}=0A= if(selector.selector!=3D=3Dundefined){this.selector=3Dselector.selector;t= his.context=3Dselector.context;}=0A= return = jQuery.makeArray(selector,this);},selector:"",jquery:"1.4.2",length:0,siz= e:function(){return this.length;},toArray:function(){return = slice.call(this,0);},get:function(num){return = num=3D=3Dnull?this.toArray():(num<0?this.slice(num)[0]:this[num]);},pushS= tack:function(elems,name,selector){var = ret=3DjQuery();if(jQuery.isArray(elems)){push.apply(ret,elems);}else{jQue= ry.merge(ret,elems);}=0A= ret.prevObject=3Dthis;ret.context=3Dthis.context;if(name=3D=3D=3D"find"){= ret.selector=3Dthis.selector+(this.selector?" ":"")+selector;}else = if(name){ret.selector=3Dthis.selector+"."+name+"("+selector+")";}=0A= return ret;},each:function(callback,args){return = jQuery.each(this,callback,args);},ready:function(fn){jQuery.bindReady();i= f(jQuery.isReady){fn.call(document,jQuery);}else = if(readyList){readyList.push(fn);}=0A= return this;},eq:function(i){return = i=3D=3D=3D-1?this.slice(i):this.slice(i,+i+1);},first:function(){return = this.eq(0);},last:function(){return = this.eq(-1);},slice:function(){return = this.pushStack(slice.apply(this,arguments),"slice",slice.call(arguments).= join(","));},map:function(callback){return = this.pushStack(jQuery.map(this,function(elem,i){return = callback.call(elem,i,elem);}));},end:function(){return = this.prevObject||jQuery(null);},push:push,sort:[].sort,splice:[].splice};= jQuery.fn.init.prototype=3DjQuery.fn;jQuery.extend=3DjQuery.fn.extend=3Df= unction(){var = target=3Darguments[0]||{},i=3D1,length=3Darguments.length,deep=3Dfalse,op= tions,name,src,copy;if(typeof = target=3D=3D=3D"boolean"){deep=3Dtarget;target=3Darguments[1]||{};i=3D2;}=0A= if(typeof = target!=3D=3D"object"&&!jQuery.isFunction(target)){target=3D{};}=0A= if(length=3D=3D=3Di){target=3Dthis;--i;}=0A= for(;i
a";var = all=3Ddiv.getElementsByTagName("*"),a=3Ddiv.getElementsByTagName("a")[0];= if(!all||!all.length||!a){return;}=0A= jQuery.support=3D{leadingWhitespace:div.firstChild.nodeType=3D=3D=3D3,tbo= dy:!div.getElementsByTagName("tbody").length,htmlSerialize:!!div.getEleme= ntsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hre= fNormalized:a.getAttribute("href")=3D=3D=3D"/a",opacity:/^0.55$/.test(a.s= tyle.opacity),cssFloat:!!a.style.cssFloat,checkOn:div.getElementsByTagNam= e("input")[0].value=3D=3D=3D"on",optSelected:document.createElement("sele= ct").appendChild(document.createElement("option")).selected,parentNode:di= v.removeChild(div.appendChild(document.createElement("div"))).parentNode=3D= =3D=3Dnull,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEv= ent:true,boxModel:null};script.type=3D"text/javascript";try{script.append= Child(document.createTextNode("window."+id+"=3D1;"));}catch(e){}=0A= root.insertBefore(script,root.firstChild);if(window[id]){jQuery.support.s= criptEval=3Dtrue;delete window[id];}=0A= try{delete script.test;}catch(e){jQuery.support.deleteExpando=3Dfalse;}=0A= root.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEve= nt("onclick",function = click(){jQuery.support.noCloneEvent=3Dfalse;div.detachEvent("onclick",cli= ck);});div.cloneNode(true).fireEvent("onclick");}=0A= div=3Ddocument.createElement("div");div.innerHTML=3D"";var = fragment=3Ddocument.createDocumentFragment();fragment.appendChild(div.fir= stChild);jQuery.support.checkClone=3Dfragment.cloneNode(true).cloneNode(t= rue).lastChild.checked;jQuery(function(){var = div=3Ddocument.createElement("div");div.style.width=3Ddiv.style.paddingLe= ft=3D"1px";document.body.appendChild(div);jQuery.boxModel=3DjQuery.suppor= t.boxModel=3Ddiv.offsetWidth=3D=3D=3D2;document.body.removeChild(div).sty= le.display=3D'none';div=3Dnull;});var = eventSupported=3Dfunction(eventName){var = el=3Ddocument.createElement("div");eventName=3D"on"+eventName;var = isSupported=3D(eventName in = el);if(!isSupported){el.setAttribute(eventName,"return;");isSupported=3Dt= ypeof el[eventName]=3D=3D=3D"function";}=0A= el=3Dnull;return = isSupported;};jQuery.support.submitBubbles=3DeventSupported("submit");jQu= ery.support.changeBubbles=3DeventSupported("change");root=3Dscript=3Ddiv=3D= all=3Da=3Dnull;})();jQuery.props=3D{"for":"htmlFor","class":"className",r= eadonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspa= n:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",framebo= rder:"frameBorder"};var = expando=3D"jQuery"+now(),uuid=3D0,windowData=3D{};jQuery.extend({cache:{}= ,expando:expando,noData:{"embed":true,"object":true,"applet":true},data:f= unction(elem,name,data){if(elem.nodeName&&jQuery.noData[elem.nodeName.toL= owerCase()]){return;}=0A= elem=3Delem=3D=3Dwindow?windowData:elem;var = id=3Delem[expando],cache=3DjQuery.cache,thisCache;if(!id&&typeof = name=3D=3D=3D"string"&&data=3D=3D=3Dundefined){return null;}=0A= if(!id){id=3D++uuid;}=0A= if(typeof = name=3D=3D=3D"object"){elem[expando]=3Did;thisCache=3Dcache[id]=3DjQuery.= extend(true,{},name);}else = if(!cache[id]){elem[expando]=3Did;cache[id]=3D{};}=0A= thisCache=3Dcache[id];if(data!=3D=3Dundefined){thisCache[name]=3Ddata;}=0A= return typeof = name=3D=3D=3D"string"?thisCache[name]:thisCache;},removeData:function(ele= m,name){if(elem.nodeName&&jQuery.noData[elem.nodeName.toLowerCase()]){ret= urn;}=0A= elem=3Delem=3D=3Dwindow?windowData:elem;var = id=3Delem[expando],cache=3DjQuery.cache,thisCache=3Dcache[id];if(name){if= (thisCache){delete = thisCache[name];if(jQuery.isEmptyObject(thisCache)){jQuery.removeData(ele= m);}}}else{if(jQuery.support.deleteExpando){delete = elem[jQuery.expando];}else = if(elem.removeAttribute){elem.removeAttribute(jQuery.expando);}=0A= delete = cache[id];}}});jQuery.fn.extend({data:function(key,value){if(typeof = key=3D=3D=3D"undefined"&&this.length){return jQuery.data(this[0]);}else = if(typeof key=3D=3D=3D"object"){return = this.each(function(){jQuery.data(this,key);});}=0A= var = parts=3Dkey.split(".");parts[1]=3Dparts[1]?"."+parts[1]:"";if(value=3D=3D= =3Dundefined){var = data=3Dthis.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data=3D=3D= =3Dundefined&&this.length){data=3DjQuery.data(this[0],key);}=0A= return = data=3D=3D=3Dundefined&&parts[1]?this.data(parts[0]):data;}else{return = this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQu= ery.data(this,key,value);});}},removeData:function(key){return = this.each(function(){jQuery.removeData(this,key);});}});jQuery.extend({qu= eue:function(elem,type,data){if(!elem){return;}=0A= type=3D(type||"fx")+"queue";var = q=3DjQuery.data(elem,type);if(!data){return q||[];}=0A= if(!q||jQuery.isArray(data)){q=3DjQuery.data(elem,type,jQuery.makeArray(d= ata));}else{q.push(data);}=0A= return q;},dequeue:function(elem,type){type=3Dtype||"fx";var = queue=3DjQuery.queue(elem,type),fn=3Dqueue.shift();if(fn=3D=3D=3D"inprogr= ess"){fn=3Dqueue.shift();}=0A= if(fn){if(type=3D=3D=3D"fx"){queue.unshift("inprogress");}=0A= fn.call(elem,function(){jQuery.dequeue(elem,type);});}}});jQuery.fn.exten= d({queue:function(type,data){if(typeof = type!=3D=3D"string"){data=3Dtype;type=3D"fx";}=0A= if(data=3D=3D=3Dundefined){return jQuery.queue(this[0],type);}=0A= return this.each(function(i,elem){var = queue=3DjQuery.queue(this,type,data);if(type=3D=3D=3D"fx"&&queue[0]!=3D=3D= "inprogress"){jQuery.dequeue(this,type);}});},dequeue:function(type){retu= rn = this.each(function(){jQuery.dequeue(this,type);});},delay:function(time,t= ype){time=3DjQuery.fx?jQuery.fx.speeds[time]||time:time;type=3Dtype||"fx"= ;return this.queue(type,function(){var = elem=3Dthis;setTimeout(function(){jQuery.dequeue(elem,type);},time);});},= clearQueue:function(type){return this.queue(type||"fx",[]);}});var = rclass=3D/[\n\t]/g,rspace=3D/\s+/,rreturn=3D/\r/g,rspecialurl=3D/href|src= |style/,rtype=3D/(button|input)/i,rfocusable=3D/(button|input|object|sele= ct|textarea)/i,rclickable=3D/^(a|area)$/i,rradiocheck=3D/radio|checkbox/;= jQuery.fn.extend({attr:function(name,value){return = access(this,name,value,true,jQuery.attr);},removeAttr:function(name,fn){r= eturn = this.each(function(){jQuery.attr(this,name,"");if(this.nodeType=3D=3D=3D1= ){this.removeAttribute(name);}});},addClass:function(value){if(jQuery.isF= unction(value)){return this.each(function(i){var = self=3DjQuery(this);self.addClass(value.call(this,i,self.attr("class")));= });}=0A= if(value&&typeof value=3D=3D=3D"string"){var = classNames=3D(value||"").split(rspace);for(var = i=3D0,l=3Dthis.length;i=3D0;}else = if(jQuery.nodeName(this,"select")){var = values=3DjQuery.makeArray(val);jQuery("option",this).each(function(){this= .selected=3DjQuery.inArray(jQuery(this).val(),values)>=3D0;});if(!values.= length){this.selectedIndex=3D-1;}}else{this.value=3Dval;}});}});jQuery.ex= tend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,= height:true,offset:true},attr:function(elem,name,value,pass){if(!elem||el= em.nodeType=3D=3D=3D3||elem.nodeType=3D=3D=3D8){return undefined;}=0A= if(pass&&name in jQuery.attrFn){return jQuery(elem)[name](value);}=0A= var = notxml=3Delem.nodeType!=3D=3D1||!jQuery.isXMLDoc(elem),set=3Dvalue!=3D=3D= undefined;name=3Dnotxml&&jQuery.props[name]||name;if(elem.nodeType=3D=3D=3D= 1){var = special=3Drspecialurl.test(name);if(name=3D=3D=3D"selected"&&!jQuery.supp= ort.optSelected){var = parent=3Delem.parentNode;if(parent){parent.selectedIndex;if(parent.parent= Node){parent.parentNode.selectedIndex;}}}=0A= if(name in = elem&¬xml&&!special){if(set){if(name=3D=3D=3D"type"&&rtype.test(elem.n= odeName)&&elem.parentNode){jQuery.error("type property can't be = changed");}=0A= elem[name]=3Dvalue;}=0A= if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name)){return = elem.getAttributeNode(name).nodeValue;}=0A= if(name=3D=3D=3D"tabIndex"){var = attributeNode=3Delem.getAttributeNode("tabIndex");return = attributeNode&&attributeNode.specified?attributeNode.value:rfocusable.tes= t(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:undefined;}=0A= return elem[name];}=0A= if(!jQuery.support.style&¬xml&&name=3D=3D=3D"style"){if(set){elem.styl= e.cssText=3D""+value;}=0A= return elem.style.cssText;}=0A= if(set){elem.setAttribute(name,""+value);}=0A= var = attr=3D!jQuery.support.hrefNormalized&¬xml&&special?elem.getAttribute(= name,2):elem.getAttribute(name);return attr=3D=3D=3Dnull?undefined:attr;}=0A= return jQuery.style(elem,name,value);}});var = rnamespaces=3D/\.(.*)$/,fcleanup=3Dfunction(nm){return = nm.replace(/[^\w\s\.\|`]/g,function(ch){return"\\"+ch;});};jQuery.event=3D= {add:function(elem,types,handler,data){if(elem.nodeType=3D=3D=3D3||elem.n= odeType=3D=3D=3D8){return;}=0A= if(elem.setInterval&&(elem!=3D=3Dwindow&&!elem.frameElement)){elem=3Dwind= ow;}=0A= var = handleObjIn,handleObj;if(handler.handler){handleObjIn=3Dhandler;handler=3D= handleObjIn.handler;}=0A= if(!handler.guid){handler.guid=3DjQuery.guid++;}=0A= var elemData=3DjQuery.data(elem);if(!elemData){return;}=0A= var = events=3DelemData.events=3DelemData.events||{},eventHandle=3DelemData.han= dle,eventHandle;if(!eventHandle){elemData.handle=3DeventHandle=3Dfunction= (){return typeof = jQuery!=3D=3D"undefined"&&!jQuery.event.triggered?jQuery.event.handle.app= ly(eventHandle.elem,arguments):undefined;};}=0A= eventHandle.elem=3Delem;types=3Dtypes.split(" ");var = type,i=3D0,namespaces;while((type=3Dtypes[i++])){handleObj=3DhandleObjIn?= jQuery.extend({},handleObjIn):{handler:handler,data:data};if(type.indexOf= (".")>-1){namespaces=3Dtype.split(".");type=3Dnamespaces.shift();handleOb= j.namespace=3Dnamespaces.slice(0).sort().join(".");}else{namespaces=3D[];= handleObj.namespace=3D"";}=0A= handleObj.type=3Dtype;handleObj.guid=3Dhandler.guid;var = handlers=3Devents[type],special=3DjQuery.event.special[type]||{};if(!hand= lers){handlers=3Devents[type]=3D[];if(!special.setup||special.setup.call(= elem,data,namespaces,eventHandle)=3D=3D=3Dfalse){if(elem.addEventListener= ){elem.addEventListener(type,eventHandle,false);}else = if(elem.attachEvent){elem.attachEvent("on"+type,eventHandle);}}}=0A= if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.gu= id){handleObj.handler.guid=3Dhandler.guid;}}=0A= handlers.push(handleObj);jQuery.event.global[type]=3Dtrue;}=0A= elem=3Dnull;},global:{},remove:function(elem,types,handler,pos){if(elem.n= odeType=3D=3D=3D3||elem.nodeType=3D=3D=3D8){return;}=0A= var = ret,type,fn,i=3D0,all,namespaces,namespace,special,eventType,handleObj,or= igType,elemData=3DjQuery.data(elem),events=3DelemData&&elemData.events;if= (!elemData||!events){return;}=0A= if(types&&types.type){handler=3Dtypes.handler;types=3Dtypes.type;}=0A= if(!types||typeof = types=3D=3D=3D"string"&&types.charAt(0)=3D=3D=3D"."){types=3Dtypes||"";fo= r(type in events){jQuery.event.remove(elem,type+types);}=0A= return;}=0A= types=3Dtypes.split(" = ");while((type=3Dtypes[i++])){origType=3Dtype;handleObj=3Dnull;all=3Dtype= .indexOf(".")<0;namespaces=3D[];if(!all){namespaces=3Dtype.split(".");typ= e=3Dnamespaces.shift();namespace=3Dnew RegExp("(^|\\.)"+=0A= jQuery.map(namespaces.slice(0).sort(),fcleanup).join("\\.(?:.*\\.)?")+"(\= \.|$)")}=0A= eventType=3Devents[type];if(!eventType){continue;}=0A= if(!handler){for(var = j=3D0;j=3D0){event.type=3Dtyp= e=3Dtype.slice(0,-1);event.exclusive=3Dtrue;}=0A= if(!elem){event.stopPropagation();if(jQuery.event.global[type]){jQuery.ea= ch(jQuery.cache,function(){if(this.events&&this.events[type]){jQuery.even= t.trigger(event,data,this.handle.elem);}});}}=0A= if(!elem||elem.nodeType=3D=3D=3D3||elem.nodeType=3D=3D=3D8){return = undefined;}=0A= event.result=3Dundefined;event.target=3Delem;data=3DjQuery.makeArray(data= );data.unshift(event);}=0A= event.currentTarget=3Delem;var = handle=3DjQuery.data(elem,"handle");if(handle){handle.apply(elem,data);}=0A= var = parent=3Delem.parentNode||elem.ownerDocument;try{if(!(elem&&elem.nodeName= &&jQuery.noData[elem.nodeName.toLowerCase()])){if(elem["on"+type]&&elem["= on"+type].apply(elem,data)=3D=3D=3Dfalse){event.result=3Dfalse;}}}catch(e= ){}=0A= if(!event.isPropagationStopped()&&parent){jQuery.event.trigger(event,data= ,parent,true);}else if(!event.isDefaultPrevented()){var = target=3Devent.target,old,isClick=3DjQuery.nodeName(target,"a")&&type=3D=3D= =3D"click",special=3DjQuery.event.special[type]||{};if((!special._default= ||special._default.call(elem,event)=3D=3D=3Dfalse)&&!isClick&&!(target&&t= arget.nodeName&&jQuery.noData[target.nodeName.toLowerCase()])){try{if(tar= get[type]){old=3Dtarget["on"+type];if(old){target["on"+type]=3Dnull;}=0A= jQuery.event.triggered=3Dtrue;target[type]();}}catch(e){}=0A= if(old){target["on"+type]=3Dold;}=0A= jQuery.event.triggered=3Dfalse;}}},handle:function(event){var = all,handlers,namespaces,namespace,events;event=3Darguments[0]=3DjQuery.ev= ent.fix(event||window.event);event.currentTarget=3Dthis;all=3Devent.type.= indexOf(".")<0&&!event.exclusive;if(!all){namespaces=3Devent.type.split("= .");event.type=3Dnamespaces.shift();namespace=3Dnew = RegExp("(^|\\.)"+namespaces.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$= )");}=0A= var = events=3DjQuery.data(this,"events"),handlers=3Devents[event.type];if(even= ts&&handlers){handlers=3Dhandlers.slice(0);for(var = j=3D0,l=3Dhandlers.length;j-1?jQuery.map= (elem.options,function(elem){return elem.selected;}).join("-"):"";}else = if(elem.nodeName.toLowerCase()=3D=3D=3D"select"){val=3Delem.selectedIndex= ;}=0A= return val;},testChange=3Dfunction testChange(e){var = elem=3De.target,data,val;if(!formElems.test(elem.nodeName)||elem.readOnly= ){return;}=0A= data=3DjQuery.data(elem,"_change_data");val=3DgetVal(elem);if(e.type!=3D=3D= "focusout"||elem.type!=3D=3D"radio"){jQuery.data(elem,"_change_data",val)= ;}=0A= if(data=3D=3D=3Dundefined||val=3D=3D=3Ddata){return;}=0A= if(data!=3Dnull||val){e.type=3D"change";return = jQuery.event.trigger(e,arguments[1],elem);}};jQuery.event.special.change=3D= {filters:{focusout:testChange,click:function(e){var = elem=3De.target,type=3Delem.type;if(type=3D=3D=3D"radio"||type=3D=3D=3D"c= heckbox"||elem.nodeName.toLowerCase()=3D=3D=3D"select"){return = testChange.call(this,e);}},keydown:function(e){var = elem=3De.target,type=3Delem.type;if((e.keyCode=3D=3D=3D13&&elem.nodeName.= toLowerCase()!=3D=3D"textarea")||(e.keyCode=3D=3D=3D32&&(type=3D=3D=3D"ch= eckbox"||type=3D=3D=3D"radio"))||type=3D=3D=3D"select-multiple"){return = testChange.call(this,e);}},beforeactivate:function(e){var = elem=3De.target;jQuery.data(elem,"_change_data",getVal(elem));}},setup:fu= nction(data,namespaces){if(this.type=3D=3D=3D"file"){return false;}=0A= for(var type in = changeFilters){jQuery.event.add(this,type+".specialChange",changeFilters[= type]);}=0A= return = formElems.test(this.nodeName);},teardown:function(namespaces){jQuery.even= t.remove(this,".specialChange");return = formElems.test(this.nodeName);}};changeFilters=3DjQuery.event.special.cha= nge.filters;}=0A= function trigger(type,elem,args){args[0].type=3Dtype;return = jQuery.event.handle.apply(elem,args);}=0A= if(document.addEventListener){jQuery.each({focus:"focusin",blur:"focusout= "},function(orig,fix){jQuery.event.special[fix]=3D{setup:function(){this.= addEventListener(orig,handler,true);},teardown:function(){this.removeEven= tListener(orig,handler,true);}};function = handler(e){e=3DjQuery.event.fix(e);e.type=3Dfix;return = jQuery.event.handle.call(this,e);}});}=0A= jQuery.each(["bind","one"],function(i,name){jQuery.fn[name]=3Dfunction(ty= pe,data,fn){if(typeof type=3D=3D=3D"object"){for(var key in = type){this[name](key,data,type[key],fn);}=0A= return this;}=0A= if(jQuery.isFunction(data)){fn=3Ddata;data=3Dundefined;}=0A= var = handler=3Dname=3D=3D=3D"one"?jQuery.proxy(fn,function(event){jQuery(this)= .unbind(event,handler);return = fn.apply(this,arguments);}):fn;if(type=3D=3D=3D"unload"&&name!=3D=3D"one"= ){this.one(type,data,fn);}else{for(var = i=3D0,l=3Dthis.length;i+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,done=3D0,toString=3DObject= .prototype.toString,hasDuplicate=3Dfalse,baseHasDuplicate=3Dtrue;[0,0].so= rt(function(){baseHasDuplicate=3Dfalse;return 0;});var = Sizzle=3Dfunction(selector,context,results,seed){results=3Dresults||[];va= r = origContext=3Dcontext=3Dcontext||document;if(context.nodeType!=3D=3D1&&co= ntext.nodeType!=3D=3D9){return[];}=0A= if(!selector||typeof selector!=3D=3D"string"){return results;}=0A= var = parts=3D[],m,set,checkSet,extra,prune=3Dtrue,contextXML=3DisXML(context),= soFar=3Dselector;while((chunker.exec(""),m=3Dchunker.exec(soFar))!=3D=3Dn= ull){soFar=3Dm[3];parts.push(m[1]);if(m[2]){extra=3Dm[3];break;}}=0A= if(parts.length>1&&origPOS.exec(selector)){if(parts.length=3D=3D=3D2&&Exp= r.relative[parts[0]]){set=3DposProcess(parts[0]+parts[1],context);}else{s= et=3DExpr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);whil= e(parts.length){selector=3Dparts.shift();if(Expr.relative[selector]){sele= ctor+=3Dparts.shift();}=0A= set=3DposProcess(selector,set);}}}else{if(!seed&&parts.length>1&&context.= nodeType=3D=3D=3D9&&!contextXML&&Expr.match.ID.test(parts[0])&&!Expr.matc= h.ID.test(parts[parts.length-1])){var = ret=3DSizzle.find(parts.shift(),context,contextXML);context=3Dret.expr?Si= zzle.filter(ret.expr,ret.set)[0]:ret.set[0];}=0A= if(context){var = ret=3Dseed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop()= ,parts.length=3D=3D=3D1&&(parts[0]=3D=3D=3D"~"||parts[0]=3D=3D=3D"+")&&co= ntext.parentNode?context.parentNode:context,contextXML);set=3Dret.expr?Si= zzle.filter(ret.expr,ret.set):ret.set;if(parts.length>0){checkSet=3DmakeA= rray(set);}else{prune=3Dfalse;}=0A= while(parts.length){var = cur=3Dparts.pop(),pop=3Dcur;if(!Expr.relative[cur]){cur=3D"";}else{pop=3D= parts.pop();}=0A= if(pop=3D=3Dnull){pop=3Dcontext;}=0A= Expr.relative[cur](checkSet,pop,contextXML);}}else{checkSet=3Dparts=3D[];= }}=0A= if(!checkSet){checkSet=3Dset;}=0A= if(!checkSet){Sizzle.error(cur||selector);}=0A= if(toString.call(checkSet)=3D=3D=3D"[object = Array]"){if(!prune){results.push.apply(results,checkSet);}else = if(context&&context.nodeType=3D=3D=3D1){for(var = i=3D0;checkSet[i]!=3Dnull;i++){if(checkSet[i]&&(checkSet[i]=3D=3D=3Dtrue|= |checkSet[i].nodeType=3D=3D=3D1&&contains(context,checkSet[i]))){results.= push(set[i]);}}}else{for(var = i=3D0;checkSet[i]!=3Dnull;i++){if(checkSet[i]&&checkSet[i].nodeType=3D=3D= =3D1){results.push(set[i]);}}}}else{makeArray(checkSet,results);}=0A= if(extra){Sizzle(extra,origContext,results,seed);Sizzle.uniqueSort(result= s);}=0A= return = results;};Sizzle.uniqueSort=3Dfunction(results){if(sortOrder){hasDuplicat= e=3DbaseHasDuplicate;results.sort(sortOrder);if(hasDuplicate){for(var = i=3D1;i":function(che= ckSet,part){var isPartStr=3Dtypeof = part=3D=3D=3D"string";if(isPartStr&&!/\W/.test(part)){part=3Dpart.toLower= Case();for(var i=3D0,l=3DcheckSet.length;i1||/^\w/.test(match[3]))= {match[3]=3DSizzle(match[3],null,null,curLoop);}else{var = ret=3DSizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){resul= t.push.apply(result,ret);}=0A= return false;}}else = if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return= true;}=0A= return match;},POS:function(match){match.unshift(true);return = match;}},filters:{enabled:function(elem){return = elem.disabled=3D=3D=3Dfalse&&elem.type!=3D=3D"hidden";},disabled:function= (elem){return elem.disabled=3D=3D=3Dtrue;},checked:function(elem){return = elem.checked=3D=3D=3Dtrue;},selected:function(elem){elem.parentNode.selec= tedIndex;return = elem.selected=3D=3D=3Dtrue;},parent:function(elem){return!!elem.firstChil= d;},empty:function(elem){return!elem.firstChild;},has:function(elem,i,mat= ch){return!!Sizzle(match[3],elem).length;},header:function(elem){return/h= \d/i.test(elem.nodeName);},text:function(elem){return"text"=3D=3D=3Delem.= type;},radio:function(elem){return"radio"=3D=3D=3Delem.type;},checkbox:fu= nction(elem){return"checkbox"=3D=3D=3Delem.type;},file:function(elem){ret= urn"file"=3D=3D=3Delem.type;},password:function(elem){return"password"=3D= =3D=3Delem.type;},submit:function(elem){return"submit"=3D=3D=3Delem.type;= },image:function(elem){return"image"=3D=3D=3Delem.type;},reset:function(e= lem){return"reset"=3D=3D=3Delem.type;},button:function(elem){return"butto= n"=3D=3D=3Delem.type||elem.nodeName.toLowerCase()=3D=3D=3D"button";},inpu= t:function(elem){return/input|select|textarea|button/i.test(elem.nodeName= );}},setFilters:{first:function(elem,i){return = i=3D=3D=3D0;},last:function(elem,i,match,array){return = i=3D=3D=3Darray.length-1;},even:function(elem,i){return = i%2=3D=3D=3D0;},odd:function(elem,i){return = i%2=3D=3D=3D1;},lt:function(elem,i,match){return = imatch[3]-0;},nth:function(elem,i,match){return = match[3]-0=3D=3D=3Di;},eq:function(elem,i,match){return = match[3]-0=3D=3D=3Di;}},filter:{PSEUDO:function(elem,match,i,array){var = name=3Dmatch[1],filter=3DExpr.filters[name];if(filter){return = filter(elem,i,match,array);}else = if(name=3D=3D=3D"contains"){return(elem.textContent||elem.innerText||getT= ext([elem])||"").indexOf(match[3])>=3D0;}else if(name=3D=3D=3D"not"){var = not=3Dmatch[3];for(var = i=3D0,l=3Dnot.length;i=3D0);}}},ID= :function(elem,match){return = elem.nodeType=3D=3D=3D1&&elem.getAttribute("id")=3D=3D=3Dmatch;},TAG:func= tion(elem,match){return(match=3D=3D=3D"*"&&elem.nodeType=3D=3D=3D1)||elem= .nodeName.toLowerCase()=3D=3D=3Dmatch;},CLASS:function(elem,match){return= (" "+(elem.className||elem.getAttribute("class"))+" = ").indexOf(match)>-1;},ATTR:function(elem,match){var = name=3Dmatch[1],result=3DExpr.attrHandle[name]?Expr.attrHandle[name](elem= ):elem[name]!=3Dnull?elem[name]:elem.getAttribute(name),value=3Dresult+""= ,type=3Dmatch[2],check=3Dmatch[4];return = result=3D=3Dnull?type=3D=3D=3D"!=3D":type=3D=3D=3D"=3D"?value=3D=3D=3Dche= ck:type=3D=3D=3D"*=3D"?value.indexOf(check)>=3D0:type=3D=3D=3D"~=3D"?(" = "+value+" = ").indexOf(check)>=3D0:!check?value&&result!=3D=3Dfalse:type=3D=3D=3D"!=3D= "?value!=3D=3Dcheck:type=3D=3D=3D"^=3D"?value.indexOf(check)=3D=3D=3D0:ty= pe=3D=3D=3D"$=3D"?value.substr(value.length-check.length)=3D=3D=3Dcheck:t= ype=3D=3D=3D"|=3D"?value=3D=3D=3Dcheck||value.substr(0,check.length+1)=3D= =3D=3Dcheck+"-":false;},POS:function(elem,match,i,array){var = name=3Dmatch[2],filter=3DExpr.setFilters[name];if(filter){return = filter(elem,i,match,array);}}}};var origPOS=3DExpr.match.POS;for(var = type in Expr.match){Expr.match[type]=3Dnew = RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);Expr.le= ftMatch[type]=3Dnew = RegExp(/(^(?:.|\r|\n)*?)/.source+Expr.match[type].source.replace(/\\(\d+)= /g,function(all,num){return"\\"+(num-0+1);}));}=0A= var = makeArray=3Dfunction(array,results){array=3DArray.prototype.slice.call(ar= ray,0);if(results){results.push.apply(results,array);return results;}=0A= return = array;};try{Array.prototype.slice.call(document.documentElement.childNode= s,0)[0].nodeType;}catch(e){makeArray=3Dfunction(array,results){var = ret=3Dresults||[];if(toString.call(array)=3D=3D=3D"[object = Array]"){Array.prototype.push.apply(ret,array);}else{if(typeof = array.length=3D=3D=3D"number"){for(var = i=3D0,l=3Darray.length;i";var = root=3Ddocument.documentElement;root.insertBefore(form,root.firstChild);i= f(document.getElementById(id)){Expr.find.ID=3Dfunction(match,context,isXM= L){if(typeof context.getElementById!=3D=3D"undefined"&&!isXML){var = m=3Dcontext.getElementById(match[1]);return = m?m.id=3D=3D=3Dmatch[1]||typeof = m.getAttributeNode!=3D=3D"undefined"&&m.getAttributeNode("id").nodeValue=3D= =3D=3Dmatch[1]?[m]:undefined:[];}};Expr.filter.ID=3Dfunction(elem,match){= var node=3Dtypeof = elem.getAttributeNode!=3D=3D"undefined"&&elem.getAttributeNode("id");retu= rn elem.nodeType=3D=3D=3D1&&node&&node.nodeValue=3D=3D=3Dmatch;};}=0A= root.removeChild(form);root=3Dform=3Dnull;})();(function(){var = div=3Ddocument.createElement("div");div.appendChild(document.createCommen= t(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=3Dfunctio= n(match,context){var = results=3Dcontext.getElementsByTagName(match[1]);if(match[1]=3D=3D=3D"*")= {var tmp=3D[];for(var = i=3D0;results[i];i++){if(results[i].nodeType=3D=3D=3D1){tmp.push(results[= i]);}}=0A= results=3Dtmp;}=0A= return results;};}=0A= div.innerHTML=3D"";if(div.firstChild&&typeof = div.firstChild.getAttribute!=3D=3D"undefined"&&div.firstChild.getAttribut= e("href")!=3D=3D"#"){Expr.attrHandle.href=3Dfunction(elem){return = elem.getAttribute("href",2);};}=0A= div=3Dnull;})();if(document.querySelectorAll){(function(){var = oldSizzle=3DSizzle,div=3Ddocument.createElement("div");div.innerHTML=3D"<= p = class=3D'TEST'>

";if(div.querySelectorAll&&div.querySelectorAll(".TEST= ").length=3D=3D=3D0){return;}=0A= Sizzle=3Dfunction(query,context,extra,seed){context=3Dcontext||document;i= f(!seed&&context.nodeType=3D=3D=3D9&&!isXML(context)){try{return = makeArray(context.querySelectorAll(query),extra);}catch(e){}}=0A= return oldSizzle(query,context,extra,seed);};for(var prop in = oldSizzle){Sizzle[prop]=3DoldSizzle[prop];}=0A= div=3Dnull;})();}=0A= (function(){var = div=3Ddocument.createElement("div");div.innerHTML=3D"
";if(!div.getElementsByClassName||div.getElementsByC= lassName("e").length=3D=3D=3D0){return;}=0A= div.lastChild.className=3D"e";if(div.getElementsByClassName("e").length=3D= =3D=3D1){return;}=0A= Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=3Dfunction(match,context,i= sXML){if(typeof = context.getElementsByClassName!=3D=3D"undefined"&&!isXML){return = context.getElementsByClassName(match[1]);}};div=3Dnull;})();function = dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){for(var = i=3D0,l=3DcheckSet.length;i0){match=3Delem;break;}}=0A= elem=3Delem[dir];}=0A= checkSet[i]=3Dmatch;}}}=0A= var = contains=3Ddocument.compareDocumentPosition?function(a,b){return!!(a.comp= areDocumentPosition(b)&16);}:function(a,b){return = a!=3D=3Db&&(a.contains?a.contains(b):true);};var = isXML=3Dfunction(elem){var = documentElement=3D(elem?elem.ownerDocument||elem:0).documentElement;retur= n documentElement?documentElement.nodeName!=3D=3D"HTML":false;};var = posProcess=3Dfunction(selector,context){var = tmpSet=3D[],later=3D"",match,root=3Dcontext.nodeType?[context]:context;wh= ile((match=3DExpr.match.PSEUDO.exec(selector))){later+=3Dmatch[0];selecto= r=3Dselector.replace(Expr.match.PSEUDO,"");}=0A= selector=3DExpr.relative[selector]?selector+"*":selector;for(var = i=3D0,l=3Droot.length;i=3D0)=3D=3D=3Dkeep;});};jQuery.fn.extend({find:function(selector){var = ret=3Dthis.pushStack("","find",selector),length=3D0;for(var = i=3D0,l=3Dthis.length;i0){for(var n=3Dlength;n0;},clo= sest:function(selectors,context){if(jQuery.isArray(selectors)){var = ret=3D[],cur=3Dthis[0],match,matches=3D{},selector;if(cur&&selectors.leng= th){for(var = i=3D0,l=3Dselectors.length;i-1:jQ= uery(cur).is(match)){ret.push({selector:selector,elem:cur});delete = matches[selector];}}=0A= cur=3Dcur.parentNode;}}=0A= return ret;}=0A= var = pos=3DjQuery.expr.match.POS.test(selectors)?jQuery(selectors,context||thi= s.context):null;return = this.map(function(i,cur){while(cur&&cur.ownerDocument&&cur!=3D=3Dcontext)= {if(pos?pos.index(cur)>-1:jQuery(cur).is(selectors)){return cur;}=0A= cur=3Dcur.parentNode;}=0A= return null;});},index:function(elem){if(!elem||typeof = elem=3D=3D=3D"string"){return = jQuery.inArray(this[0],elem?jQuery(elem):this.parent().children());}=0A= return = jQuery.inArray(elem.jquery?elem[0]:elem,this);},add:function(selector,con= text){var set=3Dtypeof = selector=3D=3D=3D"string"?jQuery(selector,context||this.context):jQuery.m= akeArray(selector),all=3DjQuery.merge(this.get(),set);return = this.pushStack(isDisconnected(set[0])||isDisconnected(all[0])?all:jQuery.= unique(all));},andSelf:function(){return = this.add(this.prevObject);}});function = isDisconnected(node){return!node||!node.parentNode||node.parentNode.nodeT= ype=3D=3D=3D11;}=0A= jQuery.each({parent:function(elem){var parent=3Delem.parentNode;return = parent&&parent.nodeType!=3D=3D11?parent:null;},parents:function(elem){ret= urn = jQuery.dir(elem,"parentNode");},parentsUntil:function(elem,i,until){retur= n jQuery.dir(elem,"parentNode",until);},next:function(elem){return = jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return = jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return = jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return = jQuery.dir(elem,"previousSibling");},nextUntil:function(elem,i,until){ret= urn = jQuery.dir(elem,"nextSibling",until);},prevUntil:function(elem,i,until){r= eturn = jQuery.dir(elem,"previousSibling",until);},siblings:function(elem){return= = jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem)= {return jQuery.sibling(elem.firstChild);},contents:function(elem){return = jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.d= ocument:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[= name]=3Dfunction(until,selector){var = ret=3DjQuery.map(this,fn,until);if(!runtil.test(name)){selector=3Duntil;}=0A= if(selector&&typeof = selector=3D=3D=3D"string"){ret=3DjQuery.filter(selector,ret);}=0A= ret=3Dthis.length>1?jQuery.unique(ret):ret;if((this.length>1||rmultiselec= tor.test(selector))&&rparentsprev.test(name)){ret=3Dret.reverse();}=0A= return = this.pushStack(ret,name,slice.call(arguments).join(","));};});jQuery.exte= nd({filter:function(expr,elems,not){if(not){expr=3D":not("+expr+")";}=0A= return = jQuery.find.matches(expr,elems);},dir:function(elem,dir,until){var = matched=3D[],cur=3Delem[dir];while(cur&&cur.nodeType!=3D=3D9&&(until=3D=3D= =3Dundefined||cur.nodeType!=3D=3D1||!jQuery(cur).is(until))){if(cur.nodeT= ype=3D=3D=3D1){matched.push(cur);}=0A= cur=3Dcur[dir];}=0A= return = matched;},nth:function(cur,result,dir,elem){result=3Dresult||1;var = num=3D0;for(;cur;cur=3Dcur[dir]){if(cur.nodeType=3D=3D=3D1&&++num=3D=3D=3D= result){break;}}=0A= return cur;},sibling:function(n,elem){var = r=3D[];for(;n;n=3Dn.nextSibling){if(n.nodeType=3D=3D=3D1&&n!=3D=3Delem){r= .push(n);}}=0A= return r;}});var rinlinejQuery=3D/ = jQuery\d+=3D"(?:\d+|null)"/g,rleadingWhitespace=3D/^\s+/,rxhtmlTag=3D/(<(= [\w:]+)[^>]*?)\/>/g,rselfClosing=3D/^(?:area|br|col|embed|hr|img|input|li= nk|meta|param)$/i,rtagName=3D/<([\w:]+)/,rtbody=3D/";},wrapMap=3D{option:[1,"",""],legend:[1,"
","
"= ],thead:[1,"","
"],tr:[2,"","
= "],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],= _default:[0,"",""]};wrapMap.optgroup=3DwrapMap.option;wrapMap.tbody=3Dwra= pMap.tfoot=3DwrapMap.colgroup=3DwrapMap.caption=3DwrapMap.thead;wrapMap.t= h=3DwrapMap.td;if(!jQuery.support.htmlSerialize){wrapMap._default=3D[1,"d= iv
","
"];}=0A= jQuery.fn.extend({text:function(text){if(jQuery.isFunction(text)){return = this.each(function(i){var = self=3DjQuery(this);self.text(text.call(this,i,self.text()));});}=0A= if(typeof text!=3D=3D"object"&&text!=3D=3Dundefined){return = this.empty().append((this[0]&&this[0].ownerDocument||document).createText= Node(text));}=0A= return = jQuery.text(this);},wrapAll:function(html){if(jQuery.isFunction(html)){re= turn this.each(function(i){jQuery(this).wrapAll(html.call(this,i));});}=0A= if(this[0]){var = wrap=3DjQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].pa= rentNode){wrap.insertBefore(this[0]);}=0A= wrap.map(function(){var = elem=3Dthis;while(elem.firstChild&&elem.firstChild.nodeType=3D=3D=3D1){el= em=3Delem.firstChild;}=0A= return elem;}).append(this);}=0A= return = this;},wrapInner:function(html){if(jQuery.isFunction(html)){return = this.each(function(i){jQuery(this).wrapInner(html.call(this,i));});}=0A= return this.each(function(){var = self=3DjQuery(this),contents=3Dself.contents();if(contents.length){conten= ts.wrapAll(html);}else{self.append(html);}});},wrap:function(html){return= = this.each(function(){jQuery(this).wrapAll(html);});},unwrap:function(){re= turn = this.parent().each(function(){if(!jQuery.nodeName(this,"body")){jQuery(th= is).replaceWith(this.childNodes);}}).end();},append:function(){return = this.domManip(arguments,true,function(elem){if(this.nodeType=3D=3D=3D1){t= his.appendChild(elem);}});},prepend:function(){return = this.domManip(arguments,true,function(elem){if(this.nodeType=3D=3D=3D1){t= his.insertBefore(elem,this.firstChild);}});},before:function(){if(this[0]= &&this[0].parentNode){return = this.domManip(arguments,false,function(elem){this.parentNode.insertBefore= (elem,this);});}else if(arguments.length){var = set=3DjQuery(arguments[0]);set.push.apply(set,this.toArray());return = this.pushStack(set,"before",arguments);}},after:function(){if(this[0]&&th= is[0].parentNode){return = this.domManip(arguments,false,function(elem){this.parentNode.insertBefore= (elem,this.nextSibling);});}else if(arguments.length){var = set=3Dthis.pushStack(this,"after",arguments);set.push.apply(set,jQuery(ar= guments[0]).toArray());return = set;}},remove:function(selector,keepData){for(var = i=3D0,elem;(elem=3Dthis[i])!=3Dnull;i++){if(!selector||jQuery.filter(sele= ctor,[elem]).length){if(!keepData&&elem.nodeType=3D=3D=3D1){jQuery.cleanD= ata(elem.getElementsByTagName("*"));jQuery.cleanData([elem]);}=0A= if(elem.parentNode){elem.parentNode.removeChild(elem);}}}=0A= return this;},empty:function(){for(var = i=3D0,elem;(elem=3Dthis[i])!=3Dnull;i++){if(elem.nodeType=3D=3D=3D1){jQue= ry.cleanData(elem.getElementsByTagName("*"));}=0A= while(elem.firstChild){elem.removeChild(elem.firstChild);}}=0A= return this;},clone:function(events){var = ret=3Dthis.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLD= oc(this)){var = html=3Dthis.outerHTML,ownerDocument=3Dthis.ownerDocument;if(!html){var = div=3DownerDocument.createElement("div");div.appendChild(this.cloneNode(t= rue));html=3Ddiv.innerHTML;}=0A= return = jQuery.clean([html.replace(rinlinejQuery,"").replace(/=3D([^=3D"'>\s]+\/)= >/g,'=3D"$1">').replace(rleadingWhitespace,"")],ownerDocument)[0];}else{r= eturn = this.cloneNode(true);}});if(events=3D=3D=3Dtrue){cloneCopyEvent(this,ret)= ;cloneCopyEvent(this.find("*"),ret.find("*"));}=0A= return ret;},html:function(value){if(value=3D=3D=3Dundefined){return = this[0]&&this[0].nodeType=3D=3D=3D1?this[0].innerHTML.replace(rinlinejQue= ry,""):null;}else if(typeof = value=3D=3D=3D"string"&&!rnocache.test(value)&&(jQuery.support.leadingWhi= tespace||!rleadingWhitespace.test(value))&&!wrapMap[(rtagName.exec(value)= ||["",""])[1].toLowerCase()]){value=3Dvalue.replace(rxhtmlTag,fcloseTag);= try{for(var = i=3D0,l=3Dthis.length;i0||results.cacheable||this.length>1?fragment.cloneNode(true):frag= ment);}}=0A= if(scripts.length){jQuery.each(scripts,evalScript);}}=0A= return this;function root(elem,cur){return = jQuery.nodeName(elem,"table")?(elem.getElementsByTagName("tbody")[0]||ele= m.appendChild(elem.ownerDocument.createElement("tbody"))):elem;}}});funct= ion cloneCopyEvent(orig,ret){var = i=3D0;ret.each(function(){if(this.nodeName!=3D=3D(orig[i]&&orig[i].nodeNa= me)){return;}=0A= var = oldData=3DjQuery.data(orig[i++]),curData=3DjQuery.data(this,oldData),even= ts=3DoldData&&oldData.events;if(events){delete = curData.handle;curData.events=3D{};for(var type in events){for(var = handler in = events[type]){jQuery.event.add(this,type,events[type][handler],events[typ= e][handler].data);}}}});}=0A= function buildFragment(args,nodes,scripts){var = fragment,cacheable,cacheresults,doc=3D(nodes&&nodes[0]?nodes[0].ownerDocu= ment||nodes[0]:document);if(args.length=3D=3D=3D1&&typeof = args[0]=3D=3D=3D"string"&&args[0].length<512&&doc=3D=3D=3Ddocument&&!rnoc= ache.test(args[0])&&(jQuery.support.checkClone||!rchecked.test(args[0])))= {cacheable=3Dtrue;cacheresults=3DjQuery.fragments[args[0]];if(cacheresult= s){if(cacheresults!=3D=3D1){fragment=3Dcacheresults;}}}=0A= if(!fragment){fragment=3Ddoc.createDocumentFragment();jQuery.clean(args,d= oc,fragment,scripts);}=0A= if(cacheable){jQuery.fragments[args[0]]=3Dcacheresults?fragment:1;}=0A= return{fragment:fragment,cacheable:cacheable};}=0A= jQuery.fragments=3D{};jQuery.each({appendTo:"append",prependTo:"prepend",= insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},funct= ion(name,original){jQuery.fn[name]=3Dfunction(selector){var = ret=3D[],insert=3DjQuery(selector),parent=3Dthis.length=3D=3D=3D1&&this[0= ].parentNode;if(parent&&parent.nodeType=3D=3D=3D11&&parent.childNodes.len= gth=3D=3D=3D1&&insert.length=3D=3D=3D1){insert[original](this[0]);return = this;}else{for(var i=3D0,l=3Dinsert.length;i0?this.clone(true):this).get();jQuery.fn[original].apply(jQuer= y(insert[i]),elems);ret=3Dret.concat(elems);}=0A= return = this.pushStack(ret,name,insert.selector);}};});jQuery.extend({clean:funct= ion(elems,context,fragment,scripts){context=3Dcontext||document;if(typeof= = context.createElement=3D=3D=3D"undefined"){context=3Dcontext.ownerDocumen= t||context[0]&&context[0].ownerDocument||document;}=0A= var ret=3D[];for(var i=3D0,elem;(elem=3Delems[i])!=3Dnull;i++){if(typeof = elem=3D=3D=3D"number"){elem+=3D"";}=0A= if(!elem){continue;}=0A= if(typeof = elem=3D=3D=3D"string"&&!rhtml.test(elem)){elem=3Dcontext.createTextNode(e= lem);}else if(typeof = elem=3D=3D=3D"string"){elem=3Delem.replace(rxhtmlTag,fcloseTag);var = tag=3D(rtagName.exec(elem)||["",""])[1].toLowerCase(),wrap=3DwrapMap[tag]= ||wrapMap._default,depth=3Dwrap[0],div=3Dcontext.createElement("div");div= .innerHTML=3Dwrap[1]+elem+wrap[2];while(depth--){div=3Ddiv.lastChild;}=0A= if(!jQuery.support.tbody){var = hasBody=3Drtbody.test(elem),tbody=3Dtag=3D=3D=3D"table"&&!hasBody?div.fir= stChild&&div.firstChild.childNodes:wrap[1]=3D=3D=3D""&&!hasBody?di= v.childNodes:[];for(var = j=3Dtbody.length-1;j>=3D0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbo= dy[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j]);}}}=0A= if(!jQuery.support.leadingWhitespace&&rleadingWhitespace.test(elem)){div.= insertBefore(context.createTextNode(rleadingWhitespace.exec(elem)[0]),div= .firstChild);}=0A= elem=3Ddiv.childNodes;}=0A= if(elem.nodeType){ret.push(elem);}else{ret=3DjQuery.merge(ret,elem);}}=0A= if(fragment){for(var = i=3D0;ret[i];i++){if(scripts&&jQuery.nodeName(ret[i],"script")&&(!ret[i].= type||ret[i].type.toLowerCase()=3D=3D=3D"text/javascript")){scripts.push(= ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i]);}else{if(= ret[i].nodeType=3D=3D=3D1){ret.splice.apply(ret,[i+1,0].concat(jQuery.mak= eArray(ret[i].getElementsByTagName("script"))));}=0A= fragment.appendChild(ret[i]);}}}=0A= return ret;},cleanData:function(elems){var = data,id,cache=3DjQuery.cache,special=3DjQuery.event.special,deleteExpando= =3DjQuery.support.deleteExpando;for(var = i=3D0,elem;(elem=3Delems[i])!=3Dnull;i++){id=3Delem[jQuery.expando];if(id= ){data=3Dcache[id];if(data.events){for(var type in = data.events){if(special[type]){jQuery.event.remove(elem,type);}else{remov= eEvent(elem,type,data.handle);}}}=0A= if(deleteExpando){delete elem[jQuery.expando];}else = if(elem.removeAttribute){elem.removeAttribute(jQuery.expando);}=0A= delete cache[id];}}}});var = rexclude=3D/z-?index|font-?weight|opacity|zoom|line-?height/i,ralpha=3D/a= lpha\([^)]*\)/,ropacity=3D/opacity=3D([^)]*)/,rfloat=3D/float/i,rdashAlph= a=3D/-([a-z])/ig,rupper=3D/([A-Z])/g,rnumpx=3D/^-?\d+(?:px)?$/i,rnum=3D/^= -?\d/,cssShow=3D{position:"absolute",visibility:"hidden",display:"block"}= ,cssWidth=3D["Left","Right"],cssHeight=3D["Top","Bottom"],getComputedStyl= e=3Ddocument.defaultView&&document.defaultView.getComputedStyle,styleFloa= t=3DjQuery.support.cssFloat?"cssFloat":"styleFloat",fcamelCase=3Dfunction= (all,letter){return = letter.toUpperCase();};jQuery.fn.css=3Dfunction(name,value){return = access(this,name,value,true,function(elem,name,value){if(value=3D=3D=3Dun= defined){return jQuery.curCSS(elem,name);}=0A= if(typeof value=3D=3D=3D"number"&&!rexclude.test(name)){value+=3D"px";}=0A= jQuery.style(elem,name,value);});};jQuery.extend({style:function(elem,nam= e,value){if(!elem||elem.nodeType=3D=3D=3D3||elem.nodeType=3D=3D=3D8){retu= rn undefined;}=0A= if((name=3D=3D=3D"width"||name=3D=3D=3D"height")&&parseFloat(value)<0){va= lue=3Dundefined;}=0A= var = style=3Delem.style||elem,set=3Dvalue!=3D=3Dundefined;if(!jQuery.support.o= pacity&&name=3D=3D=3D"opacity"){if(set){style.zoom=3D1;var = opacity=3DparseInt(value,10)+""=3D=3D=3D"NaN"?"":"alpha(opacity=3D"+value= *100+")";var = filter=3Dstyle.filter||jQuery.curCSS(elem,"filter")||"";style.filter=3Dra= lpha.test(filter)?filter.replace(ralpha,opacity):opacity;}=0A= return = style.filter&&style.filter.indexOf("opacity=3D")>=3D0?(parseFloat(ropacit= y.exec(style.filter)[1])/100)+"":"";}=0A= if(rfloat.test(name)){name=3DstyleFloat;}=0A= name=3Dname.replace(rdashAlpha,fcamelCase);if(set){style[name]=3Dvalue;}=0A= return = style[name];},css:function(elem,name,force,extra){if(name=3D=3D=3D"width"= ||name=3D=3D=3D"height"){var = val,props=3DcssShow,which=3Dname=3D=3D=3D"width"?cssWidth:cssHeight;funct= ion = getWH(){val=3Dname=3D=3D=3D"width"?elem.offsetWidth:elem.offsetHeight;if(= extra=3D=3D=3D"border"){return;}=0A= jQuery.each(which,function(){if(!extra){val-=3DparseFloat(jQuery.curCSS(e= lem,"padding"+this,true))||0;}=0A= if(extra=3D=3D=3D"margin"){val+=3DparseFloat(jQuery.curCSS(elem,"margin"+= this,true))||0;}else{val-=3DparseFloat(jQuery.curCSS(elem,"border"+this+"= Width",true))||0;}});}=0A= if(elem.offsetWidth!=3D=3D0){getWH();}else{jQuery.swap(elem,props,getWH);= }=0A= return Math.max(0,Math.round(val));}=0A= return = jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var = ret,style=3Delem.style,filter;if(!jQuery.support.opacity&&name=3D=3D=3D"o= pacity"&&elem.currentStyle){ret=3Dropacity.test(elem.currentStyle.filter|= |"")?(parseFloat(RegExp.$1)/100)+"":"";return ret=3D=3D=3D""?"1":ret;}=0A= if(rfloat.test(name)){name=3DstyleFloat;}=0A= if(!force&&style&&style[name]){ret=3Dstyle[name];}else = if(getComputedStyle){if(rfloat.test(name)){name=3D"float";}=0A= name=3Dname.replace(rupper,"-$1").toLowerCase();var = defaultView=3Delem.ownerDocument.defaultView;if(!defaultView){return = null;}=0A= var = computedStyle=3DdefaultView.getComputedStyle(elem,null);if(computedStyle)= {ret=3DcomputedStyle.getPropertyValue(name);}=0A= if(name=3D=3D=3D"opacity"&&ret=3D=3D=3D""){ret=3D"1";}}else = if(elem.currentStyle){var = camelCase=3Dname.replace(rdashAlpha,fcamelCase);ret=3Delem.currentStyle[n= ame]||elem.currentStyle[camelCase];if(!rnumpx.test(ret)&&rnum.test(ret)){= var = left=3Dstyle.left,rsLeft=3Delem.runtimeStyle.left;elem.runtimeStyle.left=3D= elem.currentStyle.left;style.left=3DcamelCase=3D=3D=3D"fontSize"?"1em":(r= et||0);ret=3Dstyle.pixelLeft+"px";style.left=3Dleft;elem.runtimeStyle.lef= t=3DrsLeft;}}=0A= return ret;},swap:function(elem,options,callback){var old=3D{};for(var = name in = options){old[name]=3Delem.style[name];elem.style[name]=3Doptions[name];}=0A= callback.call(elem);for(var name in = options){elem.style[name]=3Dold[name];}}});if(jQuery.expr&&jQuery.expr.fi= lters){jQuery.expr.filters.hidden=3Dfunction(elem){var = width=3Delem.offsetWidth,height=3Delem.offsetHeight,skip=3Delem.nodeName.= toLowerCase()=3D=3D=3D"tr";return = width=3D=3D=3D0&&height=3D=3D=3D0&&!skip?true:width>0&&height>0&&!skip?fa= lse:jQuery.curCSS(elem,"display")=3D=3D=3D"none";};jQuery.expr.filters.vi= sible=3Dfunction(elem){return!jQuery.expr.filters.hidden(elem);};}=0A= var = jsc=3Dnow(),rscript=3D//gi,rselectTextarea=3D/sel= ect|textarea/i,rinput=3D/color|date|datetime|email|hidden|month|number|pa= ssword|range|search|tel|text|time|url|week/i,jsre=3D/=3D\?(&|$)/,rquery=3D= /\?/,rts=3D/(\?|&)_=3D.*?(&|$)/,rurl=3D/^(\w+:)?\/\/([^\/?#]+)/,r20=3D/%2= 0/g,_load=3DjQuery.fn.load;jQuery.fn.extend({load:function(url,params,cal= lback){if(typeof url!=3D=3D"string"){return _load.call(this,url);}else = if(!this.length){return this;}=0A= var off=3Durl.indexOf(" ");if(off>=3D0){var = selector=3Durl.slice(off,url.length);url=3Durl.slice(0,off);}=0A= var = type=3D"GET";if(params){if(jQuery.isFunction(params)){callback=3Dparams;p= arams=3Dnull;}else if(typeof = params=3D=3D=3D"object"){params=3DjQuery.param(params,jQuery.ajaxSettings= .traditional);type=3D"POST";}}=0A= var = self=3Dthis;jQuery.ajax({url:url,type:type,dataType:"html",data:params,co= mplete:function(res,status){if(status=3D=3D=3D"success"||status=3D=3D=3D"= notmodified"){self.html(selector?jQuery("
").append(res.responseText.replace(rscript,"")).find(selector):res.resp= onseText);}=0A= if(callback){self.each(callback,[res.responseText,status,res]);}}});retur= n this;},serialize:function(){return = jQuery.param(this.serializeArray());},serializeArray:function(){return = this.map(function(){return = this.elements?jQuery.makeArray(this.elements):this;}).filter(function(){r= eturn = this.name&&!this.disabled&&(this.checked||rselectTextarea.test(this.nodeN= ame)||rinput.test(this.type));}).map(function(i,elem){var = val=3DjQuery(this).val();return = val=3D=3Dnull?null:jQuery.isArray(val)?jQuery.map(val,function(val,i){ret= urn{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});= jQuery.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess = ajaxSend".split(" "),function(i,o){jQuery.fn[o]=3Dfunction(f){return = this.bind(o,f);};});jQuery.extend({get:function(url,data,callback,type){i= f(jQuery.isFunction(data)){type=3Dtype||callback;callback=3Ddata;data=3Dn= ull;}=0A= return = jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type}= );},getScript:function(url,callback){return = jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callba= ck){return = jQuery.get(url,data,callback,"json");},post:function(url,data,callback,ty= pe){if(jQuery.isFunction(data)){type=3Dtype||callback;callback=3Ddata;dat= a=3D{};}=0A= return = jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type= });},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,setti= ngs);},ajaxSettings:{url:location.href,global:true,type:"GET",contentType= :"application/x-www-form-urlencoded",processData:true,async:true,xhr:wind= ow.XMLHttpRequest&&(window.location.protocol!=3D=3D"file:"||!window.Activ= eXObject)?function(){return new = window.XMLHttpRequest();}:function(){try{return new = window.ActiveXObject("Microsoft.XMLHTTP");}catch(e){}},accepts:{xml:"appl= ication/xml, text/xml",html:"text/html",script:"text/javascript, = application/javascript",json:"application/json, = text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:= {},ajax:function(origSettings){var = s=3DjQuery.extend(true,{},jQuery.ajaxSettings,origSettings);var = jsonp,status,data,callbackContext=3DorigSettings&&origSettings.context||s= ,type=3Ds.type.toUpperCase();if(s.data&&s.processData&&typeof = s.data!=3D=3D"string"){s.data=3DjQuery.param(s.data,s.traditional);}=0A= if(s.dataType=3D=3D=3D"jsonp"){if(type=3D=3D=3D"GET"){if(!jsre.test(s.url= )){s.url+=3D(rquery.test(s.url)?"&":"?")+(s.jsonp||"callback")+"=3D?";}}e= lse = if(!s.data||!jsre.test(s.data)){s.data=3D(s.data?s.data+"&":"")+(s.jsonp|= |"callback")+"=3D?";}=0A= s.dataType=3D"json";}=0A= if(s.dataType=3D=3D=3D"json"&&(s.data&&jsre.test(s.data)||jsre.test(s.url= ))){jsonp=3Ds.jsonpCallback||("jsonp"+jsc++);if(s.data){s.data=3D(s.data+= "").replace(jsre,"=3D"+jsonp+"$1");}=0A= s.url=3Ds.url.replace(jsre,"=3D"+jsonp+"$1");s.dataType=3D"script";window= [jsonp]=3Dwindow[jsonp]||function(tmp){data=3Dtmp;success();complete();wi= ndow[jsonp]=3Dundefined;try{delete window[jsonp];}catch(e){}=0A= if(head){head.removeChild(script);}};}=0A= if(s.dataType=3D=3D=3D"script"&&s.cache=3D=3D=3Dnull){s.cache=3Dfalse;}=0A= if(s.cache=3D=3D=3Dfalse&&type=3D=3D=3D"GET"){var ts=3Dnow();var = ret=3Ds.url.replace(rts,"$1_=3D"+ts+"$2");s.url=3Dret+((ret=3D=3D=3Ds.url= )?(rquery.test(s.url)?"&":"?")+"_=3D"+ts:"");}=0A= if(s.data&&type=3D=3D=3D"GET"){s.url+=3D(rquery.test(s.url)?"&":"?")+s.da= ta;}=0A= if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart");}=0A= var = parts=3Drurl.exec(s.url),remote=3Dparts&&(parts[1]&&parts[1]!=3D=3Dlocati= on.protocol||parts[2]!=3D=3Dlocation.host);if(s.dataType=3D=3D=3D"script"= &&type=3D=3D=3D"GET"&&remote){var = head=3Ddocument.getElementsByTagName("head")[0]||document.documentElement= ;var = script=3Ddocument.createElement("script");script.src=3Ds.url;if(s.scriptC= harset){script.charset=3Ds.scriptCharset;}=0A= if(!jsonp){var = done=3Dfalse;script.onload=3Dscript.onreadystatechange=3Dfunction(){if(!d= one&&(!this.readyState||this.readyState=3D=3D=3D"loaded"||this.readyState= =3D=3D=3D"complete")){done=3Dtrue;success();complete();script.onload=3Dsc= ript.onreadystatechange=3Dnull;if(head&&script.parentNode){head.removeChi= ld(script);}}};}=0A= head.insertBefore(script,head.firstChild);return undefined;}=0A= var requestDone=3Dfalse;var xhr=3Ds.xhr();if(!xhr){return;}=0A= if(s.username){xhr.open(type,s.url,s.async,s.username,s.password);}else{x= hr.open(type,s.url,s.async);}=0A= try{if(s.data||origSettings&&origSettings.contentType){xhr.setRequestHead= er("Content-Type",s.contentType);}=0A= if(s.ifModified){if(jQuery.lastModified[s.url]){xhr.setRequestHeader("If-= Modified-Since",jQuery.lastModified[s.url]);}=0A= if(jQuery.etag[s.url]){xhr.setRequestHeader("If-None-Match",jQuery.etag[s= .url]);}}=0A= if(!remote){xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");}=0A= xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts= [s.dataType]+", */*":s.accepts._default);}catch(e){}=0A= if(s.beforeSend&&s.beforeSend.call(callbackContext,xhr,s)=3D=3D=3Dfalse){= if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop");}=0A= xhr.abort();return false;}=0A= if(s.global){trigger("ajaxSend",[xhr,s]);}=0A= var = onreadystatechange=3Dxhr.onreadystatechange=3Dfunction(isTimeout){if(!xhr= ||xhr.readyState=3D=3D=3D0||isTimeout=3D=3D=3D"abort"){if(!requestDone){c= omplete();}=0A= requestDone=3Dtrue;if(xhr){xhr.onreadystatechange=3DjQuery.noop;}}else = if(!requestDone&&xhr&&(xhr.readyState=3D=3D=3D4||isTimeout=3D=3D=3D"timeo= ut")){requestDone=3Dtrue;xhr.onreadystatechange=3DjQuery.noop;status=3Dis= Timeout=3D=3D=3D"timeout"?"timeout":!jQuery.httpSuccess(xhr)?"error":s.if= Modified&&jQuery.httpNotModified(xhr,s.url)?"notmodified":"success";var = errMsg;if(status=3D=3D=3D"success"){try{data=3DjQuery.httpData(xhr,s.data= Type,s);}catch(err){status=3D"parsererror";errMsg=3Derr;}}=0A= if(status=3D=3D=3D"success"||status=3D=3D=3D"notmodified"){if(!jsonp){suc= cess();}}else{jQuery.handleError(s,xhr,status,errMsg);}=0A= complete();if(isTimeout=3D=3D=3D"timeout"){xhr.abort();}=0A= if(s.async){xhr=3Dnull;}}};try{var = oldAbort=3Dxhr.abort;xhr.abort=3Dfunction(){if(xhr){oldAbort.call(xhr);}=0A= onreadystatechange("abort");};}catch(e){}=0A= if(s.async&&s.timeout>0){setTimeout(function(){if(xhr&&!requestDone){onre= adystatechange("timeout");}},s.timeout);}=0A= try{xhr.send(type=3D=3D=3D"POST"||type=3D=3D=3D"PUT"||type=3D=3D=3D"DELET= E"?s.data:null);}catch(e){jQuery.handleError(s,xhr,null,e);complete();}=0A= if(!s.async){onreadystatechange();}=0A= function = success(){if(s.success){s.success.call(callbackContext,data,status,xhr);}=0A= if(s.global){trigger("ajaxSuccess",[xhr,s]);}}=0A= function = complete(){if(s.complete){s.complete.call(callbackContext,xhr,status);}=0A= if(s.global){trigger("ajaxComplete",[xhr,s]);}=0A= if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop");}}=0A= function = trigger(type,args){(s.context?jQuery(s.context):jQuery.event).trigger(typ= e,args);}=0A= return = xhr;},handleError:function(s,xhr,status,e){if(s.error){s.error.call(s.con= text||s,xhr,status,e);}=0A= if(s.global){(s.context?jQuery(s.context):jQuery.event).trigger("ajaxErro= r",[xhr,s,e]);}},active:0,httpSuccess:function(xhr){try{return!xhr.status= &&location.protocol=3D=3D=3D"file:"||(xhr.status>=3D200&&xhr.status<300)|= |xhr.status=3D=3D=3D304||xhr.status=3D=3D=3D1223||xhr.status=3D=3D=3D0;}c= atch(e){}=0A= return false;},httpNotModified:function(xhr,url){var = lastModified=3Dxhr.getResponseHeader("Last-Modified"),etag=3Dxhr.getRespo= nseHeader("Etag");if(lastModified){jQuery.lastModified[url]=3DlastModifie= d;}=0A= if(etag){jQuery.etag[url]=3Detag;}=0A= return = xhr.status=3D=3D=3D304||xhr.status=3D=3D=3D0;},httpData:function(xhr,type= ,s){var = ct=3Dxhr.getResponseHeader("content-type")||"",xml=3Dtype=3D=3D=3D"xml"||= !type&&ct.indexOf("xml")>=3D0,data=3Dxml?xhr.responseXML:xhr.responseText= ;if(xml&&data.documentElement.nodeName=3D=3D=3D"parsererror"){jQuery.erro= r("parsererror");}=0A= if(s&&s.dataFilter){data=3Ds.dataFilter(data,type);}=0A= if(typeof = data=3D=3D=3D"string"){if(type=3D=3D=3D"json"||!type&&ct.indexOf("json")>= =3D0){data=3DjQuery.parseJSON(data);}else = if(type=3D=3D=3D"script"||!type&&ct.indexOf("javascript")>=3D0){jQuery.gl= obalEval(data);}}=0A= return data;},param:function(a,traditional){var = s=3D[];if(traditional=3D=3D=3Dundefined){traditional=3DjQuery.ajaxSetting= s.traditional;}=0A= if(jQuery.isArray(a)||a.jquery){jQuery.each(a,function(){add(this.name,th= is.value);});}else{for(var prefix in a){buildParams(prefix,a[prefix]);}}=0A= return s.join("&").replace(r20,"+");function = buildParams(prefix,obj){if(jQuery.isArray(obj)){jQuery.each(obj,function(= i,v){if(traditional||/\[\]$/.test(prefix)){add(prefix,v);}else{buildParam= s(prefix+"["+(typeof = v=3D=3D=3D"object"||jQuery.isArray(v)?i:"")+"]",v);}});}else = if(!traditional&&obj!=3Dnull&&typeof = obj=3D=3D=3D"object"){jQuery.each(obj,function(k,v){buildParams(prefix+"[= "+k+"]",v);});}else{add(prefix,obj);}}=0A= function = add(key,value){value=3DjQuery.isFunction(value)?value():value;s[s.length]= =3DencodeURIComponent(key)+"=3D"+encodeURIComponent(value);}}});var = elemdisplay=3D{},rfxtypes=3D/toggle|show|hide/,rfxnum=3D/^([+-]=3D)?([\d+= -.]+)(.*)$/,timerId,fxAttrs=3D[["height","marginTop","marginBottom","padd= ingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft= ","paddingRight"],["opacity"]];jQuery.fn.extend({show:function(speed,call= back){if(speed||speed=3D=3D=3D0){return = this.animate(genFx("show",3),speed,callback);}else{for(var = i=3D0,l=3Dthis.length;i").appendTo("body");display=3Delem.css("display");if(display=3D=3D=3D"n= one"){display=3D"block";}=0A= elem.remove();elemdisplay[nodeName]=3Ddisplay;}=0A= jQuery.data(this[i],"olddisplay",display);}}=0A= for(var = j=3D0,k=3Dthis.length;j=3D0;i--){if(timers[i].elem=3D=3D=3Dthis){if(gotoEn= d){timers[i](true);}=0A= timers.splice(i,1);}}});if(!gotoEnd){this.dequeue();}=0A= return = this;}});jQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),s= lideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hi= de"}},function(name,props){jQuery.fn[name]=3Dfunction(speed,callback){ret= urn = this.animate(props,speed,callback);};});jQuery.extend({speed:function(spe= ed,easing,fn){var opt=3Dspeed&&typeof = speed=3D=3D=3D"object"?speed:{complete:fn||!fn&&easing||jQuery.isFunction= (speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFuncti= on(easing)&&easing};opt.duration=3DjQuery.fx.off?0:typeof = opt.duration=3D=3D=3D"number"?opt.duration:jQuery.fx.speeds[opt.duration]= ||jQuery.fx.speeds._default;opt.old=3Dopt.complete;opt.complete=3Dfunctio= n(){if(opt.queue!=3D=3Dfalse){jQuery(this).dequeue();}=0A= if(jQuery.isFunction(opt.old)){opt.old.call(this);}};return = opt;},easing:{linear:function(p,n,firstNum,diff){return = firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*M= ath.PI)/2)+0.5)*diff+firstNum;}},timers:[],fx:function(elem,options,prop)= {this.options=3Doptions;this.elem=3Delem;this.prop=3Dprop;if(!options.ori= g){options.orig=3D{};}}});jQuery.fx.prototype=3D{update:function(){if(thi= s.options.step){this.options.step.call(this.elem,this.now,this);}=0A= (jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if((this.prop=3D= =3D=3D"height"||this.prop=3D=3D=3D"width")&&this.elem.style){this.elem.st= yle.display=3D"block";}},cur:function(force){if(this.elem[this.prop]!=3Dn= ull&&(!this.elem.style||this.elem.style[this.prop]=3D=3Dnull)){return = this.elem[this.prop];}=0A= var r=3DparseFloat(jQuery.css(this.elem,this.prop,force));return = r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:= function(from,to,unit){this.startTime=3Dnow();this.start=3Dfrom;this.end=3D= to;this.unit=3Dunit||this.unit||"px";this.now=3Dthis.start;this.pos=3Dthi= s.state=3D0;var self=3Dthis;function t(gotoEnd){return = self.step(gotoEnd);}=0A= t.elem=3Dthis.elem;if(t()&&jQuery.timers.push(t)&&!timerId){timerId=3Dset= Interval(jQuery.fx.tick,13);}},show:function(){this.options.orig[this.pro= p]=3DjQuery.style(this.elem,this.prop);this.options.show=3Dtrue;this.cust= om(this.prop=3D=3D=3D"width"||this.prop=3D=3D=3D"height"?1:0,this.cur());= jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=3D= jQuery.style(this.elem,this.prop);this.options.hide=3Dtrue;this.custom(th= is.cur(),0);},step:function(gotoEnd){var = t=3Dnow(),done=3Dtrue;if(gotoEnd||t>=3Dthis.options.duration+this.startTi= me){this.now=3Dthis.end;this.pos=3Dthis.state=3D1;this.update();this.opti= ons.curAnim[this.prop]=3Dtrue;for(var i in = this.options.curAnim){if(this.options.curAnim[i]!=3D=3Dtrue){done=3Dfalse= ;}}=0A= if(done){if(this.options.display!=3Dnull){this.elem.style.overflow=3Dthis= .options.overflow;var = old=3DjQuery.data(this.elem,"olddisplay");this.elem.style.display=3Dold?o= ld:this.options.display;if(jQuery.css(this.elem,"display")=3D=3D=3D"none"= ){this.elem.style.display=3D"block";}}=0A= if(this.options.hide){jQuery(this.elem).hide();}=0A= if(this.options.hide||this.options.show){for(var p in = this.options.curAnim){jQuery.style(this.elem,p,this.options.orig[p]);}}=0A= this.options.complete.call(this.elem);}=0A= return false;}else{var = n=3Dt-this.startTime;this.state=3Dn/this.options.duration;var = specialEasing=3Dthis.options.specialEasing&&this.options.specialEasing[th= is.prop];var = defaultEasing=3Dthis.options.easing||(jQuery.easing.swing?"swing":"linear= ");this.pos=3DjQuery.easing[specialEasing||defaultEasing](this.state,n,0,= 1,this.options.duration);this.now=3Dthis.start+((this.end-this.start)*thi= s.pos);this.update();}=0A= return true;}};jQuery.extend(jQuery.fx,{tick:function(){var = timers=3DjQuery.timers;for(var = i=3D0;i
";jQuery.extend(container.sty= le,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height= :"1px",visibility:"hidden"});container.innerHTML=3Dhtml;body.insertBefore= (container,body.firstChild);innerDiv=3Dcontainer.firstChild;checkDiv=3Din= nerDiv.firstChild;td=3DinnerDiv.nextSibling.firstChild.firstChild;this.do= esNotAddBorder=3D(checkDiv.offsetTop!=3D=3D5);this.doesAddBorderForTableA= ndCells=3D(td.offsetTop=3D=3D=3D5);checkDiv.style.position=3D"fixed",chec= kDiv.style.top=3D"20px";this.supportsFixedPosition=3D(checkDiv.offsetTop=3D= =3D=3D20||checkDiv.offsetTop=3D=3D=3D15);checkDiv.style.position=3DcheckD= iv.style.top=3D"";innerDiv.style.overflow=3D"hidden",innerDiv.style.posit= ion=3D"relative";this.subtractsBorderForOverflowNotVisible=3D(checkDiv.of= fsetTop=3D=3D=3D-5);this.doesNotIncludeMarginInBodyOffset=3D(body.offsetT= op!=3D=3DbodyMarginTop);body.removeChild(container);body=3Dcontainer=3Din= nerDiv=3DcheckDiv=3Dtable=3Dtd=3Dnull;jQuery.offset.initialize=3DjQuery.n= oop;},bodyOffset:function(body){var = top=3Dbody.offsetTop,left=3Dbody.offsetLeft;jQuery.offset.initialize();if= (jQuery.offset.doesNotIncludeMarginInBodyOffset){top+=3DparseFloat(jQuery= .curCSS(body,"marginTop",true))||0;left+=3DparseFloat(jQuery.curCSS(body,= "marginLeft",true))||0;}=0A= return{top:top,left:left};},setOffset:function(elem,options,i){if(/static= /.test(jQuery.curCSS(elem,"position"))){elem.style.position=3D"relative";= }=0A= var = curElem=3DjQuery(elem),curOffset=3DcurElem.offset(),curTop=3DparseInt(jQu= ery.curCSS(elem,"top",true),10)||0,curLeft=3DparseInt(jQuery.curCSS(elem,= "left",true),10)||0;if(jQuery.isFunction(options)){options=3Doptions.call= (elem,i,curOffset);}=0A= var = props=3D{top:(options.top-curOffset.top)+curTop,left:(options.left-curOff= set.left)+curLeft};if("using"in = options){options.using.call(elem,props);}else{curElem.css(props);}}};jQue= ry.fn.extend({position:function(){if(!this[0]){return null;}=0A= var = elem=3Dthis[0],offsetParent=3Dthis.offsetParent(),offset=3Dthis.offset(),= parentOffset=3D/^body|html$/i.test(offsetParent[0].nodeName)?{top:0,left:= 0}:offsetParent.offset();offset.top-=3DparseFloat(jQuery.curCSS(elem,"mar= ginTop",true))||0;offset.left-=3DparseFloat(jQuery.curCSS(elem,"marginLef= t",true))||0;parentOffset.top+=3DparseFloat(jQuery.curCSS(offsetParent[0]= ,"borderTopWidth",true))||0;parentOffset.left+=3DparseFloat(jQuery.curCSS= (offsetParent[0],"borderLeftWidth",true))||0;return{top:offset.top-parent= Offset.top,left:offset.left-parentOffset.left};},offsetParent:function(){= return this.map(function(){var = offsetParent=3Dthis.offsetParent||document.body;while(offsetParent&&(!/^b= ody|html$/i.test(offsetParent.nodeName)&&jQuery.css(offsetParent,"positio= n")=3D=3D=3D"static")){offsetParent=3DoffsetParent.offsetParent;}=0A= return = offsetParent;});}});jQuery.each(["Left","Top"],function(i,name){var = method=3D"scroll"+name;jQuery.fn[method]=3Dfunction(val){var = elem=3Dthis[0],win;if(!elem){return null;}=0A= if(val!=3D=3Dundefined){return = this.each(function(){win=3DgetWindow(this);if(win){win.scrollTo(!i?val:jQ= uery(win).scrollLeft(),i?val:jQuery(win).scrollTop());}else{this[method]=3D= val;}});}else{win=3DgetWindow(elem);return win?("pageXOffset"in = win)?win[i?"pageYOffset":"pageXOffset"]:jQuery.support.boxModel&&win.docu= ment.documentElement[method]||win.document.body[method]:elem[method];}};}= );function getWindow(elem){return("scrollTo"in = elem&&elem.document)?elem:elem.nodeType=3D=3D=3D9?elem.defaultView||elem.= parentWindow:false;}=0A= jQuery.each(["Height","Width"],function(i,name){var = type=3Dname.toLowerCase();jQuery.fn["inner"+name]=3Dfunction(){return = this[0]?jQuery.css(this[0],type,false,"padding"):null;};jQuery.fn["outer"= +name]=3Dfunction(margin){return = this[0]?jQuery.css(this[0],type,false,margin?"margin":"border"):null;};jQ= uery.fn[type]=3Dfunction(size){var elem=3Dthis[0];if(!elem){return = size=3D=3Dnull?null:this;}=0A= if(jQuery.isFunction(size)){return this.each(function(i){var = self=3DjQuery(this);self[type](size.call(this,i,self[type]()));});}=0A= return("scrollTo"in = elem&&elem.document)?elem.document.compatMode=3D=3D=3D"CSS1Compat"&&elem.= document.documentElement["client"+name]||elem.document.body["client"+name= ]:(elem.nodeType=3D=3D=3D9)?Math.max(elem.documentElement["client"+name],= elem.body["scroll"+name],elem.documentElement["scroll"+name],elem.body["o= ffset"+name],elem.documentElement["offset"+name]):size=3D=3D=3Dundefined?= jQuery.css(elem,type):this.css(type,typeof = size=3D=3D=3D"string"?size:size+"px");};});window.jQuery=3Dwindow.$=3DjQu= ery;})(window); ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://www.scopus.com/gzip_N1202432461/bundles/AllTop.js =0A= function writeJavaScriptCookie()=0A= {document.cookie=3D"javaScript=3Dtrue; path=3D/";}=0A= function newImage(arg){if(document.images){rslt=3Dnew = Image();rslt.src=3Darg;return rslt;}}=0A= function = changeImages(){if(document.images&&(preloadFlag=3D=3Dtrue)){for(var = i=3D0;i)((\n|\r|.)*?)(?:<\/script>)',emptyFunction= :function(){},K:function(x){return x}}=0A= var Class=3D{create:function(){return = function(){this.initialize.apply(this,arguments);}}}=0A= var Abstract=3Dnew = Object();Object.extend=3Dfunction(destination,source){for(var property = in source){destination[property]=3Dsource[property];}=0A= return destination;}=0A= Object.extend(Object,{inspect:function(object){try{if(object=3D=3D=3Dunde= fined)return'undefined';if(object=3D=3D=3Dnull)return'null';return = object.inspect?object.inspect():object.toString();}catch(e){if(e = instanceof RangeError)return'...';throw e;}},keys:function(object){var = keys=3D[];for(var property in object)=0A= keys.push(property);return keys;},values:function(object){var = values=3D[];for(var property in object)=0A= values.push(object[property]);return = values;},clone:function(object){return = Object.extend({},object);}});Function.prototype.bind=3Dfunction(){var = __method=3Dthis,args=3D$A(arguments),object=3Dargs.shift();return = function(){return __method.apply(object,args.concat($A(arguments)));}}=0A= Function.prototype.bindAsEventListener=3Dfunction(object){var = __method=3Dthis,args=3D$A(arguments),object=3Dargs.shift();return = function(event){return = __method.apply(object,[(event||window.event)].concat(args).concat($A(argu= ments)));}}=0A= Object.extend(Number.prototype,{toColorPart:function(){var = digits=3Dthis.toString(16);if(this<16)return'0'+digits;return = digits;},succ:function(){return = this+1;},times:function(iterator){$R(0,this,true).each(iterator);return = this;}});var Try=3D{these:function(){var returnValue;for(var = i=3D0,length=3Darguments.length;i0){if(match=3Dsource.match(patt= ern)){result+=3Dsource.slice(0,match.index);result+=3DString.interpret(re= placement(match));source=3Dsource.slice(match.index+match[0].length);}els= e{result+=3Dsource,source=3D'';}}=0A= return = result;},sub:function(pattern,replacement,count){replacement=3Dthis.gsub.= prepareReplacement(replacement);count=3Dcount=3D=3D=3Dundefined?1:count;r= eturn this.gsub(pattern,function(match){if(--count<0)return = match[0];return = replacement(match);});},scan:function(pattern,iterator){this.gsub(pattern= ,iterator);return = this;},truncate:function(length,truncation){length=3Dlength||30;truncatio= n=3Dtruncation=3D=3D=3Dundefined?'...':truncation;return = this.length>length?this.slice(0,length-truncation.length)+truncation:this= ;},strip:function(){return = this.replace(/^\s+/,'').replace(/\s+$/,'');},stripTags:function(){return = this.replace(/<\/?[^>]+>/gi,'');},stripScripts:function(){return = this.replace(new = RegExp(Prototype.ScriptFragment,'img'),'');},extractScripts:function(){va= r matchAll=3Dnew RegExp(Prototype.ScriptFragment,'img');var = matchOne=3Dnew = RegExp(Prototype.ScriptFragment,'im');return(this.match(matchAll)||[]).ma= p(function(scriptTag){return(scriptTag.match(matchOne)||['',''])[1];});},= evalScripts:function(){return = this.extractScripts().map(function(script){return = eval(script)});},escapeHTML:function(){var = div=3Ddocument.createElement('div');var = text=3Ddocument.createTextNode(this);div.appendChild(text);return = div.innerHTML;},unescapeHTML:function(){var = div=3Ddocument.createElement('div');div.innerHTML=3Dthis.stripTags();retu= rn = div.childNodes[0]?(div.childNodes.length>1?$A(div.childNodes).inject('',f= unction(memo,node){return = memo+node.nodeValue}):div.childNodes[0].nodeValue):'';},toQueryParams:fun= ction(separator){var = match=3Dthis.strip().match(/([^?#]*)(#.*)?$/);if(!match)return{};return = match[1].split(separator||'&').inject({},function(hash,pair){if((pair=3Dp= air.split('=3D'))[0]){var name=3DdecodeURIComponent(pair[0]);var = value=3Dpair[1]?decodeURIComponent(pair[1]):undefined;if(hash[name]!=3D=3D= undefined){if(hash[name].constructor!=3DArray)=0A= hash[name]=3D[hash[name]];if(value)hash[name].push(value);}=0A= else hash[name]=3Dvalue;}=0A= return hash;});},toArray:function(){return = this.split('');},succ:function(){return this.slice(0,this.length-1)+=0A= String.fromCharCode(this.charCodeAt(this.length-1)+1);},camelize:function= (){var parts=3Dthis.split('-'),len=3Dparts.length;if(len=3D=3D1)return = parts[0];var = camelized=3Dthis.charAt(0)=3D=3D'-'?parts[0].charAt(0).toUpperCase()+part= s[0].substring(1):parts[0];for(var i=3D1;i=3Dresult)=0A= result=3Dvalue;});return result;},min:function(iterator){var = result;this.each(function(value,index){value=3D(iterator||Prototype.K)(va= lue,index);if(result=3D=3Dundefined||valueb?1:0;}).pluck('value');},toArray:function(){return = this.map();},zip:function(){var = iterator=3DPrototype.K,args=3D$A(arguments);if(typeof = args.last()=3D=3D'function')=0A= iterator=3Dargs.pop();var = collections=3D[this].concat(args).map($A);return = this.map(function(value,index){return = iterator(collections.pluck(index));});},size:function(){return = this.toArray().length;},inspect:function(){return'#';}}=0A= Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,s= elect:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toA= rray});var = $A=3DArray.from=3Dfunction(iterable){if(!iterable)return[];if(iterable.to= Array){return iterable.toArray();}else{var results=3D[];for(var = i=3D0,length=3Diterable.length;i1?this:this[0];},uniq:function(){return = this.inject([],function(array,value){return = array.include(value)?array:array.concat([value]);});},clone:function(){re= turn[].concat(this);},size:function(){return = this.length;},inspect:function(){return'['+this.map(Object.inspect).join(= ', ')+']';}});Array.prototype.toArray=3DArray.prototype.clone;function = $w(string){string=3Dstring.strip();return string?string.split(/\s+/):[];}=0A= if(window.opera){Array.prototype.concat=3Dfunction(){var = array=3D[];for(var = i=3D0,length=3Dthis.length;i';}});function = $H(object){if(object&&object.constructor=3D=3DHash)return object;return = new = Hash(object);};ObjectRange=3DClass.create();Object.extend(ObjectRange.pro= totype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:functi= on(start,end,exclusive){this.start=3Dstart;this.end=3Dend;this.exclusive=3D= exclusive;},_each:function(iterator){var = value=3Dthis.start;while(this.include(value)){iterator(value);value=3Dval= ue.succ();}},include:function(value){if(value-1?'&':'?')+params;try{Ajax.Responders= .dispatch('onCreate',this,this.transport);this.transport.open(this.method= .toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynch= ronous)=0A= setTimeout(function(){this.respondToReadyState(1)}.bind(this),10);this.tr= ansport.onreadystatechange=3Dthis.onStateChange.bind(this);this.setReques= tHeaders();var = body=3Dthis.method=3D=3D'post'?(this.options.postBody||params):null;this.= transport.send(body);if(!this.options.asynchronous&&this.transport.overri= deMimeType)=0A= this.onStateChange();}=0A= catch(e){this.dispatchException(e);}},onStateChange:function(){var = readyState=3Dthis.transport.readyState;if(readyState>1&&!((readyState=3D=3D= 4)&&this._complete))=0A= this.respondToReadyState(this.transport.readyState);},setRequestHeaders:f= unction(){var = headers=3D{'X-Requested-With':'XMLHttpRequest','X-Prototype-Version':Prot= otype.Version,'Accept':'text/javascript, text/html, application/xml, = text/xml, = */*'};if(this.method=3D=3D'post'){headers['Content-type']=3Dthis.options.= contentType+=0A= (this.options.encoding?'; = charset=3D'+this.options.encoding:'');if(this.transport.overrideMimeType&= &(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005)=0A= headers['Connection']=3D'close';}=0A= if(typeof this.options.requestHeaders=3D=3D'object'){var = extras=3Dthis.options.requestHeaders;if(typeof = extras.push=3D=3D'function')=0A= for(var i=3D0,length=3Dextras.length;i=3D200&&this.transpo= rt.status<300);},respondToReadyState:function(readyState){var = state=3DAjax.Request.Events[readyState];var = transport=3Dthis.transport,json=3Dthis.evalJSON();if(state=3D=3D'Complete= '){try{this._complete=3Dtrue;(this.options['on'+this.transport.status]||t= his.options['on'+(this.success()?'Success':'Failure')]||Prototype.emptyFu= nction)(transport,json);}catch(e){this.dispatchException(e);}=0A= if((this.getHeader('Content-type')||'text/javascript').strip().match(/^(t= ext|application)\/(x-)?(java|ecma)script(;.*)?$/i))=0A= this.evalResponse();}=0A= try{(this.options['on'+state]||Prototype.emptyFunction)(transport,json);A= jax.Responders.dispatch('on'+state,this,transport,json);}catch(e){this.di= spatchException(e);}=0A= if(state=3D=3D'Complete'){this.transport.onreadystatechange=3DPrototype.e= mptyFunction;}},getHeader:function(name){try{return = this.transport.getResponseHeader(name);}catch(e){return = null}},evalJSON:function(){try{var = json=3Dthis.getHeader('X-JSON');return = json?eval('('+json+')'):null;}catch(e){return = null}},evalResponse:function(){try{return = eval(this.transport.responseText);}catch(e){this.dispatchException(e);}},= dispatchException:function(exception){(this.options.onException||Prototyp= e.emptyFunction)(this,exception);Ajax.Responders.dispatch('onException',t= his,exception);}});Ajax.Updater=3DClass.create();Object.extend(Object.ext= end(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(c= ontainer,url,options){this.container=3D{success:(container.success||conta= iner),failure:(container.failure||(container.success?null:container))}=0A= this.transport=3DAjax.getTransport();this.setOptions(options);var = onComplete=3Dthis.options.onComplete||Prototype.emptyFunction;this.option= s.onComplete=3D(function(transport,param){this.updateContent();onComplete= (transport,param);}).bind(this);this.request(url);},updateContent:functio= n(){var = receiver=3Dthis.container[this.success()?'success':'failure'];var = response=3Dthis.transport.responseText;if(!this.options.evalScripts)respo= nse=3Dresponse.stripScripts();if(receiver=3D$(receiver)){if(this.options.= insertion)=0A= new this.options.insertion(receiver,response);else=0A= receiver.update(response);}=0A= if(this.success()){if(this.onComplete)=0A= setTimeout(this.onComplete.bind(this),10);}}});Ajax.PeriodicalUpdater=3DC= lass.create();Ajax.PeriodicalUpdater.prototype=3DObject.extend(new = Ajax.Base(),{initialize:function(container,url,options){this.setOptions(o= ptions);this.onComplete=3Dthis.options.onComplete;this.frequency=3D(this.= options.frequency||2);this.decay=3D(this.options.decay||1);this.updater=3D= {};this.container=3Dcontainer;this.url=3Durl;this.start();},start:functio= n(){this.options.onComplete=3Dthis.updateComplete.bind(this);this.onTimer= Event();},stop:function(){this.updater.options.onComplete=3Dundefined;cle= arTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(th= is,arguments);},updateComplete:function(request){if(this.options.decay){t= his.decay=3D(request.responseText=3D=3Dthis.lastText?this.decay*this.opti= ons.decay:1);this.lastText=3Drequest.responseText;}=0A= this.timer=3DsetTimeout(this.onTimerEvent.bind(this),this.decay*this.freq= uency*1000);},onTimerEvent:function(){this.updater=3Dnew = Ajax.Updater(this.container,this.url,this.options);}});function = $(element){if(arguments.length>1){for(var = i=3D0,elements=3D[],length=3Darguments.length;i';},recursivelyCollect:function(element,property){element=3D$(el= ement);var elements=3D[];while(element=3Delement[property])=0A= if(element.nodeType=3D=3D1)=0A= elements.push(Element.extend(element));return = elements;},ancestors:function(element){return = $(element).recursivelyCollect('parentNode');},descendants:function(elemen= t){return = $A($(element).getElementsByTagName('*'));},immediateDescendants:function(= element){if(!(element=3D$(element).firstChild))return[];while(element&&el= ement.nodeType!=3D1)element=3Delement.nextSibling;if(element)return[eleme= nt].concat($(element).nextSiblings());return[];},previousSiblings:functio= n(element){return = $(element).recursivelyCollect('previousSibling');},nextSiblings:function(= element){return = $(element).recursivelyCollect('nextSibling');},siblings:function(element)= {element=3D$(element);return = element.previousSiblings().reverse().concat(element.nextSiblings());},mat= ch:function(element,selector){if(typeof selector=3D=3D'string')=0A= selector=3Dnew Selector(selector);return = selector.match($(element));},up:function(element,expression,index){return= = Selector.findElement($(element).ancestors(),expression,index);},down:func= tion(element,expression,index){return = Selector.findElement($(element).descendants(),expression,index);},previou= s:function(element,expression,index){return = Selector.findElement($(element).previousSiblings(),expression,index);},ne= xt:function(element,expression,index){return = Selector.findElement($(element).nextSiblings(),expression,index);},getEle= mentsBySelector:function(){var = args=3D$A(arguments),element=3D$(args.shift());return = Selector.findChildElements(element,args);},getElementsByClassName:functio= n(element,className){return = document.getElementsByClassName(className,element);},readAttribute:functi= on(element,name){element=3D$(element);if(document.all&&!window.opera){var= t=3DElement._attributeTranslations;if(t.values[name])return = t.values[name](element,name);if(t.names[name])name=3Dt.names[name];var = attribute=3Delement.attributes[name];if(attribute)return = attribute.nodeValue;}=0A= return element.getAttribute(name);},getHeight:function(element){return = $(element).getDimensions().height;},getWidth:function(element){return = $(element).getDimensions().width;},classNames:function(element){return = new = Element.ClassNames(element);},hasClassName:function(element,className){if= (!(element=3D$(element)))return;var = elementClassName=3Delement.className;if(elementClassName.length=3D=3D0)re= turn = false;if(elementClassName=3D=3DclassName||elementClassName.match(new = RegExp("(^|\\s)"+className+"(\\s|$)")))=0A= return true;return = false;},addClassName:function(element,className){if(!(element=3D$(element= )))return;Element.classNames(element).add(className);return = element;},removeClassName:function(element,className){if(!(element=3D$(el= ement)))return;Element.classNames(element).remove(className);return = element;},toggleClassName:function(element,className){if(!(element=3D$(el= ement)))return;Element.classNames(element)[element.hasClassName(className= )?'remove':'add'](className);return = element;},observe:function(){Event.observe.apply(Event,arguments);return = $A(arguments).first();},stopObserving:function(){Event.stopObserving.appl= y(Event,arguments);return = $A(arguments).first();},cleanWhitespace:function(element){element=3D$(ele= ment);var node=3Delement.firstChild;while(node){var = nextNode=3Dnode.nextSibling;if(node.nodeType=3D=3D3&&!/\S/.test(node.node= Value))=0A= element.removeChild(node);node=3DnextNode;}=0A= return element;},empty:function(element){return = $(element).innerHTML.match(/^\s*$/);},descendantOf:function(element,ances= tor){element=3D$(element),ancestor=3D$(ancestor);while(element=3Delement.= parentNode)=0A= if(element=3D=3Dancestor)return true;return = false;},scrollTo:function(element){element=3D$(element);var = pos=3DPosition.cumulativeOffset(element);window.scrollTo(pos[0],pos[1]);r= eturn = element;},getStyle:function(element,style){element=3D$(element);if(['floa= t','cssFloat'].include(style))=0A= style=3D(typeof = element.style.styleFloat!=3D'undefined'?'styleFloat':'cssFloat');style=3D= style.camelize();var = value=3Delement.style[style];if(!value){if(document.defaultView&&document= .defaultView.getComputedStyle){var = css=3Ddocument.defaultView.getComputedStyle(element,null);value=3Dcss?css= [style]:null;}else = if(element.currentStyle){value=3Delement.currentStyle[style];}}=0A= if((value=3D=3D'auto')&&['width','height'].include(style)&&(element.getSt= yle('display')!=3D'none'))=0A= value=3Delement['offset'+style.capitalize()]+'px';if(window.opera&&['left= ','top','right','bottom'].include(style))=0A= if(Element.getStyle(element,'position')=3D=3D'static')value=3D'auto';if(s= tyle=3D=3D'opacity'){if(value)return = parseFloat(value);if(value=3D(element.getStyle('filter')||'').match(/alph= a\(opacity=3D(.*)\)/))=0A= if(value[1])return parseFloat(value[1])/100;return 1.0;}=0A= return = value=3D=3D'auto'?null:value;},setStyle:function(element,style){element=3D= $(element);for(var name in style){var = value=3Dstyle[name];if(name=3D=3D'opacity'){if(value=3D=3D1){value=3D(/Ge= cko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.= userAgent))?0.999999:1.0;if(/MSIE/.test(navigator.userAgent)&&!window.ope= ra)=0A= element.style.filter=3Delement.getStyle('filter').replace(/alpha\([^\)]*\= )/gi,'');}else = if(value=3D=3D=3D''){if(/MSIE/.test(navigator.userAgent)&&!window.opera)=0A= element.style.filter=3Delement.getStyle('filter').replace(/alpha\([^\)]*\= )/gi,'');}else{if(value<0.00001)value=3D0;if(/MSIE/.test(navigator.userAg= ent)&&!window.opera)=0A= element.style.filter=3Delement.getStyle('filter').replace(/alpha\([^\)]*\= )/gi,'')+'alpha(opacity=3D'+value*100+')';}}else = if(['float','cssFloat'].include(name))name=3D(typeof = element.style.styleFloat!=3D'undefined')?'styleFloat':'cssFloat';element.= style[name.camelize()]=3Dvalue;}=0A= return = element;},getDimensions:function(element){element=3D$(element);var = display=3D$(element).getStyle('display');if(display!=3D'none'&&display!=3D= null)=0A= return{width:element.offsetWidth,height:element.offsetHeight};var = els=3Delement.style;var originalVisibility=3Dels.visibility;var = originalPosition=3Dels.position;var = originalDisplay=3Dels.display;els.visibility=3D'hidden';els.position=3D'a= bsolute';els.display=3D'block';var = originalWidth=3Delement.clientWidth;var = originalHeight=3Delement.clientHeight;els.display=3DoriginalDisplay;els.p= osition=3DoriginalPosition;els.visibility=3DoriginalVisibility;return{wid= th:originalWidth,height:originalHeight};},makePositioned:function(element= ){element=3D$(element);var = pos=3DElement.getStyle(element,'position');if(pos=3D=3D'static'||!pos){el= ement._madePositioned=3Dtrue;element.style.position=3D'relative';if(windo= w.opera){element.style.top=3D0;element.style.left=3D0;}}=0A= return = element;},undoPositioned:function(element){element=3D$(element);if(elemen= t._madePositioned){element._madePositioned=3Dundefined;element.style.posi= tion=3Delement.style.top=3Delement.style.left=3Delement.style.bottom=3Del= ement.style.right=3D'';}=0A= return = element;},makeClipping:function(element){element=3D$(element);if(element.= _overflow)return = element;element._overflow=3Delement.style.overflow||'auto';if((Element.ge= tStyle(element,'overflow')||'visible')!=3D'hidden')=0A= element.style.overflow=3D'hidden';return = element;},undoClipping:function(element){element=3D$(element);if(!element= ._overflow)return = element;element.style.overflow=3Delement._overflow=3D=3D'auto'?'':element= ._overflow;element._overflow=3Dnull;return = element;}};Object.extend(Element.Methods,{childOf:Element.Methods.descend= antOf});Element._attributeTranslations=3D{};Element._attributeTranslation= s.names=3D{colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",datetime:"= dateTime",accesskey:"accessKey",tabindex:"tabIndex",enctype:"encType",max= length:"maxLength",readonly:"readOnly",longdesc:"longDesc"};Element._attr= ibuteTranslations.values=3D{_getAttr:function(element,attribute){return = element.getAttribute(attribute,2);},_flag:function(element,attribute){ret= urn = $(element).hasAttribute(attribute)?attribute:null;},style:function(elemen= t){return = element.style.cssText.toLowerCase();},title:function(element){var = node=3Delement.getAttributeNode('title');return = node.specified?node.nodeValue:null;}};Object.extend(Element._attributeTra= nslations.values,{href:Element._attributeTranslations.values._getAttr,src= :Element._attributeTranslations.values._getAttr,disabled:Element._attribu= teTranslations.values._flag,checked:Element._attributeTranslations.values= ._flag,readonly:Element._attributeTranslations.values._flag,multiple:Elem= ent._attributeTranslations.values._flag});Element.Methods.Simulated=3D{ha= sAttribute:function(element,attribute){var = t=3DElement._attributeTranslations;attribute=3Dt.names[attribute]||attrib= ute;return = $(element).getAttributeNode(attribute).specified;}};if(document.all&&!win= dow.opera){Element.Methods.update=3Dfunction(element,html){element=3D$(el= ement);html=3Dtypeof html=3D=3D'undefined'?'':html.toString();var = tagName=3Delement.tagName.toUpperCase();if(['THEAD','TBODY','TR','TD'].in= clude(tagName)){var = div=3Ddocument.createElement('div');switch(tagName){case'THEAD':case'TBOD= Y':div.innerHTML=3D''+html.stripScripts()+'
= ';depth=3D2;break;case'TR':div.innerHTML=3D''+html.stri= pScripts()+'
';depth=3D3;break;case'TD':div.innerHTML= =3D'';depth=3D4;}=0A= $A(element.childNodes).each(function(node){element.removeChild(node)});de= pth.times(function(){div=3Ddiv.firstChild});$A(div.childNodes).each(funct= ion(node){element.appendChild(node)});}else{element.innerHTML=3Dhtml.stri= pScripts();}=0A= setTimeout(function(){html.evalScripts()},10);return = element;}};Object.extend(Element,Element.Methods);var = _nativeExtensions=3Dfalse;if(/Konqueror|Safari|KHTML/.test(navigator.user= Agent))=0A= ['','Form','Input','TextArea','Select'].each(function(tag){var = className=3D'HTML'+tag+'Element';if(window[className])return;var = klass=3Dwindow[className]=3D{};klass.prototype=3Ddocument.createElement(t= ag?tag.toLowerCase():'div').__proto__;});Element.addMethods=3Dfunction(me= thods){Object.extend(Element.Methods,methods||{});function = copy(methods,destination,onlyIfAbsent){onlyIfAbsent=3DonlyIfAbsent||false= ;var cache=3DElement.extend.cache;for(var property in methods){var = value=3Dmethods[property];if(!onlyIfAbsent||!(property in destination))=0A= destination[property]=3Dcache.findOrStore(value);}}=0A= if(typeof = HTMLElement!=3D'undefined'){copy(Element.Methods,HTMLElement.prototype);c= opy(Element.Methods.Simulated,HTMLElement.prototype,true);copy(Form.Metho= ds,HTMLFormElement.prototype);[HTMLInputElement,HTMLTextAreaElement,HTMLS= electElement].each(function(klass){copy(Form.Element.Methods,klass.protot= ype);});_nativeExtensions=3Dtrue;}}=0A= var Toggle=3Dnew = Object();Toggle.display=3DElement.toggle;Abstract.Insertion=3Dfunction(ad= jacency){this.adjacency=3Dadjacency;}=0A= Abstract.Insertion.prototype=3D{initialize:function(element,content){this= .element=3D$(element);this.content=3Dcontent.stripScripts();if(this.adjac= ency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTM= L(this.adjacency,this.content);}catch(e){var = tagName=3Dthis.element.tagName.toUpperCase();if(['TBODY','TR'].include(ta= gName)){this.insertContent(this.contentFromAnonymousTable());}else{throw = e;}}}else{this.range=3Dthis.element.ownerDocument.createRange();if(this.i= nitializeRange)this.initializeRange();this.insertContent([this.range.crea= teContextualFragment(this.content)]);}=0A= setTimeout(function(){content.evalScripts()},10);},contentFromAnonymousTa= ble:function(){var = div=3Ddocument.createElement('div');div.innerHTML=3D'
'+html.stripScripts()+'
'+this= .content+'
';return = $A(div.childNodes[0].childNodes[0].childNodes);}}=0A= var Insertion=3Dnew = Object();Insertion.Before=3DClass.create();Insertion.Before.prototype=3DO= bject.extend(new = Abstract.Insertion('beforeBegin'),{initializeRange:function(){this.range.= setStartBefore(this.element);},insertContent:function(fragments){fragment= s.each((function(fragment){this.element.parentNode.insertBefore(fragment,= this.element);}).bind(this));}});Insertion.Top=3DClass.create();Insertion= .Top.prototype=3DObject.extend(new = Abstract.Insertion('afterBegin'),{initializeRange:function(){this.range.s= electNodeContents(this.element);this.range.collapse(true);},insertContent= :function(fragments){fragments.reverse(false).each((function(fragment){th= is.element.insertBefore(fragment,this.element.firstChild);}).bind(this));= }});Insertion.Bottom=3DClass.create();Insertion.Bottom.prototype=3DObject= .extend(new = Abstract.Insertion('beforeEnd'),{initializeRange:function(){this.range.se= lectNodeContents(this.element);this.range.collapse(this.element);},insert= Content:function(fragments){fragments.each((function(fragment){this.eleme= nt.appendChild(fragment);}).bind(this));}});Insertion.After=3DClass.creat= e();Insertion.After.prototype=3DObject.extend(new = Abstract.Insertion('afterEnd'),{initializeRange:function(){this.range.set= StartAfter(this.element);},insertContent:function(fragments){fragments.ea= ch((function(fragment){this.element.parentNode.insertBefore(fragment,this= .element.nextSibling);}).bind(this));}});Element.ClassNames=3DClass.creat= e();Element.ClassNames.prototype=3D{initialize:function(element){this.ele= ment=3D$(element);},_each:function(iterator){this.element.className.split= (/\s+/).select(function(name){return = name.length>0;})._each(iterator);},set:function(className){this.element.c= lassName=3DclassName;},add:function(classNameToAdd){if(this.include(class= NameToAdd))return;this.set($A(this).concat(classNameToAdd).join(' = '));},remove:function(classNameToRemove){if(!this.include(classNameToRemo= ve))return;this.set($A(this).without(classNameToRemove).join(' = '));},toString:function(){return $A(this).join(' = ');}};Object.extend(Element.ClassNames.prototype,Enumerable);var = Selector=3DClass.create();Selector.prototype=3D{initialize:function(expre= ssion){this.params=3D{classNames:[]};this.expression=3Dexpression.toStrin= g().strip();this.parseExpression();this.compileMatcher();},parseExpressio= n:function(){function abort(message){throw'Parse error in selector: = '+message;}=0A= if(this.expression=3D=3D'')abort('empty expression');var = params=3Dthis.params,expr=3Dthis.expression,match,modifier,clause,rest;wh= ile(match=3Dexpr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=3D)(?:"([^"]*)"= |([^\]\s]*)))?\]$/i)){params.attributes=3Dparams.attributes||[];params.at= tributes.push({name:match[2],operator:match[3],value:match[4]||match[5]||= ''});expr=3Dmatch[1];}=0A= if(expr=3D=3D'*')return = this.params.wildcard=3Dtrue;while(match=3Dexpr.match(/^([^a-z0-9_-])?([a-= z0-9_-]+)(.*)/i)){modifier=3Dmatch[1],clause=3Dmatch[2],rest=3Dmatch[3];s= witch(modifier){case'#':params.id=3Dclause;break;case'.':params.className= s.push(clause);break;case'':case = undefined:params.tagName=3Dclause.toUpperCase();break;default:abort(expr.= inspect());}=0A= expr=3Drest;}=0A= if(expr.length>0)abort(expr.inspect());},buildMatchExpression:function(){= var params=3Dthis.params,conditions=3D[],clause;if(params.wildcard)=0A= conditions.push('true');if(clause=3Dparams.id)=0A= conditions.push('element.readAttribute("id") =3D=3D = '+clause.inspect());if(clause=3Dparams.tagName)=0A= conditions.push('element.tagName.toUpperCase() =3D=3D = '+clause.inspect());if((clause=3Dparams.classNames).length>0)=0A= for(var i=3D0,length=3Dclause.length;i=3D0?this.optionValue(element.options[index]):null;},selectMany:fun= ction(element){var values,length=3Delement.length;if(!length)return = null;for(var i=3D0,values=3D[];i=3Dthis.offset[1]= &&y=3Dthis.offset[0]&&x=3Dthis.offset[1]&&this.ycomp=3Dthis.offset[0]&&this.xcom= pNote:<\/span> This Search history will contain the latest = '+maxSearch+' searches you perform in this = session.');}else{xObj.css('display','none');yObj.html('Show');yObj.remove= Class('hideSmall');yObj.addClass('showSmall');yObj.attr('title','Show = search history');noteObj.html('The Search history has been closed.
To = view Search history, click the Show<\/span> = link.');}}=0A= function = replaceHeaderLink(origin){if(document.getElementById("headerLink")!=3Dnul= l){var = headerLinkText=3Ddocument.getElementById("headerLink").innerHTML;var = find=3Dnew = RegExp('originValue',"ig");replacedText=3DheaderLinkText.replace(find,ori= gin);document.getElementById("headerLink").innerHTML=3DreplacedText;}}=0A= function = overlayOutside(){if(document.getElementById("overlayBuffer")!=3Dnull){var= = clusterType=3Ddocument.getElementById("overlayBuffer").innerHTML;overlayH= ide(clusterType);}=0A= document.getElementById("cib_Overlay").style.display=3D"none";} ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://www.scopus.com/gzip_N52232295/bundles/RecordPageTop.js =0A= var = Prototype=3D{Version:'1.5.0',BrowserFeatures:{XPath:!!document.evaluate},= ScriptFragment:'(?:)((\n|\r|.)*?)(?:<\/script>)',emptyFunction= :function(){},K:function(x){return x}}=0A= var Class=3D{create:function(){return = function(){this.initialize.apply(this,arguments);}}}=0A= var Abstract=3Dnew = Object();Object.extend=3Dfunction(destination,source){for(var property = in source){destination[property]=3Dsource[property];}=0A= return destination;}=0A= Object.extend(Object,{inspect:function(object){try{if(object=3D=3D=3Dunde= fined)return'undefined';if(object=3D=3D=3Dnull)return'null';return = object.inspect?object.inspect():object.toString();}catch(e){if(e = instanceof RangeError)return'...';throw e;}},keys:function(object){var = keys=3D[];for(var property in object)=0A= keys.push(property);return keys;},values:function(object){var = values=3D[];for(var property in object)=0A= values.push(object[property]);return = values;},clone:function(object){return = Object.extend({},object);}});Function.prototype.bind=3Dfunction(){var = __method=3Dthis,args=3D$A(arguments),object=3Dargs.shift();return = function(){return __method.apply(object,args.concat($A(arguments)));}}=0A= Function.prototype.bindAsEventListener=3Dfunction(object){var = __method=3Dthis,args=3D$A(arguments),object=3Dargs.shift();return = function(event){return = __method.apply(object,[(event||window.event)].concat(args).concat($A(argu= ments)));}}=0A= Object.extend(Number.prototype,{toColorPart:function(){var = digits=3Dthis.toString(16);if(this<16)return'0'+digits;return = digits;},succ:function(){return = this+1;},times:function(iterator){$R(0,this,true).each(iterator);return = this;}});var Try=3D{these:function(){var returnValue;for(var = i=3D0,length=3Darguments.length;i0){if(match=3Dsource.match(patt= ern)){result+=3Dsource.slice(0,match.index);result+=3DString.interpret(re= placement(match));source=3Dsource.slice(match.index+match[0].length);}els= e{result+=3Dsource,source=3D'';}}=0A= return = result;},sub:function(pattern,replacement,count){replacement=3Dthis.gsub.= prepareReplacement(replacement);count=3Dcount=3D=3D=3Dundefined?1:count;r= eturn this.gsub(pattern,function(match){if(--count<0)return = match[0];return = replacement(match);});},scan:function(pattern,iterator){this.gsub(pattern= ,iterator);return = this;},truncate:function(length,truncation){length=3Dlength||30;truncatio= n=3Dtruncation=3D=3D=3Dundefined?'...':truncation;return = this.length>length?this.slice(0,length-truncation.length)+truncation:this= ;},strip:function(){return = this.replace(/^\s+/,'').replace(/\s+$/,'');},stripTags:function(){return = this.replace(/<\/?[^>]+>/gi,'');},stripScripts:function(){return = this.replace(new = RegExp(Prototype.ScriptFragment,'img'),'');},extractScripts:function(){va= r matchAll=3Dnew RegExp(Prototype.ScriptFragment,'img');var = matchOne=3Dnew = RegExp(Prototype.ScriptFragment,'im');return(this.match(matchAll)||[]).ma= p(function(scriptTag){return(scriptTag.match(matchOne)||['',''])[1];});},= evalScripts:function(){return = this.extractScripts().map(function(script){return = eval(script)});},escapeHTML:function(){var = div=3Ddocument.createElement('div');var = text=3Ddocument.createTextNode(this);div.appendChild(text);return = div.innerHTML;},unescapeHTML:function(){var = div=3Ddocument.createElement('div');div.innerHTML=3Dthis.stripTags();retu= rn = div.childNodes[0]?(div.childNodes.length>1?$A(div.childNodes).inject('',f= unction(memo,node){return = memo+node.nodeValue}):div.childNodes[0].nodeValue):'';},toQueryParams:fun= ction(separator){var = match=3Dthis.strip().match(/([^?#]*)(#.*)?$/);if(!match)return{};return = match[1].split(separator||'&').inject({},function(hash,pair){if((pair=3Dp= air.split('=3D'))[0]){var name=3DdecodeURIComponent(pair[0]);var = value=3Dpair[1]?decodeURIComponent(pair[1]):undefined;if(hash[name]!=3D=3D= undefined){if(hash[name].constructor!=3DArray)=0A= hash[name]=3D[hash[name]];if(value)hash[name].push(value);}=0A= else hash[name]=3Dvalue;}=0A= return hash;});},toArray:function(){return = this.split('');},succ:function(){return this.slice(0,this.length-1)+=0A= String.fromCharCode(this.charCodeAt(this.length-1)+1);},camelize:function= (){var parts=3Dthis.split('-'),len=3Dparts.length;if(len=3D=3D1)return = parts[0];var = camelized=3Dthis.charAt(0)=3D=3D'-'?parts[0].charAt(0).toUpperCase()+part= s[0].substring(1):parts[0];for(var i=3D1;i=3Dresult)=0A= result=3Dvalue;});return result;},min:function(iterator){var = result;this.each(function(value,index){value=3D(iterator||Prototype.K)(va= lue,index);if(result=3D=3Dundefined||valueb?1:0;}).pluck('value');},toArray:function(){return = this.map();},zip:function(){var = iterator=3DPrototype.K,args=3D$A(arguments);if(typeof = args.last()=3D=3D'function')=0A= iterator=3Dargs.pop();var = collections=3D[this].concat(args).map($A);return = this.map(function(value,index){return = iterator(collections.pluck(index));});},size:function(){return = this.toArray().length;},inspect:function(){return'#';}}=0A= Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,s= elect:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toA= rray});var = $A=3DArray.from=3Dfunction(iterable){if(!iterable)return[];if(iterable.to= Array){return iterable.toArray();}else{var results=3D[];for(var = i=3D0,length=3Diterable.length;i1?this:this[0];},uniq:function(){return = this.inject([],function(array,value){return = array.include(value)?array:array.concat([value]);});},clone:function(){re= turn[].concat(this);},size:function(){return = this.length;},inspect:function(){return'['+this.map(Object.inspect).join(= ', ')+']';}});Array.prototype.toArray=3DArray.prototype.clone;function = $w(string){string=3Dstring.strip();return string?string.split(/\s+/):[];}=0A= if(window.opera){Array.prototype.concat=3Dfunction(){var = array=3D[];for(var = i=3D0,length=3Dthis.length;i';}});function = $H(object){if(object&&object.constructor=3D=3DHash)return object;return = new = Hash(object);};ObjectRange=3DClass.create();Object.extend(ObjectRange.pro= totype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:functi= on(start,end,exclusive){this.start=3Dstart;this.end=3Dend;this.exclusive=3D= exclusive;},_each:function(iterator){var = value=3Dthis.start;while(this.include(value)){iterator(value);value=3Dval= ue.succ();}},include:function(value){if(value-1?'&':'?')+params;try{Ajax.Responders= .dispatch('onCreate',this,this.transport);this.transport.open(this.method= .toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynch= ronous)=0A= setTimeout(function(){this.respondToReadyState(1)}.bind(this),10);this.tr= ansport.onreadystatechange=3Dthis.onStateChange.bind(this);this.setReques= tHeaders();var = body=3Dthis.method=3D=3D'post'?(this.options.postBody||params):null;this.= transport.send(body);if(!this.options.asynchronous&&this.transport.overri= deMimeType)=0A= this.onStateChange();}=0A= catch(e){this.dispatchException(e);}},onStateChange:function(){var = readyState=3Dthis.transport.readyState;if(readyState>1&&!((readyState=3D=3D= 4)&&this._complete))=0A= this.respondToReadyState(this.transport.readyState);},setRequestHeaders:f= unction(){var = headers=3D{'X-Requested-With':'XMLHttpRequest','X-Prototype-Version':Prot= otype.Version,'Accept':'text/javascript, text/html, application/xml, = text/xml, = */*'};if(this.method=3D=3D'post'){headers['Content-type']=3Dthis.options.= contentType+=0A= (this.options.encoding?'; = charset=3D'+this.options.encoding:'');if(this.transport.overrideMimeType&= &(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005)=0A= headers['Connection']=3D'close';}=0A= if(typeof this.options.requestHeaders=3D=3D'object'){var = extras=3Dthis.options.requestHeaders;if(typeof = extras.push=3D=3D'function')=0A= for(var i=3D0,length=3Dextras.length;i=3D200&&this.transpo= rt.status<300);},respondToReadyState:function(readyState){var = state=3DAjax.Request.Events[readyState];var = transport=3Dthis.transport,json=3Dthis.evalJSON();if(state=3D=3D'Complete= '){try{this._complete=3Dtrue;(this.options['on'+this.transport.status]||t= his.options['on'+(this.success()?'Success':'Failure')]||Prototype.emptyFu= nction)(transport,json);}catch(e){this.dispatchException(e);}=0A= if((this.getHeader('Content-type')||'text/javascript').strip().match(/^(t= ext|application)\/(x-)?(java|ecma)script(;.*)?$/i))=0A= this.evalResponse();}=0A= try{(this.options['on'+state]||Prototype.emptyFunction)(transport,json);A= jax.Responders.dispatch('on'+state,this,transport,json);}catch(e){this.di= spatchException(e);}=0A= if(state=3D=3D'Complete'){this.transport.onreadystatechange=3DPrototype.e= mptyFunction;}},getHeader:function(name){try{return = this.transport.getResponseHeader(name);}catch(e){return = null}},evalJSON:function(){try{var = json=3Dthis.getHeader('X-JSON');return = json?eval('('+json+')'):null;}catch(e){return = null}},evalResponse:function(){try{return = eval(this.transport.responseText);}catch(e){this.dispatchException(e);}},= dispatchException:function(exception){(this.options.onException||Prototyp= e.emptyFunction)(this,exception);Ajax.Responders.dispatch('onException',t= his,exception);}});Ajax.Updater=3DClass.create();Object.extend(Object.ext= end(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(c= ontainer,url,options){this.container=3D{success:(container.success||conta= iner),failure:(container.failure||(container.success?null:container))}=0A= this.transport=3DAjax.getTransport();this.setOptions(options);var = onComplete=3Dthis.options.onComplete||Prototype.emptyFunction;this.option= s.onComplete=3D(function(transport,param){this.updateContent();onComplete= (transport,param);}).bind(this);this.request(url);},updateContent:functio= n(){var = receiver=3Dthis.container[this.success()?'success':'failure'];var = response=3Dthis.transport.responseText;if(!this.options.evalScripts)respo= nse=3Dresponse.stripScripts();if(receiver=3D$(receiver)){if(this.options.= insertion)=0A= new this.options.insertion(receiver,response);else=0A= receiver.update(response);}=0A= if(this.success()){if(this.onComplete)=0A= setTimeout(this.onComplete.bind(this),10);}}});Ajax.PeriodicalUpdater=3DC= lass.create();Ajax.PeriodicalUpdater.prototype=3DObject.extend(new = Ajax.Base(),{initialize:function(container,url,options){this.setOptions(o= ptions);this.onComplete=3Dthis.options.onComplete;this.frequency=3D(this.= options.frequency||2);this.decay=3D(this.options.decay||1);this.updater=3D= {};this.container=3Dcontainer;this.url=3Durl;this.start();},start:functio= n(){this.options.onComplete=3Dthis.updateComplete.bind(this);this.onTimer= Event();},stop:function(){this.updater.options.onComplete=3Dundefined;cle= arTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(th= is,arguments);},updateComplete:function(request){if(this.options.decay){t= his.decay=3D(request.responseText=3D=3Dthis.lastText?this.decay*this.opti= ons.decay:1);this.lastText=3Drequest.responseText;}=0A= this.timer=3DsetTimeout(this.onTimerEvent.bind(this),this.decay*this.freq= uency*1000);},onTimerEvent:function(){this.updater=3Dnew = Ajax.Updater(this.container,this.url,this.options);}});function = $(element){if(arguments.length>1){for(var = i=3D0,elements=3D[],length=3Darguments.length;i';},recursivelyCollect:function(element,property){element=3D$(el= ement);var elements=3D[];while(element=3Delement[property])=0A= if(element.nodeType=3D=3D1)=0A= elements.push(Element.extend(element));return = elements;},ancestors:function(element){return = $(element).recursivelyCollect('parentNode');},descendants:function(elemen= t){return = $A($(element).getElementsByTagName('*'));},immediateDescendants:function(= element){if(!(element=3D$(element).firstChild))return[];while(element&&el= ement.nodeType!=3D1)element=3Delement.nextSibling;if(element)return[eleme= nt].concat($(element).nextSiblings());return[];},previousSiblings:functio= n(element){return = $(element).recursivelyCollect('previousSibling');},nextSiblings:function(= element){return = $(element).recursivelyCollect('nextSibling');},siblings:function(element)= {element=3D$(element);return = element.previousSiblings().reverse().concat(element.nextSiblings());},mat= ch:function(element,selector){if(typeof selector=3D=3D'string')=0A= selector=3Dnew Selector(selector);return = selector.match($(element));},up:function(element,expression,index){return= = Selector.findElement($(element).ancestors(),expression,index);},down:func= tion(element,expression,index){return = Selector.findElement($(element).descendants(),expression,index);},previou= s:function(element,expression,index){return = Selector.findElement($(element).previousSiblings(),expression,index);},ne= xt:function(element,expression,index){return = Selector.findElement($(element).nextSiblings(),expression,index);},getEle= mentsBySelector:function(){var = args=3D$A(arguments),element=3D$(args.shift());return = Selector.findChildElements(element,args);},getElementsByClassName:functio= n(element,className){return = document.getElementsByClassName(className,element);},readAttribute:functi= on(element,name){element=3D$(element);if(document.all&&!window.opera){var= t=3DElement._attributeTranslations;if(t.values[name])return = t.values[name](element,name);if(t.names[name])name=3Dt.names[name];var = attribute=3Delement.attributes[name];if(attribute)return = attribute.nodeValue;}=0A= return element.getAttribute(name);},getHeight:function(element){return = $(element).getDimensions().height;},getWidth:function(element){return = $(element).getDimensions().width;},classNames:function(element){return = new = Element.ClassNames(element);},hasClassName:function(element,className){if= (!(element=3D$(element)))return;var = elementClassName=3Delement.className;if(elementClassName.length=3D=3D0)re= turn = false;if(elementClassName=3D=3DclassName||elementClassName.match(new = RegExp("(^|\\s)"+className+"(\\s|$)")))=0A= return true;return = false;},addClassName:function(element,className){if(!(element=3D$(element= )))return;Element.classNames(element).add(className);return = element;},removeClassName:function(element,className){if(!(element=3D$(el= ement)))return;Element.classNames(element).remove(className);return = element;},toggleClassName:function(element,className){if(!(element=3D$(el= ement)))return;Element.classNames(element)[element.hasClassName(className= )?'remove':'add'](className);return = element;},observe:function(){Event.observe.apply(Event,arguments);return = $A(arguments).first();},stopObserving:function(){Event.stopObserving.appl= y(Event,arguments);return = $A(arguments).first();},cleanWhitespace:function(element){element=3D$(ele= ment);var node=3Delement.firstChild;while(node){var = nextNode=3Dnode.nextSibling;if(node.nodeType=3D=3D3&&!/\S/.test(node.node= Value))=0A= element.removeChild(node);node=3DnextNode;}=0A= return element;},empty:function(element){return = $(element).innerHTML.match(/^\s*$/);},descendantOf:function(element,ances= tor){element=3D$(element),ancestor=3D$(ancestor);while(element=3Delement.= parentNode)=0A= if(element=3D=3Dancestor)return true;return = false;},scrollTo:function(element){element=3D$(element);var = pos=3DPosition.cumulativeOffset(element);window.scrollTo(pos[0],pos[1]);r= eturn = element;},getStyle:function(element,style){element=3D$(element);if(['floa= t','cssFloat'].include(style))=0A= style=3D(typeof = element.style.styleFloat!=3D'undefined'?'styleFloat':'cssFloat');style=3D= style.camelize();var = value=3Delement.style[style];if(!value){if(document.defaultView&&document= .defaultView.getComputedStyle){var = css=3Ddocument.defaultView.getComputedStyle(element,null);value=3Dcss?css= [style]:null;}else = if(element.currentStyle){value=3Delement.currentStyle[style];}}=0A= if((value=3D=3D'auto')&&['width','height'].include(style)&&(element.getSt= yle('display')!=3D'none'))=0A= value=3Delement['offset'+style.capitalize()]+'px';if(window.opera&&['left= ','top','right','bottom'].include(style))=0A= if(Element.getStyle(element,'position')=3D=3D'static')value=3D'auto';if(s= tyle=3D=3D'opacity'){if(value)return = parseFloat(value);if(value=3D(element.getStyle('filter')||'').match(/alph= a\(opacity=3D(.*)\)/))=0A= if(value[1])return parseFloat(value[1])/100;return 1.0;}=0A= return = value=3D=3D'auto'?null:value;},setStyle:function(element,style){element=3D= $(element);for(var name in style){var = value=3Dstyle[name];if(name=3D=3D'opacity'){if(value=3D=3D1){value=3D(/Ge= cko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.= userAgent))?0.999999:1.0;if(/MSIE/.test(navigator.userAgent)&&!window.ope= ra)=0A= element.style.filter=3Delement.getStyle('filter').replace(/alpha\([^\)]*\= )/gi,'');}else = if(value=3D=3D=3D''){if(/MSIE/.test(navigator.userAgent)&&!window.opera)=0A= element.style.filter=3Delement.getStyle('filter').replace(/alpha\([^\)]*\= )/gi,'');}else{if(value<0.00001)value=3D0;if(/MSIE/.test(navigator.userAg= ent)&&!window.opera)=0A= element.style.filter=3Delement.getStyle('filter').replace(/alpha\([^\)]*\= )/gi,'')+'alpha(opacity=3D'+value*100+')';}}else = if(['float','cssFloat'].include(name))name=3D(typeof = element.style.styleFloat!=3D'undefined')?'styleFloat':'cssFloat';element.= style[name.camelize()]=3Dvalue;}=0A= return = element;},getDimensions:function(element){element=3D$(element);var = display=3D$(element).getStyle('display');if(display!=3D'none'&&display!=3D= null)=0A= return{width:element.offsetWidth,height:element.offsetHeight};var = els=3Delement.style;var originalVisibility=3Dels.visibility;var = originalPosition=3Dels.position;var = originalDisplay=3Dels.display;els.visibility=3D'hidden';els.position=3D'a= bsolute';els.display=3D'block';var = originalWidth=3Delement.clientWidth;var = originalHeight=3Delement.clientHeight;els.display=3DoriginalDisplay;els.p= osition=3DoriginalPosition;els.visibility=3DoriginalVisibility;return{wid= th:originalWidth,height:originalHeight};},makePositioned:function(element= ){element=3D$(element);var = pos=3DElement.getStyle(element,'position');if(pos=3D=3D'static'||!pos){el= ement._madePositioned=3Dtrue;element.style.position=3D'relative';if(windo= w.opera){element.style.top=3D0;element.style.left=3D0;}}=0A= return = element;},undoPositioned:function(element){element=3D$(element);if(elemen= t._madePositioned){element._madePositioned=3Dundefined;element.style.posi= tion=3Delement.style.top=3Delement.style.left=3Delement.style.bottom=3Del= ement.style.right=3D'';}=0A= return = element;},makeClipping:function(element){element=3D$(element);if(element.= _overflow)return = element;element._overflow=3Delement.style.overflow||'auto';if((Element.ge= tStyle(element,'overflow')||'visible')!=3D'hidden')=0A= element.style.overflow=3D'hidden';return = element;},undoClipping:function(element){element=3D$(element);if(!element= ._overflow)return = element;element.style.overflow=3Delement._overflow=3D=3D'auto'?'':element= ._overflow;element._overflow=3Dnull;return = element;}};Object.extend(Element.Methods,{childOf:Element.Methods.descend= antOf});Element._attributeTranslations=3D{};Element._attributeTranslation= s.names=3D{colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",datetime:"= dateTime",accesskey:"accessKey",tabindex:"tabIndex",enctype:"encType",max= length:"maxLength",readonly:"readOnly",longdesc:"longDesc"};Element._attr= ibuteTranslations.values=3D{_getAttr:function(element,attribute){return = element.getAttribute(attribute,2);},_flag:function(element,attribute){ret= urn = $(element).hasAttribute(attribute)?attribute:null;},style:function(elemen= t){return = element.style.cssText.toLowerCase();},title:function(element){var = node=3Delement.getAttributeNode('title');return = node.specified?node.nodeValue:null;}};Object.extend(Element._attributeTra= nslations.values,{href:Element._attributeTranslations.values._getAttr,src= :Element._attributeTranslations.values._getAttr,disabled:Element._attribu= teTranslations.values._flag,checked:Element._attributeTranslations.values= ._flag,readonly:Element._attributeTranslations.values._flag,multiple:Elem= ent._attributeTranslations.values._flag});Element.Methods.Simulated=3D{ha= sAttribute:function(element,attribute){var = t=3DElement._attributeTranslations;attribute=3Dt.names[attribute]||attrib= ute;return = $(element).getAttributeNode(attribute).specified;}};if(document.all&&!win= dow.opera){Element.Methods.update=3Dfunction(element,html){element=3D$(el= ement);html=3Dtypeof html=3D=3D'undefined'?'':html.toString();var = tagName=3Delement.tagName.toUpperCase();if(['THEAD','TBODY','TR','TD'].in= clude(tagName)){var = div=3Ddocument.createElement('div');switch(tagName){case'THEAD':case'TBOD= Y':div.innerHTML=3D''+html.stripScripts()+'
= ';depth=3D2;break;case'TR':div.innerHTML=3D''+html.stri= pScripts()+'
';depth=3D3;break;case'TD':div.innerHTML= =3D'';depth=3D4;}=0A= $A(element.childNodes).each(function(node){element.removeChild(node)});de= pth.times(function(){div=3Ddiv.firstChild});$A(div.childNodes).each(funct= ion(node){element.appendChild(node)});}else{element.innerHTML=3Dhtml.stri= pScripts();}=0A= setTimeout(function(){html.evalScripts()},10);return = element;}};Object.extend(Element,Element.Methods);var = _nativeExtensions=3Dfalse;if(/Konqueror|Safari|KHTML/.test(navigator.user= Agent))=0A= ['','Form','Input','TextArea','Select'].each(function(tag){var = className=3D'HTML'+tag+'Element';if(window[className])return;var = klass=3Dwindow[className]=3D{};klass.prototype=3Ddocument.createElement(t= ag?tag.toLowerCase():'div').__proto__;});Element.addMethods=3Dfunction(me= thods){Object.extend(Element.Methods,methods||{});function = copy(methods,destination,onlyIfAbsent){onlyIfAbsent=3DonlyIfAbsent||false= ;var cache=3DElement.extend.cache;for(var property in methods){var = value=3Dmethods[property];if(!onlyIfAbsent||!(property in destination))=0A= destination[property]=3Dcache.findOrStore(value);}}=0A= if(typeof = HTMLElement!=3D'undefined'){copy(Element.Methods,HTMLElement.prototype);c= opy(Element.Methods.Simulated,HTMLElement.prototype,true);copy(Form.Metho= ds,HTMLFormElement.prototype);[HTMLInputElement,HTMLTextAreaElement,HTMLS= electElement].each(function(klass){copy(Form.Element.Methods,klass.protot= ype);});_nativeExtensions=3Dtrue;}}=0A= var Toggle=3Dnew = Object();Toggle.display=3DElement.toggle;Abstract.Insertion=3Dfunction(ad= jacency){this.adjacency=3Dadjacency;}=0A= Abstract.Insertion.prototype=3D{initialize:function(element,content){this= .element=3D$(element);this.content=3Dcontent.stripScripts();if(this.adjac= ency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTM= L(this.adjacency,this.content);}catch(e){var = tagName=3Dthis.element.tagName.toUpperCase();if(['TBODY','TR'].include(ta= gName)){this.insertContent(this.contentFromAnonymousTable());}else{throw = e;}}}else{this.range=3Dthis.element.ownerDocument.createRange();if(this.i= nitializeRange)this.initializeRange();this.insertContent([this.range.crea= teContextualFragment(this.content)]);}=0A= setTimeout(function(){content.evalScripts()},10);},contentFromAnonymousTa= ble:function(){var = div=3Ddocument.createElement('div');div.innerHTML=3D'
'+html.stripScripts()+'
'+this= .content+'
';return = $A(div.childNodes[0].childNodes[0].childNodes);}}=0A= var Insertion=3Dnew = Object();Insertion.Before=3DClass.create();Insertion.Before.prototype=3DO= bject.extend(new = Abstract.Insertion('beforeBegin'),{initializeRange:function(){this.range.= setStartBefore(this.element);},insertContent:function(fragments){fragment= s.each((function(fragment){this.element.parentNode.insertBefore(fragment,= this.element);}).bind(this));}});Insertion.Top=3DClass.create();Insertion= .Top.prototype=3DObject.extend(new = Abstract.Insertion('afterBegin'),{initializeRange:function(){this.range.s= electNodeContents(this.element);this.range.collapse(true);},insertContent= :function(fragments){fragments.reverse(false).each((function(fragment){th= is.element.insertBefore(fragment,this.element.firstChild);}).bind(this));= }});Insertion.Bottom=3DClass.create();Insertion.Bottom.prototype=3DObject= .extend(new = Abstract.Insertion('beforeEnd'),{initializeRange:function(){this.range.se= lectNodeContents(this.element);this.range.collapse(this.element);},insert= Content:function(fragments){fragments.each((function(fragment){this.eleme= nt.appendChild(fragment);}).bind(this));}});Insertion.After=3DClass.creat= e();Insertion.After.prototype=3DObject.extend(new = Abstract.Insertion('afterEnd'),{initializeRange:function(){this.range.set= StartAfter(this.element);},insertContent:function(fragments){fragments.ea= ch((function(fragment){this.element.parentNode.insertBefore(fragment,this= .element.nextSibling);}).bind(this));}});Element.ClassNames=3DClass.creat= e();Element.ClassNames.prototype=3D{initialize:function(element){this.ele= ment=3D$(element);},_each:function(iterator){this.element.className.split= (/\s+/).select(function(name){return = name.length>0;})._each(iterator);},set:function(className){this.element.c= lassName=3DclassName;},add:function(classNameToAdd){if(this.include(class= NameToAdd))return;this.set($A(this).concat(classNameToAdd).join(' = '));},remove:function(classNameToRemove){if(!this.include(classNameToRemo= ve))return;this.set($A(this).without(classNameToRemove).join(' = '));},toString:function(){return $A(this).join(' = ');}};Object.extend(Element.ClassNames.prototype,Enumerable);var = Selector=3DClass.create();Selector.prototype=3D{initialize:function(expre= ssion){this.params=3D{classNames:[]};this.expression=3Dexpression.toStrin= g().strip();this.parseExpression();this.compileMatcher();},parseExpressio= n:function(){function abort(message){throw'Parse error in selector: = '+message;}=0A= if(this.expression=3D=3D'')abort('empty expression');var = params=3Dthis.params,expr=3Dthis.expression,match,modifier,clause,rest;wh= ile(match=3Dexpr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=3D)(?:"([^"]*)"= |([^\]\s]*)))?\]$/i)){params.attributes=3Dparams.attributes||[];params.at= tributes.push({name:match[2],operator:match[3],value:match[4]||match[5]||= ''});expr=3Dmatch[1];}=0A= if(expr=3D=3D'*')return = this.params.wildcard=3Dtrue;while(match=3Dexpr.match(/^([^a-z0-9_-])?([a-= z0-9_-]+)(.*)/i)){modifier=3Dmatch[1],clause=3Dmatch[2],rest=3Dmatch[3];s= witch(modifier){case'#':params.id=3Dclause;break;case'.':params.className= s.push(clause);break;case'':case = undefined:params.tagName=3Dclause.toUpperCase();break;default:abort(expr.= inspect());}=0A= expr=3Drest;}=0A= if(expr.length>0)abort(expr.inspect());},buildMatchExpression:function(){= var params=3Dthis.params,conditions=3D[],clause;if(params.wildcard)=0A= conditions.push('true');if(clause=3Dparams.id)=0A= conditions.push('element.readAttribute("id") =3D=3D = '+clause.inspect());if(clause=3Dparams.tagName)=0A= conditions.push('element.tagName.toUpperCase() =3D=3D = '+clause.inspect());if((clause=3Dparams.classNames).length>0)=0A= for(var i=3D0,length=3Dclause.length;i=3D0?this.optionValue(element.options[index]):null;},selectMany:fun= ction(element){var values,length=3Delement.length;if(!length)return = null;for(var i=3D0,values=3D[];i=3Dthis.offset[1]= &&y=3Dthis.offset[0]&&x=3Dthis.offset[1]&&this.ycomp=3Dthis.offset[0]&&this.xcom= pThis is a custom shindig library that has not yet been submitted = for=0A= * standardization. It is designed to make developing of features for the=0A= * opensocial / gadgets platforms easier and is intended as a = supplemental=0A= * tool to Shindig's standardized feature loading mechanism.=0A= *=0A= *

Usage:=0A= * First, you must register a component that needs configuration:=0A= *

=0A=
 *   var config =3D {=0A=
 *     name : gadgets.config.NonEmptyStringValidator,=0A=
 *     url : new gadgets.config.RegExValidator(/.+%mySpecialValue%.+/)=0A=
 *   };=0A=
 *   gadgets.config.register("my-feature", config, myCallback);=0A=
 * 
=0A= *=0A= *

This will register a component named "my-feature" that expects = input config=0A= * containing a "name" field with a value that is a non-empty string, = and a=0A= * "url" field with a value that matches the given regular expression.=0A= *=0A= *

When gadgets.config.init is invoked by the container, it will = automatically=0A= * validate your registered configuration and will throw an exception if=0A= * the provided configuration does not match what was required.=0A= *=0A= *

Your callback will be invoked by passing all configuration data = passed to=0A= * gadgets.config.init, which allows you to optionally inspect = configuration=0A= * from other features, if present.=0A= *=0A= *

Note that the container may optionally bypass configuration = validation for=0A= * performance reasons. This does not mean that you should duplicate = validation=0A= * code, it simply means that validation will likely only be performed = in debug=0A= * builds, and you should assume that production builds always have valid=0A= * configuration.=0A= */=0A= =0A= /** @namespace */=0A= gadgets.config =3D function() {=0A= var components =3D {};=0A= var configuration;=0A= =0A= return {=0A= 'register':=0A= /**=0A= * Registers a configurable component and its configuration = parameters.=0A= * Multiple callbacks may be registered for a single component if = needed.=0A= *=0A= * @param {string} component The name of the component to register. = Should=0A= * be the same as the fully qualified name of the = feature or=0A= * the name of a fully qualified javascript object reference=0A= * (e.g. "gadgets.io").=0A= * @param {Object=3D} opt_validators Mapping of option name to = validation=0A= * functions that take the form function(data) {return = isValid(data);}=0A= * @param {function(Object)=3D} opt_callback A function to be = invoked when a=0A= * configuration is registered. If passed, this function will be = invoked=0A= * immediately after a call to init has been made. Do not assume = that=0A= * dependent libraries have been configured until after init is=0A= * complete. If you rely on this, it is better to defer calling=0A= * dependent libraries until you can be sure that configuration = is=0A= * complete. Takes the form function(config), where config will = be=0A= * all registered config data for all components. This allows = your=0A= * component to read configuration from other components.=0A= * @member gadgets.config=0A= * @name register=0A= * @function=0A= */=0A= function(component, opt_validators, opt_callback) {=0A= var registered =3D components[component];=0A= if (!registered) {=0A= registered =3D [];=0A= components[component] =3D registered;=0A= }=0A= =0A= registered.push({=0A= validators: opt_validators || {},=0A= callback: opt_callback=0A= });=0A= },=0A= =0A= 'get':=0A= /**=0A= * Retrieves configuration data on demand.=0A= *=0A= * @param {string=3D} opt_component The component to fetch. If not = provided=0A= * all configuration will be returned.=0A= * @return {Object} The requested configuration, or an empty object = if no=0A= * configuration has been registered for that component.=0A= * @member gadgets.config=0A= * @name get=0A= * @function=0A= */=0A= function(opt_component) {=0A= if (opt_component) {=0A= return configuration[opt_component] || {};=0A= }=0A= return configuration;=0A= },=0A= =0A= /**=0A= * Initializes the configuration.=0A= *=0A= * @param {Object} config The full set of configuration data.=0A= * @param {boolean=3D} opt_noValidation True if you want to skip = validation.=0A= * @throws {Error} If there is a configuration error.=0A= * @member gadgets.config=0A= * @name init =0A= * @function=0A= */=0A= 'init': function(config, opt_noValidation) {=0A= configuration =3D config;=0A= for (var name in components) {=0A= if (components.hasOwnProperty(name)) {=0A= var componentList =3D components[name],=0A= conf =3D config[name];=0A= =0A= for (var i =3D 0, j =3D componentList.length; i < j; ++i) {=0A= var component =3D componentList[i];=0A= if (conf && !opt_noValidation) {=0A= var validators =3D component.validators;=0A= for (var v in validators) {=0A= if (validators.hasOwnProperty(v)) {=0A= if (!validators[v](conf[v])) {=0A= throw new Error('Invalid config value "' + conf[v] +=0A= '" for parameter "' + v + '" in component "' +=0A= name + '"');=0A= }=0A= }=0A= }=0A= }=0A= =0A= if (component.callback) {=0A= component.callback(config);=0A= }=0A= }=0A= }=0A= }=0A= },=0A= =0A= // Standard validators go here.=0A= =0A= /**=0A= * Ensures that data is one of a fixed set of items.=0A= * Also supports argument sytax: EnumValidator("Dog", "Cat", "Fish");=0A= *=0A= * @param {Array.} list The list of valid values.=0A= *=0A= * @member gadgets.config=0A= * @name EnumValidator=0A= * @function=0A= */=0A= 'EnumValidator': function(list) {=0A= var listItems =3D [];=0A= if (arguments.length > 1) {=0A= for (var i =3D 0, arg; (arg =3D arguments[i]); ++i) {=0A= listItems.push(arg);=0A= }=0A= } else {=0A= listItems =3D list;=0A= }=0A= return function(data) {=0A= for (var i =3D 0, test; (test =3D listItems[i]); ++i) {=0A= if (data =3D=3D=3D listItems[i]) {=0A= return true;=0A= }=0A= }=0A= return false;=0A= };=0A= },=0A= =0A= /**=0A= * Tests the value against a regular expression.=0A= * @member gadgets.config=0A= * @name RegexValidator=0A= * @function=0A= */=0A= 'RegExValidator': function(re) {=0A= return function(data) {=0A= return re.test(data);=0A= };=0A= },=0A= =0A= /**=0A= * Validates that a value was provided.=0A= * @param {*} data=0A= * @member gadgets.config=0A= * @name ExistsValidator=0A= * @function=0A= */=0A= 'ExistsValidator': function(data) {=0A= return typeof data !=3D=3D "undefined";=0A= },=0A= =0A= /**=0A= * Validates that a value is a non-empty string.=0A= * @param {*} data=0A= * @member gadgets.config=0A= * @name NonEmptyStringValidator=0A= * @function=0A= */=0A= 'NonEmptyStringValidator': function(data) {=0A= return typeof data =3D=3D=3D "string" && data.length > 0;=0A= },=0A= =0A= /**=0A= * Validates that the value is a boolean.=0A= * @param {*} data=0A= * @member gadgets.config=0A= * @name BooleanValidator=0A= * @function=0A= */=0A= 'BooleanValidator': function(data) {=0A= return typeof data =3D=3D=3D "boolean";=0A= },=0A= =0A= /**=0A= * Similar to the ECMAScript 4 virtual typing system, ensures that=0A= * whatever object was passed in is "like" the existing object.=0A= * Doesn't actually do type validation though, but instead relies=0A= * on other validators.=0A= *=0A= * This can be used recursively as well to validate sub-objects.=0A= *=0A= * @example=0A= *=0A= * var validator =3D new gadgets.config.LikeValidator(=0A= * "booleanField" : gadgets.config.BooleanValidator,=0A= * "regexField" : new gadgets.config.RegExValidator(/foo.+/);=0A= * );=0A= *=0A= *=0A= * @param {Object} test The object to test against.=0A= * @member gadgets.config=0A= * @name BooleanValidator=0A= * @function=0A= */=0A= 'LikeValidator' : function(test) {=0A= return function(data) {=0A= for (var member in test) {=0A= if (test.hasOwnProperty(member)) {=0A= var t =3D test[member];=0A= if (!t(data[member])) {=0A= return false;=0A= }=0A= }=0A= }=0A= return true;=0A= };=0A= }=0A= };=0A= }();=0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations=0A= * under the License.=0A= */=0A= =0A= /**=0A= * @fileoverview Provides gadget/container configuration flags.=0A= */=0A= =0A= /** @type {boolean} */=0A= gadgets.config.isGadget =3D false;=0A= /** @type {boolean} */=0A= gadgets.config.isContainer =3D true;=0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations=0A= * under the License.=0A= */=0A= =0A= /**=0A= * @fileoverview General purpose utilities that gadgets can use.=0A= */=0A= =0A= /**=0A= * @static=0A= * @class Provides general-purpose utility functions.=0A= * @name gadgets.util=0A= */=0A= =0A= gadgets['util'] =3D function() {=0A= /**=0A= * Parses URL parameters into an object.=0A= * @param {string} url - the url parameters to parse=0A= * @return {Array.} The parameters as an array=0A= */=0A= function parseUrlParams(url) {=0A= // Get settings from url, 'hash' takes precedence over 'search' = component=0A= // don't use document.location.hash due to browser differences.=0A= var query;=0A= var queryIdx =3D url.indexOf("?");=0A= var hashIdx =3D url.indexOf("#");=0A= if (hashIdx =3D=3D=3D -1) {=0A= query =3D url.substr(queryIdx + 1);=0A= } else {=0A= // essentially replaces "#" with "&"=0A= query =3D [url.substr(queryIdx + 1, hashIdx - queryIdx - 1), "&",=0A= url.substr(hashIdx + 1)].join("");=0A= }=0A= return query.split("&");=0A= }=0A= =0A= var parameters =3D null;=0A= var features =3D {};=0A= var services =3D {};=0A= var onLoadHandlers =3D [];=0A= =0A= /**=0A= * @enum {boolean}=0A= * @const=0A= * @private=0A= * Maps code points to the value to replace them with.=0A= * If the value is "false", the character is removed entirely, = otherwise=0A= * it will be replaced with an html entity.=0A= */=0A= =0A= var escapeCodePoints =3D {=0A= // nul; most browsers truncate because they use c strings under the = covers.=0A= 0 : false,=0A= // new line=0A= 10 : true,=0A= // carriage return=0A= 13 : true,=0A= // double quote=0A= 34 : true,=0A= // single quote=0A= 39 : true,=0A= // less than=0A= 60 : true,=0A= // greater than=0A= 62 : true,=0A= // Backslash=0A= 92 : true,=0A= // line separator=0A= 8232 : true,=0A= // paragraph separator=0A= 8233 : true=0A= };=0A= =0A= /**=0A= * Regular expression callback that returns strings from unicode code = points.=0A= *=0A= * @param {Array} match Ignored=0A= * @param {number} value The codepoint value to convert=0A= * @return {string} The character corresponding to value.=0A= */=0A= function unescapeEntity(match, value) {=0A= return String.fromCharCode(value);=0A= }=0A= =0A= /**=0A= * Initializes feature parameters.=0A= */=0A= function init(config) {=0A= features =3D config["core.util"] || {};=0A= }=0A= if (gadgets.config) {=0A= gadgets.config.register("core.util", null, init);=0A= }=0A= =0A= return /** @scope gadgets.util */ {=0A= =0A= /**=0A= * Gets the URL parameters.=0A= *=0A= * @param {string=3D} opt_url Optional URL whose parameters to parse.=0A= * Defaults to window's current URL.=0A= * @return {Object} Parameters passed into the query string=0A= * @member gadgets.util=0A= * @private Implementation detail.=0A= */=0A= 'getUrlParameters' : function (opt_url) {=0A= var no_opt_url =3D typeof opt_url =3D=3D=3D "undefined";=0A= if (parameters !=3D=3D null && no_opt_url) {=0A= // "parameters" is a cache of current window params only.=0A= return parameters;=0A= }=0A= var parsed =3D {};=0A= var pairs =3D parseUrlParams(opt_url || document.location.href);=0A= var unesc =3D window.decodeURIComponent ? decodeURIComponent : = unescape;=0A= for (var i =3D 0, j =3D pairs.length; i < j; ++i) {=0A= var pos =3D pairs[i].indexOf('=3D');=0A= if (pos =3D=3D=3D -1) {=0A= continue;=0A= }=0A= var argName =3D pairs[i].substring(0, pos);=0A= var value =3D pairs[i].substring(pos + 1);=0A= // difference to IG_Prefs, is that args doesn't replace spaces in=0A= // argname. Unclear on if it should do:=0A= // argname =3D argname.replace(/\+/g, " ");=0A= value =3D value.replace(/\+/g, " ");=0A= parsed[argName] =3D unesc(value);=0A= }=0A= if (no_opt_url) {=0A= // Cache current-window params in parameters var.=0A= parameters =3D parsed;=0A= }=0A= return parsed;=0A= },=0A= =0A= /**=0A= * Creates a closure that is suitable for passing as a callback.=0A= * Any number of arguments=0A= * may be passed to the callback;=0A= * they will be received in the order they are passed in.=0A= *=0A= * @param {Object} scope The execution scope; may be null if there = is no=0A= * need to associate a specific instance of an object with this=0A= * callback=0A= * @param {function(Object,Object)} callback The callback to invoke = when this is run;=0A= * any arguments passed in will be passed after your initial = arguments=0A= * @param {Object} var_args Initial arguments to be passed to the = callback=0A= *=0A= * @member gadgets.util=0A= * @private Implementation detail.=0A= */=0A= 'makeClosure' : function (scope, callback, var_args) {=0A= // arguments isn't a real array, so we copy it into one.=0A= var baseArgs =3D [];=0A= for (var i =3D 2, j =3D arguments.length; i < j; ++i) {=0A= baseArgs.push(arguments[i]);=0A= }=0A= return function() {=0A= // append new arguments.=0A= var tmpArgs =3D baseArgs.slice();=0A= for (var i =3D 0, j =3D arguments.length; i < j; ++i) {=0A= tmpArgs.push(arguments[i]);=0A= }=0A= return callback.apply(scope, tmpArgs);=0A= };=0A= },=0A= =0A= /**=0A= * Utility function for generating an "enum" from an array.=0A= *=0A= * @param {Array.} values The values to generate.=0A= * @return {Object.} An object with member fields to = handle=0A= * the enum.=0A= *=0A= * @private Implementation detail.=0A= */=0A= 'makeEnum' : function (values) {=0A= var i, v, obj =3D {};=0A= for (i =3D 0; (v =3D values[i]); ++i) {=0A= obj[v] =3D v;=0A= }=0A= return obj;=0A= },=0A= =0A= /**=0A= * Gets the feature parameters.=0A= *=0A= * @param {string} feature The feature to get parameters for=0A= * @return {Object} The parameters for the given feature, or null=0A= *=0A= * @member gadgets.util=0A= */=0A= 'getFeatureParameters' : function (feature) {=0A= return typeof features[feature] =3D=3D=3D "undefined" ? null : = features[feature];=0A= },=0A= =0A= /**=0A= * Returns whether the current feature is supported.=0A= *=0A= * @param {string} feature The feature to test for=0A= * @return {boolean} True if the feature is supported=0A= *=0A= * @member gadgets.util=0A= */=0A= 'hasFeature' : function (feature) {=0A= return typeof features[feature] !=3D=3D "undefined";=0A= },=0A= =0A= /**=0A= * Returns the list of services supported by the server=0A= * serving this gadget.=0A= *=0A= * @return {Object} List of Services that enumerate their methods=0A= *=0A= * @member gadgets.util=0A= */=0A= 'getServices' : function () {=0A= return services;=0A= },=0A= =0A= /**=0A= * Registers an onload handler.=0A= * @param {function()} callback The handler to run=0A= *=0A= * @member gadgets.util=0A= */=0A= 'registerOnLoadHandler' : function (callback) {=0A= onLoadHandlers.push(callback);=0A= },=0A= =0A= /**=0A= * Runs all functions registered via registerOnLoadHandler.=0A= * @private Only to be used by the container, not gadgets.=0A= */=0A= 'runOnLoadHandlers' : function () {=0A= for (var i =3D 0, j =3D onLoadHandlers.length; i < j; ++i) {=0A= onLoadHandlers[i]();=0A= }=0A= },=0A= =0A= /**=0A= * Escapes the input using html entities to make it safer.=0A= *=0A= * If the input is a string, uses gadgets.util.escapeString.=0A= * If it is an array, calls escape on each of the array elements=0A= * if it is an object, will only escape all the mapped keys and = values if=0A= * the opt_escapeObjects flag is set. This operation involves = creating an=0A= * entirely new object so only set the flag when the input is a = simple=0A= * string to string map.=0A= * Otherwise, does not attempt to modify the input.=0A= *=0A= * @param {Object} input The object to escape=0A= * @param {boolean=3D} opt_escapeObjects Whether to escape objects.=0A= * @return {Object} The escaped object=0A= * @private Only to be used by the container, not gadgets.=0A= */=0A= 'escape' : function(input, opt_escapeObjects) {=0A= if (!input) {=0A= return input;=0A= } else if (typeof input =3D=3D=3D "string") {=0A= return gadgets.util.escapeString(input);=0A= } else if (typeof input =3D=3D=3D "array") {=0A= for (var i =3D 0, j =3D input.length; i < j; ++i) {=0A= input[i] =3D gadgets.util.escape(input[i]);=0A= }=0A= } else if (typeof input =3D=3D=3D "object" && opt_escapeObjects) {=0A= var newObject =3D {};=0A= for (var field in input) {=0A= if (input.hasOwnProperty(field)) {=0A= newObject[gadgets.util.escapeString(field)] =3D = gadgets.util.escape(input[field], true);=0A= }=0A= }=0A= return newObject;=0A= }=0A= return input;=0A= },=0A= =0A= /**=0A= * Escapes the input using html entities to make it safer.=0A= *=0A= * Currently not in the spec -- future proposals may change=0A= * how this is handled.=0A= *=0A= * TODO: Parsing the string would probably be more accurate and = faster than=0A= * a bunch of regular expressions.=0A= *=0A= * @param {string} str The string to escape=0A= * @return {string} The escaped string=0A= */=0A= 'escapeString' : function(str) {=0A= if (!str) return str;=0A= var out =3D [], ch, shouldEscape;=0A= for (var i =3D 0, j =3D str.length; i < j; ++i) {=0A= ch =3D str.charCodeAt(i);=0A= shouldEscape =3D escapeCodePoints[ch];=0A= if (shouldEscape =3D=3D=3D true) {=0A= out.push("&#", ch, ";");=0A= } else if (shouldEscape !=3D=3D false) {=0A= // undefined or null are OK.=0A= out.push(str.charAt(i));=0A= }=0A= }=0A= return out.join("");=0A= },=0A= =0A= /**=0A= * Reverses escapeString=0A= *=0A= * @param {string} str The string to unescape.=0A= * @return {string}=0A= */=0A= 'unescapeString' : function(str) {=0A= if (!str) return str;=0A= return str.replace(/&#([0-9]+);/g, unescapeEntity);=0A= },=0A= =0A= =0A= /**=0A= * Attach an event listener to given DOM element (Not a gadget = standard)=0A= * =0A= * @param {Object} elem DOM element on which to attach event.=0A= * @param {string} eventName Event type to listen for.=0A= * @param {function()} callback Invoked when specified event occurs.=0A= * @param {boolean} useCapture If true, initiates capture.=0A= */=0A= 'attachBrowserEvent': function(elem, eventName, callback, = useCapture) {=0A= if (typeof elem.addEventListener !=3D 'undefined') {=0A= elem.addEventListener(eventName, callback, useCapture);=0A= } else if (typeof elem.attachEvent !=3D 'undefined') {=0A= elem.attachEvent('on' + eventName, callback);=0A= } else {=0A= gadgets.warn("cannot attachBrowserEvent: " + eventName);=0A= }=0A= },=0A= =0A= /**=0A= * Remove event listener. (Shindig internal implementation only)=0A= * =0A= * @param {Object} elem DOM element from which to remove event.=0A= * @param {string} eventName Event type to remove.=0A= * @param {function()} callback Listener to remove.=0A= * @param {boolean} useCapture Specifies whether listener being = removed was added with=0A= * capture enabled.=0A= */=0A= 'removeBrowserEvent': function(elem, eventName, callback, = useCapture) {=0A= if (elem.removeEventListener) {=0A= elem.removeEventListener(eventName, callback, useCapture);=0A= } else if (elem.detachEvent){=0A= elem.detachEvent('on' + eventName, callback);=0A= } else {=0A= gadgets.warn("cannot removeBrowserEvent: " + eventName);=0A= }=0A= }=0A= };=0A= }();=0A= // Initialize url parameters so that hash data is pulled in before it = can be=0A= // altered by a click.=0A= gadgets['util'].getUrlParameters();=0A= =0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations=0A= * under the License.=0A= */=0A= =0A= /**=0A= * @class=0A= * Tame and expose core gadgets.* API to cajoled gadgets=0A= */=0A= var tamings___ =3D tamings___ || [];=0A= tamings___.push(function(imports) {=0A= caja___.whitelistFuncs([=0A= [gadgets.util, 'escapeString'],=0A= [gadgets.util, 'getFeatureParameters'],=0A= [gadgets.util, 'getUrlParameters'],=0A= [gadgets.util, 'hasFeature'],=0A= [gadgets.util, 'registerOnLoadHandler'],=0A= [gadgets.util, 'unescapeString']=0A= ]);=0A= });=0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations=0A= * under the License.=0A= */=0A= =0A= /**=0A= * @fileoverview Support for basic logging capability for gadgets.=0A= *=0A= * This functionality replaces alert(msg) and window.console.log(msg).=0A= *=0A= *

Currently only works on browsers with a console (WebKit based = browsers,=0A= * Firefox with Firebug extension, or Opera).=0A= *=0A= *

API is designed to be equivalent to existing console.log | warn | = error=0A= * logging APIs supported by Firebug and WebKit based browsers. The only=0A= * addition is the ability to call gadgets.setLogLevel().=0A= */=0A= =0A= /**=0A= * @static=0A= * @namespace Support for basic logging capability for gadgets.=0A= * @name gadgets.log=0A= */=0A= =0A= gadgets['log'] =3D (function() {=0A= /** @const */=0A= var info_=3D1;=0A= /** @const */=0A= var warning_=3D2;=0A= /** @const */=0A= var error_=3D3;=0A= /** @const */=0A= var none_=3D4;=0A= =0A= /**=0A= * Log an informational message=0A= * @param {Object} message - the message to log=0A= * @member gadgets=0A= * @name log=0A= * @function=0A= */=0A= var log =3D function(message) {=0A= logAtLevel(info_, message);=0A= };=0A= =0A= /**=0A= * Log a warning=0A= * @param {Object} message - the message to log=0A= * @static =0A= */=0A= gadgets.warn =3D function(message) {=0A= logAtLevel(warning_, message);=0A= };=0A= =0A= /**=0A= * Log an error=0A= * @param {Object} message - The message to log=0A= * @static =0A= */=0A= gadgets.error =3D function(message) {=0A= logAtLevel(error_, message);=0A= };=0A= =0A= /**=0A= * Sets the log level threshold.=0A= * @param {number} logLevel - New log level threshold.=0A= * @static=0A= * @member gadgets.log=0A= * @name setLogLevel=0A= */=0A= gadgets['setLogLevel'] =3D function(logLevel) {=0A= logLevelThreshold_ =3D logLevel;=0A= };=0A= =0A= /**=0A= * Logs a log message if output console is available, and log threshold = is met.=0A= * @param {number} level - the level to log with. Optional, defaults to = gadgets.log.INFO.=0A= * @param {Object} message - The message to log=0A= * @private=0A= */=0A= function logAtLevel(level, message) {=0A= if (level < logLevelThreshold_ || !_console) {=0A= return;=0A= }=0A= =0A= if (level =3D=3D=3D warning_ && _console.warn) {=0A= _console.warn(message);=0A= } else if (level =3D=3D=3D error_ && _console.error) {=0A= _console.error(message);=0A= } else if (_console.log) {=0A= _console.log(message);=0A= }=0A= };=0A= =0A= /**=0A= * Log level for informational logging.=0A= * @static=0A= * @const=0A= * @member gadgets.log=0A= * @name INFO=0A= */=0A= log['INFO'] =3D info_;=0A= =0A= /**=0A= * Log level for warning logging.=0A= * @static=0A= * @const=0A= * @member gadgets.log=0A= * @name WARNING=0A= */=0A= log['WARNING'] =3D warning_;=0A= =0A= /**=0A= * Log level for no logging=0A= * @static=0A= * @const=0A= * @member gadgets.log=0A= * @name NONE=0A= */=0A= log['NONE'] =3D none_;=0A= =0A= /**=0A= * Current log level threshold.=0A= * @type {number}=0A= * @private=0A= */=0A= var logLevelThreshold_ =3D info_;=0A= =0A= =0A= =0A= /**=0A= * Console to log to=0A= * @private=0A= * @static=0A= */=0A= var _console =3D window.console ? window.console :=0A= window.opera ? window.opera.postError : = undefined;=0A= =0A= return log; =0A= })();=0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations=0A= * under the License.=0A= */=0A= =0A= /**=0A= * @class=0A= * Tame and expose core gadgets.* API to cajoled gadgets=0A= */=0A= var tamings___ =3D tamings___ || [];=0A= tamings___.push(function(imports) {=0A= ___.grantRead(gadgets.log, 'INFO');=0A= ___.grantRead(gadgets.log, 'WARNING');=0A= ___.grantRead(gadgets.log, 'ERROR');=0A= ___.grantRead(gadgets.log, 'NONE');=0A= caja___.whitelistFuncs([=0A= [gadgets, 'log'],=0A= [gadgets, 'warn'],=0A= [gadgets, 'error'],=0A= [gadgets, 'setLogLevel']=0A= ]);=0A= });=0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations=0A= * under the License.=0A= */=0A= =0A= /**=0A= * @fileoverview=0A= * The global object gadgets.json contains two methods.=0A= *=0A= * gadgets.json.stringify(value) takes a JavaScript value and produces a = JSON=0A= * text. The value must not be cyclical.=0A= *=0A= * gadgets.json.parse(text) takes a JSON text and produces a JavaScript = value.=0A= * It will return false if there is an error.=0A= */=0A= =0A= /**=0A= * @static=0A= * @class Provides operations for translating objects to and from JSON.=0A= * @name gadgets.json=0A= */=0A= =0A= /**=0A= * Port of the public domain JSON library by Douglas Crockford.=0A= * See: http://www.json.org/json2.js=0A= */=0A= if (window.JSON && window.JSON.parse && window.JSON.stringify) {=0A= // HTML5 implementation, or already defined.=0A= // Not a direct alias as the opensocial specification disagrees with = the HTML5 JSON spec.=0A= // JSON says to throw on parse errors and to support filtering = functions. OS does not.=0A= gadgets['json'] =3D (function() {=0A= var endsWith___ =3D /___$/;=0A= return {=0A= /* documented below */=0A= 'parse': function(str) {=0A= try {=0A= return window.JSON.parse(str);=0A= } catch (e) {=0A= return false;=0A= }=0A= },=0A= /* documented below */=0A= 'stringify': function(obj) {=0A= try {=0A= return window.JSON.stringify(obj, function(k,v) {=0A= return !endsWith___.test(k) ? v : null;=0A= });=0A= } catch (e) {=0A= return null;=0A= }=0A= }=0A= };=0A= })();=0A= } else {=0A= /**=0A= * Port of the public domain JSON library by Douglas Crockford.=0A= * See: http://www.json.org/json2.js=0A= */=0A= gadgets['json'] =3D function () {=0A= =0A= /**=0A= * Formats integers to 2 digits.=0A= * @param {number} n=0A= * @private=0A= */=0A= function f(n) {=0A= return n < 10 ? '0' + n : n;=0A= }=0A= =0A= Date.prototype.toJSON =3D function () {=0A= return [this.getUTCFullYear(), '-',=0A= f(this.getUTCMonth() + 1), '-',=0A= f(this.getUTCDate()), 'T',=0A= f(this.getUTCHours()), ':',=0A= f(this.getUTCMinutes()), ':',=0A= f(this.getUTCSeconds()), 'Z'].join("");=0A= };=0A= =0A= // table of character substitutions=0A= /**=0A= * @const=0A= * @enum {string}=0A= */=0A= var m =3D {=0A= '\b': '\\b',=0A= '\t': '\\t',=0A= '\n': '\\n',=0A= '\f': '\\f',=0A= '\r': '\\r',=0A= '"' : '\\"',=0A= '\\': '\\\\'=0A= };=0A= =0A= /**=0A= * Converts a json object into a string.=0A= * @param {*} value=0A= * @return {string}=0A= * @member gadgets.json=0A= */=0A= function stringify(value) {=0A= var a, // The array holding the partial texts.=0A= i, // The loop counter.=0A= k, // The member key.=0A= l, // Length.=0A= r =3D /["\\\x00-\x1f\x7f-\x9f]/g,=0A= v; // The member value.=0A= =0A= switch (typeof value) {=0A= case 'string':=0A= // If the string contains no control characters, no quote = characters, and no=0A= // backslash characters, then we can safely slap some quotes = around it.=0A= // Otherwise we must also replace the offending characters with = safe ones.=0A= return r.test(value) ?=0A= '"' + value.replace(r, function (a) {=0A= var c =3D m[a];=0A= if (c) {=0A= return c;=0A= }=0A= c =3D a.charCodeAt();=0A= return '\\u00' + Math.floor(c / 16).toString(16) +=0A= (c % 16).toString(16);=0A= }) + '"' : '"' + value + '"';=0A= case 'number':=0A= // JSON numbers must be finite. Encode non-finite numbers as null.=0A= return isFinite(value) ? String(value) : 'null';=0A= case 'boolean':=0A= case 'null':=0A= return String(value);=0A= case 'object':=0A= // Due to a specification blunder in ECMAScript,=0A= // typeof null is 'object', so watch out for that case.=0A= if (!value) {=0A= return 'null';=0A= }=0A= // toJSON check removed; re-implement when it doesn't break = other libs.=0A= a =3D [];=0A= if (typeof value.length =3D=3D=3D 'number' &&=0A= !value.propertyIsEnumerable('length')) {=0A= // The object is an array. Stringify every element. Use null = as a=0A= // placeholder for non-JSON values.=0A= l =3D value.length;=0A= for (i =3D 0; i < l; i +=3D 1) {=0A= a.push(stringify(value[i]) || 'null');=0A= }=0A= // Join all of the elements together and wrap them in brackets.=0A= return '[' + a.join(',') + ']';=0A= }=0A= // Otherwise, iterate through all of the keys in the object.=0A= for (k in value) {=0A= if (k.match('___$'))=0A= continue;=0A= if (value.hasOwnProperty(k)) {=0A= if (typeof k =3D=3D=3D 'string') {=0A= v =3D stringify(value[k]);=0A= if (v) {=0A= a.push(stringify(k) + ':' + v);=0A= }=0A= }=0A= }=0A= }=0A= // Join all of the member texts together and wrap them in braces.=0A= return '{' + a.join(',') + '}';=0A= }=0A= return "undefined";=0A= }=0A= =0A= return {=0A= 'stringify': stringify,=0A= 'parse': function (text) {=0A= // Parsing happens in three stages. In the first stage, we run the = text against=0A= // regular expressions that look for non-JSON patterns. We are = especially=0A= // concerned with '()' and 'new' because they can cause = invocation, and '=3D'=0A= // because it can cause mutation. But just to be safe, we want to = reject all=0A= // unexpected forms.=0A= =0A= // We split the first stage into 4 regexp operations in order to = work around=0A= // crippling inefficiencies in IE's and Safari's regexp engines. = First we=0A= // replace all backslash pairs with '@' (a non-JSON character). = Second, we=0A= // replace all simple value tokens with ']' characters. Third, we = delete all=0A= // open brackets that follow a colon or comma or that begin the = text. Finally,=0A= // we look to see that the remaining characters are only = whitespace or ']' or=0A= // ',' or ':' or '{' or '}'. If that is so, then the text is safe = for eval.=0A= =0A= if (/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/b-u]/g, '@').=0A= = replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/= g, ']').=0A= replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {=0A= return eval('(' + text + ')');=0A= }=0A= // If the text is not JSON parseable, then return false.=0A= =0A= return false;=0A= }=0A= };=0A= }();=0A= }=0A= /**=0A= * Flatten an object to a stringified values. Useful for dealing with=0A= * json->querystring transformations. =0A= * =0A= * @param obj {Object}=0A= * @return {Object} object with only string values=0A= * @private not in official specification yet=0A= */=0A= =0A= gadgets['json'].flatten =3D function(obj) {=0A= var flat =3D {};=0A= =0A= if (obj =3D=3D=3D null || obj =3D=3D=3D undefined) return flat;=0A= =0A= for (var k in obj) {=0A= if (obj.hasOwnProperty(k)) {=0A= var value =3D obj[k];=0A= if (null =3D=3D=3D value || undefined =3D=3D=3D value) {=0A= continue;=0A= }=0A= flat[k] =3D (typeof value =3D=3D=3D 'string') ? value : = gadgets.json.stringify(value);=0A= }=0A= }=0A= return flat;=0A= }=0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations=0A= * under the License.=0A= */=0A= =0A= /**=0A= * @class=0A= * Tame and expose core gadgets.* API to cajoled gadgets=0A= */=0A= var tamings___ =3D tamings___ || [];=0A= tamings___.push(function(imports) {=0A= ___.tamesTo(gadgets.json.stringify, safeJSON.stringify);=0A= ___.tamesTo(gadgets.json.parse, safeJSON.parse);=0A= });=0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations=0A= * under the License.=0A= */=0A= =0A= /*global gadgets */=0A= =0A= /**=0A= * @fileoverview=0A= *=0A= * Manages the gadget security token AKA the gadget auth token AKA the=0A= * social token. Also provides an API for the container server to=0A= * efficiently pass authenticated data to the gadget at render time.=0A= *=0A= * The shindig.auth package is not part of the opensocial or gadgets = spec,=0A= * and gadget authors should never use these functions or the security = token=0A= * directly. These APIs are an implementation detail and are for shindig=0A= * internal use only.=0A= *=0A= * Passing authenticated data into the gadget at render time:=0A= *=0A= * The gadget auth token is the only way for the container to allow the=0A= * gadget access to authenticated data. gadgets.io.makeRequest for = SIGNED=0A= * or OAUTH requests relies on the authentication token. Access to = social data=0A= * also relies on the authentication token.=0A= *=0A= * The authentication token is normally passed into the gadget on the URL=0A= * fragment (after the #), and so is not visible to the gadget rendering=0A= * server. This keeps the token from being leaked in referer headers, = but at=0A= * the same time limits the amount of authenticated data the gadget can = view=0A= * quickly: fetching authenticated data requires an extra round trip.=0A= *=0A= * If the authentication token is passed to the gadget as a query = parameter,=0A= * the gadget rendering server gets an opportunity to view the token = during=0A= * the rendering process. This allows the rendering server to quickly = inject=0A= * authenticated data into the gadget, at the price of potentially = leaking=0A= * the authentication token in referer headers. That risk can be = mitigated=0A= * by using a short-lived authentication token on the query string, which=0A= * the gadget server can swap for a longer lived token at render time.=0A= *=0A= * If the rendering server injects authenticated data into the gadget in = the=0A= * form of a JSON string, the resulting javascript object can be = accessed via=0A= * shindig.auth.getTrustedData.=0A= *=0A= * To access the security token:=0A= * var st =3D shindig.auth.getSecurityToken();=0A= *=0A= * To update the security token with new data from the gadget server:=0A= * shindig.auth.updateSecurityToken(newToken);=0A= *=0A= * To quickly access a javascript object that has been authenticated by = the=0A= * container and the rendering server:=0A= * var trusted =3D shindig.auth.getTrustedData();=0A= * doSomething(trusted.foo.bar);=0A= */=0A= =0A= /**=0A= * Class used to mange the gadget auth token. Singleton initialized from=0A= * auth-init.js.=0A= *=0A= * @constructor=0A= */=0A= shindig.Auth =3D function() {=0A= /**=0A= * The authentication token.=0A= */=0A= var authToken =3D null;=0A= =0A= /**=0A= * Trusted object from container.=0A= */=0A= var trusted =3D null;=0A= =0A= /**=0A= * Copy URL parameters into the auth token=0A= *=0A= * The initial auth token can look like this:=0A= * t=3Dabcd&url=3D$&foo=3D=0A= *=0A= * If any of the values in the token are '$', a matching parameter=0A= * from the URL will be inserted, for example:=0A= * t=3Dabcd&url=3Dhttp%3A%2F%2Fsome.gadget.com&foo=3D=0A= *=0A= * Why do this at all? The only currently known use case for this is=0A= * efficiently including the gadget URL in the auth token. If you = embed=0A= * the entire URL in the security token, you effectively double the = size=0A= * of the URL passed on the gadget rendering request:=0A= * /gadgets/ifr?url=3D#st=3D=0A= *=0A= * This can push the gadget render URL beyond the max length supported=0A= * by browsers, and then things break. To work around this, the=0A= * security token can include only a (much shorter) hash of the = gadget-url:=0A= * /gadgets/ifr?url=3D#st=3D=0A= *=0A= * However, we still want the proxy that handles gadgets.io.makeRequest=0A= * to be able to look up the gadget URL efficiently, without requring=0A= * a database hit. To do that, we modify the auth token here to fill=0A= * in any blank values. The auth token then becomes:=0A= * t=3D&url=3D=0A= *=0A= * We send the expanded auth token in the body of post requests, so we=0A= * don't run into problems with length there. (But people who put=0A= * several hundred characters in their gadget URLs are still lame.)=0A= * @param {Object} urlParams=0A= */=0A= function addParamsToToken(urlParams) {=0A= var args =3D authToken.split('&');=0A= for (var i =3D 0; i < args.length; i++) {=0A= var nameAndValue =3D args[i].split('=3D');=0A= if (nameAndValue.length =3D=3D=3D 2) {=0A= var name =3D nameAndValue[0];=0A= var value =3D nameAndValue[1];=0A= if (value =3D=3D=3D '$') {=0A= value =3D encodeURIComponent(urlParams[name]);=0A= args[i] =3D name + '=3D' + value;=0A= }=0A= }=0A= }=0A= authToken =3D args.join('&');=0A= }=0A= =0A= function init (configuration) {=0A= var urlParams =3D gadgets.util.getUrlParameters();=0A= var config =3D configuration["shindig.auth"] || {};=0A= =0A= // Auth token - might be injected into the gadget directly, or might=0A= // be on the URL (hopefully on the fragment).=0A= if (config.authToken) {=0A= authToken =3D config.authToken;=0A= } else if (urlParams.st) {=0A= authToken =3D urlParams.st;=0A= }=0A= if (authToken !=3D=3D null) {=0A= addParamsToToken(urlParams);=0A= }=0A= =0A= // Trusted JSON. We use eval directly because this was injected by = the=0A= // container server and json parsing is slow in IE.=0A= if (config.trustedJson) {=0A= trusted =3D eval("(" + config.trustedJson + ")");=0A= }=0A= }=0A= =0A= gadgets.config.register("shindig.auth", null, init);=0A= =0A= return /** @scope shindig.auth */ {=0A= =0A= /**=0A= * Gets the auth token.=0A= *=0A= * @return {string} the gadget authentication token=0A= *=0A= * @member shindig.auth=0A= */=0A= getSecurityToken : function() {=0A= return authToken;=0A= },=0A= =0A= /**=0A= * Updates the security token with new data from the gadget server.=0A= *=0A= * @param {string} newToken the new auth token data.=0A= *=0A= * @member shindig.auth=0A= */=0A= updateSecurityToken : function(newToken) {=0A= authToken =3D newToken;=0A= },=0A= =0A= /**=0A= * Quickly retrieves data that is known to have been injected by=0A= * a trusted container server.=0A= * @return {Object}=0A= */=0A= getTrustedData : function() {=0A= return trusted;=0A= }=0A= };=0A= };=0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations=0A= * under the License.=0A= */=0A= =0A= /**=0A= * @fileoverview=0A= *=0A= * Bootstraps auth.js.=0A= */=0A= =0A= shindig.auth =3D new shindig.Auth();=0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations under the = License.=0A= */=0A= =0A= gadgets.rpctx =3D gadgets.rpctx || {};=0A= =0A= /**=0A= * Transport for browsers that support native messaging (various = implementations=0A= * of the HTML5 postMessage method). Officially defined at=0A= * = http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html.=0A= *=0A= * postMessage is a native implementation of XDC. A page registers that=0A= * it would like to receive messages by listening the the "message" event=0A= * on the window (document in DPM) object. In turn, another page can=0A= * raise that event by calling window.postMessage (document.postMessage=0A= * in DPM) with a string representing the message and a string=0A= * indicating on which domain the receiving page must be to receive=0A= * the message. The target page will then have its "message" event raised=0A= * if the domain matches and can, in turn, check the origin of the = message=0A= * and process the data contained within.=0A= *=0A= * wpm: postMessage on the window object.=0A= * - Internet Explorer 8+=0A= * - Safari 4+=0A= * - Chrome 2+=0A= * - Webkit nightlies=0A= * - Firefox 3+=0A= * - Opera 9+=0A= */=0A= if (!gadgets.rpctx.wpm) { // make lib resilient to double-inclusion=0A= =0A= gadgets.rpctx.wpm =3D function() {=0A= var process, ready;=0A= var postMessage;=0A= var pmSync =3D false;=0A= var pmEventDomain =3D false;=0A= var isForceSecure =3D false;=0A= =0A= // Some browsers (IE, Opera) have an implementation of postMessage = that is=0A= // synchronous, although HTML5 specifies that it should be = asynchronous. In=0A= // order to make all browsers behave consistently, we run a small test = to detect=0A= // if postMessage is asynchronous or not. If not, we wrap calls to = postMessage=0A= // in a setTimeout with a timeout of 0.=0A= // Also, Opera's "message" event does not have an "origin" property = (at least,=0A= // it doesn't in version 9.64; presumably, it will in version 10). If=0A= // event.origin does not exist, use event.domain. The other = difference is that=0A= // while event.origin looks like ://:, = event.domain=0A= // consists only of .=0A= //=0A= function testPostMessage() {=0A= var hit =3D false;=0A= =0A= function receiveMsg(event) {=0A= if (event.data =3D=3D "postmessage.test") {=0A= hit =3D true;=0A= if (typeof event.origin =3D=3D=3D "undefined") {=0A= pmEventDomain =3D true;=0A= }=0A= }=0A= }=0A= =0A= gadgets.util.attachBrowserEvent(window, "message", receiveMsg, = false);=0A= window.postMessage("postmessage.test", "*");=0A= =0A= // if 'hit' is true here, then postMessage is synchronous=0A= if (hit) {=0A= pmSync =3D true;=0A= }=0A= =0A= gadgets.util.removeBrowserEvent(window, "message", receiveMsg, = false);=0A= }=0A= =0A= function onmessage(packet) {=0A= var rpc =3D gadgets.json.parse(packet.data);=0A= if (isForceSecure) {=0A= if (!rpc || !rpc.f) {=0A= return;=0A= }=0A= =0A= // for security, check origin against expected value=0A= var origRelay =3D gadgets.rpc.getRelayUrl(rpc.f) ||=0A= gadgets.util.getUrlParameters()["parent"];=0A= var origin =3D gadgets.rpc.getOrigin(origRelay);=0A= if (!pmEventDomain ? packet.origin !=3D=3D origin :=0A= packet.domain !=3D=3D = /^.+:\/\/([^:]+).*/.exec( origin )[1]) {=0A= return;=0A= }=0A= }=0A= process(rpc);=0A= }=0A= =0A= return {=0A= getCode: function() {=0A= return 'wpm';=0A= },=0A= =0A= isParentVerifiable: function() {=0A= return true;=0A= },=0A= =0A= init: function(processFn, readyFn) {=0A= process =3D processFn;=0A= ready =3D readyFn;=0A= =0A= testPostMessage();=0A= if (!pmSync) {=0A= postMessage =3D function(win, msg, origin) {=0A= win.postMessage(msg, origin);=0A= };=0A= } else {=0A= postMessage =3D function(win, msg, origin) {=0A= window.setTimeout( function() {=0A= win.postMessage(msg, origin);=0A= }, 0);=0A= };=0A= }=0A= =0A= // Set up native postMessage handler.=0A= gadgets.util.attachBrowserEvent(window, 'message', onmessage, = false);=0A= =0A= ready('..', true); // Immediately ready to send to parent.=0A= return true;=0A= },=0A= =0A= setup: function(receiverId, token, forceSecure) {=0A= isForceSecure =3D forceSecure;=0A= // If we're a gadget, send an ACK message to indicate to container=0A= // that we're ready to receive messages.=0A= if (receiverId =3D=3D=3D '..') {=0A= if (isForceSecure) {=0A= gadgets.rpc._createRelayIframe(token);=0A= } else {=0A= gadgets.rpc.call(receiverId, gadgets.rpc.ACK);=0A= }=0A= }=0A= return true;=0A= },=0A= =0A= call: function(targetId, from, rpc) {=0A= var targetWin =3D gadgets.rpc._getTargetWin(targetId);=0A= // targetOrigin =3D canonicalized relay URL=0A= var origRelay =3D gadgets.rpc.getRelayUrl(targetId) ||=0A= gadgets.util.getUrlParameters()["parent"];=0A= var origin =3D gadgets.rpc.getOrigin(origRelay);=0A= if (origin) {=0A= postMessage(targetWin, gadgets.json.stringify(rpc), origin);=0A= } else {=0A= gadgets.error("No relay set (used as window.postMessage = targetOrigin)" +=0A= ", cannot send cross-domain message");=0A= }=0A= return true;=0A= },=0A= =0A= relayOnload: function(receiverId, data) {=0A= ready(receiverId, true);=0A= }=0A= };=0A= }();=0A= =0A= } // !end of double-inclusion guard=0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations under the = License.=0A= */=0A= =0A= gadgets.rpctx =3D gadgets.rpctx || {};=0A= =0A= /*=0A= * For Gecko-based browsers, the security model allows a child to call a=0A= * function on the frameElement of the iframe, even if the child is in=0A= * a different domain. This method is dubbed "frameElement" (fe).=0A= *=0A= * The ability to add and call such functions on the frameElement allows=0A= * a bidirectional channel to be setup via the adding of simple function=0A= * references on the frameElement object itself. In this implementation,=0A= * when the container sets up the authentication information for that = gadget=0A= * (by calling setAuth(...)) it as well adds a special function on the=0A= * gadget's iframe. This function can then be used by the gadget to send=0A= * messages to the container. In turn, when the gadget tries to send a=0A= * message, it checks to see if this function has its own function stored=0A= * that can be used by the container to call the gadget. If not, the=0A= * function is created and subsequently used by the container.=0A= * Note that as a result, FE can only be used by a container to call a=0A= * particular gadget *after* that gadget has called the container at=0A= * least once via FE.=0A= *=0A= * fe: Gecko-specific frameElement trick.=0A= * - Firefox 1+=0A= */=0A= if (!gadgets.rpctx.frameElement) { // make lib resilient to = double-inclusion=0A= =0A= gadgets.rpctx.frameElement =3D function() {=0A= // Consts for FrameElement.=0A= var FE_G2C_CHANNEL =3D '__g2c_rpc';=0A= var FE_C2G_CHANNEL =3D '__c2g_rpc';=0A= var process;=0A= var ready;=0A= =0A= function callFrameElement(targetId, from, rpc) {=0A= try {=0A= if (from !=3D=3D '..') {=0A= // Call from gadget to the container.=0A= var fe =3D window.frameElement;=0A= =0A= if (typeof fe[FE_G2C_CHANNEL] =3D=3D=3D 'function') {=0A= // Complete the setup of the FE channel if need be.=0A= if (typeof fe[FE_G2C_CHANNEL][FE_C2G_CHANNEL] !=3D=3D = 'function') {=0A= fe[FE_G2C_CHANNEL][FE_C2G_CHANNEL] =3D function(args) {=0A= process(gadgets.json.parse(args));=0A= };=0A= }=0A= =0A= // Conduct the RPC call.=0A= fe[FE_G2C_CHANNEL](gadgets.json.stringify(rpc));=0A= return true;=0A= }=0A= } else {=0A= // Call from container to gadget[targetId].=0A= var frame =3D document.getElementById(targetId);=0A= =0A= if (typeof frame[FE_G2C_CHANNEL] =3D=3D=3D 'function' &&=0A= typeof frame[FE_G2C_CHANNEL][FE_C2G_CHANNEL] =3D=3D=3D = 'function') {=0A= =0A= // Conduct the RPC call.=0A= = frame[FE_G2C_CHANNEL][FE_C2G_CHANNEL](gadgets.json.stringify(rpc));=0A= return true;=0A= }=0A= }=0A= } catch (e) {=0A= }=0A= return false;=0A= }=0A= =0A= return {=0A= getCode: function() {=0A= return 'fe';=0A= },=0A= =0A= isParentVerifiable: function() {=0A= return false;=0A= },=0A= =0A= init: function(processFn, readyFn) {=0A= // No global setup.=0A= process =3D processFn;=0A= ready =3D readyFn;=0A= return true;=0A= },=0A= =0A= setup: function(receiverId, token) {=0A= // Indicate OK to call to container. This will be true=0A= // by the end of this method.=0A= if (receiverId !=3D=3D '..') {=0A= try {=0A= var frame =3D document.getElementById(receiverId);=0A= frame[FE_G2C_CHANNEL] =3D function(args) {=0A= process(gadgets.json.parse(args));=0A= };=0A= } catch (e) {=0A= return false;=0A= }=0A= }=0A= if (receiverId =3D=3D=3D '..') {=0A= ready('..', true);=0A= var ackFn =3D function() {=0A= window.setTimeout(function() {=0A= gadgets.rpc.call(receiverId, gadgets.rpc.ACK);=0A= }, 500);=0A= };=0A= // Setup to container always happens before onload.=0A= // If it didn't, the correct fix would be in gadgets.util.=0A= gadgets.util.registerOnLoadHandler(ackFn);=0A= }=0A= return true;=0A= },=0A= =0A= call: function(targetId, from, rpc) {=0A= return callFrameElement(targetId, from, rpc);=0A= } =0A= =0A= };=0A= }();=0A= =0A= } // !end of double-inclusion guard=0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations under the = License.=0A= */=0A= =0A= gadgets.rpctx =3D gadgets.rpctx || {};=0A= =0A= /**=0A= * For Internet Explorer before version 8, the security model allows = anyone=0A= * parent to set the value of the "opener" property on another window,=0A= * with only the receiving window able to read it.=0A= * This method is dubbed "Native IE XDC" (NIX).=0A= *=0A= * This method works by placing a handler object in the "opener" property=0A= * of a gadget when the container sets up the authentication information=0A= * for that gadget (by calling setAuthToken(...)). At that point, a NIX=0A= * wrapper is created and placed into the gadget by calling=0A= * theframe.contentWindow.opener =3D wrapper. Note that as a result, NIX = can=0A= * only be used by a container to call a particular gadget *after* that=0A= * gadget has called the container at least once via NIX.=0A= *=0A= * The NIX wrappers in this RPC implementation are instances of a = VBScript=0A= * class that is created when this implementation loads. The reason for=0A= * using a VBScript class stems from the fact that any object can be = passed=0A= * into the opener property.=0A= * While this is a good thing, as it lets us pass functions and setup a = true=0A= * bidirectional channel via callbacks, it opens a potential security = hole=0A= * by which the other page can get ahold of the "window" or "document"=0A= * objects in the parent page and in turn wreak havok. This is due to the=0A= * fact that any JS object useful for establishing such a bidirectional=0A= * channel (such as a function) can be used to access a function=0A= * (eg. obj.toString, or a function itself) created in a specific = context,=0A= * in particular the global context of the sender. Suppose container=0A= * domain C passes object obj to gadget on domain G. Then the gadget can=0A= * access C's global context using:=0A= * var parentWindow =3D (new obj.toString.constructor("return = window;"))();=0A= * Nulling out all of obj's properties doesn't fix this, since IE = helpfully=0A= * restores them to their original values if you do something like:=0A= * delete obj.toString; delete obj.toString;=0A= * Thus, we wrap the necessary functions and information inside a = VBScript=0A= * object. VBScript objects in IE, like DOM objects, are in fact COM=0A= * wrappers when used in JavaScript, so we can safely pass them around=0A= * without worrying about a breach of context while at the same time=0A= * allowing them to act as a pass-through mechanism for information=0A= * and function calls. The implementation details of this VBScript = wrapper=0A= * can be found in the setupChannel() method below.=0A= *=0A= * nix: Internet Explorer-specific window.opener trick.=0A= * - Internet Explorer 6=0A= * - Internet Explorer 7=0A= */=0A= if (!gadgets.rpctx.nix) { // make lib resilient to double-inclusion=0A= =0A= gadgets.rpctx.nix =3D function() {=0A= // Consts for NIX. VBScript doesn't=0A= // allow items to start with _ for some reason,=0A= // so we need to make these names quite unique, as=0A= // they will go into the global namespace.=0A= var NIX_WRAPPER =3D 'GRPC____NIXVBS_wrapper';=0A= var NIX_GET_WRAPPER =3D 'GRPC____NIXVBS_get_wrapper';=0A= var NIX_HANDLE_MESSAGE =3D 'GRPC____NIXVBS_handle_message';=0A= var NIX_CREATE_CHANNEL =3D 'GRPC____NIXVBS_create_channel';=0A= var MAX_NIX_SEARCHES =3D 10;=0A= var NIX_SEARCH_PERIOD =3D 500;=0A= =0A= // JavaScript reference to the NIX VBScript wrappers.=0A= // Gadgets will have but a single channel under=0A= // nix_channels['..'] while containers will have a channel=0A= // per gadget stored under the gadget's ID.=0A= var nix_channels =3D {};=0A= var isForceSecure =3D {};=0A= =0A= // Store the ready signal method for use on handshake complete.=0A= var ready;=0A= var numHandlerSearches =3D 0;=0A= =0A= // Search for NIX handler to parent. Tries MAX_NIX_SEARCHES times every=0A= // NIX_SEARCH_PERIOD milliseconds.=0A= function conductHandlerSearch() {=0A= // Call from gadget to the container.=0A= var handler =3D nix_channels['..'];=0A= if (handler) {=0A= return;=0A= }=0A= =0A= if (++numHandlerSearches > MAX_NIX_SEARCHES) {=0A= // Handshake failed. Will fall back.=0A= gadgets.warn('Nix transport setup failed, falling back...');=0A= ready('..', false);=0A= return;=0A= }=0A= =0A= // If the gadget has yet to retrieve a reference to=0A= // the NIX handler, try to do so now. We don't do a=0A= // typeof(window.opener.GetAuthToken) check here=0A= // because it means accessing that field on the COM object, which,=0A= // being an internal function reference, is not allowed.=0A= // "in" works because it merely checks for the prescence of=0A= // the key, rather than actually accessing the object's property.=0A= // This is just a sanity check, not a validity check.=0A= if (!handler && window.opener && "GetAuthToken" in window.opener) {=0A= handler =3D window.opener;=0A= =0A= // Create the channel to the parent/container.=0A= // First verify that it knows our auth token to ensure it's not=0A= // an impostor.=0A= if (handler.GetAuthToken() =3D=3D gadgets.rpc.getAuthToken('..')) {=0A= // Auth match - pass it back along with our wrapper to finish.=0A= // own wrapper and our authentication token for co-verification.=0A= var token =3D gadgets.rpc.getAuthToken('..');=0A= handler.CreateChannel(window[NIX_GET_WRAPPER]('..', token),=0A= token);=0A= // Set channel handler=0A= nix_channels['..'] =3D handler;=0A= window.opener =3D null;=0A= =0A= // Signal success and readiness to send to parent.=0A= // Container-to-gadget bit flipped in CreateChannel.=0A= ready('..', true);=0A= return;=0A= }=0A= }=0A= =0A= // Try again.=0A= window.setTimeout(function() { conductHandlerSearch(); },=0A= NIX_SEARCH_PERIOD);=0A= }=0A= =0A= // Returns current window location, without hash values=0A= function getLocationNoHash() {=0A= var loc =3D window.location.href;=0A= var idx =3D loc.indexOf('#');=0A= if (idx =3D=3D -1) {=0A= return loc;=0A= }=0A= return loc.substring(0, idx);=0A= }=0A= =0A= // When "forcesecure" is set to true, use the relay file and a simple = variant of IFPC to first=0A= // authenticate the container and gadget with each other. Once that = is done, then initialize=0A= // the NIX protocol. =0A= function setupSecureRelayToParent(rpctoken) {=0A= // To the parent, transmit the child's URL, the passed in auth=0A= // token, and another token generated by the child.=0A= var childToken =3D (0x7FFFFFFF * Math.random()) | 0; // TODO = expose way to have child set this value=0A= var data =3D [=0A= getLocationNoHash(),=0A= childToken=0A= ];=0A= gadgets.rpc._createRelayIframe(rpctoken, data);=0A= =0A= // listen for response from parent=0A= var hash =3D window.location.href.split('#')[1] || '';=0A= =0A= function relayTimer() {=0A= var newHash =3D window.location.href.split('#')[1] || '';=0A= if (newHash !=3D=3D hash) {=0A= clearInterval(relayTimerId);=0A= var params =3D = gadgets.util.getUrlParameters(window.location.href);=0A= if (params.childtoken =3D=3D childToken) {=0A= // parent has been authenticated; now init NIX=0A= conductHandlerSearch();=0A= return;=0A= }=0A= // security error -- token didn't match=0A= ready('..', false);=0A= }=0A= }=0A= var relayTimerId =3D setInterval( relayTimer, 100 );=0A= }=0A= =0A= return {=0A= getCode: function() {=0A= return 'nix';=0A= },=0A= =0A= isParentVerifiable: function(opt_receiverId) {=0A= // NIX is only parent verifiable if a receiver was setup with = "forcesecure" set to TRUE.=0A= if (opt_receiverId) {=0A= return isForceSecure[opt_receiverId];=0A= }=0A= return false;=0A= },=0A= =0A= init: function(processFn, readyFn) {=0A= ready =3D readyFn;=0A= =0A= // Ensure VBScript wrapper code is in the page and that the=0A= // global Javascript handlers have been set.=0A= // VBScript methods return a type of 'unknown' when=0A= // checked via the typeof operator in IE. Fortunately=0A= // for us, this only applies to COM objects, so we=0A= // won't see this for a real Javascript object.=0A= if (typeof window[NIX_GET_WRAPPER] !=3D=3D 'unknown') {=0A= window[NIX_HANDLE_MESSAGE] =3D function(data) {=0A= window.setTimeout(=0A= function() { processFn(gadgets.json.parse(data)); }, 0);=0A= };=0A= =0A= window[NIX_CREATE_CHANNEL] =3D function(name, channel, token) {=0A= // Verify the authentication token of the gadget trying=0A= // to create a channel for us.=0A= if (gadgets.rpc.getAuthToken(name) =3D=3D=3D token) {=0A= nix_channels[name] =3D channel;=0A= ready(name, true);=0A= }=0A= };=0A= =0A= // Inject the VBScript code needed.=0A= var vbscript =3D=0A= // We create a class to act as a wrapper for=0A= // a Javascript call, to prevent a break in of=0A= // the context.=0A= 'Class ' + NIX_WRAPPER + '\n '=0A= =0A= // An internal member for keeping track of the=0A= // name of the document (container or gadget)=0A= // for which this wrapper is intended. For=0A= // those wrappers created by gadgets, this is not=0A= // used (although it is set to "..")=0A= + 'Private m_Intended\n'=0A= =0A= // Stores the auth token used to communicate with=0A= // the gadget. The GetChannelCreator method returns=0A= // an object that returns this auth token. Upon matching=0A= // that with its own, the gadget uses the object=0A= // to actually establish the communication channel.=0A= + 'Private m_Auth\n'=0A= =0A= // Method for internally setting the value=0A= // of the m_Intended property.=0A= + 'Public Sub SetIntendedName(name)\n '=0A= + 'If isEmpty(m_Intended) Then\n'=0A= + 'm_Intended =3D name\n'=0A= + 'End If\n'=0A= + 'End Sub\n'=0A= =0A= // Method for internally setting the value of the m_Auth = property.=0A= + 'Public Sub SetAuth(auth)\n '=0A= + 'If isEmpty(m_Auth) Then\n'=0A= + 'm_Auth =3D auth\n'=0A= + 'End If\n'=0A= + 'End Sub\n'=0A= =0A= // A wrapper method which actually causes a=0A= // message to be sent to the other context.=0A= + 'Public Sub SendMessage(data)\n '=0A= + NIX_HANDLE_MESSAGE + '(data)\n'=0A= + 'End Sub\n'=0A= =0A= // Returns the auth token to the gadget, so it can=0A= // confirm a match before initiating the connection=0A= + 'Public Function GetAuthToken()\n '=0A= + 'GetAuthToken =3D m_Auth\n'=0A= + 'End Function\n'=0A= =0A= // Method for setting up the container->gadget=0A= // channel. Not strictly needed in the gadget's=0A= // wrapper, but no reason to get rid of it. Note here=0A= // that we pass the intended name to the NIX_CREATE_CHANNEL=0A= // method so that it can save the channel in the proper place=0A= // *and* verify the channel via the authentication token passed=0A= // here.=0A= + 'Public Sub CreateChannel(channel, auth)\n '=0A= + 'Call ' + NIX_CREATE_CHANNEL + '(m_Intended, channel, = auth)\n'=0A= + 'End Sub\n'=0A= + 'End Class\n'=0A= =0A= // Function to get a reference to the wrapper.=0A= + 'Function ' + NIX_GET_WRAPPER + '(name, auth)\n'=0A= + 'Dim wrap\n'=0A= + 'Set wrap =3D New ' + NIX_WRAPPER + '\n'=0A= + 'wrap.SetIntendedName name\n'=0A= + 'wrap.SetAuth auth\n'=0A= + 'Set ' + NIX_GET_WRAPPER + ' =3D wrap\n'=0A= + 'End Function';=0A= =0A= try {=0A= window.execScript(vbscript, 'vbscript');=0A= } catch (e) {=0A= return false;=0A= }=0A= }=0A= return true;=0A= },=0A= =0A= setup: function(receiverId, token, forcesecure) {=0A= isForceSecure[receiverId] =3D !!forcesecure;=0A= if (receiverId =3D=3D=3D '..') {=0A= if (forcesecure) {=0A= setupSecureRelayToParent(token);=0A= } else {=0A= conductHandlerSearch();=0A= }=0A= return true;=0A= }=0A= try {=0A= var frame =3D document.getElementById(receiverId);=0A= var wrapper =3D window[NIX_GET_WRAPPER](receiverId, token);=0A= frame.contentWindow.opener =3D wrapper;=0A= } catch (e) {=0A= return false;=0A= }=0A= return true;=0A= },=0A= =0A= call: function(targetId, from, rpc) {=0A= try {=0A= // If we have a handler, call it.=0A= if (nix_channels[targetId]) {=0A= = nix_channels[targetId].SendMessage(gadgets.json.stringify(rpc));=0A= }=0A= } catch (e) {=0A= return false;=0A= }=0A= return true;=0A= },=0A= =0A= // data =3D [child URL, child auth token]=0A= relayOnload: function(receiverId, data) {=0A= // transmit childtoken back to child to complete authentication=0A= var src =3D data[0] + '#childtoken=3D' + data[1];=0A= var childIframe =3D document.getElementById(receiverId);=0A= childIframe.src =3D src;=0A= }=0A= };=0A= }();=0A= =0A= } // !end of double-inclusion guard=0A= ;=0A= /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the = License. */ gadgets.rpctx =3D gadgets.rpctx || {}; /** * Transport for browsers that utilizes a small Flash bridge and * Flash's ExternalInterface methods to transport messages securely, * and with guarantees provided on sender identity. This largely = emulates wpm. * * flash: postMessage on the window object. * - Internet Explorer 6/7 * - In theory, any browser supporting Flash 8 and above, * though embed code is tailored to IE only to reduce size. * + (window.postMessage takes precedence where available) */ if (!gadgets.rpctx.flash) { // make lib resilient to double-inclusion gadgets.rpctx.flash =3D function() { var swfId =3D '___xpcswf'; var swfUrl =3D null; var usingFlash =3D false; var processFn =3D null; var readyFn =3D null; var relayHandle =3D null; var LOADER_TIMEOUT_MS =3D 100; var MAX_LOADER_RETRIES =3D 50; var pendingHandshakes =3D []; var setupHandle =3D null; var setupAttempts =3D 0; var SWF_CHANNEL_READY =3D '_scr'; var SWF_CONFIRMED_PARENT =3D '_pnt'; var READY_TIMEOUT_MS =3D 100; var MAX_READY_RETRIES =3D 50; var readyAttempts =3D 0; var readyHandle =3D null; var readyMsgs =3D {}; var myLoc =3D window.location.protocol + '//' + = window.location.host; var JSL_NS =3D '___jsl'; var METHODS_NS =3D '_fm'; var bucketNs; function setupMethodBucket() { window[JSL_NS] =3D window[JSL_NS] || {}; var container =3D window[JSL_NS]; var bucket =3D container[METHODS_NS] =3D {}; bucketNs =3D JSL_NS + '.' + METHODS_NS; return bucket; } var methodBucket =3D setupMethodBucket(); function exportMethod(method, requestedName) { var exported =3D function() { method.apply({}, arguments); }; methodBucket[requestedName] =3D methodBucket[requestedName] || = exported; return bucketNs + '.' + requestedName; } function getChannelId(receiverId) { return receiverId =3D=3D=3D '..' ? gadgets.rpc.RPC_ID : = receiverId; } function getRoleId(targetId) { return targetId =3D=3D=3D '..' ? 'INNER' : 'OUTER'; } function init(config) { if (usingFlash) { swfUrl =3D config['rpc']['commSwf'] || = '//xpc.googleusercontent.com/gadgets/xpc.swf'; } } gadgets.config.register('rpc', null, init); function relayLoader() { if (relayHandle =3D=3D=3D null && document.body && swfUrl) { var theSwf =3D swfUrl + '?cb=3D' + Math.random() + '&origin=3D' = + myLoc + '&jsl=3D1'; var containerDiv =3D document.createElement('div'); containerDiv.style.height =3D '1px'; containerDiv.style.width =3D '1px'; var html =3D '' + '' + '' + '' + ''; document.body.appendChild(containerDiv); containerDiv.innerHTML =3D html; relayHandle =3D containerDiv.firstChild; } ++setupAttempts; if (setupHandle !=3D=3D null && (relayHandle !=3D=3D null || setupAttempts >=3D = MAX_LOADER_RETRIES)) { window.clearTimeout(setupHandle); } else { // Either document.body doesn't yet exist or config doesn't. // In either case the relay handle isn't set up properly yet, = and // so should be retried. setupHandle =3D window.setTimeout(relayLoader, = LOADER_TIMEOUT_MS); } } function childReadyPoller() { // Attempt sending a message to parent indicating that child is = ready // to receive messages. This only occurs after the SWF indicates = that // its setup() method has been successfully called and completed, = and // only in child context. if (readyMsgs['..']) return; sendChannelReady('..'); readyAttempts++; if (readyAttempts >=3D MAX_READY_RETRIES && readyHandle !=3D=3D = null) { window.clearTimeout(readyHandle); readyHandle =3D null; } else { // Try again later. The handle will be cleared during receipt of // the setup ACK. readyHandle =3D window.setTimeout(childReadyPoller, = READY_TIMEOUT_MS); } } function flushHandshakes() { if (relayHandle !=3D=3D null && relayHandle['setup']) { while (pendingHandshakes.length > 0) { var shake =3D pendingHandshakes.shift(); var targetId =3D shake.targetId; relayHandle['setup'](shake.token, getChannelId(targetId), = getRoleId(targetId)); } } } function ready() { flushHandshakes(); if (setupHandle !=3D=3D null) { window.clearTimeout(setupHandle); } setupHandle =3D null; } exportMethod(ready, 'ready'); function setupDone() { // Called by SWF only for role_id =3D "INNER" ie when initializing = to parent. // Instantiates a polling handshake mechanism which ensures that = any enqueued // messages remain so until each side is ready to send. if (!readyMsgs['..'] && readyHandle =3D=3D=3D null) { readyHandle =3D window.setTimeout(childReadyPoller, = READY_TIMEOUT_MS); } } exportMethod(setupDone, 'setupDone'); function call(targetId, from, rpc) { var targetOrigin =3D gadgets.rpc.getTargetOrigin(targetId); var rpcKey =3D gadgets.rpc.getAuthToken(targetId); var handleKey =3D 'sendMessage_' + getChannelId(targetId) + '_' + = rpcKey + '_' + getRoleId(targetId); var messageHandler =3D relayHandle[handleKey]; messageHandler.call(relayHandle, gadgets.json.stringify(rpc), = targetOrigin); return true; } function receiveMessage(message, fromOrigin, toOrigin) { var jsonMsg =3D gadgets.json.parse(message); var channelReady =3D jsonMsg[SWF_CHANNEL_READY]; if (channelReady) { // Special message indicating that a ready message has been = received, indicating // the sender is now prepared to receive messages. This type of = message is instigated // by child context in polling fashion, and is responded-to by = parent context(s). // If readyHandle is non-null, then it should first be cleared. // This method is OK to call twice, if it occurs in a race. readyFn(channelReady, true); readyMsgs[channelReady] =3D true; if (channelReady !=3D=3D '..') { // Child-to-parent: immediately signal that parent is ready. // Now that we know that child can receive messages, it's = enough to send once. sendChannelReady(channelReady, true); } return; } window.setTimeout(function() { processFn(jsonMsg, fromOrigin); }, = 0); } exportMethod(receiveMessage, 'receiveMessage'); function sendChannelReady(receiverId, opt_isParentConfirmation) { var myId =3D gadgets.rpc.RPC_ID; var readyAck =3D {}; readyAck[SWF_CHANNEL_READY] =3D opt_isParentConfirmation ? '..' : = myId; readyAck[SWF_CONFIRMED_PARENT] =3D myId; call(receiverId, myId, readyAck); } return { // "core" transport methods getCode: function() { return 'flash'; }, isParentVerifiable: function() { return true; }, init: function(processIn, readyIn) { processFn =3D processIn; readyFn =3D readyIn; usingFlash =3D true; return true; }, setup: function(receiverId, token) { // Perform all setup, including embedding of relay SWF (a = one-time // per Window operation), in this method. We cannot assume = document.body // exists however, since child-to-parent setup is often done in = head. // Thus we simply enqueue a setup pair and attempt to complete = them all. // If body already exists then this enqueueing will immediately = flush; // otherwise polling will occur until the SWF has completed = loading, at // which point all connections will complete their handshake. pendingHandshakes.push({ token: token, targetId: receiverId }); if (relayHandle =3D=3D=3D null && setupHandle =3D=3D=3D null) { setupHandle =3D window.setTimeout(relayLoader, = LOADER_TIMEOUT_MS); } return true; }, call: call, // Methods called by relay SWF. Should be considered private. _receiveMessage: receiveMessage, _ready: ready, _setupDone: setupDone }; }(); } // !end of double-inclusion guard ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations under the = License.=0A= */=0A= =0A= gadgets.rpctx =3D gadgets.rpctx || {};=0A= =0A= /*=0A= * For older WebKit-based browsers, the security model does not allow = for any=0A= * known "native" hacks for conducting cross browser communication. = However,=0A= * a variation of the IFPC (see below) can be used, entitled "RMR". RMR = is=0A= * a technique that uses the resize event of the iframe to indicate that = a=0A= * message was sent (instead of the much slower/performance heavy polling=0A= * technique used when a defined relay page is not avaliable). Simply = put,=0A= * RMR uses the same "pass the message by the URL hash" trick that IFPC=0A= * uses to send a message, but instead of having an active relay page = that=0A= * runs a piece of code when it is loaded, RMR merely changes the URL=0A= * of the relay page (which does not even have to exist on the domain)=0A= * and then notifies the other party by resizing the relay iframe. RMR=0A= * exploits the fact that iframes in the dom of page A can be resized=0A= * by page A while the onresize event will be fired in the DOM of page B,=0A= * thus providing a single bit channel indicating "message sent to you".=0A= * This method has the added benefit that the relay need not be active,=0A= * nor even exist: a 404 suffices just as well.=0A= *=0A= * rmr: WebKit-specific resizing trick.=0A= * - Safari 2+=0A= * - Chrome 1=0A= */=0A= if (!gadgets.rpctx.rmr) { // make lib resilient to double-inclusion=0A= =0A= gadgets.rpctx.rmr =3D function() {=0A= // Consts for RMR, including time in ms RMR uses to poll for=0A= // its relay frame to be created, and the max # of polls it does.=0A= var RMR_SEARCH_TIMEOUT =3D 500;=0A= var RMR_MAX_POLLS =3D 10;=0A= =0A= // JavaScript references to the channel objects used by RMR.=0A= // Gadgets will have but a single channel under=0A= // rmr_channels['..'] while containers will have a channel=0A= // per gadget stored under the gadget's ID.=0A= var rmr_channels =3D {};=0A= =0A= var process;=0A= var ready;=0A= =0A= /**=0A= * Append an RMR relay frame to the document. This allows the receiver=0A= * to start receiving messages.=0A= *=0A= * @param {Node} channelFrame Relay frame to add to the DOM body.=0A= * @param {string} relayUri Base URI for the frame.=0A= * @param {string} data to pass along to the frame.=0A= * @param {string=3D} opt_frameId ID of frame for which relay is being = appended (optional).=0A= */=0A= function appendRmrFrame(channelFrame, relayUri, data, opt_frameId) {=0A= var appendFn =3D function() {=0A= // Append the iframe.=0A= document.body.appendChild(channelFrame);=0A= =0A= // Set the src of the iframe to 'about:blank' first and then set it=0A= // to the relay URI. This prevents the iframe from maintaining a = src=0A= // to the 'old' relay URI if the page is returned to from another.=0A= // In other words, this fixes the bfcache issue that causes the = iframe's=0A= // src property to not be updated despite us assigning it a new = value here.=0A= channelFrame.src =3D 'about:blank';=0A= if (opt_frameId) {=0A= // Process the initial sent payload (typically sent by container = to=0A= // child/gadget) only when the relay frame has finished loading. = We=0A= // do this to ensure that, in processRmrData(...), the ACK sent = due=0A= // to processing can actually be sent. Before this time, the = frame's=0A= // contentWindow is null, making it impossible to do so.=0A= channelFrame.onload =3D function() {=0A= processRmrData(opt_frameId);=0A= };=0A= }=0A= channelFrame.src =3D relayUri + '#' + data;=0A= };=0A= =0A= if (document.body) {=0A= appendFn();=0A= } else {=0A= // Common gadget case: attaching header during in-gadget handshake,=0A= // when we may still be in script in head. Attach onload.=0A= gadgets.util.registerOnLoadHandler(function() { appendFn(); });=0A= }=0A= }=0A= =0A= /**=0A= * Sets up the RMR transport frame for the given frameId. For gadgets=0A= * calling containers, the frameId should be '..'.=0A= *=0A= * @param {string} frameId The ID of the frame.=0A= */=0A= function setupRmr(frameId) {=0A= if (typeof rmr_channels[frameId] =3D=3D=3D "object") {=0A= // Sanity check. Already done.=0A= return;=0A= }=0A= =0A= var channelFrame =3D document.createElement('iframe');=0A= var frameStyle =3D channelFrame.style;=0A= frameStyle.position =3D 'absolute';=0A= frameStyle.top =3D '0px';=0A= frameStyle.border =3D '0';=0A= frameStyle.opacity =3D '0';=0A= =0A= // The width here is important as RMR=0A= // makes use of the resize handler for the frame.=0A= // Do not modify unless you test thoroughly!=0A= frameStyle.width =3D '10px';=0A= frameStyle.height =3D '1px';=0A= channelFrame.id =3D 'rmrtransport-' + frameId;=0A= channelFrame.name =3D channelFrame.id;=0A= =0A= // Use the explicitly set relay, if one exists. Otherwise,=0A= // Construct one using the parent parameter plus robots.txt=0A= // as a synthetic relay. This works since browsers using RMR=0A= // treat 404s as legitimate for the purposes of cross domain=0A= // communication.=0A= var relayUri =3D gadgets.rpc.getRelayUrl(frameId);=0A= if (!relayUri) {=0A= relayUri =3D=0A= = gadgets.rpc.getOrigin(gadgets.util.getUrlParameters()["parent"]) +=0A= '/robots.txt';=0A= }=0A= =0A= rmr_channels[frameId] =3D {=0A= frame: channelFrame,=0A= receiveWindow: null,=0A= relayUri: relayUri,=0A= searchCounter : 0,=0A= width: 10,=0A= =0A= // Waiting means "waiting for acknowledgement to be received."=0A= // Acknowledgement always comes as a special ACK=0A= // message having been received. This message is received=0A= // during handshake in different ways by the container and=0A= // gadget, and by normal RMR message passing once the handshake=0A= // is complete.=0A= waiting: true,=0A= queue: [],=0A= =0A= // Number of non-ACK messages that have been sent to the recipient=0A= // and have been acknowledged.=0A= sendId: 0,=0A= =0A= // Number of messages received and processed from the sender.=0A= // This is the number that accompanies every ACK to tell the=0A= // sender to clear its queue.=0A= recvId: 0=0A= };=0A= =0A= if (frameId !=3D=3D '..') {=0A= // Container always appends a relay to the gadget, before=0A= // the gadget appends its own relay back to container. The=0A= // gadget, in the meantime, refuses to attach the container=0A= // relay until it finds this one. Thus, the container knows=0A= // for certain that gadget to container communication is set=0A= // up by the time it finds its own relay. In addition to=0A= // establishing a reliable handshake protocol, this also=0A= // makes it possible for the gadget to send an initial batch=0A= // of messages to the container ASAP.=0A= appendRmrFrame(channelFrame, relayUri, getRmrData(frameId));=0A= }=0A= =0A= // Start searching for our own frame on the other page.=0A= conductRmrSearch(frameId);=0A= }=0A= =0A= /**=0A= * Searches for a relay frame, created by the sender referenced by=0A= * frameId, with which this context receives messages. Once=0A= * found with proper permissions, attaches a resize handler which=0A= * signals messages to be sent.=0A= *=0A= * @param {string} frameId Frame ID of the prospective sender.=0A= */=0A= function conductRmrSearch(frameId) {=0A= var channelWindow =3D null;=0A= =0A= // Increment the search counter.=0A= rmr_channels[frameId].searchCounter++;=0A= =0A= try {=0A= var targetWin =3D gadgets.rpc._getTargetWin(frameId);=0A= if (frameId =3D=3D=3D '..') {=0A= // We are a gadget.=0A= channelWindow =3D targetWin.frames['rmrtransport-' + = gadgets.rpc.RPC_ID];=0A= } else {=0A= // We are a container.=0A= channelWindow =3D targetWin.frames['rmrtransport-..'];=0A= }=0A= } catch (e) {=0A= // Just in case; may happen when relay is set to about:blank or = unset.=0A= // Catching exceptions here ensures that the timeout to continue = the=0A= // search below continues to work.=0A= }=0A= =0A= var status =3D false;=0A= =0A= if (channelWindow) {=0A= // We have a valid reference to "our" RMR transport frame.=0A= // Register the proper event handlers.=0A= status =3D registerRmrChannel(frameId, channelWindow);=0A= }=0A= =0A= if (!status) {=0A= // Not found yet. Continue searching, but only if the counter=0A= // has not reached the threshold.=0A= if (rmr_channels[frameId].searchCounter > RMR_MAX_POLLS) {=0A= // If we reach this point, then RMR has failed and we=0A= // fall back to IFPC.=0A= return;=0A= }=0A= =0A= window.setTimeout(function() {=0A= conductRmrSearch(frameId);=0A= }, RMR_SEARCH_TIMEOUT);=0A= }=0A= }=0A= =0A= /**=0A= * Attempts to conduct an RPC call to the specified=0A= * target with the specified data via the RMR=0A= * method. If this method fails, the system attempts again=0A= * using the known default of IFPC.=0A= *=0A= * @param {string} targetId Module Id of the RPC service provider.=0A= * @param {string} serviceName Name of the service to call.=0A= * @param {string} from Module Id of the calling provider.=0A= * @param {Object} rpc The RPC data for this call.=0A= */=0A= function callRmr(targetId, serviceName, from, rpc) {=0A= var handler =3D null;=0A= =0A= if (from !=3D=3D '..') {=0A= // Call from gadget to the container.=0A= handler =3D rmr_channels['..'];=0A= } else {=0A= // Call from container to the gadget.=0A= handler =3D rmr_channels[targetId];=0A= }=0A= =0A= if (handler) {=0A= // Queue the current message if not ACK.=0A= // ACK is always sent through getRmrData(...).=0A= if (serviceName !=3D=3D gadgets.rpc.ACK) {=0A= handler.queue.push(rpc);=0A= }=0A= =0A= if (handler.waiting ||=0A= (handler.queue.length =3D=3D=3D 0 &&=0A= !(serviceName =3D=3D=3D gadgets.rpc.ACK && rpc && = rpc.ackAlone =3D=3D=3D true))) {=0A= // If we are awaiting a response from any previously-sent = messages,=0A= // or if we don't have anything new to send, just return.=0A= // Note that we don't short-return if we're ACKing just-received=0A= // messages.=0A= return true;=0A= }=0A= =0A= if (handler.queue.length > 0) {=0A= handler.waiting =3D true;=0A= }=0A= =0A= var url =3D handler.relayUri + "#" + getRmrData(targetId);=0A= =0A= try {=0A= // Update the URL with the message.=0A= handler.frame.contentWindow.location =3D url;=0A= =0A= // Resize the frame.=0A= var newWidth =3D handler.width =3D=3D 10 ? 20 : 10;=0A= handler.frame.style.width =3D newWidth + 'px';=0A= handler.width =3D newWidth;=0A= =0A= // Done!=0A= } catch (e) {=0A= // Something about location-setting or resizing failed.=0A= // This should never happen, but if it does, fall back to=0A= // the default transport.=0A= return false;=0A= }=0A= }=0A= =0A= return true;=0A= }=0A= =0A= /**=0A= * Returns as a string the data to be appended to an RMR relay frame,=0A= * constructed from the current request queue plus an ACK message = indicating=0A= * the currently latest-processed message ID.=0A= *=0A= * @param {string} toFrameId Frame whose sendable queued data to = retrieve.=0A= */=0A= function getRmrData(toFrameId) {=0A= var channel =3D rmr_channels[toFrameId];=0A= var rmrData =3D {id: channel.sendId};=0A= if (channel) {=0A= rmrData.d =3D Array.prototype.slice.call(channel.queue, 0);=0A= rmrData.d.push({s:gadgets.rpc.ACK, id:channel.recvId});=0A= }=0A= return gadgets.json.stringify(rmrData);=0A= }=0A= =0A= /**=0A= * Retrieve data from the channel keyed by the given frameId,=0A= * processing it as a batch. All processed data is assumed to have been=0A= * generated by getRmrData(...), pairing that method with this.=0A= *=0A= * @param {string} fromFrameId Frame from which data is being = retrieved.=0A= */=0A= function processRmrData(fromFrameId) {=0A= var channel =3D rmr_channels[fromFrameId];=0A= var data =3D channel.receiveWindow.location.hash.substring(1);=0A= =0A= // Decode the RPC object array.=0A= var rpcObj =3D gadgets.json.parse(decodeURIComponent(data)) || {};=0A= var rpcArray =3D rpcObj.d || [];=0A= =0A= var nonAckReceived =3D false;=0A= var noLongerWaiting =3D false;=0A= =0A= var numBypassed =3D 0;=0A= var numToBypass =3D (channel.recvId - rpcObj.id);=0A= for (var i =3D 0; i < rpcArray.length; ++i) {=0A= var rpc =3D rpcArray[i];=0A= =0A= // If we receive an ACK message, then mark the current=0A= // handler as no longer waiting and send out the next=0A= // queued message.=0A= if (rpc.s =3D=3D=3D gadgets.rpc.ACK) {=0A= // ACK received - whether this came from a handshake or=0A= // an active call, in either case it indicates readiness to=0A= // send messages to the from frame.=0A= ready(fromFrameId, true);=0A= =0A= if (channel.waiting) {=0A= noLongerWaiting =3D true;=0A= }=0A= =0A= channel.waiting =3D false;=0A= var newlyAcked =3D Math.max(0, rpc.id - channel.sendId);=0A= channel.queue.splice(0, newlyAcked);=0A= channel.sendId =3D Math.max(channel.sendId, rpc.id || 0);=0A= continue;=0A= }=0A= =0A= // If we get here, we've received > 0 non-ACK messages to=0A= // process. Indicate this bit for later.=0A= nonAckReceived =3D true;=0A= =0A= // Bypass any messages already received.=0A= if (++numBypassed <=3D numToBypass) {=0A= continue;=0A= }=0A= =0A= ++channel.recvId;=0A= process(rpc); // actually dispatch the message=0A= }=0A= =0A= // Send an ACK indicating that we got/processed the message(s).=0A= // Do so if we've received a message to process or if we were waiting=0A= // before but a received ACK has cleared our waiting bit, and we have=0A= // more messages to send. Performing this operation causes additional=0A= // messages to be sent.=0A= if (nonAckReceived ||=0A= (noLongerWaiting && channel.queue.length > 0)) {=0A= var from =3D (fromFrameId =3D=3D=3D '..') ? gadgets.rpc.RPC_ID : = '..';=0A= callRmr(fromFrameId, gadgets.rpc.ACK, from, {ackAlone: = nonAckReceived});=0A= }=0A= }=0A= =0A= /**=0A= * Registers the RMR channel handler for the given frameId and = associated=0A= * channel window.=0A= *=0A= * @param {string} frameId The ID of the frame for which this channel = is being=0A= * registered.=0A= * @param {Object} channelWindow The window of the receive frame for = this=0A= * channel, if any.=0A= *=0A= * @return {boolean} True if the frame was setup successfully, false=0A= * otherwise.=0A= */=0A= function registerRmrChannel(frameId, channelWindow) {=0A= var channel =3D rmr_channels[frameId];=0A= =0A= // Verify that the channel is ready for receiving.=0A= try {=0A= var canAccess =3D false;=0A= =0A= // Check to see if the document is in the window. For Chrome, this=0A= // will return 'false' if the channelWindow is inaccessible by this=0A= // piece of JavaScript code, meaning that the URL of the = channelWindow's=0A= // parent iframe has not yet changed from 'about:blank'. We do this=0A= // check this way because any true *access* on the channelWindow = object=0A= // will raise a security exception, which, despite the try-catch, = still=0A= // gets reported to the debugger (it does not break execution, the = try=0A= // handles that problem, but it is still reported, which is bad = form).=0A= // This check always succeeds in Safari 3.1 regardless of the = state of=0A= // the window.=0A= canAccess =3D 'document' in channelWindow;=0A= =0A= if (!canAccess) {=0A= return false;=0A= }=0A= =0A= // Check to see if the document is an object. For Safari 3.1, this = will=0A= // return undefined if the page is still inaccessible. = Unfortunately, this=0A= // *will* raise a security issue in the debugger.=0A= // TODO Find a way around this problem.=0A= canAccess =3D typeof channelWindow['document'] =3D=3D 'object';=0A= =0A= if (!canAccess) {=0A= return false;=0A= }=0A= =0A= // Once we get here, we know we can access the document (and = anything else)=0A= // on the window object. Therefore, we check to see if the = location is=0A= // still about:blank (this takes care of the Safari 3.2 case).=0A= var loc =3D channelWindow.location.href;=0A= =0A= // Check if this is about:blank for Safari.=0A= if (loc =3D=3D=3D 'about:blank') {=0A= return false;=0A= }=0A= } catch (ex) {=0A= // For some reason, the iframe still points to about:blank. We try=0A= // again in a bit.=0A= return false;=0A= }=0A= =0A= // Save a reference to the receive window.=0A= channel.receiveWindow =3D channelWindow;=0A= =0A= // Register the onresize handler.=0A= function onresize() {=0A= processRmrData(frameId);=0A= };=0A= =0A= if (typeof channelWindow.attachEvent =3D=3D=3D "undefined") {=0A= channelWindow.onresize =3D onresize;=0A= } else {=0A= channelWindow.attachEvent("onresize", onresize);=0A= }=0A= =0A= if (frameId =3D=3D=3D '..') {=0A= // Gadget to container. Signal to the container that the gadget=0A= // is ready to receive messages by attaching the g -> c relay.=0A= // As a nice optimization, pass along any gadget to container=0A= // queued messages that have backed up since then. ACK is enqueued = in=0A= // getRmrData to ensure that the container's waiting flag is set = to false=0A= // (this happens in the below code run on the container side).=0A= appendRmrFrame(channel.frame, channel.relayUri, = getRmrData(frameId), frameId);=0A= } else {=0A= // Process messages that the gadget sent in its initial relay = payload.=0A= // We can do this immediately because the container has already = appended=0A= // and loaded a relay frame that can be used to ACK the messages = the gadget=0A= // sent. In the preceding if-block, however, the = processRmrData(...) call=0A= // must wait. That's because appendRmrFrame may not actually = append the=0A= // frame - in the context of a gadget, this code may be running in = the=0A= // head element, so it cannot be appended to body. As a result, the=0A= // gadget cannot ACK the container for messages it received.=0A= processRmrData(frameId);=0A= }=0A= =0A= return true;=0A= }=0A= =0A= return {=0A= getCode: function() {=0A= return 'rmr';=0A= },=0A= =0A= isParentVerifiable: function() {=0A= return true;=0A= },=0A= =0A= init: function(processFn, readyFn) {=0A= // No global setup.=0A= process =3D processFn;=0A= ready =3D readyFn;=0A= return true;=0A= },=0A= =0A= setup: function(receiverId, token) {=0A= try {=0A= setupRmr(receiverId);=0A= } catch (e) {=0A= gadgets.warn('Caught exception setting up RMR: ' + e);=0A= return false;=0A= }=0A= return true;=0A= },=0A= =0A= call: function(targetId, from, rpc) {=0A= return callRmr(targetId, rpc.s, from, rpc);=0A= }=0A= };=0A= }();=0A= =0A= } // !end of double-inclusion guard=0A= ;=0A= /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the = License. */ gadgets.rpctx =3D gadgets.rpctx || {}; /* * For all others, we have a fallback mechanism known as "ifpc". IFPC * exploits the fact that while same-origin policy prohibits a frame = from * accessing members on a window not in the same domain, that frame can, * however, navigate the window heirarchy (via parent). This is = exploited by * having a page on domain A that wants to talk to domain B create an = iframe * on domain B pointing to a special relay file and with a message = encoded * after the hash (#). This relay, in turn, finds the page on domain B, = and * can call a receipt function with the message given to it. The relay = URL * used by each caller is set via the gadgets.rpc.setRelayUrl(..) and * *must* be called before the call method is used. * * ifpc: Iframe-based method, utilizing a relay page, to send a = message. * - No known major browsers still use this method, but it remains * useful as a catch-all fallback for the time being. */ if (!gadgets.rpctx.ifpc) { // make lib resilient to double-inclusion gadgets.rpctx.ifpc =3D function() { var iframePool =3D []; var callId =3D 0; var ready; var URL_LIMIT =3D 2000; var messagesIn =3D {}; /** * Encodes arguments for the legacy IFPC wire format. * * @param {Object} args * @return {string} the encoded args. */ function encodeLegacyData(args) { var argsEscaped =3D []; for (var i =3D 0, j =3D args.length; i < j; ++i) { = argsEscaped.push(encodeURIComponent(gadgets.json.stringify(args[i]))); } return argsEscaped.join('&'); } /** * Helper function to emit an invisible IFrame. * @param {string} src SRC attribute of the IFrame to emit. * @private */ function emitInvisibleIframe(src) { var iframe; // Recycle IFrames for (var i =3D iframePool.length - 1; i >=3D 0; --i) { var ifr =3D iframePool[i]; try { if (ifr && (ifr.recyclable || ifr.readyState =3D=3D=3D = 'complete')) { ifr.parentNode.removeChild(ifr); if (window.ActiveXObject) { // For MSIE, delete any iframes that are no longer being = used. MSIE // cannot reuse the IFRAME because a navigational click = sound will // be triggered when we set the SRC attribute. // Other browsers scan the pool for a free iframe to = reuse. iframePool[i] =3D ifr =3D null; iframePool.splice(i, 1); } else { ifr.recyclable =3D false; iframe =3D ifr; break; } } } catch (e) { // Ignore; IE7 throws an exception when trying to read = readyState and // readyState isn't set. } } // Create IFrame if necessary if (!iframe) { iframe =3D document.createElement('iframe'); iframe.style.border =3D iframe.style.width =3D = iframe.style.height =3D '0px'; iframe.style.visibility =3D 'hidden'; iframe.style.position =3D 'absolute'; iframe.onload =3D function() { this.recyclable =3D true; }; iframePool.push(iframe); } iframe.src =3D src; window.setTimeout(function() { document.body.appendChild(iframe); = }, 0); } function isMessageComplete(arr, total) { for (var i =3D total - 1; i >=3D 0; --i) { if (typeof arr[i] =3D=3D=3D 'undefined') { return false; } } return true; } return { getCode: function() { return 'ifpc'; }, isParentVerifiable: function() { return true; }, init: function(processFn, readyFn) { // No global setup. ready =3D readyFn; ready('..', true); // Ready immediately. return true; }, setup: function(receiverId, token) { // Indicate readiness to send to receiver. ready(receiverId, true); return true; }, call: function(targetId, from, rpc) { // Retrieve the relay file used by IFPC. Note that // this must be set before the call, and so we conduct // an extra check to ensure it is not blank. var relay =3D gadgets.rpc.getRelayUrl(targetId); ++callId; if (!relay) { gadgets.warn('No relay file assigned for IFPC'); return false; } // The RPC mechanism supports two formats for IFPC (legacy and = current). var src =3D null, queueOut =3D []; if (rpc['l']) { // Use legacy protocol. // Format: = #iframe_id&callId&num_packets&packet_num&block_of_data var callArgs =3D rpc['a']; src =3D [relay, '#', encodeLegacyData([from, callId, 1, 0, encodeLegacyData([from, rpc['s'], '', '', from].concat( callArgs))])].join(''); queueOut.push(src); } else { // Format: #targetId & sourceId@callId & packetNum & packetId = & packetData src =3D [relay, '#', targetId, '&', from, '@', callId, = '&'].join(''); var message =3D = encodeURIComponent(gadgets.json.stringify(rpc)), payloadLength =3D URL_LIMIT - src.length, numPackets =3D Math.ceil(message.length / payloadLength), packetIdx =3D 0, part; while (message.length > 0) { part =3D message.substring(0, payloadLength); message =3D message.substring(payloadLength); queueOut.push([src, numPackets, '&', packetIdx, '&', = part].join('')); packetIdx +=3D 1; } } // Conduct the IFPC call by creating the Iframe with // the relay URL and appended message. do { emitInvisibleIframe(queueOut.shift()); } while (queueOut.length > 0); return true; }, /** Process message from invisible iframe, merging message parts = if necessary. */ _receiveMessage: function(fragment, process) { var from =3D fragment[1], // in the form of "@" numPackets =3D parseInt(fragment[2], 10), packetIdx =3D parseInt(fragment[3], 10), payload =3D fragment[fragment.length - 1], completed =3D numPackets =3D=3D=3D 1; // if message is multi-part, store parts in the proper order if (numPackets > 1) { if (!messagesIn[from]) { messagesIn[from] =3D []; } messagesIn[from][packetIdx] =3D payload; // check if all parts have been sent if (isMessageComplete(messagesIn[from], numPackets)) { payload =3D messagesIn[from].join(''); delete messagesIn[from]; completed =3D true; } } // complete message sent if (completed) { process(gadgets.json.parse(decodeURIComponent(payload))); } } }; }(); } // !end of double inclusion guard ;=0A= /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the = License. */ /** * @fileoverview Remote procedure call library for gadget-to-container, * container-to-gadget, and gadget-to-gadget (thru container) = communication. */ /** * gadgets.rpc Transports * * All transports are stored in object gadgets.rpctx, and are provided * to the core gadgets.rpc library by various build rules. * * Transports used by core gadgets.rpc code to actually pass messages. * Each transport implements the same interface exposing hooks that * the core library calls at strategic points to set up and use * the transport. * * The methods each transport must implement are: * + getCode(): returns a string identifying the transport. For = debugging. * + isParentVerifiable(): indicates (via boolean) whether the method * has the property that its relay URL verifies for certain the * receiver's protocol://host:port. * + init(processFn, readyFn): Performs any global initialization = needed. Called * before any other gadgets.rpc methods are invoked. processFn is * the function in gadgets.rpc used to process an rpc packet. = readyFn is * a function that must be called when the transport is ready to = send * and receive messages bidirectionally. Returns * true if successful, false otherwise. * + setup(receiverId, token): Performs per-receiver initialization, if = any. * receiverId will be '..' for gadget-to-container. Returns true if * successful, false otherwise. * + call(targetId, from, rpc): Invoked to send an actual * message to the given targetId, with the given serviceName, from * the sender identified by 'from'. Payload is an rpc packet. = Returns * true if successful, false otherwise. */ if (!window['gadgets']['rpc']) { // make lib resilient to = double-inclusion /** * @static * @namespace Provides operations for making rpc calls. * @name gadgets.rpc */ gadgets.rpc =3D function() { /** * @const * @private */ var CALLBACK_NAME =3D '__cb'; /** * @const * @private */ var DEFAULT_NAME =3D ''; /** Exported constant, for use by transports only. * @const * @type {string} * @member gadgets.rpc */ var ACK =3D '__ack'; /** * Timeout and number of attempts made to setup a transport = receiver. * @const * @private */ var SETUP_FRAME_TIMEOUT =3D 500; /** * @const * @private */ var SETUP_FRAME_MAX_TRIES =3D 10; /** * @const * @private */ var ID_ORIGIN_DELIMITER =3D '|'; /** * @const * @private */ var RPC_KEY_CALLBACK =3D 'callback'; /** * @const * @private */ var RPC_KEY_ORIGIN =3D 'origin'; var RPC_KEY_REFERRER =3D 'referer'; var services =3D {}; var relayUrl =3D {}; var useLegacyProtocol =3D {}; var authToken =3D {}; var callId =3D 0; var callbacks =3D {}; var setup =3D {}; var sameDomain =3D {}; var params =3D {}; var receiverTx =3D {}; var earlyRpcQueue =3D {}; var passReferrerDirection =3D null; var passReferrerContents =3D null; // isGadget =3D~ isChild for the purposes of rpc (used only in = setup). var isChild =3D (window.top !=3D=3D window.self); // Set the current rpc ID from window.name immediately, to prevent // shadowing of window.name by a "var name" declaration, or similar. var rpcId =3D window.name; var securityCallback =3D function() {}; var LOAD_TIMEOUT =3D 0; var FRAME_PHISH =3D 1; var FORGED_MSG =3D 2; // Fallback transport is simply a dummy impl that emits no errors // and logs info on calls it receives, to avoid undesired = side-effects // from falling back to IFPC or some other transport. var console =3D window['console']; var clog =3D console && console.log && function(msg) { = console.log(msg); } || function(){}; var fallbackTransport =3D (function() { function logFn(name) { return function() { clog(name + ': call ignored'); }; } return { 'getCode': function() { return 'noop'; }, // Not really, but prevents transport assignment to IFPC. 'isParentVerifiable': function() { return true; }, 'init': logFn('init'), 'setup': logFn('setup'), 'call': logFn('call') }; })(); // Load the authentication token for speaking to the container // from the gadget's parameters, or default to '0' if not found. if (gadgets.util) { params =3D gadgets.util.getUrlParameters(); } /** * Return a transport representing the best available cross-domain * message-passing mechanism available to the browser. * *

Transports are selected on a cascading basis determined by = browser * capability and other checks. The order of preference is: *

    *
  1. wpm: Uses window.postMessage standard. *
  2. dpm: Uses document.postMessage, similar to wpm but = pre-standard. *
  3. nix: Uses IE-specific browser hacks. *
  4. rmr: Signals message passing using relay file's onresize = handler. *
  5. fe: Uses FF2-specific window.frameElement hack. *
  6. ifpc: Sends messages via active load of a relay file. *
*

See each transport's commentary/documentation for details. * @return {Object} * @member gadgets.rpc */ function getTransport() { if (params['rpctx'] =3D=3D 'flash') return gadgets.rpctx.flash; if (params['rpctx'] =3D=3D 'rmr') return gadgets.rpctx.rmr; return typeof window.postMessage =3D=3D=3D 'function' ? = gadgets.rpctx.wpm : typeof window.postMessage =3D=3D=3D 'object' ? = gadgets.rpctx.wpm : //window.ActiveXObject ? (gadgets.rpctx.flash ? = gadgets.rpctx.flash : gadgets.rpctx.nix) : window.ActiveXObject ? (gadgets.rpctx.ifpc ? = gadgets.rpctx.ifpc : gadgets.rpctx.nix) : navigator.userAgent.indexOf('WebKit') > 0 ? gadgets.rpctx.rmr = : navigator.product =3D=3D=3D 'Gecko' ? = gadgets.rpctx.frameElement : gadgets.rpctx.ifpc; } /** * Function passed to, and called by, a transport indicating it's = ready to * send and receive messages. */ function transportReady(receiverId, readySuccess) { if (receiverTx[receiverId]) return; var tx =3D transport; if (!readySuccess) { tx =3D fallbackTransport; } receiverTx[receiverId] =3D tx; // If there are any early-queued messages, send them now directly = through // the needed transport. var earlyQueue =3D earlyRpcQueue[receiverId] || []; for (var i =3D 0; i < earlyQueue.length; ++i) { var rpc =3D earlyQueue[i]; // There was no auth/rpc token set before, so set it now. rpc['t'] =3D getAuthToken(receiverId); tx.call(receiverId, rpc['f'], rpc); } // Clear the queue so it won't be sent again. earlyRpcQueue[receiverId] =3D []; } // Track when this main page is closed or navigated to a different = location // ("unload" event). // NOTE: The use of the "unload" handler here and for the relay = iframe // prevents the use of the in-memory page cache in modern browsers. // See: https://developer.mozilla.org/en/using_firefox_1.5_caching // See: = http://webkit.org/blog/516/webkit-page-cache-ii-the-unload-event/ var mainPageUnloading =3D false, hookedUnload =3D false; function hookMainPageUnload() { if (hookedUnload) { return; } function onunload() { mainPageUnloading =3D true; } // TODO: use common helper if (typeof window.addEventListener !=3D 'undefined') { window.addEventListener('unload', onunload, false); } else if (typeof window.attachEvent !=3D 'undefined') { window.attachEvent('onunload', onunload); } hookedUnload =3D true; } function relayOnload(targetId, sourceId, token, data, relayWindow) { // Validate auth token. if (!authToken[sourceId] || authToken[sourceId] !=3D=3D token) { gadgets.error('Invalid auth token. ' + authToken[sourceId] + ' = vs ' + token); securityCallback(sourceId, FORGED_MSG); } relayWindow.onunload =3D function() { if (setup[sourceId] && !mainPageUnloading) { securityCallback(sourceId, FRAME_PHISH); gadgets.rpc.removeReceiver(sourceId); } }; hookMainPageUnload(); data =3D gadgets.json.parse(decodeURIComponent(data)); } /** * Helper function that performs actual processing of an RPC = request. * Origin is passed in separately to ensure that it cannot be = spoofed, * and guard code in the method ensures the same before dispatching * any service handler. * @param {Object} rpc RPC request object. * @param {String} opt_sender RPC sender, if available and with a = verified origin piece. * @private */ function process(rpc, opt_sender) { // // RPC object contents: // s: Service Name // f: From // c: The callback ID or 0 if none. // a: The arguments for this RPC call. // t: The authentication token. // if (rpc && typeof rpc['s'] =3D=3D=3D 'string' && typeof rpc['f'] = =3D=3D=3D 'string' && rpc['a'] instanceof Array) { // Validate auth token. if (authToken[rpc['f']]) { // We don't do type coercion here because all entries in the = authToken // object are strings, as are all url params. See = setupReceiver(...). if (authToken[rpc['f']] !=3D=3D rpc['t']) { gadgets.error('Invalid auth token. ' + authToken[rpc['f']] + = ' vs ' + rpc['t']); securityCallback(rpc['f'], FORGED_MSG); } } if (rpc['s'] =3D=3D=3D ACK) { // Acknowledgement API, used to indicate a receiver is ready. window.setTimeout(function() { transportReady(rpc['f'], true); = }, 0); return; } // If there is a callback for this service, attach a callback = function // to the rpc context object for asynchronous rpc services. // // Synchronous rpc request handlers should simply ignore it and = return a // value as usual. // Asynchronous rpc request handlers, on the other hand, should = pass its // result to this callback function and not return a value on = exit. // // For example, the following rpc handler passes the first = parameter back // to its rpc client with a one-second delay. // // function asyncRpcHandler(param) { // var me =3D this; // setTimeout(function() { // me.callback(param); // }, 1000); // } if (rpc['c']) { rpc[RPC_KEY_CALLBACK] =3D function(result) { gadgets.rpc.call(rpc['f'], CALLBACK_NAME, null, rpc['c'], = result); }; } // Set the requestor origin. // If not passed by the transport, then this simply sets to = undefined. if (opt_sender) { var origin =3D getOrigin(opt_sender); rpc[RPC_KEY_ORIGIN] =3D opt_sender; var referrer =3D rpc['r']; if (!referrer || getOrigin(referrer) !=3D origin) { // Transports send along as much info as they can about the = sender // of the message; 'origin' is the origin component alone, = while // 'referrer' is a best-effort field set from available = information. // The second clause simply verifies that referrer is valid. referrer =3D opt_sender; } rpc[RPC_KEY_REFERRER] =3D referrer; } // Call the requested RPC service. var result =3D (services[rpc['s']] || services[DEFAULT_NAME]).apply(rpc, rpc['a']); // If the rpc request handler returns a value, immediately pass = it back // to the callback. Otherwise, do nothing, assuming that the rpc = handler // will make an asynchronous call later. if (rpc['c'] && typeof result !=3D=3D 'undefined') { gadgets.rpc.call(rpc['f'], CALLBACK_NAME, null, rpc['c'], = result); } } } /** * Helper method returning a canonicalized protocol://host[:port] = for * a given input URL, provided as a string. Used to compute = convenient * relay URLs and to determine whether a call is coming from the = same * domain as its receiver (bypassing the try/catch capability = detection * flow, thereby obviating Firebug and other tools reporting an = exception). * * @param {string} url Base URL to canonicalize. * @memberOf gadgets.rpc */ function getOrigin(url) { if (!url) { return ''; } url =3D url.toLowerCase(); if (url.indexOf('//') =3D=3D 0) { url =3D window.location.protocol + url; } if (url.indexOf('://') =3D=3D -1) { // Assumed to be schemaless. Default to current protocol. url =3D window.location.protocol + '//' + url; } // At this point we guarantee that "://" is in the URL and defines // current protocol. Skip past this to search for host:port. var host =3D url.substring(url.indexOf('://') + 3); // Find the first slash char, delimiting the host:port. var slashPos =3D host.indexOf('/'); if (slashPos !=3D -1) { host =3D host.substring(0, slashPos); } var protocol =3D url.substring(0, url.indexOf('://')); // Use port only if it's not default for the protocol. var portStr =3D ''; var portPos =3D host.indexOf(':'); if (portPos !=3D -1) { var port =3D host.substring(portPos + 1); host =3D host.substring(0, portPos); if ((protocol =3D=3D=3D 'http' && port !=3D=3D '80') || (protocol =3D=3D=3D 'https' && port !=3D=3D '443')) { portStr =3D ':' + port; } } // Return ://[] return protocol + '://' + host + portStr; } /* * Makes a sibling id in the format of = "/|". */ function makeSiblingId(id, opt_origin) { return '/' + id + (opt_origin ? ID_ORIGIN_DELIMITER + opt_origin : = ''); } /* * Parses an iframe id. Returns null if not a sibling id or * {id: , origin: } otherwise. */ function parseSiblingId(id) { if (id.charAt(0) =3D=3D '/') { var delimiter =3D id.indexOf(ID_ORIGIN_DELIMITER); var siblingId =3D delimiter > 0 ? id.substring(1, delimiter) : = id.substring(1); var origin =3D delimiter > 0 ? id.substring(delimiter + 1) : = null; return {id: siblingId, origin: origin}; } else { return null; } } function getTargetWin(id) { if (typeof id =3D=3D=3D 'undefined' || id =3D=3D=3D '..') { return window.parent; } var siblingId =3D parseSiblingId(id); if (siblingId) { return window.top.frames[siblingId.id]; } // Cast to a String to avoid an index lookup. id =3D String(id); // Try window.frames first var target =3D window.frames[id]; if (target) { return target; } // Fall back to getElementById() target =3D document.getElementById(id); if (target && target.contentWindow) { return target.contentWindow; } return null; } function getTargetOrigin(id) { var targetRelay =3D null; var relayUrl =3D getRelayUrl(id); if (relayUrl) { targetRelay =3D relayUrl; } else { var siblingId =3D parseSiblingId(id); if (siblingId) { // sibling targetRelay =3D siblingId.origin; } else if (id =3D=3D '..') { // parent targetRelay =3D params['parent']; } else { // child targetRelay =3D document.getElementById(id).src; } } return getOrigin(targetRelay); } // Pick the most efficient RPC relay mechanism. var transport =3D getTransport(); // Create the Default RPC handler. services[DEFAULT_NAME] =3D function() { clog('Unknown RPC service: ' + this.s); }; // Create a Special RPC handler for callbacks. services[CALLBACK_NAME] =3D function(callbackId, result) { var callback =3D callbacks[callbackId]; if (callback) { delete callbacks[callbackId]; callback.call(this, result); } }; /** * Conducts any frame-specific work necessary to setup * the channel type chosen. This method is called when * the container page first registers the gadget in the * RPC mechanism. Gadgets, in turn, will complete the setup * of the channel once they send their first messages. */ function setupFrame(frameId, token) { if (setup[frameId] =3D=3D=3D true) { return; } if (typeof setup[frameId] =3D=3D=3D 'undefined') { setup[frameId] =3D 0; } var tgtFrame =3D getTargetWin(frameId); if (frameId =3D=3D=3D '..' || tgtFrame !=3D null) { if (transport.setup(frameId, token) =3D=3D=3D true) { setup[frameId] =3D true; return; } } if (setup[frameId] !=3D=3D true && setup[frameId]++ < = SETUP_FRAME_MAX_TRIES) { // Try again in a bit, assuming that frame will soon exist. window.setTimeout(function() { setupFrame(frameId, token); }, SETUP_FRAME_TIMEOUT); } else { // Fail: fall back for this gadget. receiverTx[frameId] =3D fallbackTransport; setup[frameId] =3D true; } } /** * Attempts to make an rpc by calling the target's receive method = directly. * This works when gadgets are rendered on the same domain as their = container, * a potentially useful optimization for trusted content which keeps * RPC behind a consistent interface. * * @param {string} target Module id of the rpc service provider. * @param {Object} rpc RPC data. * @return {boolean} */ function callSameDomain(target, rpc) { if (typeof sameDomain[target] =3D=3D=3D 'undefined') { // Seed with a negative, typed value to avoid // hitting this code path repeatedly. sameDomain[target] =3D false; var targetRelay =3D getRelayUrl(target); if (getOrigin(targetRelay) !=3D=3D = getOrigin(window.location.href)) { // Not worth trying -- avoid the error and just return. return false; } var targetEl =3D getTargetWin(target); try { // If this succeeds, then same-domain policy applied var targetGadgets =3D targetEl['gadgets']; sameDomain[target] =3D targetGadgets.rpc.receiveSameDomain; } catch (e) { // Shouldn't happen due to origin check. Caught to emit more // meaningful error to the caller. Consider emitting in = non-opt mode. // gadgets.log('Same domain call failed: parent=3D incorrectly = set.'); } } if (typeof sameDomain[target] =3D=3D=3D 'function') { // Call target's receive method sameDomain[target](rpc); return true; } return false; } /** * Gets the relay URL of a target frame. * @param {string} targetId Name of the target frame. * @return {string|undefined} Relay URL of the target frame. * * @member gadgets.rpc */ function getRelayUrl(targetId) { var url =3D relayUrl[targetId]; // Some RPC methods (wpm, for one) are unhappy with schemeless = URLs. if (url && url.substring(0, 1) =3D=3D=3D '/') { if (url.substring(1, 2) =3D=3D=3D '/') { // starts with '//' url =3D document.location.protocol + url; } else { // relative URL, starts with '/' url =3D document.location.protocol + '//' + = document.location.host + url; } } return url; } /** * Sets the relay URL of a target frame. * @param {string} targetId Name of the target frame. * @param {string} url Full relay URL of the target frame. * * @member gadgets.rpc * @deprecated */ function setRelayUrl(targetId, url, opt_useLegacy) { // Make URL absolute if necessary if (!/http(s)?:\/\/.+/.test(url)) { if (url.indexOf('//') =3D=3D 0) { url =3D window.location.protocol + url; } else if (url.charAt(0) =3D=3D '/') { url =3D window.location.protocol + '//' + window.location.host = + url; } else if (url.indexOf('://') =3D=3D -1) { // Assumed to be schemaless. Default to current protocol. url =3D window.location.protocol + '//' + url; } } relayUrl[targetId] =3D url; if (typeof opt_useLegacy !=3D=3D 'undefined') { useLegacyProtocol[targetId] =3D !!opt_useLegacy; } } /** * Helper method to retrieve the authToken for a given gadget. * Not to be used directly. * @member gadgets.rpc * @return {string} */ function getAuthToken(targetId) { return authToken[targetId]; } /** * Sets the auth token of a target frame. * @param {string} targetId Name of the target frame. * @param {string} token The authentication token to use for all * calls to or from this target id. * * @member gadgets.rpc * @deprecated */ function setAuthToken(targetId, token) { token =3D token || ''; // Coerce token to a String, ensuring that all authToken values // are strings. This ensures correct comparison with URL params // in the process(rpc) method. authToken[targetId] =3D String(token); setupFrame(targetId, token); } function setReferrerConfig(cfg) { var passReferrer =3D cfg['passReferrer'] || ''; var prParts =3D passReferrer.split(':', 2); passReferrerDirection =3D prParts[0] || 'none'; passReferrerContents =3D prParts[1] || 'origin'; } function setLegacyProtocolConfig(cfg) { if (isLegacyProtocolConfig(cfg)) { transport =3D gadgets.rpctx.ifpc; transport.init(process, transportReady); } } function isLegacyProtocolConfig(cfg) { return String(cfg['useLegacyProtocol']) =3D=3D=3D 'true'; } function setupContainedContext(rpctoken, opt_parent) { function init(config) { var cfg =3D config ? config['rpc'] : {}; setReferrerConfig(cfg); // Parent-relative only. var parentRelayUrl =3D cfg['parentRelayUrl'] || ''; parentRelayUrl =3D getOrigin(params['parent'] || opt_parent) + = parentRelayUrl; setRelayUrl('..', parentRelayUrl, isLegacyProtocolConfig(cfg)); setLegacyProtocolConfig(cfg); setAuthToken('..', rpctoken); } // Check to see if we know the parent yet. // In almost all cases we will, since the parent param is = provided. // However, it's possible that the lib doesn't yet know, but is // initialized in forced fashion later. if (!params['parent'] && opt_parent) { // Handles the forced initialization case. init({}); return; } // Handles the standard gadgets.config.init() case. gadgets.config.register('rpc', null, init); } function setupChildIframe(gadgetId, opt_frameurl, opt_authtoken) { var childIframe =3D null; if (gadgetId.charAt(0) !=3D '/') { // only set up child (and not sibling) iframe if (!gadgets.util) { return; } childIframe =3D document.getElementById(gadgetId); if (!childIframe) { throw new Error('Cannot set up gadgets.rpc receiver with ID: ' = + gadgetId + ', element not found.'); } } // The "relay URL" can either be explicitly specified or is set as // the child IFRAME URL's origin var childSrc =3D childIframe && childIframe.src; var relayUrl =3D opt_frameurl || gadgets.rpc.getOrigin(childSrc); setRelayUrl(gadgetId, relayUrl); // The auth token is parsed from child params (rpctoken) or = overridden. var childParams =3D gadgets.util.getUrlParameters(childSrc); var rpctoken =3D opt_authtoken || childParams['rpctoken']; setAuthToken(gadgetId, rpctoken); } /** * Sets up the gadgets.rpc library to communicate with the receiver. *

This method replaces setRelayUrl(...) and setAuthToken(...) * *

Simplified instructions - highly recommended: *

    *
  1. Generate <iframe id=3D"<ID>" = src=3D"...#parent=3D<PARENTURL>&rpctoken=3D<RANDOM>"/> * and add to DOM. *
  2. Call gadgets.rpc.setupReceiver("<ID>"); *

    All parent/child communication initializes automatically = from here. * Naturally, both sides need to include the library. *

* *

Detailed container/parent instructions: *

    *
  1. Create the target IFRAME (eg. gadget) with a given <ID> = and params * rpctoken=3D (eg. #rpctoken=3D1234), which is a = random/unguessbable * string, and parent=3D<url>, where <url> is the URL of = the container. *
  2. Append IFRAME to the document. *
  3. Call gadgets.rpc.setupReceiver(<ID>) *

    [Optional]. Strictly speaking, you may omit rpctoken and = parent. This * practice earns little but is occasionally useful for = testing. * If you omit parent, you MUST pass your container URL = as the 2nd * parameter to this method. *

* *

Detailed gadget/child IFRAME instructions: *

    *
  1. If your container/parent passed parent and rpctoken params = (query string * or fragment are both OK), you needn't do anything. The library = will self- * initialize. *
  2. If "parent" is omitted, you MUST call this method with = targetId '..' * and the second param set to the parent URL. *
  3. If "rpctoken" is omitted, but the container set an authToken = manually * for this frame, you MUST pass that ID (however acquired) as = the 2nd param * to this method. *
* * @member gadgets.rpc * @param {string} targetId * @param {string=3D} opt_receiverurl * @param {string=3D} opt_authtoken */ function setupReceiver(targetId, opt_receiverurl, opt_authtoken) { if (targetId =3D=3D=3D '..') { // Gadget/IFRAME to container. var rpctoken =3D opt_authtoken || params['rpctoken'] || = params['ifpctok'] || ''; setupContainedContext(rpctoken, opt_receiverurl); } else { // Container to child. setupChildIframe(targetId, opt_receiverurl, opt_authtoken); } } function getReferrer(targetId) { if (passReferrerDirection =3D=3D=3D 'bidir' || (passReferrerDirection =3D=3D=3D 'c2p' && targetId =3D=3D=3D = '..') || (passReferrerDirection =3D=3D=3D 'p2c' && targetId !=3D=3D = '..')) { var href =3D window.location.href; var lopOff =3D '?'; // default =3D origin if (passReferrerContents =3D=3D=3D 'query') { lopOff =3D '#'; } else if (passReferrerContents =3D=3D=3D 'hash') { return href; } var lastIx =3D href.lastIndexOf(lopOff); lastIx =3D lastIx =3D=3D=3D -1 ? href.length : lastIx; return href.substring(0, lastIx); } return null; } return /** @scope gadgets.rpc */ { config: function(config) { if (typeof config.securityCallback =3D=3D=3D 'function') { securityCallback =3D config.securityCallback; } }, /** * Registers an RPC service. * @param {string} serviceName Service name to register. * @param {function(Object,Object)} handler Service handler. * * @member gadgets.rpc */ register: function(serviceName, handler) { if (serviceName =3D=3D=3D CALLBACK_NAME || serviceName =3D=3D=3D = ACK) { throw new Error('Cannot overwrite callback/ack service'); } if (serviceName =3D=3D=3D DEFAULT_NAME) { throw new Error('Cannot overwrite default service:' + ' use registerDefault'); } services[serviceName] =3D handler; }, /** * Unregisters an RPC service. * @param {string} serviceName Service name to unregister. * * @member gadgets.rpc */ unregister: function(serviceName) { if (serviceName =3D=3D=3D CALLBACK_NAME || serviceName =3D=3D=3D = ACK) { throw new Error('Cannot delete callback/ack service'); } if (serviceName =3D=3D=3D DEFAULT_NAME) { throw new Error('Cannot delete default service:' + ' use unregisterDefault'); } delete services[serviceName]; }, /** * Registers a default service handler to processes all unknown * RPC calls which raise an exception by default. * @param {function(Object,Object)} handler Service handler. * * @member gadgets.rpc */ registerDefault: function(handler) { services[DEFAULT_NAME] =3D handler; }, /** * Unregisters the default service handler. Future unknown RPC * calls will fail silently. * * @member gadgets.rpc */ unregisterDefault: function() { delete services[DEFAULT_NAME]; }, /** * Forces all subsequent calls to be made by a transport * method that allows the caller to verify the message receiver * (by way of the parent parameter, through getRelayUrl(...)). * At present this means IFPC or WPM. * @member gadgets.rpc */ forceParentVerifiable: function() { if (!transport.isParentVerifiable()) { transport =3D gadgets.rpctx.ifpc; } }, /** * Calls an RPC service. * @param {string} targetId Module Id of the RPC service provider. * Empty if calling the parent container. * @param {string} serviceName Service name to call. * @param {function()|null} callback Callback function (if any) to = process * the return value of the RPC = request. * @param {*} var_args Parameters for the RPC request. * * @member gadgets.rpc */ call: function(targetId, serviceName, callback, var_args) { targetId =3D targetId || '..'; // Default to the container calling. var from =3D '..'; if (targetId =3D=3D=3D '..') { from =3D rpcId; } else if (targetId.charAt(0) =3D=3D '/') { // sending to sibling from =3D makeSiblingId(rpcId, = gadgets.rpc.getOrigin(window.location.href)); } ++callId; if (callback) { callbacks[callId] =3D callback; } var rpc =3D { 's': serviceName, 'f': from, 'c': callback ? callId : 0, 'a': Array.prototype.slice.call(arguments, 3), 't': authToken[targetId], 'l': !!useLegacyProtocol[targetId] }; var referrer =3D getReferrer(targetId); if (referrer) { rpc['r'] =3D referrer; } if (targetId !=3D=3D '..' && parseSiblingId(targetId) =3D=3D null && // sibling never in = the document !document.getElementById(targetId)) { // The target has been removed from the DOM. Don't even try. return; } // If target is on the same domain, call method directly if (callSameDomain(targetId, rpc)) { return; } // Attempt to make call via a cross-domain transport. // Retrieve the transport for the given target - if one // target is misconfigured, it won't affect the others. // In the case of a sibling relay, channel is not found // in the receiverTx map but in the transport itself. var channel =3D receiverTx[targetId]; if (!channel && parseSiblingId(targetId) !=3D=3D null) { // Sibling-to-sibling communication; use default trasport // (in practice, wpm) despite not being ready()-indicated. channel =3D transport; } if (!channel) { // Not set up yet. Enqueue the rpc for such time as it is. if (!earlyRpcQueue[targetId]) { earlyRpcQueue[targetId] =3D [rpc]; } else { earlyRpcQueue[targetId].push(rpc); } return; } // If we are told to use the legacy format, then we must // default to IFPC. if (useLegacyProtocol[targetId]) { channel =3D gadgets.rpctx.ifpc; } if (channel.call(targetId, from, rpc) =3D=3D=3D false) { // Fall back to IFPC. This behavior may be removed as IFPC is = as well. receiverTx[targetId] =3D fallbackTransport; transport.call(targetId, from, rpc); } }, getRelayUrl: getRelayUrl, setRelayUrl: setRelayUrl, setAuthToken: setAuthToken, setupReceiver: setupReceiver, getAuthToken: getAuthToken, // Note: Does not delete iframe removeReceiver: function(receiverId) { delete relayUrl[receiverId]; delete useLegacyProtocol[receiverId]; delete authToken[receiverId]; delete setup[receiverId]; delete sameDomain[receiverId]; delete receiverTx[receiverId]; }, /** * Gets the RPC relay mechanism. * @return {string} RPC relay mechanism. See above for * a list of supported types. * * @member gadgets.rpc */ getRelayChannel: function() { return transport.getCode(); }, /** * Receives and processes an RPC request. (Not to be used = directly.) * Only used by IFPC. * @param {Array.} fragment An RPC request fragment = encoded as * an array. The first 4 elements are target id, source id = & call id, * total packet number, packet id. The last element stores = the actual * JSON-encoded and URI escaped packet data. * * @member gadgets.rpc * @deprecated */ receive: function(fragment, otherWindow) { if (fragment.length > 4) { transport._receiveMessage(fragment, process); } else { relayOnload.apply(null, fragment.concat(otherWindow)); } }, /** * Receives and processes an RPC request sent via the same domain. * (Not to be used directly). Converts the inbound rpc object's * Array into a local Array to pass the process() Array test. * @param {Object} rpc RPC object containing all request params. * @member gadgets.rpc */ receiveSameDomain: function(rpc) { // Pass through to local process method but converting to a = local Array rpc['a'] =3D Array.prototype.slice.call(rpc['a']); window.setTimeout(function() { process(rpc); }, 0); }, // Helper method to get the protocol://host:port of an input URL. // see docs above getOrigin: getOrigin, getTargetOrigin: getTargetOrigin, /** * Internal-only method used to initialize gadgets.rpc. * @member gadgets.rpc */ init: function() { // Conduct any global setup necessary for the chosen transport. // Do so after gadgets.rpc definition to allow transport to = access // gadgets.rpc methods. if (transport.init(process, transportReady) =3D=3D=3D false) { transport =3D fallbackTransport; } if (isChild) { setupReceiver('..'); } else { gadgets.config.register('rpc', null, function(config) { var cfg =3D config['rpc'] || {}; setReferrerConfig(cfg); setLegacyProtocolConfig(cfg); }); } }, /** Returns the window keyed by the ID. null/".." for parent, else = child */ _getTargetWin: getTargetWin, /** Parses a sibling id into {id: , origin: = } */ _parseSiblingId: parseSiblingId, ACK: ACK, RPC_ID: rpcId || '..', SEC_ERROR_LOAD_TIMEOUT: LOAD_TIMEOUT, SEC_ERROR_FRAME_PHISH: FRAME_PHISH, SEC_ERROR_FORGED_MSG: FORGED_MSG }; }(); // Initialize library/transport. gadgets.rpc.init(); } // !end of double-inclusion guard;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations=0A= * under the License.=0A= */=0A= =0A= /*global ActiveXObject, DOMParser */=0A= /*global shindig */=0A= =0A= /**=0A= * @fileoverview Provides remote content retrieval facilities.=0A= * Available to every gadget.=0A= */=0A= =0A= /**=0A= * @static=0A= * @class Provides remote content retrieval functions.=0A= * @name gadgets.io=0A= */=0A= =0A= gadgets.io =3D function() {=0A= /**=0A= * Holds configuration-related data such as proxy urls.=0A= */=0A= var config =3D {};=0A= =0A= /**=0A= * Holds state for OAuth.=0A= */=0A= var oauthState;=0A= =0A= /**=0A= * Internal facility to create an xhr request.=0A= */=0A= function makeXhr() {=0A= var x; =0A= if (typeof shindig !=3D 'undefined' &&=0A= shindig.xhrwrapper &&=0A= shindig.xhrwrapper.createXHR) {=0A= return shindig.xhrwrapper.createXHR();=0A= } else if (typeof ActiveXObject !=3D 'undefined') {=0A= x =3D new ActiveXObject("Msxml2.XMLHTTP");=0A= if (!x) {=0A= x =3D new ActiveXObject("Microsoft.XMLHTTP");=0A= }=0A= return x;=0A= }=0A= // The second construct is for the benefit of jsunit...=0A= else if (typeof XMLHttpRequest !=3D 'undefined' || = window.XMLHttpRequest) {=0A= return new window.XMLHttpRequest();=0A= }=0A= else throw("no xhr available");=0A= }=0A= =0A= /**=0A= * Checks the xobj for errors, may call the callback with an error = response=0A= * if the error is fatal.=0A= *=0A= * @param {Object} xobj The XHR object to check=0A= * @param {function(Object)} callback The callback to call if the = error is fatal=0A= * @return {boolean} true if the xobj is not ready to be processed=0A= */=0A= function hadError(xobj, callback) {=0A= if (xobj.readyState !=3D=3D 4) {=0A= return true;=0A= }=0A= try {=0A= if (xobj.status !=3D=3D 200) {=0A= var error =3D ("" + xobj.status);=0A= if(xobj.responseText) {=0A= error =3D error + " " + xobj.responseText;=0A= }=0A= callback({=0A= errors : [error],=0A= rc : xobj.status,=0A= text : xobj.responseText=0A= });=0A= return true;=0A= }=0A= } catch(e) {=0A= callback({=0A= errors : [e.number + " Error not specified"],=0A= rc : e.number,=0A= text : e.description=0A= });=0A= return true;=0A= }=0A= return false;=0A= }=0A= =0A= /**=0A= * Handles non-proxied XHR callback processing.=0A= *=0A= * @param {string} url=0A= * @param {function(Object)} callback=0A= * @param {Object} params=0A= * @param {Object} xobj=0A= */=0A= function processNonProxiedResponse(url, callback, params, xobj) {=0A= if (hadError(xobj, callback)) {=0A= return;=0A= }=0A= var data =3D {=0A= body: xobj.responseText=0A= };=0A= callback(transformResponseData(params, data));=0A= }=0A= =0A= var UNPARSEABLE_CRUFT =3D "throw 1; < don't be evil' >";=0A= =0A= /**=0A= * Handles XHR callback processing.=0A= *=0A= * @param {string} url=0A= * @param {function(Object)} callback=0A= * @param {Object} params=0A= * @param {Object} xobj=0A= */ =0A= function processResponse(url, callback, params, xobj) {=0A= if (hadError(xobj, callback)) {=0A= return;=0A= }=0A= var txt =3D xobj.responseText;=0A= =0A= // remove unparseable cruft used to prevent cross-site script = inclusion=0A= var offset =3D txt.indexOf(UNPARSEABLE_CRUFT) + = UNPARSEABLE_CRUFT.length;=0A= =0A= // If no cruft then just return without a callback - avoid JS errors=0A= // TODO craft an error response?=0A= if (offset < UNPARSEABLE_CRUFT.length) return;=0A= txt =3D txt.substr(offset)=0A= =0A= // We are using eval directly here because the outer response comes = from a=0A= // trusted source, and json parsing is slow in IE.=0A= var data =3D eval("(" + txt + ")");=0A= data =3D data[url];=0A= // Save off any transient OAuth state the server wants back later.=0A= if (data.oauthState) {=0A= oauthState =3D data.oauthState;=0A= }=0A= // Update the security token if the server sent us a new one=0A= if (data.st) {=0A= shindig.auth.updateSecurityToken(data.st);=0A= }=0A= callback(transformResponseData(params, data));=0A= }=0A= =0A= /**=0A= * @param {Object} params=0A= * @param {Object} data=0A= * @return {Object}=0A= */=0A= =0A= function transformResponseData(params, data) {=0A= // Sometimes rc is not present, generally when used=0A= // by jsonrpccontainer, so assume 200 in its absence.=0A= var resp =3D {=0A= text: data.body,=0A= rc: data.rc || 200,=0A= headers: data.headers,=0A= oauthApprovalUrl: data.oauthApprovalUrl,=0A= oauthError: data.oauthError,=0A= oauthErrorText: data.oauthErrorText,=0A= errors: []=0A= };=0A= =0A= if (resp.rc < 200 || resp.rc >=3D 400){=0A= resp.errors =3D [resp.rc + " Error"];=0A= } else if (resp.text) {=0A= if (resp.rc >=3D 300 && resp.rc < 400) {=0A= // Redirect pages will usually contain arbitrary=0A= // HTML which will fail during parsing, inadvertently=0A= // causing a 500 response. Thus we treat as text.=0A= params.CONTENT_TYPE =3D "TEXT";=0A= }=0A= switch (params.CONTENT_TYPE) {=0A= case "JSON":=0A= case "FEED":=0A= resp.data =3D gadgets.json.parse(resp.text);=0A= if (!resp.data) {=0A= resp.errors.push("500 Failed to parse JSON");=0A= resp.rc =3D 500;=0A= resp.data =3D null;=0A= }=0A= break;=0A= case "DOM":=0A= var dom;=0A= if (typeof ActiveXObject !=3D 'undefined') {=0A= dom =3D new ActiveXObject("Microsoft.XMLDOM");=0A= dom.async =3D false;=0A= dom.validateOnParse =3D false;=0A= dom.resolveExternals =3D false;=0A= if (!dom.loadXML(resp.text)) {=0A= resp.errors.push("500 Failed to parse XML");=0A= resp.rc =3D 500;=0A= } else {=0A= resp.data =3D dom;=0A= }=0A= } else {=0A= var parser =3D new DOMParser();=0A= dom =3D parser.parseFromString(resp.text, "text/xml");=0A= if ("parsererror" =3D=3D=3D dom.documentElement.nodeName) {=0A= resp.errors.push("500 Failed to parse XML");=0A= resp.rc =3D 500;=0A= } else {=0A= resp.data =3D dom;=0A= }=0A= }=0A= break;=0A= default:=0A= resp.data =3D resp.text;=0A= break;=0A= }=0A= }=0A= return resp;=0A= }=0A= =0A= /**=0A= * Sends an XHR post or get request=0A= *=0A= * @param {string} realUrl The url to fetch data from that was = requested by the gadget=0A= * @param {string} proxyUrl The url to proxy through=0A= * @param {function()} callback The function to call once the data is = fetched=0A= * @param {Object} paramData The params to use when processing the = response=0A= * @param {function(string,function(Object),Object,Object)} =0A= * processResponseFunction The function that should process the=0A= * response from the sever before calling the callback=0A= * @param {string=3D} opt_contentType - Optional content type defaults = to=0A= * 'application/x-www-form-urlencoded'=0A= */=0A= function makeXhrRequest(realUrl, proxyUrl, callback, paramData, method,=0A= params, processResponseFunction, opt_contentType) {=0A= var xhr =3D makeXhr();=0A= =0A= if (proxyUrl.indexOf('//') =3D=3D 0) {=0A= proxyUrl =3D document.location.protocol + proxyUrl;=0A= }=0A= =0A= xhr.open(method, proxyUrl, true);=0A= if (callback) {=0A= xhr.onreadystatechange =3D gadgets.util.makeClosure(=0A= null, processResponseFunction, realUrl, callback, params, xhr);=0A= }=0A= if (paramData !=3D=3D null) {=0A= xhr.setRequestHeader('Content-Type', opt_contentType || = 'application/x-www-form-urlencoded');=0A= xhr.send(paramData);=0A= } else {=0A= xhr.send(null);=0A= }=0A= }=0A= =0A= =0A= =0A= /**=0A= * Satisfy a request with data that is prefetched as per the gadget = Preload=0A= * directive. The preloader will only satisfy a request for a specific = piece=0A= * of content once.=0A= *=0A= * @param {Object} postData The definition of the request to be = executed by the proxy=0A= * @param {Object} params The params to use when processing the = response=0A= * @param {function(Object)} callback The function to call once the = data is fetched=0A= * @return {boolean} true if the request can be satisfied by the = preloaded =0A= * content false otherwise=0A= */=0A= function respondWithPreload(postData, params, callback) {=0A= if (gadgets.io.preloaded_ && postData.httpMethod =3D=3D=3D "GET") {=0A= for (var i =3D 0; i < gadgets.io.preloaded_.length; i++) {=0A= var preload =3D gadgets.io.preloaded_[i];=0A= if (preload && (preload.id =3D=3D=3D postData.url)) {=0A= // Only satisfy once=0A= delete gadgets.io.preloaded_[i];=0A= =0A= if (preload.rc !=3D=3D 200) {=0A= callback({rc: preload.rc, errors : [preload.rc + " Error"]});=0A= } else {=0A= if (preload.oauthState) {=0A= oauthState =3D preload.oauthState;=0A= }=0A= var resp =3D {=0A= body: preload.body,=0A= rc: preload.rc,=0A= headers: preload.headers,=0A= oauthApprovalUrl: preload.oauthApprovalUrl,=0A= oauthError: preload.oauthError,=0A= oauthErrorText: preload.oauthErrorText,=0A= errors: []=0A= };=0A= callback(transformResponseData(params, resp));=0A= }=0A= return true;=0A= }=0A= }=0A= }=0A= return false;=0A= }=0A= =0A= /**=0A= * @param {Object} configuration Configuration settings=0A= * @private=0A= */=0A= function init (configuration) {=0A= config =3D configuration["core.io"] || {};=0A= }=0A= =0A= var requiredConfig =3D {=0A= proxyUrl: new gadgets.config.RegExValidator(/.*%(raw)?url%.*/),=0A= jsonProxyUrl: gadgets.config.NonEmptyStringValidator=0A= };=0A= gadgets.config.register("core.io", requiredConfig, init);=0A= =0A= return /** @scope gadgets.io */ {=0A= /**=0A= * Fetches content from the provided URL and feeds that content into = the=0A= * callback function.=0A= *=0A= * Example:=0A= *
=0A=
     * gadgets.io.makeRequest(url, fn,=0A=
     *    {contentType: gadgets.io.ContentType.FEED});=0A=
     * 
=0A= *=0A= * @param {string} url The URL where the content is located=0A= * @param {function(Object)} callback The function to call with the = data from=0A= * the URL once it is fetched=0A= * @param {Object.=3D} = opt_params=0A= * Additional=0A= * parameters=0A= * to pass to the request=0A= *=0A= * @member gadgets.io=0A= */=0A= makeRequest : function (url, callback, opt_params) {=0A= // TODO: This method also needs to respect all members of=0A= // gadgets.io.RequestParameters, and validate them.=0A= =0A= var params =3D opt_params || {};=0A= =0A= var httpMethod =3D params.METHOD || "GET";=0A= var refreshInterval =3D params.REFRESH_INTERVAL;=0A= =0A= // Check if authorization is requested=0A= var auth, st;=0A= if (params.AUTHORIZATION && params.AUTHORIZATION !=3D=3D "NONE") {=0A= auth =3D params.AUTHORIZATION.toLowerCase();=0A= st =3D shindig.auth.getSecurityToken();=0A= } else {=0A= // Unauthenticated GET requests are cacheable=0A= if (httpMethod =3D=3D=3D "GET" && refreshInterval =3D=3D=3D = undefined) {=0A= refreshInterval =3D 3600;=0A= }=0A= }=0A= =0A= // Include owner information?=0A= var signOwner =3D true;=0A= if (typeof params.OWNER_SIGNED !=3D=3D "undefined") {=0A= signOwner =3D params.OWNER_SIGNED;=0A= }=0A= =0A= // Include viewer information?=0A= var signViewer =3D true;=0A= if (typeof params.VIEWER_SIGNED !=3D=3D "undefined") {=0A= signViewer =3D params.VIEWER_SIGNED;=0A= }=0A= =0A= var headers =3D params.HEADERS || {};=0A= if (httpMethod =3D=3D=3D "POST" && !headers["Content-Type"]) {=0A= headers["Content-Type"] =3D "application/x-www-form-urlencoded";=0A= }=0A= =0A= var urlParams =3D gadgets.util.getUrlParameters();=0A= =0A= var paramData =3D {=0A= url: url,=0A= httpMethod : httpMethod,=0A= headers: gadgets.io.encodeValues(headers, false),=0A= postData : params.POST_DATA || "",=0A= authz : auth || "",=0A= st : st || "",=0A= contentType : params.CONTENT_TYPE || "TEXT",=0A= numEntries : params.NUM_ENTRIES || "3",=0A= getSummaries : !!params.GET_SUMMARIES,=0A= signOwner : signOwner,=0A= signViewer : signViewer,=0A= gadget : urlParams.url,=0A= container : urlParams.container || urlParams.synd || "default",=0A= // should we bypass gadget spec cache (e.g. to read OAuth = provider URLs)=0A= bypassSpecCache : gadgets.util.getUrlParameters().nocache || "",=0A= nocache : gadgets.util.getUrlParameters().nocache || "",=0A= getFullHeaders : !!params.GET_FULL_HEADERS=0A= };=0A= =0A= // OAuth goodies=0A= if (auth =3D=3D=3D "oauth" || auth =3D=3D=3D "signed") {=0A= if (gadgets.io.oauthReceivedCallbackUrl_) {=0A= paramData.OAUTH_RECEIVED_CALLBACK =3D = gadgets.io.oauthReceivedCallbackUrl_;=0A= gadgets.io.oauthReceivedCallbackUrl_ =3D null;=0A= }=0A= paramData.oauthState =3D oauthState || "";=0A= // Just copy the OAuth parameters into the req to the server=0A= for (var opt in params) {=0A= if (params.hasOwnProperty(opt)) {=0A= if (opt.indexOf("OAUTH_") =3D=3D=3D 0) {=0A= paramData[opt] =3D params[opt];=0A= }=0A= }=0A= }=0A= }=0A= =0A= var proxyUrl =3D config.jsonProxyUrl.replace("%host%", = document.location.host);=0A= =0A= // FIXME -- processResponse is not used in call=0A= if (!respondWithPreload(paramData, params, callback, = processResponse)) {=0A= if (httpMethod =3D=3D=3D "GET" && refreshInterval > 0) {=0A= // this content should be cached=0A= // Add paramData to the URL=0A= var extraparams =3D "?refresh=3D" + refreshInterval + '&'=0A= + gadgets.io.encodeValues(paramData);=0A= =0A= makeXhrRequest(url, proxyUrl + extraparams, callback,=0A= null, "GET", params, processResponse);=0A= =0A= } else {=0A= makeXhrRequest(url, proxyUrl, callback,=0A= gadgets.io.encodeValues(paramData), "POST", params,=0A= processResponse);=0A= }=0A= }=0A= },=0A= =0A= /**=0A= * @private=0A= */=0A= makeNonProxiedRequest : function (relativeUrl, callback, opt_params, = opt_contentType) {=0A= var params =3D opt_params || {};=0A= makeXhrRequest(relativeUrl, relativeUrl, callback, = params.POST_DATA,=0A= params.METHOD, params, processNonProxiedResponse, = opt_contentType);=0A= },=0A= =0A= /**=0A= * Used to clear out the oauthState, for testing only.=0A= *=0A= * @private=0A= */=0A= clearOAuthState : function () {=0A= oauthState =3D undefined;=0A= },=0A= =0A= /**=0A= * Converts an input object into a URL-encoded data string.=0A= * (key=3Dvalue&...)=0A= *=0A= * @param {Object} fields The post fields you wish to encode=0A= * @param {boolean=3D} opt_noEscaping An optional parameter = specifying whether=0A= * to turn off escaping of the parameters. Defaults to false.=0A= * @return {string} The processed post data in www-form-urlencoded = format.=0A= *=0A= * @member gadgets.io=0A= */=0A= encodeValues : function (fields, opt_noEscaping) {=0A= var escape =3D !opt_noEscaping;=0A= =0A= var buf =3D [];=0A= var first =3D false;=0A= for (var i in fields) {=0A= if (fields.hasOwnProperty(i) && !/___$/.test(i)) {=0A= if (!first) {=0A= first =3D true;=0A= } else {=0A= buf.push("&");=0A= }=0A= buf.push(escape ? encodeURIComponent(i) : i);=0A= buf.push("=3D");=0A= buf.push(escape ? encodeURIComponent(fields[i]) : fields[i]);=0A= }=0A= }=0A= return buf.join("");=0A= },=0A= =0A= /**=0A= * Gets the proxy version of the passed-in URL.=0A= *=0A= * @param {string} url The URL to get the proxy URL for=0A= * @param {Object.=3D} = opt_params Optional Parameter Object.=0A= * The following properties are supported:=0A= * .REFRESH_INTERVAL The number of seconds that this=0A= * content should be cached. Defaults to 3600.=0A= *=0A= * @return {string} The proxied version of the URL=0A= * @member gadgets.io=0A= */=0A= getProxyUrl : function (url, opt_params) {=0A= var params =3D opt_params || {};=0A= var refresh =3D params.REFRESH_INTERVAL;=0A= if (refresh =3D=3D=3D undefined) {=0A= refresh =3D "3600";=0A= }=0A= =0A= var urlParams =3D gadgets.util.getUrlParameters();=0A= =0A= var rewriteMimeParam =3D=0A= params.rewriteMime ? "&rewriteMime=3D" + = encodeURIComponent(params.rewriteMime) : "";=0A= var ret =3D config.proxyUrl.replace("%url%", = encodeURIComponent(url)).=0A= replace("%host%", document.location.host).=0A= replace("%rawurl%", url).=0A= replace("%refresh%", encodeURIComponent(refresh)).=0A= replace("%gadget%", encodeURIComponent(urlParams.url)).=0A= replace("%container%", encodeURIComponent(urlParams.container = || urlParams.synd || "default")).=0A= replace("%rewriteMime%", rewriteMimeParam);=0A= if (ret.indexOf('//') =3D=3D 0) {=0A= ret =3D window.location.protocol + ret;=0A= }=0A= return ret;=0A= }=0A= };=0A= }();=0A= =0A= gadgets.io.RequestParameters =3D gadgets.util.makeEnum([=0A= "METHOD",=0A= "CONTENT_TYPE",=0A= "POST_DATA",=0A= "HEADERS",=0A= "AUTHORIZATION",=0A= "NUM_ENTRIES",=0A= "GET_SUMMARIES",=0A= "GET_FULL_HEADERS",=0A= "REFRESH_INTERVAL",=0A= "OAUTH_SERVICE_NAME",=0A= "OAUTH_USE_TOKEN",=0A= "OAUTH_TOKEN_NAME",=0A= "OAUTH_REQUEST_TOKEN",=0A= "OAUTH_REQUEST_TOKEN_SECRET",=0A= "OAUTH_RECEIVED_CALLBACK"=0A= ]);=0A= =0A= /**=0A= * @const=0A= */=0A= gadgets.io.MethodType =3D gadgets.util.makeEnum([=0A= "GET", "POST", "PUT", "DELETE", "HEAD"=0A= ]);=0A= =0A= /**=0A= * @const=0A= */=0A= gadgets.io.ContentType =3D gadgets.util.makeEnum([=0A= "TEXT", "DOM", "JSON", "FEED"=0A= ]);=0A= =0A= /**=0A= * @const=0A= */=0A= gadgets.io.AuthorizationType =3D gadgets.util.makeEnum([=0A= "NONE", "SIGNED", "OAUTH"=0A= ]);=0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations=0A= * under the License.=0A= */=0A= =0A= /**=0A= * @class=0A= * Tame and expose core gadgets.io.* API to cajoled gadgets=0A= */=0A= var tamings___ =3D tamings___ || [];=0A= tamings___.push(function(imports) {=0A= caja___.whitelistFuncs([=0A= [gadgets.io, 'encodeValues'],=0A= [gadgets.io, 'getProxyUrl'],=0A= [gadgets.io, 'makeRequest']=0A= ]);=0A= });=0A= ;=0A= /**=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations under the = License.=0A= */=0A= =0A= /**=0A= * @fileoverview Pure JS code for processing Uris.=0A= *=0A= * Unlike Java Shindig and other code, these Uris are mutable. While=0A= * this introduces some challenges, ultimately the confusion introduced=0A= * by passing around a Uri versus a UriBuilder in an untyped language=0A= * is too great.=0A= *=0A= * The class only implements core methods associated with Uris -=0A= * essentially the minimum required for various helper routines. Lazy = evalution=0A= * of query and fragment params is chosen to avoid undue performance hit.=0A= * Further, only set operations are provided for query/fragment params,=0A= * in order to keep the API relatively small, yet sufficiently flexible. = Values set to=0A= * null are equivalent to being removed, for instance.=0A= * =0A= * Limitations include, but are not limited to:=0A= * + Multiple params with the same key not supported via set APIs.=0A= * + Full RPC-compliant parsing not supported. A "highly useful" subset = is impl'd.=0A= * + Helper methods are all provided in the shindig.uri.full feature.=0A= * + Query and fragment do not contain their preceding ? and # chars.=0A= *=0A= * Example usage:=0A= * var uri =3D shindig.uri("http://www.apache.org");=0A= * uri.setPath("random.xml");=0A= * alert(uri.toString()); // Emits "http://www.apache.org/random.xml"=0A= * var other =3D // resolve() provided in shindig.uri.full=0A= * shindig.uri("http://www.other.com/foo").resolve("/bar").setQP({ = hi: "bye" });=0A= * alert(other); // Emits "http://other.com/bar?hi=3Dbye"=0A= */=0A= shindig.uri =3D (function() {=0A= var PARSE_REGEX =3D new = RegExp("^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))= ?");=0A= =0A= return function(opt_in) {=0A= var schema_ =3D "";=0A= var authority_ =3D "";=0A= var path_ =3D "";=0A= var query_ =3D "";=0A= var qparms_ =3D null;=0A= var fragment_ =3D "";=0A= var fparms_ =3D null;=0A= var unesc =3D window.decodeURIComponent ? decodeURIComponent : = unescape;=0A= var esc =3D window.encodeURIComponent ? encodeURIComponent : escape;=0A= var bundle =3D null;=0A= =0A= function parseFrom(url) {=0A= if (url.match(PARSE_REGEX) =3D=3D=3D null) {=0A= throw "Malformed URL: " + url;=0A= }=0A= schema_ =3D RegExp.$1;=0A= authority_ =3D RegExp.$2;=0A= path_ =3D RegExp.$3;=0A= query_ =3D RegExp.$4;=0A= fragment_ =3D RegExp.$5;=0A= }=0A= =0A= function serializeParams(params) {=0A= var str =3D [];=0A= for (var i =3D 0, j =3D params.length; i < j; ++i) {=0A= var key =3D params[i][0];=0A= var val =3D params[i][1];=0A= if (val =3D=3D=3D undefined) {=0A= continue;=0A= }=0A= str.push(esc(key) + (val !=3D=3D null ? '=3D' + esc(val) : ""));=0A= }=0A= return str.join('&');=0A= }=0A= =0A= function getQuery() {=0A= if (qparms_) {=0A= query_ =3D serializeParams(qparms_);=0A= qparms_ =3D null;=0A= }=0A= return query_;=0A= }=0A= =0A= function getFragment() {=0A= if (fparms_) {=0A= fragment_ =3D serializeParams(fparms_);=0A= fparms_ =3D null;=0A= }=0A= return fragment_;=0A= }=0A= =0A= function getQP(key) {=0A= qparms_ =3D qparms_ || parseParams(query_);=0A= return getParam(qparms_, key);=0A= }=0A= =0A= function getFP(key) {=0A= fparms_ =3D fparms_ || parseParams(fragment_);=0A= return getParam(fparms_, key);=0A= }=0A= =0A= function setQP(argOne, argTwo) {=0A= qparms_ =3D setParams(qparms_ || parseParams(query_), argOne, = argTwo);=0A= return bundle;=0A= }=0A= =0A= function setFP(argOne, argTwo) {=0A= fparms_ =3D setParams(fparms_ || parseParams(fragment_), argOne, = argTwo);=0A= return bundle;=0A= }=0A= =0A= function getOrigin() {=0A= return [=0A= schema_,=0A= schema_ !=3D=3D "" ? ":" : "",=0A= authority_ !=3D=3D "" ? "//" : "",=0A= authority_=0A= ].join("");=0A= }=0A= =0A= /**=0A= * Returns a readable representation of the URL.=0A= * =0A= * @return {string} A readable URL.=0A= */=0A= function toString() {=0A= var query =3D getQuery();=0A= var fragment =3D getFragment();=0A= return [=0A= getOrigin(),=0A= path_,=0A= query !=3D=3D "" ? "?" : "",=0A= query,=0A= fragment !=3D=3D "" ? "#" : "",=0A= fragment=0A= ].join("");=0A= }=0A= =0A= function parseParams(str) {=0A= var params =3D [];=0A= var pairs =3D str.split("&");=0A= for (var i =3D 0, j =3D pairs.length; i < j; ++i) {=0A= var kv =3D pairs[i].split('=3D');=0A= var key =3D kv.shift();=0A= var value =3D null;=0A= if (kv.length > 0) {=0A= value =3D kv.join('').replace(/\+/g, " ");=0A= }=0A= params.push([ key, value !=3D null ? unesc(value) : null ]);=0A= }=0A= return params;=0A= }=0A= =0A= function getParam(pmap, key) {=0A= for (var i =3D 0, j =3D pmap.length; i < j; ++i) {=0A= if (pmap[i][0] =3D=3D key) {=0A= return pmap[i][1];=0A= }=0A= }=0A= // undefined =3D no key set=0A= // vs. null =3D no value set and "" =3D value is empty=0A= return undefined;=0A= }=0A= =0A= function setParams(pset, argOne, argTwo) {=0A= // Assume by default that we're setting by map (full replace).=0A= var newParams =3D argOne;=0A= if (typeof argOne =3D=3D=3D 'string') {=0A= // N/V set (single param override)=0A= newParams =3D {};=0A= newParams[argOne] =3D argTwo;=0A= }=0A= for (var key in newParams) {=0A= var found =3D false;=0A= for (var i =3D 0, j =3D pset.length; !found && i < j; ++i) {=0A= if (pset[i][0] =3D=3D key) {=0A= pset[i][1] =3D newParams[key];=0A= found =3D true;=0A= }=0A= }=0A= if (!found) {=0A= pset.push([ key, newParams[key] ]);=0A= }=0A= }=0A= return pset;=0A= }=0A= =0A= function stripPrefix(str, pfx) {=0A= str =3D str || "";=0A= if (str[0] =3D=3D=3D pfx) {=0A= str =3D str.substr(pfx.length);=0A= }=0A= return str;=0A= }=0A= =0A= // CONSTRUCTOR=0A= if (typeof opt_in =3D=3D=3D "object" &&=0A= typeof opt_in.toString =3D=3D=3D "function") {=0A= // Assume it's another shindig.uri, or something that can be = parsed from one.=0A= parseFrom(opt_in.toString());=0A= } else if (opt_in) {=0A= parseFrom(opt_in);=0A= }=0A= =0A= bundle =3D {=0A= // Getters=0A= getSchema: function() { return schema_; },=0A= getAuthority: function() { return authority_; },=0A= getOrigin: getOrigin,=0A= getPath: function() { return path_; },=0A= getQuery: getQuery,=0A= getFragment: getFragment,=0A= getQP: getQP,=0A= getFP: getFP,=0A= =0A= // Setters=0A= setSchema: function(schema) { schema_ =3D schema; return bundle; },=0A= setAuthority: function(authority) { authority_ =3D authority; = return bundle; },=0A= setPath: function(path) { path_ =3D (path[0] =3D=3D=3D "/" ? "" : = "/") + path; return bundle; },=0A= setQuery: function(query) { qparms_ =3D null; query_ =3D = stripPrefix(query, '?'); return bundle; },=0A= setFragment: function(fragment) { fparms_ =3D null; fragment_ =3D = stripPrefix(fragment, '#'); return bundle; },=0A= setQP: setQP,=0A= setFP: setFP,=0A= setExistingP: function(key, val) {=0A= if (getQP(key, val) !=3D=3D undefined) {=0A= setQP(key, val);=0A= }=0A= if (getFP(key, val) !=3D=3D undefined) {=0A= setFP(key, val);=0A= }=0A= return bundle;=0A= },=0A= =0A= // Core utility methods.=0A= toString: toString=0A= };=0A= =0A= return bundle;=0A= }=0A= })();=0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations under the = License.=0A= */=0A= =0A= (function() {=0A= /**=0A= * Called by the transports for each service method that they expose=0A= * @param {string} method The method to expose e.g. "people.get"=0A= * @param {Object.} transport The transport used to = execute a call for the method=0A= */=0A= osapi._registerMethod =3D function (method, transport) {=0A= var has___ =3D typeof ___ !=3D=3D 'undefined';=0A= =0A= // Skip registration of local newBatch implementation.=0A= if (method =3D=3D "newBatch") {=0A= return;=0A= }=0A= =0A= // Lookup last method value.=0A= var parts =3D method.split(".");=0A= var last =3D osapi;=0A= for (var i =3D 0; i < parts.length - 1; i++) {=0A= last[parts[i]] =3D last[parts[i]] || {};=0A= last =3D last[parts[i]];=0A= }=0A= =0A= // Use the batch as the actual executor of calls.=0A= var apiMethod =3D function(rpc) {=0A= var batch =3D osapi.newBatch();=0A= var boundCall =3D {};=0A= boundCall.execute =3D function(callback) {=0A= var feralCallback =3D has___ ? ___.untame(callback) : callback;=0A= var that =3D has___ ? ___.USELESS : this;=0A= batch.add(method, this);=0A= batch.execute(function(batchResult) {=0A= if (batchResult.error) {=0A= feralCallback.call(that, batchResult.error);=0A= } else {=0A= feralCallback.call(that, batchResult[method]);=0A= }=0A= });=0A= }=0A= if (has___) {=0A= ___.markInnocent(boundCall.execute, 'execute');=0A= }=0A= // TODO: This shouldnt really be necessary. The spec should be = clear enough about=0A= // defaults that we dont have to populate this.=0A= rpc =3D rpc || {};=0A= rpc.userId =3D rpc.userId || "@viewer";=0A= rpc.groupId =3D rpc.groupId || "@self";=0A= =0A= // Decorate the execute method with the information necessary for = batching=0A= boundCall.method =3D method;=0A= boundCall.transport =3D transport;=0A= boundCall.rpc =3D rpc;=0A= =0A= return boundCall;=0A= };=0A= if (has___ && typeof ___.markInnocent !=3D=3D 'undefined') {=0A= ___.markInnocent(apiMethod, method);=0A= }=0A= =0A= if (last[parts[parts.length - 1]]) {=0A= gadgets.warn("Skipping duplicate osapi method definition " + = method + " on transport " + transport.name);=0A= } else {=0A= last[parts[parts.length - 1]] =3D apiMethod;=0A= }=0A= };=0A= })();=0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations under the = License.=0A= */=0A= =0A= (function() {=0A= =0A= /**=0A= * It is common to batch requests together to make them more efficient.=0A= *=0A= * Note: the container config specified endpoints at which services = are to be found.=0A= * When creating a batch, the calls are split out into separate = requests based on the=0A= * transport, as it may get sent to a different server on the backend.=0A= */=0A= var newBatch =3D function() {=0A= var that =3D {};=0A= =0A= // An array of requests where each request is=0A= // { key : =0A= // request : {=0A= // method : =0A= // rpc : =0A= // transport : =0A= // }=0A= // }=0A= =0A= /** @type {Array.} */=0A= var keyedRequests =3D [];=0A= =0A= /**=0A= * Create a new request in the batch=0A= * @param {string} key id for the request=0A= * @param {Object} request the opensocial request object which is of = the form=0A= * { method : =0A= * rpc : =0A= * transport : =0A= * }=0A= */=0A= var add =3D function(key, request) {=0A= if (request && key) {=0A= keyedRequests.push({"key" : key, "request" : request});=0A= }=0A= return that;=0A= };=0A= =0A= /**=0A= * Convert our internal request format into a JSON-RPC=0A= * @param {Object} request=0A= */=0A= var toJsonRpc =3D function(request) {=0A= var jsonRpc =3D {method : request.request.method, id : = request.key};=0A= if (request.request.rpc) {=0A= jsonRpc.params =3D request.request.rpc;=0A= }=0A= return jsonRpc;=0A= };=0A= =0A= /**=0A= * Call to make a batch execute its requests. Batch will distribute = calls over their=0A= * bound transports and then merge them before calling the = userCallback. If the result=0A= * of an rpc is another rpc request then it will be chained and = executed.=0A= *=0A= * @param {function(Object)} userCallback the callback to the gadget = where results are passed.=0A= */=0A= var execute =3D function(userCallback) {=0A= var batchResult =3D {};=0A= =0A= var perTransportBatch =3D {};=0A= =0A= // Break requests into their per-transport batches in call order=0A= /** @type {number} */=0A= var latchCount =3D 0;=0A= var transports =3D [];=0A= for (var i =3D 0; i < keyedRequests.length; i++) {=0A= // Batch requests per-transport=0A= var transport =3D keyedRequests[i].request.transport;=0A= if (!perTransportBatch[transport.name]) {=0A= transports.push(transport);=0A= latchCount++;=0A= }=0A= perTransportBatch[transport.name] =3D = perTransportBatch[transport.name] || [];=0A= =0A= // Transform the request into JSON-RPC form before sending to = the transport=0A= = perTransportBatch[transport.name].push(toJsonRpc(keyedRequests[i]));=0A= }=0A= =0A= // Define callback for transports=0A= var transportCallback =3D function(transportBatchResult) {=0A= if (transportBatchResult.error) {=0A= batchResult.error =3D transportBatchResult.error;=0A= }=0A= // Merge transport results into overall result and hoist data.=0A= // All transport results are required to be of the format=0A= // { : , ...}=0A= for (var i =3D 0; i < keyedRequests.length; i++) {=0A= var key =3D keyedRequests[i].key;=0A= var response =3D transportBatchResult[key];=0A= if (response) {=0A= if (response.error) {=0A= // No need to hoist error responses=0A= batchResult[key] =3D response;=0A= } else {=0A= // Handle both compliant and non-compliant JSON-RPC data = responses.=0A= batchResult[key] =3D response.data || response.result;=0A= }=0A= }=0A= }=0A= =0A= // Latch on no. of transports before calling user callback=0A= latchCount--;=0A= if (latchCount =3D=3D=3D 0) {=0A= userCallback(batchResult);=0A= }=0A= };=0A= =0A= // For each transport execute its local batch of requests=0A= for (var j =3D 0; j < transports.length; j++) {=0A= transports[j].execute(perTransportBatch[transports[j].name], = transportCallback);=0A= }=0A= =0A= // Force the callback to occur asynchronously even if there were = no actual calls=0A= if (latchCount =3D=3D 0) {=0A= window.setTimeout(function(){userCallback(batchResult)}, 0);=0A= }=0A= };=0A= =0A= that.execute =3D execute;=0A= that.add =3D add;=0A= return that;=0A= };=0A= =0A= osapi.newBatch =3D newBatch;=0A= })();=0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations under the = License.=0A= */=0A= =0A= /**=0A= * Provide a transport of osapi requests over JSON-RPC. Exposed JSON-RPC = endpoints and=0A= * their associated methods are available from config in the = "osapi.services" field.=0A= */=0A= (function() {=0A= =0A= /**=0A= * Called by a batch to execute all requests=0A= * @param {Object} requests=0A= * @param {function(Object)} callback=0A= */=0A= function execute(requests, callback) {=0A= =0A= function processResponse(response) {=0A= // Convert an XHR failure to a JSON-RPC error=0A= if (response.errors[0]) {=0A= callback({=0A= error : {=0A= code : response.rc,=0A= message : response.text=0A= }=0A= });=0A= } else {=0A= var jsonResponse =3D response.result || response.data;=0A= if (jsonResponse.error) {=0A= callback(jsonResponse);=0A= } else {=0A= var responseMap =3D {};=0A= for (var i =3D 0; i < jsonResponse.length; i++) {=0A= responseMap[jsonResponse[i].id] =3D jsonResponse[i];=0A= }=0A= callback(responseMap);=0A= }=0A= }=0A= }=0A= =0A= var request =3D {=0A= "POST_DATA" : gadgets.json.stringify(requests),=0A= "CONTENT_TYPE" : "JSON",=0A= "METHOD" : "POST",=0A= "AUTHORIZATION" : "SIGNED"=0A= };=0A= =0A= var url =3D this.name;=0A= var token =3D shindig.auth.getSecurityToken();=0A= if (token) {=0A= url +=3D "?st=3D";=0A= url +=3D encodeURIComponent(token);=0A= }=0A= gadgets.io.makeNonProxiedRequest(url, processResponse, request, = "application/json");=0A= }=0A= =0A= function init(config) {=0A= var services =3D config["osapi.services"];=0A= if (services) {=0A= // Iterate over the defined services, extract the http endpoints = and=0A= // create a transport per-endpoint=0A= for (var endpointName in services) if = (services.hasOwnProperty(endpointName)) {=0A= if (endpointName.indexOf("http") =3D=3D 0 ||=0A= endpointName.indexOf("//") =3D=3D 0) {=0A= // Expand the host & append the security token=0A= var endpointUrl =3D endpointName.replace("%host%", = document.location.host);=0A= var transport =3D { name : endpointUrl, "execute" : execute };=0A= var methods =3D services[endpointName];=0A= for (var i=3D0; i < methods.length; i++) {=0A= osapi._registerMethod(methods[i], transport);=0A= }=0A= }=0A= }=0A= }=0A= }=0A= =0A= // We do run this in the container mode in the new common container=0A= if (gadgets.config) {=0A= gadgets.config.register("osapi.services", null, init);=0A= }=0A= =0A= })();=0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations under the = License.=0A= */=0A= =0A= /**=0A= * A transport for osapi based on gadgets.rpc. Allows osapi to expose = APIs requiring container=0A= * and user UI mediation in addition to allowing data oriented APIs to = be implemented using=0A= * gadgets.rpc instead of XHR/JSON-RPC/REST etc..=0A= */=0A= if (gadgets && gadgets.rpc) { //Dont bind if gadgets.rpc not defined=0A= (function() {=0A= =0A= /**=0A= * Execute the JSON-RPC batch of gadgets.rpc. The container is = expected to implement=0A= * the method osapi._handleGadgetRpcMethod()=0A= *=0A= * @param {Object} requests the opensocial JSON-RPC request batch=0A= * @param {function(Object)} callback to the osapi batch with either = an error response or=0A= * a JSON-RPC batch result=0A= * @private=0A= */=0A= function execute(requests, callback) {=0A= var rpcCallback =3D function(response) {=0A= if (!response) {=0A= callback({ code : 500, message : 'Container refused the = request' });=0A= } else if (response.error) {=0A= callback(response);=0A= } else {=0A= var responseMap =3D {};=0A= for (var i =3D 0; i < response.length; i++) {=0A= responseMap[response[i].id] =3D response[i];=0A= }=0A= callback(responseMap);=0A= }=0A= };=0A= gadgets.rpc.call('..', 'osapi._handleGadgetRpcMethod', = rpcCallback, requests);=0A= // TODO - Timeout handling if rpc silently fails?=0A= }=0A= =0A= function init(config) {=0A= var transport =3D { name : "gadgets.rpc", "execute" : execute };=0A= var services =3D config["osapi.services"];=0A= if (services) {=0A= // Iterate over the defined services, extract the gadget.rpc = endpoint and=0A= // bind to it=0A= for (var endpointName in services) if = (services.hasOwnProperty(endpointName)) {=0A= if (endpointName =3D=3D=3D "gadgets.rpc") {=0A= var methods =3D services[endpointName];=0A= for (var i=3D0; i < methods.length; i++) {=0A= osapi._registerMethod(methods[i], transport);=0A= }=0A= }=0A= }=0A= }=0A= =0A= // Check if the container.listMethods is bound? If it is then use = it to=0A= // introspect the container services for available methods and = bind them=0A= // Because the call is asynchronous we delay the execution of the = gadget onLoad=0A= // handler until the callback has completed. Containers wishing to = avoid this=0A= // behavior should not specify a binding for container.listMethods = in their=0A= // container config but rather list out all the container methods = they want to=0A= // expose directly which is the preferred option for production = environments=0A= if (osapi.container && osapi.container.listMethods) {=0A= =0A= // Swap out the onload handler with a latch so that it is not = called=0A= // until two of the three following events occur=0A= // 1 - gadgets.util.runOnLoadHandlers called at end of gadget = content=0A= // 2 - callback from container.listMethods=0A= // 3 - callback from window.setTimeout=0A= var originalRunOnLoadHandlers =3D gadgets.util.runOnLoadHandlers;=0A= var count =3D 2;=0A= var newRunOnLoadHandlers =3D function() {=0A= count--;=0A= if (count =3D=3D 0) {=0A= originalRunOnLoadHandlers();=0A= }=0A= };=0A= gadgets.util.runOnLoadHandlers =3D newRunOnLoadHandlers;=0A= =0A= // Call for the container methods and bind them to osapi.=0A= osapi.container.listMethods({}).execute(function(response) {=0A= if (!response.error) {=0A= for (var i =3D 0; i < response.length; i++) {=0A= // do not rebind container.listMethods implementation=0A= if (response[i] !=3D "container.listMethods") {=0A= osapi._registerMethod(response[i], transport);=0A= }=0A= }=0A= }=0A= // Notify completion=0A= newRunOnLoadHandlers();=0A= });=0A= =0A= // Wait 500ms for the rpc. This should be a reasonable upper = bound=0A= // even for slow transports while still allowing for reasonable = testing=0A= // in a development environment=0A= window.setTimeout(newRunOnLoadHandlers, 500);=0A= }=0A= }=0A= =0A= // Do not run this in container mode.=0A= if (gadgets.config && gadgets.config.isGadget) {=0A= gadgets.config.register("osapi.services", null, init);=0A= }=0A= })();=0A= }=0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations under the = License.=0A= */=0A= =0A= /**=0A= * Service to retrieve People via JSON RPC opensocial calls.=0A= * Called in onLoad handler as osapi.people.get could be defined by=0A= * the container over the gadgets.rpc transport.=0A= */=0A= gadgets.util.registerOnLoadHandler(function() {=0A= =0A= // No point defining these if osapi.people.get doesn't exist=0A= if (osapi && osapi.people && osapi.people.get) {=0A= /**=0A= * Helper functions to get People.=0A= * Options specifies parameters to the call as outlined in the=0A= * JSON RPC Opensocial Spec=0A= * = http://www.opensocial.org/Technical-Resources/opensocial-spec-v081/rpc-pr= otocol=0A= * @param {object.} The JSON object of parameters for the = specific request=0A= */=0A= /**=0A= * Function to get Viewer profile.=0A= * Options specifies parameters to the call as outlined in the=0A= * JSON RPC Opensocial Spec=0A= * = http://www.opensocial.org/Technical-Resources/opensocial-spec-v081/rpc-pr= otocol=0A= * @param {object.} The JSON object of parameters for the = specific request=0A= */=0A= osapi.people.getViewer =3D function(options) {=0A= options =3D options || {};=0A= options.userId =3D "@viewer";=0A= options.groupId =3D "@self";=0A= return osapi.people.get(options);=0A= };=0A= =0A= /**=0A= * Function to get Viewer's friends' profiles.=0A= * Options specifies parameters to the call as outlined in the=0A= * JSON RPC Opensocial Spec=0A= * = http://www.opensocial.org/Technical-Resources/opensocial-spec-v081/rpc-pr= otocol=0A= * @param {object.} The JSON object of parameters for the = specific request=0A= */=0A= osapi.people.getViewerFriends =3D function(options) {=0A= options =3D options || {};=0A= options.userId =3D "@viewer";=0A= options.groupId =3D "@friends";=0A= return osapi.people.get(options);=0A= };=0A= =0A= /**=0A= * Function to get Owner profile.=0A= * Options specifies parameters to the call as outlined in the=0A= * JSON RPC Opensocial Spec=0A= * = http://www.opensocial.org/Technical-Resources/opensocial-spec-v081/rpc-pr= otocol=0A= * @param {object.} The JSON object of parameters for the = specific request=0A= */=0A= osapi.people.getOwner =3D function(options) {=0A= options =3D options || {};=0A= options.userId =3D "@owner";=0A= options.groupId =3D "@self";=0A= return osapi.people.get(options);=0A= };=0A= =0A= /**=0A= * Function to get Owner's friends' profiles.=0A= * Options specifies parameters to the call as outlined in the=0A= * JSON RPC Opensocial Spec=0A= * = http://www.opensocial.org/Technical-Resources/opensocial-spec-v081/rpc-pr= otocol=0A= * @param {object.} The JSON object of parameters for the = specific request=0A= */=0A= osapi.people.getOwnerFriends =3D function(options) {=0A= options =3D options || {};=0A= options.userId =3D "@owner";=0A= options.groupId =3D "@friends";=0A= return osapi.people.get(options);=0A= };=0A= }=0A= });=0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations=0A= * under the License.=0A= */=0A= =0A= /**=0A= * @class=0A= * Tame and expose core osapi.* API to cajoled gadgets=0A= */=0A= var tamings___ =3D tamings___ || [];=0A= tamings___.push(function(imports) {=0A= =0A= ___.tamesTo(osapi.newBatch, ___.markFuncFreeze(function () {=0A= var result =3D osapi.newBatch();=0A= ___.markInnocent(result['add'], 'add');=0A= ___.markInnocent(result['execute'], 'execute');=0A= return ___.tame(result);=0A= }));=0A= =0A= // OSAPI functions are marked as simple funcs as they are registered=0A= imports.outers.osapi =3D ___.tame(osapi);=0A= ___.grantRead(imports.outers, 'osapi');=0A= =0A= // Forced to tame in an onload handler because peoplehelpers does=0A= // not define some functions till runOnLoadHandlers runs=0A= var savedImports =3D imports;=0A= gadgets.util.registerOnLoadHandler(function() {=0A= if (osapi && osapi.people && osapi.people.get) {=0A= caja___.whitelistFuncs([=0A= [osapi.people, 'getViewer'],=0A= [osapi.people, 'getViewerFriends'],=0A= [osapi.people, 'getOwner'],=0A= [osapi.people, 'getOwnerFriends']=0A= ]);=0A= // Careful not to clobber osapi.people which already has tamed = functions on it=0A= savedImports.outers.osapi.people.getViewer =3D = ___.tame(osapi.people.getViewer);=0A= savedImports.outers.osapi.people.getViewerFriends =3D = ___.tame(osapi.people.getViewerFriends);=0A= savedImports.outers.osapi.people.getOwner =3D = ___.tame(osapi.people.getOwner);=0A= savedImports.outers.osapi.people.getOwnerFriends =3D = ___.tame(osapi.people.getOwnerFriends);=0A= }=0A= });=0A= =0A= });=0A= ;=0A= /**=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations under the = License.=0A= */=0A= =0A= /**=0A= * @fileoverview Augments shindig.uri class with various useful helper = methods.=0A= */=0A= =0A= shindig._uri =3D shindig.uri;=0A= shindig.uri =3D (function() {=0A= var oldCtor =3D shindig._uri;=0A= shindig._uri =3D null;=0A= =0A= /**=0A= * Checks that a Uri has the same origin as this Uri.=0A= *=0A= * Two Uris have the same origin if they point to the same schema, = server=0A= * and port.=0A= *=0A= * @param {Url} other The Uri to compare to this Uri.=0A= * @return {boolean} Whether the Uris have the same origin.=0A= */=0A= function hasSameOrigin(self, other) {=0A= return self.getOrigin() =3D=3D other.getOrigin();=0A= }=0A= =0A= /**=0A= * Fully qualifies this Uri if it is relative, using a given base Uri.=0A= * =0A= * @param {Uri} self The base Uri.=0A= * @param {Uri} base The Uri to resolve.=0A= */=0A= function resolve(self, base) {=0A= if (self.getSchema() =3D=3D '') {=0A= self.setSchema(base.getSchema());=0A= }=0A= if (self.getAuthority() =3D=3D '') {=0A= self.setAuthority(base.getAuthority());=0A= }=0A= var selfPath =3D self.getPath();=0A= if (selfPath =3D=3D '' || selfPath.charAt(0) !=3D '/') {=0A= var basePath =3D base.getPath(); =0A= var lastSlash =3D basePath.lastIndexOf('/');=0A= if (lastSlash !=3D -1) {=0A= basePath =3D basePath.substring(0, lastSlash + 1);=0A= }=0A= self.setPath(base.getPath() + selfPath);=0A= }=0A= }=0A= =0A= return function(opt_in) {=0A= var self =3D oldCtor(opt_in);=0A= self.hasSameOrigin =3D function(other) {=0A= return hasSameOrigin(self, other);=0A= };=0A= self.resolve =3D function(other) {=0A= return resolve(self, other);=0A= };=0A= return self;=0A= };=0A= })();=0A= ;=0A= /**=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations under the = License.=0A= */=0A= =0A= /**=0A= * @fileoverview Utility functions for the Open Gadget Container=0A= */=0A= =0A= Function.prototype.inherits =3D function(parentCtor) {=0A= function tempCtor() {};=0A= tempCtor.prototype =3D parentCtor.prototype;=0A= this.superClass_ =3D parentCtor.prototype;=0A= this.prototype =3D new tempCtor();=0A= this.prototype.constructor =3D this;=0A= };;=0A= /**=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations under the = License.=0A= */=0A= =0A= /**=0A= * @fileoverview Functions for setting, getting and deleting cookies=0A= */=0A= =0A= /**=0A= * Namespace for cookie functions=0A= */=0A= =0A= // TODO: find the official solution for a cookies library=0A= shindig.cookies =3D {};=0A= =0A= =0A= shindig.cookies.JsType_ =3D {=0A= UNDEFINED: 'undefined'=0A= };=0A= =0A= shindig.cookies.isDef =3D function(val) {=0A= return typeof val !=3D shindig.cookies.JsType_.UNDEFINED;=0A= };=0A= =0A= =0A= /**=0A= * Sets a cookie.=0A= * The max_age can be -1 to set a session cookie. To remove and expire = cookies,=0A= * use remove() instead.=0A= *=0A= * @param {string} name The cookie name.=0A= * @param {string} value The cookie value.=0A= * @param {number} opt_maxAge The max age in seconds (from now). Use -1 = to set=0A= * a session cookie. If not provided, the = default is=0A= * -1 (i.e. set a session cookie).=0A= * @param {string} opt_path The path of the cookie, or null to not = specify a=0A= * path attribute (browser will use the full = request=0A= * path). If not provided, the default is '/' = (i.e.=0A= * path=3D/).=0A= * @param {string} opt_domain The domain of the cookie, or null to not = specify=0A= * a domain attribute (browser will use the = full=0A= * request host name). If not provided, the = default=0A= * is null (i.e. let browser use full request = host=0A= * name).=0A= */=0A= shindig.cookies.set =3D function(name, value, opt_maxAge, opt_path, = opt_domain) {=0A= // we do not allow '=3D' or ';' in the name=0A= if (/;=3D/g.test(name)) {=0A= throw new Error('Invalid cookie name "' + name + '"');=0A= }=0A= // we do not allow ';' in value=0A= if (/;/g.test(value)) {=0A= throw new Error('Invalid cookie value "' + value + '"');=0A= }=0A= =0A= if (!shindig.cookies.isDef(opt_maxAge)) {=0A= opt_maxAge =3D -1;=0A= }=0A= =0A= var domainStr =3D opt_domain ? ';domain=3D' + opt_domain : '';=0A= var pathStr =3D opt_path ? ';path=3D' + opt_path : '';=0A= =0A= var expiresStr;=0A= =0A= // Case 1: Set a session cookie.=0A= if (opt_maxAge < 0) {=0A= expiresStr =3D '';=0A= =0A= // Case 2: Expire the cookie.=0A= // Note: We don't tell people about this option in the function doc = because=0A= // we prefer people to use ExpireCookie() to expire cookies.=0A= } else if (opt_maxAge =3D=3D=3D 0) {=0A= // Note: Don't use Jan 1, 1970 for date because NS 4.76 will try to = convert=0A= // it to local time, and if the local time is before Jan 1, 1970, = then the=0A= // browser will ignore the Expires attribute altogether.=0A= var pastDate =3D new Date(1970, 1 /*Feb*/, 1); // Feb 1, 1970=0A= expiresStr =3D ';expires=3D' + pastDate.toUTCString();=0A= =0A= // Case 3: Set a persistent cookie.=0A= } else {=0A= var futureDate =3D new Date((new Date).getTime() + opt_maxAge * = 1000);=0A= expiresStr =3D ';expires=3D' + futureDate.toUTCString();=0A= }=0A= =0A= document.cookie =3D name + '=3D' + value + domainStr + pathStr + = expiresStr;=0A= };=0A= =0A= =0A= /**=0A= * Returns the value for the first cookie with the given name=0A= * @param {string} name The name of the cookie to get=0A= * @param {string} opt_default If not found this is returned instead.=0A= * @return {string|undefined} The value of the cookie. If no cookie is = set this=0A= * returns opt_default or undefined if = opt_default is=0A= * not provided.=0A= */=0A= shindig.cookies.get =3D function(name, opt_default) {=0A= var nameEq =3D name + "=3D";=0A= var cookie =3D String(document.cookie);=0A= for (var pos =3D -1; (pos =3D cookie.indexOf(nameEq, pos + 1)) >=3D = 0;) {=0A= var i =3D pos;=0A= // walk back along string skipping whitespace and looking for a ; = before=0A= // the name to make sure that we don't match cookies whose name = contains=0A= // the given name as a suffix.=0A= while (--i >=3D 0) {=0A= var ch =3D cookie.charAt(i);=0A= if (ch =3D=3D ';') {=0A= i =3D -1; // indicate success=0A= break;=0A= }=0A= }=0A= if (i =3D=3D -1) { // first cookie in the string or we found a ;=0A= var end =3D cookie.indexOf(';', pos);=0A= if (end < 0) {=0A= end =3D cookie.length;=0A= }=0A= return cookie.substring(pos + nameEq.length, end);=0A= }=0A= }=0A= return opt_default;=0A= };=0A= =0A= =0A= /**=0A= * Removes and expires a cookie.=0A= *=0A= * @param {string} name The cookie name.=0A= * @param {string} opt_path The path of the cookie, or null to expire a = cookie=0A= * set at the full request path. If not = provided, the=0A= * default is '/' (i.e. path=3D/).=0A= * @param {string} opt_domain The domain of the cookie, or null to = expire a=0A= * cookie set at the full request host name. = If not=0A= * provided, the default is null (i.e. cookie = at=0A= * full request host name).=0A= */=0A= shindig.cookies.remove =3D function(name, opt_path, opt_domain) {=0A= var rv =3D shindig.cookies.containsKey(name);=0A= shindig.cookies.set(name, '', 0, opt_path, opt_domain);=0A= return rv;=0A= };=0A= =0A= =0A= /**=0A= * Gets the names and values for all the cookies=0A= * @private=0A= * @return {Object} An object with keys and values=0A= */=0A= shindig.cookies.getKeyValues_ =3D function() {=0A= var cookie =3D String(document.cookie);=0A= var parts =3D cookie.split(/\s*;\s*/);=0A= var keys =3D [], values =3D [], index, part;=0A= for (var i =3D 0; part =3D parts[i]; i++) {=0A= index =3D part.indexOf('=3D');=0A= =0A= if (index =3D=3D -1) { // empty name=0A= keys.push('');=0A= values.push(part);=0A= } else {=0A= keys.push(part.substring(0, index));=0A= values.push(part.substring(index + 1));=0A= }=0A= }=0A= return {keys: keys, values: values};=0A= };=0A= =0A= =0A= /**=0A= * Gets the names for all the cookies=0A= * @return {Array} An array with the names of the cookies=0A= */=0A= shindig.cookies.getKeys =3D function() {=0A= return shindig.cookies.getKeyValues_().keys;=0A= };=0A= =0A= =0A= /**=0A= * Gets the values for all the cookies=0A= * @return {Array} An array with the values of the cookies=0A= */=0A= shindig.cookies.getValues =3D function() {=0A= return shindig.cookies.getKeyValues_().values;=0A= };=0A= =0A= =0A= /**=0A= * Whether there are any cookies for this document=0A= * @return {boolean}=0A= */=0A= shindig.cookies.isEmpty =3D function() {=0A= return document.cookie =3D=3D=3D '';=0A= };=0A= =0A= =0A= /**=0A= * Returns the number of cookies for this document=0A= * @return {number}=0A= */=0A= shindig.cookies.getCount =3D function() {=0A= var cookie =3D String(document.cookie);=0A= if (cookie =3D=3D=3D '') {=0A= return 0;=0A= }=0A= var parts =3D cookie.split(/\s*;\s*/);=0A= return parts.length;=0A= };=0A= =0A= =0A= /**=0A= * Returns whether there is a cookie with the given name=0A= * @param {string} key The name of the cookie to test for=0A= * @return {boolean}=0A= */=0A= shindig.cookies.containsKey =3D function(key) {=0A= var sentinel =3D {};=0A= // if get does not find the key it returns the default value. We = therefore=0A= // compare the result with an object to ensure we do not get any false=0A= // positives.=0A= return shindig.cookies.get(key, sentinel) !=3D=3D sentinel;=0A= };=0A= =0A= =0A= /**=0A= * Returns whether there is a cookie with the given value. (This is an = O(n)=0A= * operation.)=0A= * @param {string} value The value to check for=0A= * @return {boolean}=0A= */=0A= shindig.cookies.containsValue =3D function(value) {=0A= // this O(n) in any case so lets do the trivial thing.=0A= var values =3D shindig.cookies.getKeyValues_().values;=0A= for (var i =3D 0; i < values.length; i++) {=0A= if (values[i] =3D=3D value) {=0A= return true;=0A= }=0A= }=0A= return false;=0A= };=0A= =0A= =0A= /**=0A= * Removes all cookies for this document=0A= */=0A= shindig.cookies.clear =3D function() {=0A= var keys =3D shindig.cookies.getKeyValues_().keys;=0A= for (var i =3D keys.length - 1; i >=3D 0; i--) {=0A= shindig.cookies.remove(keys[i]);=0A= }=0A= };=0A= =0A= /**=0A= * Static constant for the size of cookies. Per the spec, there's a 4K = limit=0A= * to the size of a cookie. To make sure users can't break this limit, we=0A= * should truncate long cookies at 3950 bytes, to be extra careful with = dumb=0A= * browsers/proxies that interpret 4K as 4000 rather than 4096=0A= * @type number=0A= */=0A= shindig.cookies.MAX_COOKIE_LENGTH =3D 3950;=0A= ;=0A= /**=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations under the = License.=0A= */=0A= =0A= /**=0A= * @fileoverview Open Gadget Container=0A= */=0A= =0A= shindig.errors =3D {};=0A= shindig.errors.SUBCLASS_RESPONSIBILITY =3D 'subclass responsibility';=0A= shindig.errors.TO_BE_DONE =3D 'to be done';=0A= =0A= /**=0A= * Calls an array of asynchronous functions and calls the continuation=0A= * function when all are done.=0A= * @param {Array} functions Array of asynchronous functions, each taking=0A= * one argument that is the continuation function that handles the = result=0A= * That is, each function is something like the following:=0A= * function(continuation) {=0A= * // compute result asynchronously=0A= * continuation(result);=0A= * }=0A= * @param {Function} continuation Function to call when all results are = in. It=0A= * is pass an array of all results of all functions=0A= * @param {Object} opt_this Optional object used as "this" when calling = each=0A= * function=0A= */=0A= shindig.callAsyncAndJoin =3D function(functions, continuation, opt_this) = {=0A= var pending =3D functions.length;=0A= var results =3D [];=0A= for (var i =3D 0; i < functions.length; i++) {=0A= // we need a wrapper here because i changes and we need one index=0A= // variable per closure=0A= var wrapper =3D function(index) {=0A= var fn =3D functions[index];=0A= if (typeof fn =3D=3D=3D 'string') {=0A= fn =3D opt_this[fn];=0A= }=0A= fn.call(opt_this, function(result) {=0A= results[index] =3D result;=0A= if (--pending =3D=3D=3D 0) {=0A= continuation(results);=0A= }=0A= });=0A= };=0A= wrapper(i);=0A= }=0A= };=0A= =0A= =0A= // ----------=0A= // Extensible=0A= =0A= shindig.Extensible =3D function() {=0A= };=0A= =0A= /**=0A= * Sets the dependencies.=0A= * @param {Object} dependencies Object whose properties are set on this=0A= * container as dependencies=0A= */=0A= shindig.Extensible.prototype.setDependencies =3D function(dependencies) {=0A= for (var p in dependencies) {=0A= this[p] =3D dependencies[p];=0A= }=0A= };=0A= =0A= /**=0A= * Returns a dependency given its name.=0A= * @param {String} name Name of dependency=0A= * @return {Object} Dependency with that name or undefined if not found=0A= */=0A= shindig.Extensible.prototype.getDependencies =3D function(name) {=0A= return this[name];=0A= };=0A= =0A= =0A= =0A= // -------------=0A= // UserPrefStore=0A= =0A= /**=0A= * User preference store interface.=0A= * @constructor=0A= */=0A= shindig.UserPrefStore =3D function() {=0A= };=0A= =0A= /**=0A= * Gets all user preferences of a gadget.=0A= * @param {Object} gadget Gadget object=0A= * @return {Object} All user preference of given gadget=0A= */=0A= shindig.UserPrefStore.prototype.getPrefs =3D function(gadget) {=0A= throw Error(shindig.errors.SUBCLASS_RESPONSIBILITY);=0A= };=0A= =0A= /**=0A= * Saves user preferences of a gadget in the store.=0A= * @param {Object} gadget Gadget object=0A= * @param {Object} prefs User preferences=0A= */=0A= shindig.UserPrefStore.prototype.savePrefs =3D function(gadget) {=0A= throw Error(shindig.errors.SUBCLASS_RESPONSIBILITY);=0A= };=0A= =0A= =0A= // -------------=0A= // DefaultUserPrefStore=0A= =0A= /**=0A= * User preference store implementation.=0A= * TODO: Turn this into a real implementation that is production safe=0A= * @constructor=0A= */=0A= shindig.DefaultUserPrefStore =3D function() {=0A= shindig.UserPrefStore.call(this);=0A= };=0A= shindig.DefaultUserPrefStore.inherits(shindig.UserPrefStore);=0A= =0A= shindig.DefaultUserPrefStore.prototype.getPrefs =3D function(gadget) { };=0A= =0A= shindig.DefaultUserPrefStore.prototype.savePrefs =3D function(gadget) { = };=0A= =0A= =0A= // -------------=0A= // GadgetService=0A= =0A= /**=0A= * Interface of service provided to gadgets for resizing gadgets,=0A= * setting title, etc.=0A= * @constructor=0A= */=0A= shindig.GadgetService =3D function() {=0A= };=0A= =0A= shindig.GadgetService.prototype.setHeight =3D function(elementId, = height) {=0A= throw Error(shindig.errors.SUBCLASS_RESPONSIBILITY);=0A= };=0A= =0A= shindig.GadgetService.prototype.setTitle =3D function(gadget, title) {=0A= throw Error(shindig.errors.SUBCLASS_RESPONSIBILITY);=0A= };=0A= =0A= shindig.GadgetService.prototype.setUserPref =3D function(id) {=0A= throw Error(shindig.errors.SUBCLASS_RESPONSIBILITY);=0A= };=0A= =0A= =0A= // ----------------=0A= // IfrGadgetService=0A= =0A= /**=0A= * Base implementation of GadgetService.=0A= * @constructor=0A= */=0A= shindig.IfrGadgetService =3D function() {=0A= shindig.GadgetService.call(this);=0A= gadgets.rpc.register('resize_iframe', this.setHeight);=0A= gadgets.rpc.register('set_pref', this.setUserPref);=0A= gadgets.rpc.register('set_title', this.setTitle);=0A= gadgets.rpc.register('requestNavigateTo', this.requestNavigateTo);=0A= gadgets.rpc.register('requestSendMessage', this.requestSendMessage);=0A= };=0A= =0A= shindig.IfrGadgetService.inherits(shindig.GadgetService);=0A= =0A= shindig.IfrGadgetService.prototype.setHeight =3D function(height) {=0A= if (height > shindig.container.maxheight_) {=0A= height =3D shindig.container.maxheight_;=0A= }=0A= =0A= var element =3D document.getElementById(this.f);=0A= if (element) {=0A= element.style.height =3D height + 'px';=0A= }=0A= };=0A= =0A= shindig.IfrGadgetService.prototype.setTitle =3D function(title) {=0A= var element =3D document.getElementById(this.f + '_title');=0A= if (element) {=0A= element.innerHTML =3D title.replace(/&/g, '&').replace(/, String} recipients An ID, array of IDs, or a = group reference;=0A= * the supported keys are VIEWER, OWNER, VIEWER_FRIENDS, OWNER_FRIENDS, = or a=0A= * single ID within one of those groups=0A= * @param {opensocial.Message} message The message to send to the = specified users=0A= * @param {Function} opt_callback The function to call once the request = has been=0A= * processed; either this callback will be called or the gadget will be = reloaded=0A= * from scratch=0A= * @param {opensocial.NavigationParameters} opt_params The optional = parameters=0A= * indicating where to send a user when a request is made, or when a = request=0A= * is accepted; options are of type NavigationParameters.DestinationType=0A= */=0A= shindig.IfrGadgetService.prototype.requestSendMessage =3D = function(recipients,=0A= message, opt_callback, opt_params) {=0A= if (opt_callback) {=0A= window.setTimeout(function() {=0A= opt_callback(new opensocial.ResponseItem(=0A= null, null, opensocial.ResponseItem.Error.NOT_IMPLEMENTED, = null));=0A= }, 0);=0A= }=0A= };=0A= =0A= /**=0A= * Navigates the page to a new url based on a gadgets requested view and=0A= * parameters.=0A= */=0A= shindig.IfrGadgetService.prototype.requestNavigateTo =3D function(view,=0A= opt_params) {=0A= var id =3D = shindig.container.gadgetService.getGadgetIdFromModuleId(this.f);=0A= var url =3D shindig.container.gadgetService.getUrlForView(view);=0A= =0A= if (opt_params) {=0A= var paramStr =3D gadgets.json.stringify(opt_params);=0A= if (paramStr.length > 0) {=0A= url +=3D '&appParams=3D' + encodeURIComponent(paramStr);=0A= }=0A= }=0A= =0A= if (url && document.location.href.indexOf(url) =3D=3D -1) {=0A= document.location.href =3D url;=0A= }=0A= };=0A= =0A= /**=0A= * This is a silly implementation that will need to be overriden by = almost all=0A= * real containers.=0A= * TODO: Find a better default for this function=0A= *=0A= * @param view The view name to get the url for=0A= */=0A= shindig.IfrGadgetService.prototype.getUrlForView =3D function(=0A= view) {=0A= if (view =3D=3D=3D 'canvas') {=0A= return '/canvas';=0A= } else if (view =3D=3D=3D 'profile') {=0A= return '/profile';=0A= } else {=0A= return null;=0A= }=0A= };=0A= =0A= shindig.IfrGadgetService.prototype.getGadgetIdFromModuleId =3D function(=0A= moduleId) {=0A= // Quick hack to extract the gadget id from module id=0A= return parseInt(moduleId.match(/_([0-9]+)$/)[1], 10);=0A= };=0A= =0A= =0A= // -------------=0A= // LayoutManager=0A= =0A= /**=0A= * Layout manager interface.=0A= * @constructor=0A= */=0A= shindig.LayoutManager =3D function() {=0A= };=0A= =0A= /**=0A= * Gets the HTML element that is the chrome of a gadget into which the = content=0A= * of the gadget can be rendered.=0A= * @param {Object} gadget Gadget instance=0A= * @return {Object} HTML element that is the chrome for the given gadget=0A= */=0A= shindig.LayoutManager.prototype.getGadgetChrome =3D function(gadget) {=0A= throw Error(shindig.errors.SUBCLASS_RESPONSIBILITY);=0A= };=0A= =0A= // -------------------=0A= // StaticLayoutManager=0A= =0A= /**=0A= * Static layout manager where gadget ids have a 1:1 mapping to chrome = ids.=0A= * @constructor=0A= */=0A= shindig.StaticLayoutManager =3D function() {=0A= shindig.LayoutManager.call(this);=0A= };=0A= =0A= shindig.StaticLayoutManager.inherits(shindig.LayoutManager);=0A= =0A= /**=0A= * Sets chrome ids, whose indexes are gadget instance ids (starting from = 0).=0A= * @param {Array} gadgetChromeIds Gadget id to chrome id map=0A= */=0A= shindig.StaticLayoutManager.prototype.setGadgetChromeIds =3D=0A= function(gadgetChromeIds) {=0A= this.gadgetChromeIds_ =3D gadgetChromeIds;=0A= };=0A= =0A= shindig.StaticLayoutManager.prototype.getGadgetChrome =3D = function(gadget) {=0A= var chromeId =3D this.gadgetChromeIds_[gadget.id];=0A= return chromeId ? document.getElementById(chromeId) : null;=0A= };=0A= =0A= =0A= // ----------------------=0A= // FloatLeftLayoutManager=0A= =0A= /**=0A= * FloatLeft layout manager where gadget ids have a 1:1 mapping to = chrome ids.=0A= * @constructor=0A= * @param {String} layoutRootId Id of the element that is the parent of = all=0A= * gadgets.=0A= */=0A= shindig.FloatLeftLayoutManager =3D function(layoutRootId) {=0A= shindig.LayoutManager.call(this);=0A= this.layoutRootId_ =3D layoutRootId;=0A= };=0A= =0A= shindig.FloatLeftLayoutManager.inherits(shindig.LayoutManager);=0A= =0A= shindig.FloatLeftLayoutManager.prototype.getGadgetChrome =3D=0A= function(gadget) {=0A= var layoutRoot =3D document.getElementById(this.layoutRootId_);=0A= if (layoutRoot) {=0A= var chrome =3D document.createElement('div');=0A= chrome.className =3D 'gadgets-gadget-chrome';=0A= chrome.style.cssFloat =3D 'left';=0A= layoutRoot.appendChild(chrome);=0A= return chrome;=0A= } else {=0A= return null;=0A= }=0A= };=0A= =0A= =0A= // ------=0A= // Gadget=0A= =0A= /**=0A= * Creates a new instance of gadget. Optional parameters are set as = instance=0A= * variables.=0A= * @constructor=0A= * @param {Object} params Parameters to set on gadget. Common = parameters:=0A= * "specUrl": URL to gadget specification=0A= * "private": Whether gadget spec is accessible only privately, which = means=0A= * browser can load it but not gadget server=0A= * "spec": Gadget Specification in XML=0A= * "userPrefs": a javascript object containing attribute value pairs = of user=0A= * preferences for this gadget with the value being a preference = object=0A= * "viewParams": a javascript object containing attribute value pairs=0A= * for this gadgets=0A= * "secureToken": an encoded token that is passed on the URL hash=0A= * "hashData": Query-string like data that will be added to the=0A= * hash portion of the URL.=0A= * "specVersion": a hash value used to add a v=3D param to allow for = better caching=0A= * "title": the default title to use for the title bar.=0A= * "height": height of the gadget=0A= * "width": width of the gadget=0A= * "debug": send debug=3D1 to the gadget server, gets us uncompressed=0A= * javascript=0A= */=0A= shindig.Gadget =3D function(params) {=0A= this.userPrefs =3D {};=0A= =0A= if (params) {=0A= for (var name in params) if (params.hasOwnProperty(name)) {=0A= this[name] =3D params[name];=0A= }=0A= }=0A= if (!this.secureToken) {=0A= // Assume that the default security token implementation is=0A= // in use on the server.=0A= this.secureToken =3D 'john.doe:john.doe:appid:cont:url:0:default';=0A= }=0A= };=0A= =0A= shindig.Gadget.prototype.getUserPrefs =3D function() {=0A= return this.userPrefs;=0A= };=0A= =0A= shindig.Gadget.prototype.saveUserPrefs =3D function() {=0A= shindig.container.userPrefStore.savePrefs(this);=0A= };=0A= =0A= shindig.Gadget.prototype.getUserPrefValue =3D function(name) {=0A= var pref =3D this.userPrefs[name];=0A= return typeof(pref.value) !=3D 'undefined' && pref.value !=3D null ?=0A= pref.value : pref['default'];=0A= };=0A= =0A= shindig.Gadget.prototype.render =3D function(chrome) {=0A= if (chrome) {=0A= var gadget =3D this;=0A= this.getContent(function(content) {=0A= chrome.innerHTML =3D content;=0A= gadget.finishRender(chrome);=0A= });=0A= }=0A= };=0A= =0A= shindig.Gadget.prototype.getContent =3D function(continuation) {=0A= shindig.callAsyncAndJoin([=0A= 'getTitleBarContent', 'getUserPrefsDialogContent',=0A= 'getMainContent'], function(results) {=0A= continuation(results.join(''));=0A= }, this);=0A= };=0A= =0A= /**=0A= * Gets title bar content asynchronously or synchronously.=0A= * @param {Function} continuation Function that handles title bar = content as=0A= * the one and only argument=0A= */=0A= shindig.Gadget.prototype.getTitleBarContent =3D function(continuation) {=0A= throw Error(shindig.errors.SUBCLASS_RESPONSIBILITY);=0A= };=0A= =0A= /**=0A= * Gets user preferences dialog content asynchronously or synchronously.=0A= * @param {Function} continuation Function that handles user preferences=0A= * content as the one and only argument=0A= */=0A= shindig.Gadget.prototype.getUserPrefsDialogContent =3D = function(continuation) {=0A= throw Error(shindig.errors.SUBCLASS_RESPONSIBILITY);=0A= };=0A= =0A= /**=0A= * Gets gadget content asynchronously or synchronously.=0A= * @param {Function} continuation Function that handles gadget content as=0A= * the one and only argument=0A= */=0A= shindig.Gadget.prototype.getMainContent =3D function(continuation) {=0A= throw Error(shindig.errors.SUBCLASS_RESPONSIBILITY);=0A= };=0A= =0A= shindig.Gadget.prototype.finishRender =3D function(chrome) {=0A= throw Error(shindig.errors.SUBCLASS_RESPONSIBILITY);=0A= };=0A= =0A= /*=0A= * Gets additional parameters to append to the iframe url=0A= * Override this method if you need any custom params.=0A= */=0A= shindig.Gadget.prototype.getAdditionalParams =3D function() {=0A= return '';=0A= };=0A= =0A= =0A= // ---------=0A= // IfrGadget=0A= =0A= shindig.BaseIfrGadget =3D function(opt_params) {=0A= shindig.Gadget.call(this, opt_params);=0A= this.serverBase_ =3D '/gadgets/'; // default gadget server=0A= this.queryIfrGadgetType_();=0A= };=0A= =0A= shindig.BaseIfrGadget.inherits(shindig.Gadget);=0A= =0A= shindig.BaseIfrGadget.prototype.GADGET_IFRAME_PREFIX_ =3D = 'remote_iframe_';=0A= =0A= shindig.BaseIfrGadget.prototype.CONTAINER =3D 'default';=0A= =0A= shindig.BaseIfrGadget.prototype.cssClassGadget =3D 'gadgets-gadget';=0A= shindig.BaseIfrGadget.prototype.cssClassTitleBar =3D = 'gadgets-gadget-title-bar';=0A= shindig.BaseIfrGadget.prototype.cssClassTitle =3D 'gadgets-gadget-title';=0A= shindig.BaseIfrGadget.prototype.cssClassTitleButtonBar =3D=0A= 'gadgets-gadget-title-button-bar';=0A= shindig.BaseIfrGadget.prototype.cssClassGadgetUserPrefsDialog =3D=0A= 'gadgets-gadget-user-prefs-dialog';=0A= shindig.BaseIfrGadget.prototype.cssClassGadgetUserPrefsDialogActionBar =3D=0A= 'gadgets-gadget-user-prefs-dialog-action-bar';=0A= shindig.BaseIfrGadget.prototype.cssClassTitleButton =3D = 'gadgets-gadget-title-button';=0A= shindig.BaseIfrGadget.prototype.cssClassGadgetContent =3D = 'gadgets-gadget-content';=0A= shindig.BaseIfrGadget.prototype.rpcToken =3D (0x7FFFFFFF * = Math.random()) | 0;=0A= shindig.BaseIfrGadget.prototype.rpcRelay =3D = '../container/rpc_relay.html';=0A= =0A= shindig.BaseIfrGadget.prototype.getTitleBarContent =3D = function(continuation) {=0A= var settingsButton =3D this.hasViewablePrefs_() ?=0A= 'settings '=0A= : '';=0A= continuation('
' + (this.title ? this.title : 'Title') + = ' | ' + settingsButton +=0A= 'toggle
');=0A= };=0A= =0A= shindig.BaseIfrGadget.prototype.getUserPrefsDialogContent =3D = function(continuation) {=0A= continuation('
');=0A= };=0A= =0A= shindig.BaseIfrGadget.prototype.setServerBase =3D function(url) {=0A= this.serverBase_ =3D url;=0A= };=0A= =0A= shindig.BaseIfrGadget.prototype.getServerBase =3D function() {=0A= return this.serverBase_;=0A= };=0A= =0A= shindig.BaseIfrGadget.prototype.getMainContent =3D = function(continuation) {=0A= // proper sub-class has not been mixed-in yet=0A= var gadget =3D this;=0A= window.setTimeout( function() {=0A= gadget.getMainContent(continuation);=0A= }, 0);=0A= };=0A= =0A= shindig.BaseIfrGadget.prototype.getIframeId =3D function() {=0A= return this.GADGET_IFRAME_PREFIX_ + this.id;=0A= };=0A= =0A= shindig.BaseIfrGadget.prototype.getUserPrefsDialogId =3D function() {=0A= return this.getIframeId() + '_userPrefsDialog';=0A= };=0A= =0A= shindig.BaseIfrGadget.prototype.getUserPrefsParams =3D function() {=0A= var params =3D '';=0A= for(var name in this.getUserPrefs()) {=0A= params +=3D '&up_' + encodeURIComponent(name) + '=3D' +=0A= encodeURIComponent(this.getUserPrefValue(name));=0A= }=0A= return params;=0A= };=0A= =0A= shindig.BaseIfrGadget.prototype.handleToggle =3D function() {=0A= var gadgetIframe =3D document.getElementById(this.getIframeId());=0A= if (gadgetIframe) {=0A= var gadgetContent =3D gadgetIframe.parentNode;=0A= var display =3D gadgetContent.style.display;=0A= gadgetContent.style.display =3D display ? '' : 'none';=0A= }=0A= };=0A= =0A= =0A= shindig.BaseIfrGadget.prototype.hasViewablePrefs_ =3D function() {=0A= for(var name in this.getUserPrefs()) {=0A= var pref =3D this.userPrefs[name];=0A= if (pref.type !=3D 'hidden') {=0A= return true;=0A= }=0A= }=0A= return false;=0A= };=0A= =0A= =0A= shindig.BaseIfrGadget.prototype.handleOpenUserPrefsDialog =3D function() = {=0A= if (this.userPrefsDialogContentLoaded) {=0A= this.showUserPrefsDialog();=0A= } else {=0A= var gadget =3D this;=0A= var igCallbackName =3D 'ig_callback_' + this.id;=0A= window[igCallbackName] =3D function(userPrefsDialogContent) {=0A= gadget.userPrefsDialogContentLoaded =3D true;=0A= gadget.buildUserPrefsDialog(userPrefsDialogContent);=0A= gadget.showUserPrefsDialog();=0A= };=0A= =0A= var script =3D document.createElement('script');=0A= script.src =3D 'http://www.gmodules.com/ig/gadgetsettings?mid=3D' + = this.id +=0A= '&output=3Djs' + this.getUserPrefsParams() + '&url=3D' + = this.specUrl;=0A= document.body.appendChild(script);=0A= }=0A= };=0A= =0A= shindig.BaseIfrGadget.prototype.buildUserPrefsDialog =3D = function(content) {=0A= var userPrefsDialog =3D = document.getElementById(this.getUserPrefsDialogId());=0A= userPrefsDialog.innerHTML =3D content +=0A= '
';=0A= userPrefsDialog.childNodes[0].style.display =3D '';=0A= };=0A= =0A= shindig.BaseIfrGadget.prototype.showUserPrefsDialog =3D = function(opt_show) {=0A= var userPrefsDialog =3D = document.getElementById(this.getUserPrefsDialogId());=0A= userPrefsDialog.style.display =3D (opt_show || opt_show =3D=3D=3D = undefined)=0A= ? '' : 'none';=0A= };=0A= =0A= shindig.BaseIfrGadget.prototype.hideUserPrefsDialog =3D function() {=0A= this.showUserPrefsDialog(false);=0A= };=0A= =0A= shindig.BaseIfrGadget.prototype.handleSaveUserPrefs =3D function() {=0A= this.hideUserPrefsDialog();=0A= =0A= var numFields =3D document.getElementById('m_' + this.id +=0A= '_numfields').value;=0A= for (var i =3D 0; i < numFields; i++) {=0A= var input =3D document.getElementById('m_' + this.id + '_' + i);=0A= var userPrefNamePrefix =3D 'm_' + this.id + '_up_';=0A= var userPrefName =3D input.name.substring(userPrefNamePrefix.length);=0A= var userPrefValue =3D input.value;=0A= this.userPrefs[userPrefName].value =3D userPrefValue;=0A= }=0A= =0A= this.saveUserPrefs();=0A= this.refresh();=0A= };=0A= =0A= shindig.BaseIfrGadget.prototype.handleCancelUserPrefs =3D function() {=0A= this.hideUserPrefsDialog();=0A= };=0A= =0A= shindig.BaseIfrGadget.prototype.refresh =3D function() {=0A= var iframeId =3D this.getIframeId();=0A= document.getElementById(iframeId).src =3D this.getIframeUrl();=0A= };=0A= =0A= shindig.BaseIfrGadget.prototype.queryIfrGadgetType_ =3D function() {=0A= // Get the gadget metadata and check if the gadget requires the = 'pubsub-2'=0A= // feature. If so, then we use OpenAjax Hub in order to create and = manage=0A= // the iframe. Otherwise, we create the iframe ourselves.=0A= var request =3D {=0A= context: {=0A= country: "default",=0A= language: "default",=0A= view: "default",=0A= container: "default"=0A= },=0A= gadgets: [{=0A= url: this.specUrl,=0A= moduleId: 1=0A= }]=0A= };=0A= =0A= var makeRequestParams =3D {=0A= "CONTENT_TYPE" : "JSON",=0A= "METHOD" : "POST",=0A= "POST_DATA" : gadgets.json.stringify(request)=0A= };=0A= =0A= var url =3D this.serverBase_+"metadata?st=3D" + this.secureToken;=0A= =0A= gadgets.io.makeNonProxiedRequest(url,=0A= handleJSONResponse,=0A= makeRequestParams,=0A= "application/javascript"=0A= );=0A= =0A= var gadget =3D this;=0A= function handleJSONResponse(obj) {=0A= var requiresPubSub2 =3D false;=0A= var arr =3D obj.data.gadgets[0].features;=0A= for(var i =3D 0; i < arr.length; i++) {=0A= if (arr[i] =3D=3D=3D "pubsub-2") {=0A= requiresPubSub2 =3D true;=0A= break;=0A= }=0A= }=0A= var subClass =3D requiresPubSub2 ? shindig.OAAIfrGadget : = shindig.IfrGadget;=0A= for (var name in subClass) if (subClass.hasOwnProperty(name)) {=0A= gadget[name] =3D subClass[name];=0A= }=0A= }=0A= };=0A= =0A= // ---------=0A= // IfrGadget=0A= =0A= shindig.IfrGadget =3D {=0A= getMainContent: function(continuation) {=0A= var iframeId =3D this.getIframeId();=0A= gadgets.rpc.setRelayUrl(iframeId, this.serverBase_ + this.rpcRelay);=0A= gadgets.rpc.setAuthToken(iframeId, this.rpcToken);=0A= continuation('
');=0A= },=0A= =0A= finishRender: function(chrome) {=0A= window.frames[this.getIframeId()].location =3D this.getIframeUrl();=0A= },=0A= =0A= getIframeUrl: function() {=0A= return this.serverBase_ + 'ifr?' +=0A= 'container=3D' + this.CONTAINER +=0A= '&mid=3D' + this.id +=0A= '&nocache=3D' + shindig.container.nocache_ +=0A= '&country=3D' + shindig.container.country_ +=0A= '&lang=3D' + shindig.container.language_ +=0A= '&view=3D' + shindig.container.view_ +=0A= (this.specVersion ? '&v=3D' + this.specVersion : '') +=0A= (shindig.container.parentUrl_ ? '&parent=3D' + = encodeURIComponent(shindig.container.parentUrl_) : '') +=0A= (this.debug ? '&debug=3D1' : '') +=0A= this.getAdditionalParams() +=0A= this.getUserPrefsParams() +=0A= (this.secureToken ? '&st=3D' + this.secureToken : '') +=0A= '&url=3D' + encodeURIComponent(this.specUrl) +=0A= '#rpctoken=3D' + this.rpcToken +=0A= (this.viewParams ?=0A= '&view-params=3D' + = encodeURIComponent(gadgets.json.stringify(this.viewParams)) : '') +=0A= (this.hashData ? '&' + this.hashData : '');=0A= }=0A= };=0A= =0A= =0A= // ---------=0A= // OAAIfrGadget=0A= =0A= shindig.OAAIfrGadget =3D {=0A= getMainContent: function(continuation) {=0A= continuation('
');=0A= },=0A= =0A= finishRender: function(chrome) {=0A= var iframeAttrs =3D {=0A= className: this.cssClassGadget,=0A= frameborder: "no",=0A= scrolling: "no"=0A= };=0A= if (this.height) {=0A= iframeAttrs.height =3D this.height;=0A= }=0A= if (this.width) {=0A= iframeAttrs.width =3D this.width;=0A= }=0A= =0A= new OpenAjax.hub.IframeContainer(=0A= gadgets.pubsub2router.hub,=0A= this.getIframeId(),=0A= {=0A= Container: {=0A= onSecurityAlert: function( source, alertType) {=0A= gadgets.error("Security error for container " + = source.getClientID() + " : " + alertType);=0A= source.getIframe().src =3D "about:blank"; =0A= // for debugging=0A= // },=0A= // onConnect: function( container ) {=0A= // gadgets.log("++ connected: " + container.getClientID());=0A= }=0A= },=0A= IframeContainer: {=0A= parent: document.getElementById(this.cssClassGadgetContent + = '-' + this.id),=0A= uri: this.getIframeUrl(),=0A= tunnelURI: shindig.uri(this.serverBase_ + = this.rpcRelay).resolve(shindig.uri(window.location.href)),=0A= iframeAttrs: iframeAttrs=0A= }=0A= }=0A= );=0A= },=0A= =0A= getIframeUrl: function() {=0A= return this.serverBase_ + 'ifr?' +=0A= 'container=3D' + this.CONTAINER +=0A= '&mid=3D' + this.id +=0A= '&nocache=3D' + shindig.container.nocache_ +=0A= '&country=3D' + shindig.container.country_ +=0A= '&lang=3D' + shindig.container.language_ +=0A= '&view=3D' + shindig.container.view_ +=0A= (this.specVersion ? '&v=3D' + this.specVersion : '') +=0A= // (shindig.container.parentUrl_ ? '&parent=3D' + = encodeURIComponent(shindig.container.parentUrl_) : '') +=0A= (this.debug ? '&debug=3D1' : '') +=0A= this.getAdditionalParams() +=0A= this.getUserPrefsParams() +=0A= (this.secureToken ? '&st=3D' + this.secureToken : '') +=0A= '&url=3D' + encodeURIComponent(this.specUrl) +=0A= // '#rpctoken=3D' + this.rpcToken +=0A= (this.viewParams ?=0A= '&view-params=3D' + = encodeURIComponent(gadgets.json.stringify(this.viewParams)) : '') +=0A= // (this.hashData ? '&' + this.hashData : '');=0A= (this.hashData ? '#' + this.hashData : '');=0A= }=0A= };=0A= =0A= =0A= // ---------=0A= // Container=0A= =0A= /**=0A= * Container interface.=0A= * @constructor=0A= */=0A= shindig.Container =3D function() {=0A= this.gadgets_ =3D {};=0A= this.parentUrl_ =3D document.location.href + '://' + = document.location.host;=0A= this.country_ =3D 'ALL';=0A= this.language_ =3D 'ALL';=0A= this.view_ =3D 'default';=0A= this.nocache_ =3D 1;=0A= =0A= // signed max int=0A= this.maxheight_ =3D 0x7FFFFFFF;=0A= };=0A= =0A= shindig.Container.inherits(shindig.Extensible);=0A= =0A= /**=0A= * Known dependencies:=0A= * gadgetClass: constructor to create a new gadget instance=0A= * userPrefStore: instance of a subclass of shindig.UserPrefStore=0A= * gadgetService: instance of a subclass of shindig.GadgetService=0A= * layoutManager: instance of a subclass of shindig.LayoutManager=0A= */=0A= =0A= shindig.Container.prototype.gadgetClass =3D shindig.Gadget;=0A= =0A= shindig.Container.prototype.userPrefStore =3D new = shindig.DefaultUserPrefStore();=0A= =0A= shindig.Container.prototype.gadgetService =3D new = shindig.GadgetService();=0A= =0A= shindig.Container.prototype.layoutManager =3D=0A= new shindig.StaticLayoutManager();=0A= =0A= shindig.Container.prototype.setParentUrl =3D function(url) {=0A= this.parentUrl_ =3D url;=0A= };=0A= =0A= shindig.Container.prototype.setCountry =3D function(country) {=0A= this.country_ =3D country;=0A= };=0A= =0A= shindig.Container.prototype.setNoCache =3D function(nocache) {=0A= this.nocache_ =3D nocache;=0A= };=0A= =0A= shindig.Container.prototype.setLanguage =3D function(language) {=0A= this.language_ =3D language;=0A= };=0A= =0A= shindig.Container.prototype.setView =3D function(view) {=0A= this.view_ =3D view;=0A= };=0A= =0A= shindig.Container.prototype.setMaxHeight =3D function(maxheight) {=0A= this.maxheight_ =3D maxheight;=0A= };=0A= =0A= shindig.Container.prototype.getGadgetKey_ =3D function(instanceId) {=0A= return 'gadget_' + instanceId;=0A= };=0A= =0A= shindig.Container.prototype.getGadget =3D function(instanceId) {=0A= return this.gadgets_[this.getGadgetKey_(instanceId)];=0A= };=0A= =0A= shindig.Container.prototype.createGadget =3D function(opt_params) {=0A= return new this.gadgetClass(opt_params);=0A= };=0A= =0A= shindig.Container.prototype.addGadget =3D function(gadget) {=0A= gadget.id =3D this.getNextGadgetInstanceId();=0A= this.gadgets_[this.getGadgetKey_(gadget.id)] =3D gadget;=0A= };=0A= =0A= shindig.Container.prototype.addGadgets =3D function(gadgets) {=0A= for (var i =3D 0; i < gadgets.length; i++) {=0A= this.addGadget(gadgets[i]);=0A= }=0A= };=0A= =0A= /**=0A= * Renders all gadgets in the container.=0A= */=0A= shindig.Container.prototype.renderGadgets =3D function() {=0A= for (var key in this.gadgets_) {=0A= this.renderGadget(this.gadgets_[key]);=0A= }=0A= };=0A= =0A= /**=0A= * Renders a gadget. Gadgets are rendered inside their chrome element.=0A= * @param {Object} gadget Gadget object=0A= */=0A= shindig.Container.prototype.renderGadget =3D function(gadget) {=0A= throw Error(shindig.errors.SUBCLASS_RESPONSIBILITY);=0A= };=0A= =0A= shindig.Container.prototype.nextGadgetInstanceId_ =3D 0;=0A= =0A= shindig.Container.prototype.getNextGadgetInstanceId =3D function() {=0A= return this.nextGadgetInstanceId_++;=0A= };=0A= =0A= /**=0A= * Refresh all the gadgets in the container.=0A= */=0A= shindig.Container.prototype.refreshGadgets =3D function() {=0A= for (var key in this.gadgets_) {=0A= this.gadgets_[key].refresh();=0A= }=0A= };=0A= =0A= =0A= // ------------=0A= // IfrContainer=0A= =0A= /**=0A= * Container that renders gadget using ifr.=0A= * @constructor=0A= */=0A= shindig.IfrContainer =3D function() {=0A= shindig.Container.call(this);=0A= };=0A= =0A= shindig.IfrContainer.inherits(shindig.Container);=0A= =0A= shindig.IfrContainer.prototype.gadgetClass =3D shindig.BaseIfrGadget;=0A= =0A= shindig.IfrContainer.prototype.gadgetService =3D new = shindig.IfrGadgetService();=0A= =0A= shindig.IfrContainer.prototype.setParentUrl =3D function(url) {=0A= if (!url.match(/^http[s]?:\/\//)) {=0A= url =3D document.location.href.match(/^[^?#]+\//)[0] + url;=0A= }=0A= =0A= this.parentUrl_ =3D url;=0A= };=0A= =0A= /**=0A= * Renders a gadget using ifr.=0A= * @param {Object} gadget Gadget object=0A= */=0A= shindig.IfrContainer.prototype.renderGadget =3D function(gadget) {=0A= var chrome =3D this.layoutManager.getGadgetChrome(gadget);=0A= gadget.render(chrome);=0A= };=0A= =0A= /**=0A= * Default container.=0A= */=0A= shindig.container =3D new shindig.IfrContainer();=0A= ;=0A= /**=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations under the = License.=0A= */=0A= =0A= /**=0A= * @fileoverview Base OSAPI binding=0A= */=0A= =0A= /**=0A= * Container-side binding for the gadgetsrpctransport used by osapi. = Containers=0A= * add services to the client-side osapi implementation by defining them = in the osapi=0A= * namespace=0A= */=0A= if (gadgets && gadgets.rpc) { //Only define if gadgets rpc exists=0A= =0A= /**=0A= * Dispatch a JSON-RPC batch request to services defined in the osapi = namespace=0A= * @param callbackId=0A= * @param requests=0A= */=0A= osapi._handleGadgetRpcMethod =3D function(requests) {=0A= var responses =3D new Array(requests.length);=0A= var callCount =3D 0;=0A= var callback =3D this.callback;=0A= var dummy =3D function(params, apiCallback) {=0A= apiCallback({});=0A= };=0A= for (var i =3D 0; i < requests.length; i++) {=0A= // Don't allow underscores in any part of the method name as a = convention=0A= // for restricted methods=0A= var current =3D osapi;=0A= if (requests[i].method.indexOf("_") =3D=3D -1) {=0A= var path =3D requests[i].method.split(".");=0A= for (var j =3D 0; j < path.length; j++) {=0A= if (current.hasOwnProperty(path[j])) {=0A= current =3D current[path[j]];=0A= } else {=0A= // No matching api=0A= current =3D dummy;=0A= break;=0A= }=0A= }=0A= } else {=0A= current =3D dummy;=0A= }=0A= =0A= // Execute the call and latch the rpc callback until all=0A= // complete=0A= current(requests[i].params, function(i) {=0A= return function(response) {=0A= // Put back in json-rpc format=0A= responses[i] =3D { id : requests[i].id, data : response};=0A= callCount++;=0A= if (callCount =3D=3D requests.length) {=0A= callback(responses);=0A= }=0A= };=0A= }(i));=0A= }=0A= };=0A= =0A= /**=0A= * Basic implementation of system.listMethods which can be used to = introspect=0A= * available services=0A= * @param request=0A= * @param callback=0A= */=0A= osapi.container =3D {};=0A= osapi.container["listMethods"] =3D function(request, callback) {=0A= var names =3D [];=0A= recurseNames(osapi, "", 5, names)=0A= callback(names);=0A= };=0A= =0A= /**=0A= * Recurse the object paths to a limited depth=0A= */=0A= function recurseNames(base, path, depth, accumulated) {=0A= if (depth =3D=3D 0) return;=0A= for (var prop in base) if (base.hasOwnProperty(prop)) {=0A= if (prop.indexOf("_") =3D=3D -1) {=0A= var type =3D typeof(base[prop]);=0A= if (type =3D=3D "function") {=0A= accumulated.push(path + prop);=0A= } else if (type =3D=3D "object") {=0A= recurseNames(base[prop], path + prop + ".", depth - 1, = accumulated);=0A= }=0A= }=0A= }=0A= }=0A= =0A= // Register the osapi RPC dispatcher.=0A= gadgets.rpc.register("osapi._handleGadgetRpcMethod", = osapi._handleGadgetRpcMethod);=0A= }=0A= ;=0A= /************************************************************************= *******=0A= * OpenAjax-mashup.js=0A= *=0A= * Reference implementation of the OpenAjax Hub, as specified by = OpenAjax Alliance.=0A= * Specification is under development at: =0A= *=0A= * http://www.openajax.org/member/wiki/OpenAjax_Hub_Specification=0A= *=0A= * Copyright 2006-2009 OpenAjax Alliance=0A= *=0A= * Licensed under the Apache License, Version 2.0 (the "License"); you = may not =0A= * use this file except in compliance with the License. You may obtain a = copy =0A= * of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless =0A= * required by applicable law or agreed to in writing, software = distributed =0A= * under the License is distributed on an "AS IS" BASIS, WITHOUT = WARRANTIES OR =0A= * CONDITIONS OF ANY KIND, either express or implied. See the License = for the =0A= * specific language governing permissions and limitations under the = License.=0A= *=0A= = *************************************************************************= *****/=0A= =0A= var OpenAjax =3D OpenAjax || {};=0A= =0A= if ( !OpenAjax.hub ) { // prevent re-definition of the OpenAjax.hub = object=0A= =0A= OpenAjax.hub =3D function() {=0A= var libs =3D {};=0A= var ooh =3D "org.openajax.hub.";=0A= =0A= return /** @scope OpenAjax.hub */ {=0A= implementer: "http://openajax.org",=0A= implVersion: "2.0.4",=0A= specVersion: "2.0",=0A= implExtraData: {},=0A= libraries: libs,=0A= =0A= registerLibrary: function(prefix, nsURL, version, extra) {=0A= libs[prefix] =3D {=0A= prefix: prefix,=0A= namespaceURI: nsURL,=0A= version: version,=0A= extraData: extra =0A= };=0A= this.publish(ooh+"registerLibrary", libs[prefix]);=0A= },=0A= =0A= unregisterLibrary: function(prefix) {=0A= this.publish(ooh+"unregisterLibrary", libs[prefix]);=0A= delete libs[prefix];=0A= }=0A= };=0A= }();=0A= =0A= /**=0A= * Error=0A= * =0A= * Standard Error names used when the standard functions need to throw = Errors.=0A= */=0A= OpenAjax.hub.Error =3D {=0A= // Either a required argument is missing or an invalid argument was = provided=0A= BadParameters: "OpenAjax.hub.Error.BadParameters",=0A= // The specified hub has been disconnected and cannot perform the = requested=0A= // operation:=0A= Disconnected: "OpenAjax.hub.Error.Disconnected",=0A= // Container with specified ID already exists:=0A= Duplicate: "OpenAjax.hub.Error.Duplicate",=0A= // The specified ManagedHub has no such Container (or it has been = removed)=0A= NoContainer: "OpenAjax.hub.Error.NoContainer",=0A= // The specified ManagedHub or Container has no such subscription=0A= NoSubscription: "OpenAjax.hub.Error.NoSubscription",=0A= // Permission denied by manager's security policy=0A= NotAllowed: "OpenAjax.hub.Error.NotAllowed",=0A= // Wrong communications protocol identifier provided by Container or = HubClient=0A= WrongProtocol: "OpenAjax.hub.Error.WrongProtocol",=0A= // A 'tunnelURI' param was specified, but current browser does not = support security features=0A= IncompatBrowser: "OpenAjax.hub.Error.IncompatBrowser"=0A= };=0A= =0A= /**=0A= * SecurityAlert=0A= * =0A= * Standard codes used when attempted security violations are detected. = Unlike=0A= * Errors, these codes are not thrown as exceptions but rather passed = into the =0A= * SecurityAlertHandler function registered with the Hub instance.=0A= */=0A= OpenAjax.hub.SecurityAlert =3D {=0A= // Container did not load (possible frame phishing attack)=0A= LoadTimeout: "OpenAjax.hub.SecurityAlert.LoadTimeout",=0A= // Hub suspects a frame phishing attack against the specified = container=0A= FramePhish: "OpenAjax.hub.SecurityAlert.FramePhish",=0A= // Hub detected a message forgery that purports to come to a = specified=0A= // container=0A= ForgedMsg: "OpenAjax.hub.SecurityAlert.ForgedMsg"=0A= };=0A= =0A= /**=0A= * Debugging Help=0A= *=0A= * OpenAjax.hub.enableDebug=0A= *=0A= * If OpenAjax.hub.enableDebug is set to true, then the "debugger" = keyword=0A= * will get hit whenever a user callback throws an exception, = thereby=0A= * bringing up the JavaScript debugger.=0A= */=0A= OpenAjax.hub._debugger =3D function() {=0A= // if ( OpenAjax.hub.enableDebug ) debugger; // REMOVE ON BUILD=0A= }=0A= =0A= /////////////////////////////////////////////////////////////////////////= ///////=0A= =0A= /**=0A= * Hub interface=0A= * =0A= * Hub is implemented on the manager side by ManagedHub and on the = client side=0A= * by ClientHub.=0A= */=0A= //OpenAjax.hub.Hub =3D function() {}=0A= =0A= /**=0A= * Subscribe to a topic.=0A= *=0A= * @param {String} topic=0A= * A valid topic string. MAY include wildcards.=0A= * @param {Function} onData =0A= * Callback function that is invoked whenever an event is =0A= * published on the topic=0A= * @param {Object} [scope]=0A= * When onData callback or onComplete callback is invoked,=0A= * the JavaScript "this" keyword refers to this scope object.=0A= * If no scope is provided, default is window.=0A= * @param {Function} [onComplete]=0A= * Invoked to tell the client application whether the =0A= * subscribe operation succeeded or failed. =0A= * @param {*} [subscriberData]=0A= * Client application provides this data, which is handed=0A= * back to the client application in the subscriberData=0A= * parameter of the onData callback function.=0A= * =0A= * @returns subscriptionID=0A= * Identifier representing the subscription. This identifier is an =0A= * arbitrary ID string that is unique within this Hub instance=0A= * @type {String}=0A= * =0A= * @throws {OpenAjax.hub.Error.Disconnected} if this Hub instance is not = in CONNECTED state=0A= * @throws {OpenAjax.hub.Error.BadParameters} if the topic is invalid = (e.g. contains an empty token)=0A= */=0A= //OpenAjax.hub.Hub.prototype.subscribe =3D function( topic, onData, = scope, onComplete, subscriberData ) {}=0A= =0A= /**=0A= * Publish an event on a topic=0A= *=0A= * @param {String} topic=0A= * A valid topic string. MUST NOT include wildcards.=0A= * @param {*} data=0A= * Valid publishable data. To be portable across different=0A= * Container implementations, this value SHOULD be serializable=0A= * as JSON.=0A= * =0A= * @throws {OpenAjax.hub.Error.Disconnected} if this Hub instance is not = in CONNECTED state=0A= * @throws {OpenAjax.hub.Error.BadParameters} if the topic cannot be = published (e.g. contains =0A= * wildcards or empty tokens) or if the data cannot be published = (e.g. cannot be serialized as JSON)=0A= */=0A= //OpenAjax.hub.Hub.prototype.publish =3D function( topic, data ) {}=0A= =0A= /**=0A= * Unsubscribe from a subscription=0A= *=0A= * @param {String} subscriptionID=0A= * A subscriptionID returned by Hub.subscribe()=0A= * @param {Function} [onComplete]=0A= * Callback function invoked when unsubscribe completes=0A= * @param {Object} [scope]=0A= * When onComplete callback function is invoked, the JavaScript = "this"=0A= * keyword refers to this scope object.=0A= * If no scope is provided, default is window.=0A= * =0A= * @throws {OpenAjax.hub.Error.Disconnected} if this Hub instance is not = in CONNECTED state=0A= * @throws {OpenAjax.hub.Error.NoSubscription} if no such subscription = is found=0A= */=0A= //OpenAjax.hub.Hub.prototype.unsubscribe =3D function( subscriptionID, = onComplete, scope ) {}=0A= =0A= /**=0A= * Return true if this Hub instance is in the Connected state.=0A= * Else returns false.=0A= * =0A= * This function can be called even if the Hub is not in a CONNECTED = state.=0A= * =0A= * @returns Boolean=0A= * @type {Boolean}=0A= */=0A= //OpenAjax.hub.Hub.prototype.isConnected =3D function() {}=0A= =0A= /**=0A= * Returns the scope associated with this Hub instance and which will be = used=0A= * with callback functions.=0A= * =0A= * This function can be called even if the Hub is not in a CONNECTED = state.=0A= * =0A= * @returns scope object=0A= * @type {Object}=0A= */=0A= //OpenAjax.hub.Hub.prototype.getScope =3D function() {}=0A= =0A= /**=0A= * Returns the subscriberData parameter that was provided when =0A= * Hub.subscribe was called.=0A= *=0A= * @param {String} subscriptionID=0A= * The subscriberID of a subscription=0A= * =0A= * @returns subscriberData=0A= * @type {*}=0A= * =0A= * @throws {OpenAjax.hub.Error.Disconnected} if this Hub instance is not = in CONNECTED state=0A= * @throws {OpenAjax.hub.Error.NoSubscription} if there is no such = subscription=0A= */=0A= //OpenAjax.hub.Hub.prototype.getSubscriberData =3D = function(subscriptionID) {}=0A= =0A= /**=0A= * Returns the scope associated with a specified subscription. This = scope will=0A= * be used when invoking the 'onData' callback supplied to = Hub.subscribe().=0A= *=0A= * @param {String} subscriberID=0A= * The subscriberID of a subscription=0A= * =0A= * @returns scope=0A= * @type {*}=0A= * =0A= * @throws {OpenAjax.hub.Error.Disconnected} if this Hub instance is not = in CONNECTED state=0A= * @throws {OpenAjax.hub.Error.NoSubscription} if there is no such = subscription=0A= */=0A= //OpenAjax.hub.Hub.prototype.getSubscriberScope =3D = function(subscriberID) {}=0A= =0A= /**=0A= * Returns the params object associated with this Hub instance.=0A= *=0A= * @returns params=0A= * The params object associated with this Hub instance=0A= * @type {Object}=0A= */=0A= //OpenAjax.hub.Hub.prototype.getParameters =3D function() {}=0A= =0A= /////////////////////////////////////////////////////////////////////////= ///////=0A= =0A= /**=0A= * HubClient interface =0A= * =0A= * Extends Hub interface.=0A= * =0A= * A HubClient implementation is typically specific to a particular =0A= * implementation of Container.=0A= */=0A= =0A= /**=0A= * Create a new HubClient. All HubClient constructors MUST have this =0A= * signature.=0A= * @constructor=0A= * =0A= * @param {Object} params =0A= * Parameters used to instantiate the HubClient.=0A= * Once the constructor is called, the params object belongs to the=0A= * HubClient. The caller MUST not modify it.=0A= * Implementations of HubClient may specify additional properties=0A= * for the params object, besides those identified below. =0A= * =0A= * @param {Function} params.HubClient.onSecurityAlert=0A= * Called when an attempted security breach is thwarted=0A= * @param {Object} [params.HubClient.scope]=0A= * Whenever one of the HubClient's callback functions is called,=0A= * references to "this" in the callback will refer to the scope = object.=0A= * If not provided, the default is window.=0A= * @param {Function} [params.HubClient.log]=0A= * Optional logger function. Would be used to log to console.log or=0A= * equivalent. =0A= * =0A= * @throws {OpenAjax.hub.Error.BadParameters} if any of the required=0A= * parameters is missing, or if a parameter value is invalid in =0A= * some way.=0A= */=0A= //OpenAjax.hub.HubClient =3D function( params ) {}=0A= =0A= /**=0A= * Requests a connection to the ManagedHub, via the Container=0A= * associated with this HubClient.=0A= * =0A= * If the Container accepts the connection request, the HubClient's =0A= * state is set to CONNECTED and the HubClient invokes the =0A= * onComplete callback function.=0A= * =0A= * If the Container refuses the connection request, the HubClient=0A= * invokes the onComplete callback function with an error code. =0A= * The error code might, for example, indicate that the Container =0A= * is being destroyed.=0A= * =0A= * In most implementations, this function operates asynchronously, =0A= * so the onComplete callback function is the only reliable way to=0A= * determine when this function completes and whether it has succeeded=0A= * or failed.=0A= * =0A= * A client application may call HubClient.disconnect and then call=0A= * HubClient.connect.=0A= * =0A= * @param {Function} [onComplete]=0A= * Callback function to call when this operation completes.=0A= * @param {Object} [scope] =0A= * When the onComplete function is invoked, the JavaScript "this"=0A= * keyword refers to this scope object.=0A= * If no scope is provided, default is window.=0A= *=0A= * @throws {OpenAjax.hub.Error.Duplicate} if the HubClient is already = connected=0A= */=0A= //OpenAjax.hub.HubClient.prototype.connect =3D function( onComplete, = scope ) {}=0A= =0A= /**=0A= * Disconnect from the ManagedHub=0A= * =0A= * Disconnect immediately:=0A= * =0A= * 1. Sets the HubClient's state to DISCONNECTED.=0A= * 2. Causes the HubClient to send a Disconnect request to the =0A= * associated Container. =0A= * 3. Ensures that the client application will receive no more=0A= * onData or onComplete callbacks associated with this =0A= * connection, except for the disconnect function's own=0A= * onComplete callback.=0A= * 4. Automatically destroys all of the HubClient's subscriptions.=0A= *=0A= * In most implementations, this function operates asynchronously, =0A= * so the onComplete callback function is the only reliable way to=0A= * determine when this function completes and whether it has succeeded=0A= * or failed.=0A= * =0A= * A client application is allowed to call HubClient.disconnect and =0A= * then call HubClient.connect.=0A= * =0A= * @param {Function} [onComplete]=0A= * Callback function to call when this operation completes.=0A= * @param {Object} [scope] =0A= * When the onComplete function is invoked, the JavaScript "this"=0A= * keyword refers to the scope object.=0A= * If no scope is provided, default is window.=0A= *=0A= * @throws {OpenAjax.hub.Error.Disconnected} if the HubClient is already=0A= * disconnected=0A= */=0A= //OpenAjax.hub.HubClient.prototype.disconnect =3D function( onComplete, = scope ) {}=0A= =0A= /**=0A= * If DISCONNECTED: Returns null=0A= * If CONNECTED: Returns the origin associated with the window = containing the=0A= * Container associated with this HubClient instance. The origin has the = format=0A= * =0A= * [protocol]://[host]=0A= * =0A= * where:=0A= * =0A= * [protocol] is "http" or "https"=0A= * [host] is the hostname of the partner page.=0A= * =0A= * @returns Partner's origin=0A= * @type {String}=0A= */=0A= //OpenAjax.hub.HubClient.prototype.getPartnerOrigin =3D function() {}=0A= =0A= /**=0A= * Returns the client ID of this HubClient=0A= *=0A= * @returns clientID=0A= * @type {String}=0A= */=0A= //OpenAjax.hub.HubClient.prototype.getClientID =3D function() {}=0A= =0A= /////////////////////////////////////////////////////////////////////////= ///////=0A= =0A= /**=0A= * OpenAjax.hub.ManagedHub=0A= *=0A= * Managed hub API for the manager application and for Containers. =0A= * =0A= * Implements OpenAjax.hub.Hub.=0A= */=0A= =0A= /**=0A= * Create a new ManagedHub instance=0A= * @constructor=0A= * =0A= * This constructor automatically sets the ManagedHub's state to=0A= * CONNECTED.=0A= * =0A= * @param {Object} params=0A= * Parameters used to instantiate the ManagedHub.=0A= * Once the constructor is called, the params object belongs = exclusively to=0A= * the ManagedHub. The caller MUST not modify it.=0A= * =0A= * The params object may contain the following properties:=0A= * =0A= * @param {Function} params.onPublish=0A= * Callback function that is invoked whenever a =0A= * data value published by a Container is about=0A= * to be delivered to some (possibly the same) Container.=0A= * This callback function implements a security policy;=0A= * it returns true if the delivery of the data is=0A= * permitted and false if permission is denied.=0A= * @param {Function} params.onSubscribe=0A= * Called whenever a Container tries to subscribe=0A= * on behalf of its client.=0A= * This callback function implements a security policy;=0A= * it returns true if the subscription is permitted =0A= * and false if permission is denied.=0A= * @param {Function} [params.onUnsubscribe]=0A= * Called whenever a Container unsubscribes on behalf of its client. =0A= * Unlike the other callbacks, onUnsubscribe is intended only for =0A= * informative purposes, and is not used to implement a security=0A= * policy.=0A= * @param {Object} [params.scope]=0A= * Whenever one of the ManagedHub's callback functions is called,=0A= * references to the JavaScript "this" keyword in the callback =0A= * function refer to this scope object=0A= * If no scope is provided, default is window.=0A= * @param {Function} [params.log] Optional logger function. Would=0A= * be used to log to console.log or equivalent.=0A= * =0A= * @throws {OpenAjax.hub.Error.BadParameters} if any of the required=0A= * parameters are missing=0A= */=0A= OpenAjax.hub.ManagedHub =3D function( params )=0A= {=0A= if ( ! params || ! params.onPublish || ! params.onSubscribe )=0A= throw new Error( OpenAjax.hub.Error.BadParameters );=0A= =0A= this._p =3D params;=0A= this._onUnsubscribe =3D params.onUnsubscribe ? params.onUnsubscribe = : null;=0A= this._scope =3D params.scope || window;=0A= =0A= if ( params.log ) {=0A= var that =3D this;=0A= this._log =3D function( msg ) {=0A= try {=0A= params.log.call( that._scope, "ManagedHub: " + msg );=0A= } catch( e ) {=0A= OpenAjax.hub._debugger();=0A= }=0A= };=0A= } else {=0A= this._log =3D function() {};=0A= }=0A= =0A= this._subscriptions =3D { c:{}, s:null };=0A= this._containers =3D {};=0A= =0A= // Sequence # used to create IDs that are unique within this hub=0A= this._seq =3D 0;=0A= =0A= this._active =3D true;=0A= =0A= this._isPublishing =3D false;=0A= this._pubQ =3D [];=0A= }=0A= =0A= /**=0A= * Subscribe to a topic on behalf of a Container. Called only by =0A= * Container implementations, NOT by manager applications.=0A= * =0A= * This function:=0A= * 1. Checks with the ManagedHub's onSubscribe security policy=0A= * to determine whether this Container is allowed to subscribe =0A= * to this topic.=0A= * 2. If the subscribe operation is permitted, subscribes to the=0A= * topic and returns the ManagedHub's subscription ID for this=0A= * subscription. =0A= * 3. If the subscribe operation is not permitted, throws=0A= * OpenAjax.hub.Error.NotAllowed.=0A= * =0A= * When data is published on the topic, the ManagedHub's =0A= * onPublish security policy will be invoked to ensure that=0A= * this Container is permitted to receive the published data.=0A= * If the Container is allowed to receive the data, then the=0A= * Container's sendToClient function will be invoked.=0A= * =0A= * When a Container needs to create a subscription on behalf of=0A= * its client, the Container MUST use this function to create=0A= * the subscription.=0A= * =0A= * @param {OpenAjax.hub.Container} container =0A= * A Container=0A= * @param {String} topic =0A= * A valid topic=0A= * @param {String} containerSubID =0A= * Arbitrary string ID that the Container uses to =0A= * represent the subscription. Must be unique within the =0A= * context of the Container=0A= *=0A= * @returns managerSubID =0A= * Arbitrary string ID that this ManagedHub uses to =0A= * represent the subscription. Will be unique within the =0A= * context of this ManagedHub=0A= * @type {String}=0A= * =0A= * @throws {OpenAjax.hub.Error.Disconnected} if this.isConnected() = returns false=0A= * @throws {OpenAjax.hub.Error.NotAllowed} if subscription request is = denied by the onSubscribe security policy=0A= * @throws {OpenAjax.hub.Error.BadParameters} if one of the parameters, = e.g. the topic, is invalid=0A= */=0A= OpenAjax.hub.ManagedHub.prototype.subscribeForClient =3D function( = container, topic, containerSubID )=0A= {=0A= this._assertConn();=0A= // check subscribe permission=0A= if ( this._invokeOnSubscribe( topic, container ) ) {=0A= // return ManagedHub's subscriptionID for this subscription=0A= return this._subscribe( topic, this._sendToClient, this, { c: = container, sid: containerSubID } );=0A= }=0A= throw new Error(OpenAjax.hub.Error.NotAllowed);=0A= }=0A= =0A= /**=0A= * Unsubscribe from a subscription on behalf of a Container. Called only = by =0A= * Container implementations, NOT by manager application code.=0A= * =0A= * This function:=0A= * 1. Destroys the specified subscription=0A= * 2. Calls the ManagedHub's onUnsubscribe callback function=0A= * =0A= * This function can be called even if the ManagedHub is not in a = CONNECTED state.=0A= * =0A= * @param {OpenAjax.hub.Container} container =0A= * container instance that is unsubscribing=0A= * @param {String} managerSubID =0A= * opaque ID of a subscription, returned by previous call to = subscribeForClient()=0A= * =0A= * @throws {OpenAjax.hub.Error.NoSubscription} if subscriptionID does = not refer to a valid subscription=0A= */=0A= OpenAjax.hub.ManagedHub.prototype.unsubscribeForClient =3D function( = container, managerSubID )=0A= {=0A= this._unsubscribe( managerSubID );=0A= this._invokeOnUnsubscribe( container, managerSubID );=0A= }=0A= =0A= /**=0A= * Publish data on a topic on behalf of a Container. Called only by =0A= * Container implementations, NOT by manager application code.=0A= *=0A= * @param {OpenAjax.hub.Container} container=0A= * Container on whose behalf data should be published=0A= * @param {String} topic=0A= * Valid topic string. Must NOT contain wildcards.=0A= * @param {*} data=0A= * Valid publishable data. To be portable across different=0A= * Container implementations, this value SHOULD be serializable=0A= * as JSON.=0A= * =0A= * @throws {OpenAjax.hub.Error.Disconnected} if this.isConnected() = returns false=0A= * @throws {OpenAjax.hub.Error.BadParameters} if one of the parameters, = e.g. the topic, is invalid=0A= */=0A= OpenAjax.hub.ManagedHub.prototype.publishForClient =3D function( = container, topic, data )=0A= {=0A= this._assertConn();=0A= this._publish( topic, data, container );=0A= }=0A= =0A= /**=0A= * Destroy this ManagedHub=0A= * =0A= * 1. Sets state to DISCONNECTED. All subsequent attempts to add = containers,=0A= * publish or subscribe will throw the Disconnected error. We will=0A= * continue to allow "cleanup" operations such as removeContainer=0A= * and unsubscribe, as well as read-only operations such as =0A= * isConnected=0A= * 2. Remove all Containers associated with this ManagedHub=0A= */=0A= OpenAjax.hub.ManagedHub.prototype.disconnect =3D function()=0A= {=0A= this._active =3D false;=0A= for (var c in this._containers) {=0A= this.removeContainer( this._containers[c] );=0A= }=0A= }=0A= =0A= /**=0A= * Get a container belonging to this ManagedHub by its clientID, or null=0A= * if this ManagedHub has no such container=0A= * =0A= * This function can be called even if the ManagedHub is not in a = CONNECTED state.=0A= * =0A= * @param {String} containerId=0A= * Arbitrary string ID associated with the container=0A= *=0A= * @returns container associated with given ID=0A= * @type {OpenAjax.hub.Container}=0A= */=0A= OpenAjax.hub.ManagedHub.prototype.getContainer =3D function( containerId = ) =0A= {=0A= var container =3D this._containers[containerId];=0A= return container ? container : null;=0A= }=0A= =0A= /**=0A= * Returns an array listing all containers belonging to this ManagedHub.=0A= * The order of the Containers in this array is arbitrary.=0A= * =0A= * This function can be called even if the ManagedHub is not in a = CONNECTED state.=0A= * =0A= * @returns container array=0A= * @type {OpenAjax.hub.Container[]}=0A= */=0A= OpenAjax.hub.ManagedHub.prototype.listContainers =3D function() =0A= {=0A= var res =3D [];=0A= for (var c in this._containers) { =0A= res.push(this._containers[c]);=0A= }=0A= return res;=0A= }=0A= =0A= /**=0A= * Add a container to this ManagedHub.=0A= *=0A= * This function should only be called by a Container constructor.=0A= * =0A= * @param {OpenAjax.hub.Container} container=0A= * A Container to be added to this ManagedHub=0A= * =0A= * @throws {OpenAjax.hub.Error.Duplicate} if there is already a Container=0A= * in this ManagedHub whose clientId is the same as that of = container=0A= * @throws {OpenAjax.hub.Error.Disconnected} if this.isConnected() = returns false=0A= */=0A= OpenAjax.hub.ManagedHub.prototype.addContainer =3D function( container ) =0A= { =0A= this._assertConn();=0A= var containerId =3D container.getClientID();=0A= if ( this._containers[containerId] ) {=0A= throw new Error(OpenAjax.hub.Error.Duplicate);=0A= }=0A= this._containers[containerId] =3D container;=0A= }=0A= =0A= /**=0A= * Remove a container from this ManagedHub immediately=0A= * =0A= * This function can be called even if the ManagedHub is not in a = CONNECTED state.=0A= * =0A= * @param {OpenAjax.hub.Container} container =0A= * A Container to be removed from this ManagedHub=0A= * =0A= * @throws {OpenAjax.hub.Error.NoContainer} if no such container is = found=0A= */=0A= OpenAjax.hub.ManagedHub.prototype.removeContainer =3D function( = container )=0A= {=0A= var containerId =3D container.getClientID();=0A= if ( ! this._containers[ containerId ] ) {=0A= throw new Error(OpenAjax.hub.Error.NoContainer);=0A= }=0A= container.remove();=0A= delete this._containers[ containerId ];=0A= }=0A= =0A= /*** OpenAjax.hub.Hub interface implementation ***/=0A= =0A= /**=0A= * Subscribe to a topic.=0A= * =0A= * This implementation of Hub.subscribe is synchronous. When subscribe =0A= * is called:=0A= * =0A= * 1. The ManagedHub's onSubscribe callback is invoked. The =0A= * container parameter is null, because the manager application, =0A= * rather than a container, is subscribing.=0A= * 2. If onSubscribe returns true, then the subscription is created.=0A= * 3. The onComplete callback is invoked.=0A= * 4. Then this function returns.=0A= * =0A= * @param {String} topic=0A= * A valid topic string. MAY include wildcards.=0A= * @param {Function} onData =0A= * Callback function that is invoked whenever an event is =0A= * published on the topic=0A= * @param {Object} [scope]=0A= * When onData callback or onComplete callback is invoked,=0A= * the JavaScript "this" keyword refers to this scope object.=0A= * If no scope is provided, default is window.=0A= * @param {Function} [onComplete]=0A= * Invoked to tell the client application whether the =0A= * subscribe operation succeeded or failed. =0A= * @param {*} [subscriberData]=0A= * Client application provides this data, which is handed=0A= * back to the client application in the subscriberData=0A= * parameter of the onData and onComplete callback functions.=0A= * =0A= * @returns subscriptionID=0A= * Identifier representing the subscription. This identifier is an =0A= * arbitrary ID string that is unique within this Hub instance=0A= * @type {String}=0A= * =0A= * @throws {OpenAjax.hub.Error.Disconnected} if this Hub instance is not = in CONNECTED state=0A= * @throws {OpenAjax.hub.Error.BadParameters} if the topic is invalid = (e.g. contains an empty token)=0A= */=0A= OpenAjax.hub.ManagedHub.prototype.subscribe =3D function( topic, onData, = scope, onComplete, subscriberData ) =0A= {=0A= this._assertConn();=0A= this._assertSubTopic(topic);=0A= if ( ! onData ) {=0A= throw new Error( OpenAjax.hub.Error.BadParameters );=0A= }=0A= =0A= scope =3D scope || window;=0A= =0A= // check subscribe permission=0A= if ( ! this._invokeOnSubscribe( topic, null ) ) {=0A= this._invokeOnComplete( onComplete, scope, null, false, = OpenAjax.hub.Error.NotAllowed );=0A= return;=0A= }=0A= =0A= // on publish event, check publish permissions=0A= var that =3D this;=0A= function publishCB( topic, data, sd, pcont ) {=0A= if ( that._invokeOnPublish( topic, data, pcont, null ) ) {=0A= try {=0A= onData.call( scope, topic, data, subscriberData );=0A= } catch( e ) {=0A= OpenAjax.hub._debugger();=0A= that._log( "caught error from onData callback to = Hub.subscribe(): " + e.message );=0A= }=0A= }=0A= }=0A= var subID =3D this._subscribe( topic, publishCB, scope, = subscriberData );=0A= this._invokeOnComplete( onComplete, scope, subID, true );=0A= return subID;=0A= }=0A= =0A= /**=0A= * Publish an event on a topic=0A= *=0A= * This implementation of Hub.publish is synchronous. When publish =0A= * is called:=0A= * =0A= * 1. The target subscriptions are identified.=0A= * 2. For each target subscription, the ManagedHub's onPublish=0A= * callback is invoked. Data is only delivered to a target=0A= * subscription if the onPublish callback returns true.=0A= * The pcont parameter of the onPublish callback is null.=0A= * This is because the ManagedHub, rather than a container,=0A= * is publishing the data.=0A= * =0A= * @param {String} topic=0A= * A valid topic string. MUST NOT include wildcards.=0A= * @param {*} data=0A= * Valid publishable data. To be portable across different=0A= * Container implementations, this value SHOULD be serializable=0A= * as JSON.=0A= * =0A= * @throws {OpenAjax.hub.Error.Disconnected} if this Hub instance is not = in CONNECTED state=0A= * @throws {OpenAjax.hub.Error.BadParameters} if the topic cannot be = published (e.g. contains =0A= * wildcards or empty tokens) or if the data cannot be published = (e.g. cannot be serialized as JSON)=0A= */=0A= OpenAjax.hub.ManagedHub.prototype.publish =3D function( topic, data ) =0A= {=0A= this._assertConn();=0A= this._assertPubTopic(topic);=0A= this._publish( topic, data, null );=0A= }=0A= =0A= /**=0A= * Unsubscribe from a subscription=0A= * =0A= * This implementation of Hub.unsubscribe is synchronous. When = unsubscribe =0A= * is called:=0A= * =0A= * 1. The subscription is destroyed.=0A= * 2. The ManagedHub's onUnsubscribe callback is invoked, if there is = one.=0A= * 3. The onComplete callback is invoked.=0A= * 4. Then this function returns.=0A= * =0A= * @param {String} subscriptionID=0A= * A subscriptionID returned by Hub.subscribe()=0A= * @param {Function} [onComplete]=0A= * Callback function invoked when unsubscribe completes=0A= * @param {Object} [scope]=0A= * When onComplete callback function is invoked, the JavaScript = "this"=0A= * keyword refers to this scope object.=0A= * If no scope is provided, default is window.=0A= * =0A= * @throws {OpenAjax.hub.Error.Disconnected} if this Hub instance is not = in CONNECTED state=0A= * @throws {OpenAjax.hub.Error.NoSubscription} if no such subscription = is found=0A= */=0A= OpenAjax.hub.ManagedHub.prototype.unsubscribe =3D function( = subscriptionID, onComplete, scope )=0A= {=0A= this._assertConn();=0A= if ( ! subscriptionID ) {=0A= throw new Error( OpenAjax.hub.Error.BadParameters );=0A= }=0A= this._unsubscribe( subscriptionID );=0A= this._invokeOnUnsubscribe( null, subscriptionID );=0A= this._invokeOnComplete( onComplete, scope, subscriptionID, true );=0A= }=0A= =0A= /**=0A= * Returns true if disconnect() has NOT been called on this ManagedHub, =0A= * else returns false=0A= * =0A= * @returns Boolean=0A= * @type {Boolean}=0A= */=0A= OpenAjax.hub.ManagedHub.prototype.isConnected =3D function()=0A= {=0A= return this._active;=0A= }=0A= =0A= /**=0A= * Returns the scope associated with this Hub instance and which will be = used=0A= * with callback functions.=0A= * =0A= * This function can be called even if the Hub is not in a CONNECTED = state.=0A= * =0A= * @returns scope object=0A= * @type {Object}=0A= */=0A= OpenAjax.hub.ManagedHub.prototype.getScope =3D function()=0A= {=0A= return this._scope;=0A= }=0A= =0A= /**=0A= * Returns the subscriberData parameter that was provided when =0A= * Hub.subscribe was called.=0A= *=0A= * @param subscriberID=0A= * The subscriberID of a subscription=0A= * =0A= * @returns subscriberData=0A= * @type {*}=0A= * =0A= * @throws {OpenAjax.hub.Error.Disconnected} if this Hub instance is not = in CONNECTED state=0A= * @throws {OpenAjax.hub.Error.NoSubscription} if there is no such = subscription=0A= */=0A= OpenAjax.hub.ManagedHub.prototype.getSubscriberData =3D function( = subscriberID )=0A= {=0A= this._assertConn();=0A= var path =3D subscriberID.split(".");=0A= var sid =3D path.pop();=0A= var sub =3D this._getSubscriptionObject( this._subscriptions, path, = 0, sid );=0A= if ( sub ) =0A= return sub.data;=0A= throw new Error( OpenAjax.hub.Error.NoSubscription );=0A= }=0A= =0A= /**=0A= * Returns the scope associated with a specified subscription. This = scope will=0A= * be used when invoking the 'onData' callback supplied to = Hub.subscribe().=0A= *=0A= * @param subscriberID=0A= * The subscriberID of a subscription=0A= * =0A= * @returns scope=0A= * @type {*}=0A= * =0A= * @throws {OpenAjax.hub.Error.Disconnected} if this Hub instance is not = in CONNECTED state=0A= * @throws {OpenAjax.hub.Error.NoSubscription} if there is no such = subscription=0A= */=0A= OpenAjax.hub.ManagedHub.prototype.getSubscriberScope =3D function( = subscriberID )=0A= {=0A= this._assertConn();=0A= var path =3D subscriberID.split(".");=0A= var sid =3D path.pop();=0A= var sub =3D this._getSubscriptionObject( this._subscriptions, path, = 0, sid );=0A= if ( sub ) =0A= return sub.scope;=0A= throw new Error( OpenAjax.hub.Error.NoSubscription );=0A= }=0A= =0A= /**=0A= * Returns the params object associated with this Hub instance.=0A= * Allows mix-in code to access parameters passed into constructor that = created=0A= * this Hub instance.=0A= *=0A= * @returns params the params object associated with this Hub instance=0A= * @type {Object}=0A= */=0A= OpenAjax.hub.ManagedHub.prototype.getParameters =3D function()=0A= {=0A= return this._p;=0A= }=0A= =0A= =0A= /* PRIVATE FUNCTIONS */=0A= =0A= /**=0A= * Send a message to a container's client. =0A= * This is an OAH subscriber's data callback. It is private to ManagedHub=0A= * and serves as an adapter between the OAH 1.0 API and = Container.sendToClient.=0A= * =0A= * @param {String} topic Topic on which data was published=0A= * @param {Object} data Data to be delivered to the client=0A= * @param {Object} sd Object containing properties =0A= * c: container to which data must be sent=0A= * sid: subscription ID within that container=0A= * @param {Object} pcont Publishing container, or null if this data was=0A= * published by the manager=0A= */=0A= OpenAjax.hub.ManagedHub.prototype._sendToClient =3D function(topic, = data, sd, pcont) =0A= {=0A= if (!this.isConnected()) {=0A= return;=0A= }=0A= if ( this._invokeOnPublish( topic, data, pcont, sd.c ) ) {=0A= sd.c.sendToClient( topic, data, sd.sid );=0A= }=0A= }=0A= =0A= OpenAjax.hub.ManagedHub.prototype._assertConn =3D function() =0A= {=0A= if (!this.isConnected()) {=0A= throw new Error(OpenAjax.hub.Error.Disconnected);=0A= }=0A= }=0A= =0A= OpenAjax.hub.ManagedHub.prototype._assertPubTopic =3D function(topic) =0A= {=0A= if ( !topic || topic =3D=3D=3D "" || (topic.indexOf("*") !=3D -1) ||=0A= (topic.indexOf("..") !=3D -1) || (topic.charAt(0) =3D=3D ".") ||=0A= (topic.charAt(topic.length-1) =3D=3D "."))=0A= {=0A= throw new Error(OpenAjax.hub.Error.BadParameters);=0A= }=0A= }=0A= =0A= OpenAjax.hub.ManagedHub.prototype._assertSubTopic =3D function(topic) =0A= {=0A= if ( ! topic ) {=0A= throw new Error(OpenAjax.hub.Error.BadParameters);=0A= }=0A= var path =3D topic.split(".");=0A= var len =3D path.length;=0A= for (var i =3D 0; i < len; i++) {=0A= var p =3D path[i];=0A= if ((p =3D=3D=3D "") ||=0A= ((p.indexOf("*") !=3D -1) && (p !=3D "*") && (p !=3D "**"))) {=0A= throw new Error(OpenAjax.hub.Error.BadParameters);=0A= }=0A= if ((p =3D=3D "**") && (i < len - 1)) {=0A= throw new Error(OpenAjax.hub.Error.BadParameters);=0A= }=0A= }=0A= }=0A= =0A= OpenAjax.hub.ManagedHub.prototype._invokeOnComplete =3D function( func, = scope, item, success, errorCode )=0A= {=0A= if ( func ) { // onComplete is optional=0A= try {=0A= scope =3D scope || window;=0A= func.call( scope, item, success, errorCode );=0A= } catch( e ) {=0A= OpenAjax.hub._debugger();=0A= this._log( "caught error from onComplete callback: " + = e.message );=0A= }=0A= }=0A= }=0A= =0A= OpenAjax.hub.ManagedHub.prototype._invokeOnPublish =3D function( topic, = data, pcont, scont )=0A= {=0A= try {=0A= return this._p.onPublish.call( this._scope, topic, data, pcont, = scont );=0A= } catch( e ) {=0A= OpenAjax.hub._debugger();=0A= this._log( "caught error from onPublish callback to constructor: = " + e.message );=0A= }=0A= return false;=0A= }=0A= =0A= OpenAjax.hub.ManagedHub.prototype._invokeOnSubscribe =3D function( = topic, container )=0A= {=0A= try {=0A= return this._p.onSubscribe.call( this._scope, topic, container );=0A= } catch( e ) {=0A= OpenAjax.hub._debugger();=0A= this._log( "caught error from onSubscribe callback to = constructor: " + e.message );=0A= }=0A= return false;=0A= }=0A= =0A= OpenAjax.hub.ManagedHub.prototype._invokeOnUnsubscribe =3D function( = container, managerSubID )=0A= {=0A= if ( this._onUnsubscribe ) {=0A= var topic =3D managerSubID.slice( 0, = managerSubID.lastIndexOf(".") );=0A= try {=0A= this._onUnsubscribe.call( this._scope, topic, container );=0A= } catch( e ) {=0A= OpenAjax.hub._debugger();=0A= this._log( "caught error from onUnsubscribe callback to = constructor: " + e.message );=0A= }=0A= }=0A= }=0A= =0A= OpenAjax.hub.ManagedHub.prototype._subscribe =3D function( topic, = onData, scope, subscriberData ) =0A= {=0A= var handle =3D topic + "." + this._seq;=0A= var sub =3D { scope: scope, cb: onData, data: subscriberData, sid: = this._seq++ };=0A= var path =3D topic.split(".");=0A= this._recursiveSubscribe( this._subscriptions, path, 0, sub );=0A= return handle;=0A= }=0A= =0A= OpenAjax.hub.ManagedHub.prototype._recursiveSubscribe =3D function(tree, = path, index, sub) =0A= {=0A= var token =3D path[index];=0A= if (index =3D=3D path.length) {=0A= sub.next =3D tree.s;=0A= tree.s =3D sub;=0A= } else { =0A= if (typeof tree.c =3D=3D "undefined") {=0A= tree.c =3D {};=0A= }=0A= if (typeof tree.c[token] =3D=3D "undefined") {=0A= tree.c[token] =3D { c: {}, s: null }; =0A= this._recursiveSubscribe(tree.c[token], path, index + 1, = sub);=0A= } else {=0A= this._recursiveSubscribe( tree.c[token], path, index + 1, = sub);=0A= }=0A= }=0A= }=0A= =0A= OpenAjax.hub.ManagedHub.prototype._publish =3D function( topic, data, = pcont )=0A= {=0A= // if we are currently handling a publish event, then queue this = request=0A= // and handle later, one by one=0A= if ( this._isPublishing ) {=0A= this._pubQ.push( { t: topic, d: data, p: pcont } );=0A= return;=0A= }=0A= =0A= this._safePublish( topic, data, pcont );=0A= =0A= while ( this._pubQ.length > 0 ) {=0A= var pub =3D this._pubQ.shift();=0A= this._safePublish( pub.t, pub.d, pub.p );=0A= }=0A= }=0A= =0A= OpenAjax.hub.ManagedHub.prototype._safePublish =3D function( topic, = data, pcont )=0A= {=0A= this._isPublishing =3D true;=0A= var path =3D topic.split(".");=0A= this._recursivePublish( this._subscriptions, path, 0, topic, data, = pcont );=0A= this._isPublishing =3D false;=0A= }=0A= =0A= OpenAjax.hub.ManagedHub.prototype._recursivePublish =3D function(tree, = path, index, name, msg, pcont) =0A= {=0A= if (typeof tree !=3D "undefined") {=0A= var node;=0A= if (index =3D=3D path.length) {=0A= node =3D tree;=0A= } else {=0A= this._recursivePublish(tree.c[path[index]], path, index + 1, = name, msg, pcont);=0A= this._recursivePublish(tree.c["*"], path, index + 1, name, = msg, pcont);=0A= node =3D tree.c["**"];=0A= }=0A= if (typeof node !=3D "undefined") {=0A= var sub =3D node.s;=0A= while ( sub ) {=0A= var sc =3D sub.scope;=0A= var cb =3D sub.cb;=0A= var d =3D sub.data;=0A= if (typeof cb =3D=3D "string") {=0A= // get a function object=0A= cb =3D sc[cb];=0A= }=0A= cb.call(sc, name, msg, d, pcont);=0A= sub =3D sub.next;=0A= }=0A= }=0A= }=0A= }=0A= =0A= OpenAjax.hub.ManagedHub.prototype._unsubscribe =3D function( = subscriptionID )=0A= {=0A= var path =3D subscriptionID.split(".");=0A= var sid =3D path.pop();=0A= if ( ! this._recursiveUnsubscribe( this._subscriptions, path, 0, sid = ) ) {=0A= throw new Error( OpenAjax.hub.Error.NoSubscription );=0A= }=0A= }=0A= =0A= /**=0A= * @returns 'true' if properly unsubscribed; 'false' otherwise=0A= */=0A= OpenAjax.hub.ManagedHub.prototype._recursiveUnsubscribe =3D = function(tree, path, index, sid) =0A= {=0A= if ( typeof tree =3D=3D "undefined" ) {=0A= return false;=0A= }=0A= =0A= if (index < path.length) {=0A= var childNode =3D tree.c[path[index]];=0A= if ( ! childNode ) {=0A= return false;=0A= }=0A= this._recursiveUnsubscribe(childNode, path, index + 1, sid);=0A= if ( ! childNode.s ) {=0A= for (var x in childNode.c) {=0A= return true;=0A= }=0A= delete tree.c[path[index]]; =0A= }=0A= } else {=0A= var sub =3D tree.s;=0A= var sub_prev =3D null;=0A= var found =3D false;=0A= while ( sub ) {=0A= if ( sid =3D=3D sub.sid ) {=0A= found =3D true;=0A= if ( sub =3D=3D tree.s ) {=0A= tree.s =3D sub.next;=0A= } else {=0A= sub_prev.next =3D sub.next;=0A= }=0A= break;=0A= }=0A= sub_prev =3D sub;=0A= sub =3D sub.next;=0A= }=0A= if ( ! found ) {=0A= return false;=0A= }=0A= }=0A= =0A= return true;=0A= }=0A= =0A= OpenAjax.hub.ManagedHub.prototype._getSubscriptionObject =3D function( = tree, path, index, sid )=0A= {=0A= if (typeof tree !=3D "undefined") {=0A= if (index < path.length) {=0A= var childNode =3D tree.c[path[index]];=0A= return this._getSubscriptionObject(childNode, path, index + = 1, sid);=0A= }=0A= =0A= var sub =3D tree.s;=0A= while ( sub ) {=0A= if ( sid =3D=3D sub.sid ) {=0A= return sub;=0A= }=0A= sub =3D sub.next;=0A= }=0A= }=0A= return null;=0A= }=0A= =0A= =0A= /////////////////////////////////////////////////////////////////////////= ///////=0A= =0A= /**=0A= * Container=0A= * @constructor=0A= * =0A= * Container represents an instance of a manager-side object that = contains and=0A= * communicates with a single client of the hub. The container might be = an inline=0A= * container, an iframe FIM container, or an iframe PostMessage = container, or=0A= * it might be an instance of some other implementation.=0A= *=0A= * @param {OpenAjax.hub.ManagedHub} hub=0A= * Managed Hub instance=0A= * @param {String} clientID=0A= * A string ID that identifies a particular client of a Managed Hub. = Unique=0A= * within the context of the ManagedHub.=0A= * @param {Object} params =0A= * Parameters used to instantiate the Container.=0A= * Once the constructor is called, the params object belongs = exclusively to=0A= * the Container. The caller MUST not modify it.=0A= * Implementations of Container may specify additional properties=0A= * for the params object, besides those identified below.=0A= * The following params properties MUST be supported by all Container =0A= * implementations:=0A= * @param {Function} params.Container.onSecurityAlert=0A= * Called when an attempted security breach is thwarted. Function is = defined=0A= * as follows: function(container, securityAlert)=0A= * @param {Function} [params.Container.onConnect]=0A= * Called when the client connects to the Managed Hub. Function is = defined=0A= * as follows: function(container)=0A= * @param {Function} [params.Container.onDisconnect]=0A= * Called when the client disconnects from the Managed Hub. Function = is=0A= * defined as follows: function(container)=0A= * @param {Object} [params.Container.scope]=0A= * Whenever one of the Container's callback functions is called, = references=0A= * to "this" in the callback will refer to the scope object. If no = scope is=0A= * provided, default is window.=0A= * @param {Function} [params.Container.log]=0A= * Optional logger function. Would be used to log to console.log or=0A= * equivalent. =0A= *=0A= * @throws {OpenAjax.hub.Error.BadParameters} if required params are = not=0A= * present or null=0A= * @throws {OpenAjax.hub.Error.Duplicate} if a Container with this = clientID=0A= * already exists in the given Managed Hub=0A= * @throws {OpenAjax.hub.Error.Disconnected} if ManagedHub is not = connected=0A= */=0A= //OpenAjax.hub.Container =3D function( hub, clientID, params ) {}=0A= =0A= /**=0A= * Send a message to the client inside this container. This function = MUST only=0A= * be called by ManagedHub. =0A= * =0A= * @param {String} topic=0A= * The topic name for the published message=0A= * @param {*} data=0A= * The payload. Can be any JSON-serializable value.=0A= * @param {String} containerSubscriptionId=0A= * Container's ID for a subscription, from previous call to=0A= * subscribeForClient()=0A= */=0A= //OpenAjax.hub.Container.prototype.sendToClient =3D function( topic, = data, containerSubscriptionId ) {}=0A= =0A= /**=0A= * Shut down a container. remove does all of the following:=0A= * - disconnects container from HubClient=0A= * - unsubscribes from all of its existing subscriptions in the = ManagedHub=0A= * =0A= * This function is only called by ManagedHub.removeContainer=0A= * Calling this function does NOT cause the container's onDisconnect = callback to=0A= * be invoked.=0A= */=0A= //OpenAjax.hub.Container.prototype.remove =3D function() {}=0A= =0A= /**=0A= * Returns true if the given client is connected to the managed hub.=0A= * Else returns false.=0A= *=0A= * @returns true if the client is connected to the managed hub=0A= * @type boolean=0A= */=0A= //OpenAjax.hub.Container.prototype.isConnected =3D function() {}=0A= =0A= /**=0A= * Returns the clientID passed in when this Container was instantiated.=0A= *=0A= * @returns The clientID=0A= * @type {String} =0A= */=0A= //OpenAjax.hub.Container.prototype.getClientID =3D function() {}=0A= =0A= /**=0A= * If DISCONNECTED:=0A= * Returns null=0A= * If CONNECTED:=0A= * Returns the origin associated with the window containing the HubClient=0A= * associated with this Container instance. The origin has the format=0A= * =0A= * [protocol]://[host]=0A= * =0A= * where:=0A= * =0A= * [protocol] is "http" or "https"=0A= * [host] is the hostname of the partner page.=0A= * =0A= * @returns Partner's origin=0A= * @type {String}=0A= */=0A= //OpenAjax.hub.Container.prototype.getPartnerOrigin =3D function() {}=0A= =0A= /**=0A= * Returns the params object associated with this Container instance.=0A= *=0A= * @returns params=0A= * The params object associated with this Container instance=0A= * @type {Object}=0A= */=0A= //OpenAjax.hub.Container.prototype.getParameters =3D function() {}=0A= =0A= /**=0A= * Returns the ManagedHub to which this Container belongs.=0A= *=0A= * @returns ManagedHub=0A= * The ManagedHub object associated with this Container instance=0A= * @type {OpenAjax.hub.ManagedHub}=0A= */=0A= //OpenAjax.hub.Container.prototype.getHub =3D function() {}=0A= =0A= /////////////////////////////////////////////////////////////////////////= ///////=0A= =0A= /*=0A= * Unmanaged Hub=0A= */=0A= =0A= /**=0A= * OpenAjax.hub._hub is the default ManagedHub instance that we use to =0A= * provide OAH 1.0 behavior. =0A= */=0A= OpenAjax.hub._hub =3D new OpenAjax.hub.ManagedHub({ =0A= onSubscribe: function(topic, ctnr) { return true; },=0A= onPublish: function(topic, data, pcont, scont) { return true; }=0A= });=0A= =0A= /**=0A= * Subscribe to a topic.=0A= *=0A= * @param {String} topic=0A= * A valid topic string. MAY include wildcards.=0A= * @param {Function|String} onData=0A= * Callback function that is invoked whenever an event is published = on the=0A= * topic. If 'onData' is a string, then it represents the name of a=0A= * function on the 'scope' object.=0A= * @param {Object} [scope]=0A= * When onData callback is invoked,=0A= * the JavaScript "this" keyword refers to this scope object.=0A= * If no scope is provided, default is window.=0A= * @param {*} [subscriberData]=0A= * Client application provides this data, which is handed=0A= * back to the client application in the subscriberData=0A= * parameter of the onData callback function.=0A= * =0A= * @returns {String} Identifier representing the subscription.=0A= * =0A= * @throws {OpenAjax.hub.Error.BadParameters} if the topic is invalid=0A= * (e.g.contains an empty token)=0A= */=0A= OpenAjax.hub.subscribe =3D function(topic, onData, scope, = subscriberData) =0A= {=0A= // resolve the 'onData' function if it is a string=0A= if ( typeof onData =3D=3D=3D "string" ) {=0A= scope =3D scope || window;=0A= onData =3D scope[ onData ] || null;=0A= }=0A= =0A= return OpenAjax.hub._hub.subscribe( topic, onData, scope, null, = subscriberData );=0A= }=0A= =0A= /**=0A= * Unsubscribe from a subscription.=0A= *=0A= * @param {String} subscriptionID=0A= * Subscription identifier returned by subscribe()=0A= * =0A= * @throws {OpenAjax.hub.Error.NoSubscription} if no such subscription = is found=0A= */=0A= OpenAjax.hub.unsubscribe =3D function(subscriptionID) =0A= {=0A= return OpenAjax.hub._hub.unsubscribe( subscriptionID );=0A= }=0A= =0A= /**=0A= * Publish an event on a topic.=0A= *=0A= * @param {String} topic=0A= * A valid topic string. MUST NOT include wildcards.=0A= * @param {*} data=0A= * Valid publishable data.=0A= * =0A= * @throws {OpenAjax.hub.Error.BadParameters} if the topic cannot be = published=0A= * (e.g. contains wildcards or empty tokens)=0A= */=0A= OpenAjax.hub.publish =3D function(topic, data) =0A= {=0A= OpenAjax.hub._hub.publish(topic, data);=0A= }=0A= =0A= /////////////////////////////////////////////////////////////////////////= ///////=0A= =0A= // Register the OpenAjax Hub itself as a library.=0A= OpenAjax.hub.registerLibrary("OpenAjax", "http://openajax.org/hub", = "2.0", {});=0A= =0A= } // !OpenAjax.hub=0A= ;=0A= /*=0A= =0A= Copyright 2006-2009 OpenAjax Alliance=0A= =0A= Licensed under the Apache License, Version 2.0 (the "License"); =0A= you may not use this file except in compliance with the License. =0A= You may obtain a copy of the License at=0A= =0A= http://www.apache.org/licenses/LICENSE-2.0=0A= =0A= Unless required by applicable law or agreed to in writing, = software =0A= distributed under the License is distributed on an "AS IS" = BASIS, =0A= WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or = implied. =0A= See the License for the specific language governing permissions = and =0A= limitations under the License.=0A= */=0A= =0A= var OpenAjax =3D OpenAjax || {};=0A= OpenAjax.hub =3D OpenAjax.hub || {};=0A= OpenAjax.gadgets =3D typeof OpenAjax.gadgets =3D=3D=3D 'object' ? = OpenAjax.gadgets :=0A= typeof gadgets =3D=3D=3D 'object' ? gadgets :=0A= {};=0A= OpenAjax.gadgets.rpctx =3D OpenAjax.gadgets.rpctx || {};=0A= =0A= (function() {=0A= // For now, we only use "oaaConfig" for the global "gadgets" object. = If the "gadgets" global=0A= // already exists, then there is no reason to check for "oaaConfig". = In the future, if we use=0A= // "oaaConfig" for other purposes, we'll need to remove the check = for "!window.gadgets".=0A= if (typeof gadgets =3D=3D=3D 'undefined') {=0A= // "oaaConfig" can be specified as a global object. If not = found, then look for it as an=0A= // attribute on the script line for the OpenAjax Hub JS file.=0A= if (typeof oaaConfig =3D=3D=3D 'undefined') {=0A= var scripts =3D document.getElementsByTagName("script");=0A= // match "OpenAjax-mashup.js", "OpenAjaxManagedHub-all*.js", = "OpenAjaxManagedHub-core*.js"=0A= var reHub =3D = /openajax(?:managedhub-(?:all|core).*|-mashup)\.js$/i;=0A= for ( var i =3D scripts.length - 1; i >=3D 0; i-- ) {=0A= var src =3D scripts[i].getAttribute( "src" );=0A= if ( !src ) {=0A= continue;=0A= }=0A= =0A= var m =3D src.match( reHub );=0A= if ( m ) {=0A= var config =3D scripts[i].getAttribute( "oaaConfig" = );=0A= if ( config ) {=0A= try {=0A= oaaConfig =3D eval( "({ " + config + " })" );=0A= } catch (e) {}=0A= }=0A= break;=0A= }=0A= }=0A= }=0A= =0A= if (typeof oaaConfig !=3D=3D 'undefined' && = oaaConfig.gadgetsGlobal) {=0A= gadgets =3D OpenAjax.gadgets;=0A= }=0A= }=0A= })();=0A= =0A= =0A= if (!OpenAjax.hub.IframeContainer) {=0A= =0A= (function(){=0A= =0A= /**=0A= * Create a new Iframe Container.=0A= * @constructor=0A= * @extends OpenAjax.hub.Container=0A= * =0A= * IframeContainer implements the Container interface to provide a = container=0A= * that isolates client components into secure sandboxes by leveraging = the=0A= * isolation features provided by browser iframes.=0A= * =0A= * SECURITY=0A= * =0A= * In order for the connection between the IframeContainer and = IframeHubClient=0A= * to be fully secure, you must specify a valid 'tunnelURI'. Note that = if you=0A= * do specify a 'tunnelURI', then only the WPM and NIX transports are = used,=0A= * covering the following browsers:=0A= * IE 6+, Firefox 3+, Safari 4+, Chrome 2+, Opera 9+.=0A= * =0A= * If no 'tunnelURI' is specified, then some security features are = disabled:=0A= * the IframeContainer will not report FramePhish errors, and on some = browsers=0A= * IframeContainer and IframeHubClient will not be able to validate the=0A= * identity of their partner (i.e. getPartnerOrigin() will return = 'null').=0A= * However, not providing 'tunnelURI' allows the additional use of the = RMR=0A= * and FE transports -- in addition to the above browsers, the Hub code = will=0A= * also work on:=0A= * Firefox 1 & 2, Safari 2 & 3, Chrome 1.=0A= * =0A= * @param {OpenAjax.hub.ManagedHub} hub=0A= * Managed Hub instance to which this Container belongs=0A= * @param {String} clientID=0A= * A string ID that identifies a particular client of a Managed Hub. = Unique=0A= * within the context of the ManagedHub.=0A= * @param {Object} params =0A= * Parameters used to instantiate the IframeContainer.=0A= * Once the constructor is called, the params object belongs = exclusively to=0A= * the IframeContainer. The caller MUST not modify it.=0A= * The following are the pre-defined properties on params:=0A= * @param {Function} params.Container.onSecurityAlert=0A= * Called when an attempted security breach is thwarted. Function is = defined=0A= * as follows: function(container, securityAlert)=0A= * @param {Function} [params.Container.onConnect]=0A= * Called when the client connects to the Managed Hub. Function is = defined=0A= * as follows: function(container)=0A= * @param {Function} [params.Container.onDisconnect]=0A= * Called when the client disconnects from the Managed Hub. Function = is=0A= * defined as follows: function(container)=0A= * @param {Object} [params.Container.scope]=0A= * Whenever one of the Container's callback functions is called, = references=0A= * to "this" in the callback will refer to the scope object. If no = scope is=0A= * provided, default is window.=0A= * @param {Function} [params.Container.log]=0A= * Optional logger function. Would be used to log to console.log or=0A= * equivalent. =0A= * @param {Object} params.IframeContainer.parent=0A= * DOM element that is to be parent of iframe=0A= * @param {String} params.IframeContainer.uri=0A= * Initial Iframe URI (Container will add parameters to this URI)=0A= * @param {String} [params.IframeContainer.tunnelURI]=0A= * URI of the tunnel iframe. Must be from the same origin as the page = which=0A= * instantiates the IframeContainer. If not specified, connection = will not=0A= * be fully secure (see SECURITY section).=0A= * @param {Object} [params.IframeContainer.iframeAttrs]=0A= * Attributes to add to IFRAME DOM entity. For example:=0A= * { style: { width: "100%",=0A= * height: "100%" },=0A= * className: "some_class" }=0A= * @param {Number} [params.IframeContainer.timeout]=0A= * Load timeout in milliseconds. If not specified, defaults to = 15000. If=0A= * the client at params.IframeContainer.uri does not establish a = connection=0A= * with this container in the given time, the onSecurityAlert = callback is=0A= * called with a LoadTimeout error code.=0A= * @param {Function} [params.IframeContainer.seed]=0A= * A function that returns a string that will be used to seed the=0A= * pseudo-random number generator, which is used to create the = security=0A= * tokens. An implementation of IframeContainer may choose to ignore = this=0A= * value.=0A= * @param {Number} [params.IframeContainer.tokenLength]=0A= * Length of the security tokens used when transmitting messages. If = not=0A= * specified, defaults to 6. An implementation of IframeContainer = may choose=0A= * to ignore this value.=0A= *=0A= * @throws {OpenAjax.hub.Error.BadParameters} if required params are = not=0A= * present or null=0A= * @throws {OpenAjax.hub.Error.Duplicate} if a Container with this = clientID=0A= * already exists in the given Managed Hub=0A= * @throws {OpenAjax.hub.Error.Disconnected} if hub is not connected=0A= */=0A= OpenAjax.hub.IframeContainer =3D function( hub, clientID, params )=0A= {=0A= assertValidParams( arguments );=0A= =0A= var container =3D this;=0A= var scope =3D params.Container.scope || window;=0A= var connected =3D false;=0A= var subs =3D {};=0A= var securityToken;=0A= var internalID;=0A= var timeout =3D params.IframeContainer.timeout || 15000;=0A= var loadTimer;=0A= =0A= if ( params.Container.log ) {=0A= var log =3D function( msg ) {=0A= try {=0A= params.Container.log.call( scope, "IframeContainer::" + = clientID + ": " + msg );=0A= } catch( e ) {=0A= OpenAjax.hub._debugger();=0A= }=0A= };=0A= } else {=0A= log =3D function() {};=0A= }=0A= =0A= =0A= this._init =3D function() {=0A= // add to ManagedHub first, to see if clientID is a duplicate=0A= hub.addContainer( this );=0A= =0A= // Create an "internal" ID, which is guaranteed to be unique = within the=0A= // window, not just within the hub.=0A= internalID =3D OpenAjax.hub.IframeContainer._rpcRouter.add( = clientID, this );=0A= securityToken =3D generateSecurityToken( params, scope, log );=0A= =0A= var relay =3D null;=0A= var transportName =3D OpenAjax.gadgets.rpc.getRelayChannel();=0A= if ( params.IframeContainer.tunnelURI ) {=0A= if ( transportName !=3D=3D "wpm" && transportName !=3D=3D = "nix" ) {=0A= throw new Error( OpenAjax.hub.Error.IncompatBrowser );=0A= }=0A= } else {=0A= log( "WARNING: Parameter 'IframeContaienr.tunnelURI' not = specified. Connection will not be fully secure." );=0A= if ( transportName =3D=3D=3D "rmr" ) {=0A= relay =3D OpenAjax.gadgets.rpc.getOrigin( = params.IframeContainer.uri ) + "/robots.txt"; =0A= }=0A= }=0A= =0A= // Create IFRAME to hold the client=0A= createIframe();=0A= =0A= OpenAjax.gadgets.rpc.setupReceiver( internalID, relay );=0A= =0A= startLoadTimer();=0A= };=0A= =0A= =0A= /*** OpenAjax.hub.Container interface ***/=0A= =0A= this.sendToClient =3D function( topic, data, subscriptionID ) {=0A= OpenAjax.gadgets.rpc.call( internalID, "openajax.pubsub", null, = "pub", topic, data,=0A= subscriptionID );=0A= };=0A= =0A= this.remove =3D function() {=0A= finishDisconnect();=0A= clearTimeout( loadTimer );=0A= OpenAjax.gadgets.rpc.removeReceiver( internalID );=0A= var iframe =3D document.getElementById( internalID );=0A= iframe.parentNode.removeChild( iframe );=0A= OpenAjax.hub.IframeContainer._rpcRouter.remove( internalID );=0A= };=0A= =0A= this.isConnected =3D function() {=0A= return connected;=0A= };=0A= =0A= this.getClientID =3D function() {=0A= return clientID;=0A= };=0A= =0A= this.getPartnerOrigin =3D function() {=0A= if ( connected ) {=0A= var origin =3D OpenAjax.gadgets.rpc.getReceiverOrigin( = internalID );=0A= if ( origin ) {=0A= // remove port if present=0A= return ( /^([a-zA-Z]+:\/\/[^:]+).*/.exec( origin )[1] );=0A= }=0A= }=0A= return null;=0A= };=0A= =0A= this.getParameters =3D function() {=0A= return params;=0A= };=0A= =0A= this.getHub =3D function() {=0A= return hub;=0A= };=0A= =0A= =0A= /*** OpenAjax.hub.IframeContainer interface ***/=0A= =0A= /**=0A= * Get the iframe associated with this iframe container=0A= * =0A= * This function returns the iframe associated with an = IframeContainer,=0A= * allowing the Manager Application to change its size, styles, = scrollbars, etc.=0A= * =0A= * CAUTION: The iframe is owned exclusively by the IframeContainer. = The Manager=0A= * Application MUST NOT destroy the iframe directly. Also, if the = iframe is=0A= * hidden and disconnected, the Manager Application SHOULD NOT = attempt to make=0A= * it visible. The Container SHOULD automatically hide the iframe = when it is=0A= * disconnected; to make it visible would introduce security risks. =0A= * =0A= * @returns iframeElement=0A= * @type {Object}=0A= */=0A= this.getIframe =3D function() {=0A= return document.getElementById( internalID );=0A= };=0A= =0A= =0A= /*** private functions ***/=0A= =0A= function assertValidParams( args ) {=0A= var hub =3D args[0],=0A= clientID =3D args[1],=0A= params =3D args[2];=0A= if ( ! hub || ! clientID || ! params || ! params.Container ||=0A= ! params.Container.onSecurityAlert || ! = params.IframeContainer ||=0A= ! params.IframeContainer.parent || ! = params.IframeContainer.uri ) {=0A= throw new Error( OpenAjax.hub.Error.BadParameters );=0A= }=0A= }=0A= =0A= this._handleIncomingRPC =3D function( command, topic, data ) {=0A= switch ( command ) {=0A= // publish=0A= // 'data' is topic message=0A= case "pub":=0A= hub.publishForClient( container, topic, data );=0A= break;=0A= =0A= // subscribe=0A= // 'data' is subscription ID=0A= case "sub":=0A= var errCode =3D ""; // empty string is success=0A= try {=0A= subs[ data ] =3D hub.subscribeForClient( container, = topic, data );=0A= } catch( e ) {=0A= errCode =3D e.message;=0A= }=0A= return errCode;=0A= =0A= // unsubscribe=0A= // 'data' is subscription ID=0A= case "uns":=0A= var handle =3D subs[ data ];=0A= hub.unsubscribeForClient( container, handle );=0A= delete subs[ data ];=0A= return data;=0A= =0A= // connect=0A= case "con":=0A= finishConnect();=0A= return true;=0A= =0A= // disconnect=0A= case "dis":=0A= startLoadTimer();=0A= finishDisconnect();=0A= if ( params.Container.onDisconnect ) {=0A= try {=0A= params.Container.onDisconnect.call( scope, = container );=0A= } catch( e ) {=0A= OpenAjax.hub._debugger();=0A= log( "caught error from onDisconnect callback to = constructor: " + e.message );=0A= }=0A= }=0A= return true;=0A= }=0A= };=0A= =0A= this._onSecurityAlert =3D function( error ) {=0A= invokeSecurityAlert( rpcErrorsToOAA[ error ] );=0A= };=0A= =0A= // The RPC code requires that the 'name' attribute be properly set = on the=0A= // iframe. However, setting the 'name' property on the iframe object=0A= // returned from 'createElement("iframe")' doesn't work on IE --=0A= // 'window.name' returns null for the code within the iframe. The=0A= // workaround is to set the 'innerHTML' of a span to the iframe's = HTML code,=0A= // with 'name' and other attributes properly set.=0A= function createIframe() {=0A= var span =3D document.createElement( "span" );=0A= params.IframeContainer.parent.appendChild( span );=0A= =0A= var iframeText =3D '';=0A= =0A= span.innerHTML =3D iframeText;=0A= =0A= var tunnel =3D params.IframeContainer.tunnelURI;=0A= document.getElementById( internalID ).src =3D = params.IframeContainer.uri +=0A= "#rpctoken=3D" + securityToken +=0A= (tunnel ? "&parent=3D" + encodeURIComponent( tunnel ) + = "&forcesecure=3Dtrue" :=0A= "&oaaParent=3D" + encodeURIComponent( = OpenAjax.gadgets.rpc.getOrigin( window.location.href )));=0A= }=0A= =0A= // If the relay iframe used by RPC has not been loaded yet, then we = won't have unload protection=0A= // at this point. Since we can't detect when the relay iframe has = loaded, we use a two stage=0A= // connection process. First, the child sends a connection msg and = the container sends an ack.=0A= // Then the container sends a connection msg and the child replies = with an ack. Since the=0A= // container can only send a message if the relay iframe has loaded, = then we know if we get an=0A= // ack here that the relay iframe is ready. And we are fully = connected.=0A= function finishConnect() {=0A= // connect acknowledgement=0A= function callback( result ) {=0A= if ( result ) {=0A= connected =3D true;=0A= clearTimeout( loadTimer );=0A= document.getElementById( internalID ).style.visibility = =3D "visible";=0A= if ( params.Container.onConnect ) {=0A= try {=0A= params.Container.onConnect.call( scope, = container );=0A= } catch( e ) {=0A= OpenAjax.hub._debugger();=0A= log( "caught error from onConnect callback to = constructor: " + e.message );=0A= }=0A= }=0A= }=0A= }=0A= OpenAjax.gadgets.rpc.call( internalID, "openajax.pubsub", = callback, "cmd", "con" );=0A= }=0A= =0A= function finishDisconnect() {=0A= if ( connected ) {=0A= connected =3D false;=0A= document.getElementById( internalID ).style.visibility =3D = "hidden";=0A= =0A= // unsubscribe from all subs=0A= for ( var s in subs ) {=0A= hub.unsubscribeForClient( container, subs[s] );=0A= }=0A= subs =3D {};=0A= }=0A= }=0A= =0A= function invokeSecurityAlert( errorMsg ) {=0A= try {=0A= params.Container.onSecurityAlert.call( scope, container, = errorMsg );=0A= } catch( e ) {=0A= OpenAjax.hub._debugger();=0A= log( "caught error from onSecurityAlert callback to = constructor: " + e.message );=0A= }=0A= }=0A= =0A= function startLoadTimer() {=0A= loadTimer =3D setTimeout(=0A= function() {=0A= // alert the security alert callback=0A= invokeSecurityAlert( = OpenAjax.hub.SecurityAlert.LoadTimeout );=0A= // don't receive any more messages from HubClient=0A= container._handleIncomingRPC =3D function() {};=0A= },=0A= timeout=0A= );=0A= }=0A= =0A= =0A= this._init();=0A= };=0A= =0A= /////////////////////////////////////////////////////////////////////////= ///////=0A= =0A= /**=0A= * Create a new IframeHubClient.=0A= * @constructor=0A= * @extends OpenAjax.hub.HubClient=0A= * =0A= * @param {Object} params=0A= * Once the constructor is called, the params object belongs to the=0A= * HubClient. The caller MUST not modify it.=0A= * The following are the pre-defined properties on params:=0A= * @param {Function} params.HubClient.onSecurityAlert=0A= * Called when an attempted security breach is thwarted=0A= * @param {Object} [params.HubClient.scope]=0A= * Whenever one of the HubClient's callback functions is called,=0A= * references to "this" in the callback will refer to the scope = object.=0A= * If not provided, the default is window.=0A= * @param {Function} [params.HubClient.log]=0A= * Optional logger function. Would be used to log to console.log or=0A= * equivalent. =0A= * @param {Boolean} [params.IframeHubClient.requireParentVerifiable]=0A= * Set to true in order to require that this IframeHubClient use a=0A= * transport that can verify the parent Container's identity.=0A= * @param {Function} [params.IframeHubClient.seed]=0A= * A function that returns a string that will be used to seed the=0A= * pseudo-random number generator, which is used to create the = security=0A= * tokens. An implementation of IframeHubClient may choose to ignore=0A= * this value.=0A= * @param {Number} [params.IframeHubClient.tokenLength]=0A= * Length of the security tokens used when transmitting messages. If=0A= * not specified, defaults to 6. An implementation of = IframeHubClient=0A= * may choose to ignore this value.=0A= * =0A= * @throws {OpenAjax.hub.Error.BadParameters} if any of the required=0A= * parameters is missing, or if a parameter value is invalid in =0A= * some way.=0A= */=0A= OpenAjax.hub.IframeHubClient =3D function( params )=0A= {=0A= if ( ! params || ! params.HubClient || ! = params.HubClient.onSecurityAlert ) {=0A= throw new Error( OpenAjax.hub.Error.BadParameters );=0A= }=0A= =0A= var client =3D this;=0A= var scope =3D params.HubClient.scope || window;=0A= var connected =3D false;=0A= var subs =3D {};=0A= var subIndex =3D 0;=0A= var clientID;=0A= // var securityToken; // XXX still need "securityToken"?=0A= =0A= if ( params.HubClient.log ) {=0A= var log =3D function( msg ) {=0A= try {=0A= params.HubClient.log.call( scope, "IframeHubClient::" + = clientID + ": " + msg );=0A= } catch( e ) {=0A= OpenAjax.hub._debugger();=0A= }=0A= };=0A= } else {=0A= log =3D function() {};=0A= }=0A= =0A= this._init =3D function() {=0A= var urlParams =3D OpenAjax.gadgets.util.getUrlParameters();=0A= if ( ! urlParams.parent ) {=0A= // The RMR transport does not require a valid relay file, = but does need a URL=0A= // in the parent's domain. The URL does not need to point to = valid file, so just=0A= // point to 'robots.txt' file. See RMR transport code for = more info.=0A= var parent =3D urlParams.oaaParent + "/robots.txt";=0A= OpenAjax.gadgets.rpc.setupReceiver( "..", parent );=0A= }=0A= =0A= if ( params.IframeHubClient && = params.IframeHubClient.requireParentVerifiable &&=0A= OpenAjax.gadgets.rpc.getReceiverOrigin( ".." ) =3D=3D=3D = null ) {=0A= // If user set 'requireParentVerifiable' to true but RPC = transport does not=0A= // support this, throw error.=0A= OpenAjax.gadgets.rpc.removeReceiver( ".." );=0A= throw new Error( OpenAjax.hub.Error.IncompatBrowser );=0A= }=0A= =0A= OpenAjax.hub.IframeContainer._rpcRouter.add( "..", this );=0A= // XXX The RPC layer initializes immediately on load, in the child = (IframeHubClient). So it is too=0A= // late here to specify a security token for the RPC layer. At the = moment, only the NIX=0A= // transport requires a child token (IFPC [aka FIM] is not supported).=0A= // securityToken =3D generateSecurityToken( params, scope, log );=0A= =0A= var internalID =3D OpenAjax.gadgets.rpc.RPC_ID;=0A= if ( ! internalID ) {=0A= throw new Error( OpenAjax.hub.Error.WrongProtocol );=0A= }=0A= clientID =3D internalID.substr( internalID.indexOf("_") + 1 );=0A= };=0A= =0A= /*** HubClient interface ***/=0A= =0A= this.connect =3D function( onComplete, scope ) {=0A= if ( connected ) {=0A= throw new Error( OpenAjax.hub.Error.Duplicate );=0A= }=0A= =0A= // connect acknowledgement=0A= function callback( result ) {=0A= if ( result ) {=0A= connected =3D true;=0A= if ( onComplete ) {=0A= try {=0A= onComplete.call( scope || window, client, true );=0A= } catch( e ) {=0A= OpenAjax.hub._debugger();=0A= log( "caught error from onComplete callback to = connect(): " + e.message );=0A= }=0A= }=0A= }=0A= }=0A= OpenAjax.gadgets.rpc.call( "..", "openajax.pubsub", callback, = "con" );=0A= };=0A= =0A= this.disconnect =3D function( onComplete, scope ) {=0A= if ( !connected ) {=0A= throw new Error( OpenAjax.hub.Error.Disconnected );=0A= }=0A= =0A= connected =3D false;=0A= =0A= // disconnect acknowledgement=0A= var callback =3D null;=0A= if ( onComplete ) {=0A= callback =3D function( result ) {=0A= try {=0A= onComplete.call( scope || window, client, true );=0A= } catch( e ) {=0A= OpenAjax.hub._debugger();=0A= log( "caught error from onComplete callback to = disconnect(): " + e.message );=0A= }=0A= };=0A= }=0A= OpenAjax.gadgets.rpc.call( "..", "openajax.pubsub", callback, = "dis" );=0A= };=0A= =0A= this.getPartnerOrigin =3D function() {=0A= if ( connected ) {=0A= var origin =3D OpenAjax.gadgets.rpc.getReceiverOrigin( ".." = );=0A= if ( origin ) {=0A= // remove port if present=0A= return ( /^([a-zA-Z]+:\/\/[^:]+).*/.exec( origin )[1] );=0A= }=0A= }=0A= return null;=0A= };=0A= =0A= this.getClientID =3D function() {=0A= return clientID;=0A= };=0A= =0A= /*** Hub interface ***/=0A= =0A= this.subscribe =3D function( topic, onData, scope, onComplete, = subscriberData ) {=0A= assertConn();=0A= assertSubTopic( topic );=0A= if ( ! onData ) {=0A= throw new Error( OpenAjax.hub.Error.BadParameters );=0A= }=0A= =0A= scope =3D scope || window;=0A= var subID =3D "" + subIndex++;=0A= subs[ subID ] =3D { cb: onData, sc: scope, d: subscriberData };=0A= =0A= // subscribe acknowledgement=0A= function callback( result ) {=0A= if ( result !=3D=3D '' ) { // error=0A= delete subs[ subID ];=0A= }=0A= if ( onComplete ) {=0A= try {=0A= onComplete.call( scope, subID, result =3D=3D=3D "", = result );=0A= } catch( e ) {=0A= OpenAjax.hub._debugger();=0A= log( "caught error from onComplete callback to = subscribe(): " + e.message );=0A= }=0A= }=0A= }=0A= OpenAjax.gadgets.rpc.call( "..", "openajax.pubsub", callback, = "sub", topic, subID );=0A= =0A= return subID;=0A= };=0A= =0A= this.publish =3D function( topic, data ) {=0A= assertConn();=0A= assertPubTopic( topic );=0A= OpenAjax.gadgets.rpc.call( "..", "openajax.pubsub", null, "pub", = topic, data );=0A= };=0A= =0A= this.unsubscribe =3D function( subscriptionID, onComplete, scope ) {=0A= assertConn();=0A= if ( ! subscriptionID ) {=0A= throw new Error( OpenAjax.hub.Error.BadParameters );=0A= }=0A= =0A= // if no such subscriptionID, or in process of unsubscribing = given ID, throw error=0A= if ( ! subs[ subscriptionID ] || subs[ subscriptionID ].uns ) {=0A= throw new Error( OpenAjax.hub.Error.NoSubscription );=0A= }=0A= =0A= // unsubscribe in progress=0A= subs[ subscriptionID ].uns =3D true;=0A= =0A= // unsubscribe acknowledgement=0A= function callback( result ) {=0A= delete subs[ subscriptionID ];=0A= if ( onComplete ) {=0A= try {=0A= onComplete.call( scope || window, subscriptionID, = true );=0A= } catch( e ) {=0A= OpenAjax.hub._debugger();=0A= log( "caught error from onComplete callback to = unsubscribe(): " + e.message );=0A= }=0A= }=0A= }=0A= OpenAjax.gadgets.rpc.call( "..", "openajax.pubsub", callback, = "uns", null, subscriptionID );=0A= };=0A= =0A= this.isConnected =3D function() {=0A= return connected;=0A= };=0A= =0A= this.getScope =3D function() {=0A= return scope;=0A= };=0A= =0A= this.getSubscriberData =3D function( subscriptionID ) {=0A= assertConn();=0A= if ( subs[ subscriptionID ] ) {=0A= return subs[ subscriptionID ].d;=0A= }=0A= throw new Error( OpenAjax.hub.Error.NoSubscription );=0A= };=0A= =0A= this.getSubscriberScope =3D function( subscriptionID ) {=0A= assertConn();=0A= if ( subs[ subscriptionID ] ) {=0A= return subs[ subscriptionID ].sc;=0A= }=0A= throw new Error( OpenAjax.hub.Error.NoSubscription );=0A= };=0A= =0A= this.getParameters =3D function() {=0A= return params;=0A= };=0A= =0A= /*** private functions ***/=0A= =0A= this._handleIncomingRPC =3D function( command, topic, data, = subscriptionID ) {=0A= if ( command =3D=3D=3D "pub" ) {=0A= // if subscription exists and we are not in process of = unsubscribing...=0A= if ( subs[ subscriptionID ] && ! subs[ subscriptionID ].uns = ) {=0A= try {=0A= subs[ subscriptionID ].cb.call( subs[ subscriptionID = ].sc, topic,=0A= data, subs[ subscriptionID ].d );=0A= } catch( e ) {=0A= OpenAjax.hub._debugger();=0A= log( "caught error from onData callback to = subscribe(): " + e.message );=0A= }=0A= }=0A= }=0A= // else if command =3D=3D=3D "cmd"...=0A= =0A= // First time this function is called, topic should be "con". = This is the 2nd stage of the=0A= // connection process. Simply need to return "true" in order to = send an acknowledgement=0A= // back to container. See finishConnect() in the container = object.=0A= if ( topic =3D=3D=3D "con" ) {=0A= return true;=0A= }=0A= return false;=0A= };=0A= =0A= function assertConn() {=0A= if ( ! connected ) {=0A= throw new Error( OpenAjax.hub.Error.Disconnected );=0A= }=0A= }=0A= =0A= function assertSubTopic( topic )=0A= {=0A= if ( ! topic ) {=0A= throw new Error( OpenAjax.hub.Error.BadParameters );=0A= }=0A= var path =3D topic.split(".");=0A= var len =3D path.length;=0A= for (var i =3D 0; i < len; i++) {=0A= var p =3D path[i];=0A= if ((p =3D=3D=3D "") ||=0A= ((p.indexOf("*") !=3D -1) && (p !=3D "*") && (p !=3D = "**"))) {=0A= throw new Error( OpenAjax.hub.Error.BadParameters );=0A= }=0A= if ((p =3D=3D "**") && (i < len - 1)) {=0A= throw new Error( OpenAjax.hub.Error.BadParameters );=0A= }=0A= }=0A= }=0A= =0A= function assertPubTopic( topic ) {=0A= if ( !topic || topic =3D=3D=3D "" || (topic.indexOf("*") !=3D = -1) ||=0A= (topic.indexOf("..") !=3D -1) || (topic.charAt(0) =3D=3D = ".") ||=0A= (topic.charAt(topic.length-1) =3D=3D "."))=0A= {=0A= throw new Error( OpenAjax.hub.Error.BadParameters );=0A= }=0A= }=0A= =0A= // function invokeSecurityAlert( errorMsg ) {=0A= // try {=0A= // params.HubClient.onSecurityAlert.call( scope, client, = errorMsg );=0A= // } catch( e ) {=0A= // OpenAjax.hub._debugger();=0A= // log( "caught error from onSecurityAlert callback to = constructor: " + e.message );=0A= // }=0A= // }=0A= =0A= =0A= this._init();=0A= };=0A= =0A= /////////////////////////////////////////////////////////////////////////= ///////=0A= =0A= // RPC object contents:=0A= // s: Service Name=0A= // f: From=0A= // c: The callback ID or 0 if none.=0A= // a: The arguments for this RPC call.=0A= // t: The authentication token.=0A= OpenAjax.hub.IframeContainer._rpcRouter =3D function() {=0A= var receivers =3D {};=0A= =0A= function router() {=0A= var r =3D receivers[ this.f ];=0A= if ( r ) {=0A= return r._handleIncomingRPC.apply( r, arguments );=0A= }=0A= }=0A= =0A= function onSecurityAlert( receiverId, error ) {=0A= var r =3D receivers[ receiverId ];=0A= if ( r ) {=0A= r._onSecurityAlert.call( r, error );=0A= }=0A= }=0A= =0A= return {=0A= add: function( id, receiver ) {=0A= function _add( id, receiver ) {=0A= if ( id =3D=3D=3D ".." ) {=0A= if ( ! receivers[ ".." ] ) {=0A= receivers[ ".." ] =3D receiver;=0A= }=0A= return;=0A= }=0A= =0A= do {=0A= // a client with the specified ID already exists on = this page;=0A= // create a unique ID=0A= newID =3D ((0x7fff * Math.random()) | = 0).toString(16) + "_" + id;=0A= } while ( receivers[ newID ] );=0A= receivers[ newID ] =3D receiver;=0A= return newID;=0A= }=0A= =0A= // when this function is first called, register the RPC = service=0A= OpenAjax.gadgets.rpc.register( "openajax.pubsub", router );=0A= OpenAjax.gadgets.rpc.config({=0A= securityCallback: onSecurityAlert=0A= });=0A= =0A= rpcErrorsToOAA[ OpenAjax.gadgets.rpc.SEC_ERROR_LOAD_TIMEOUT = ] =3D OpenAjax.hub.SecurityAlert.LoadTimeout;=0A= rpcErrorsToOAA[ OpenAjax.gadgets.rpc.SEC_ERROR_FRAME_PHISH ] = =3D OpenAjax.hub.SecurityAlert.FramePhish;=0A= rpcErrorsToOAA[ OpenAjax.gadgets.rpc.SEC_ERROR_FORGED_MSG ] = =3D OpenAjax.hub.SecurityAlert.ForgedMsg;=0A= =0A= this.add =3D _add;=0A= return _add( id, receiver );=0A= },=0A= =0A= remove: function( id ) {=0A= delete receivers[ id ];=0A= }=0A= };=0A= }();=0A= =0A= var rpcErrorsToOAA =3D {};=0A= =0A= /////////////////////////////////////////////////////////////////////////= ///////=0A= =0A= function generateSecurityToken( params, scope, log ) {=0A= if ( ! OpenAjax.hub.IframeContainer._prng ) {=0A= // create pseudo-random number generator with a default seed=0A= var seed =3D new Date().getTime() + Math.random() + = document.cookie;=0A= OpenAjax.hub.IframeContainer._prng =3D = OpenAjax._smash.crypto.newPRNG( seed );=0A= }=0A= =0A= var p =3D params.IframeContainer || params.IframeHubClient;=0A= if ( p && p.seed ) {=0A= try {=0A= var extraSeed =3D p.seed.call( scope );=0A= OpenAjax.hub.IframeContainer._prng.addSeed( extraSeed );=0A= } catch( e ) {=0A= OpenAjax.hub._debugger();=0A= log( "caught error from 'seed' callback: " + e.message );=0A= }=0A= }=0A= =0A= var tokenLength =3D (p && p.tokenLength) || 6;=0A= return OpenAjax.hub.IframeContainer._prng.nextRandomB64Str( = tokenLength );=0A= }=0A= =0A= })();=0A= };=0A= /*=0A= =0A= Copyright 2006-2009 OpenAjax Alliance=0A= =0A= Licensed under the Apache License, Version 2.0 (the "License"); =0A= you may not use this file except in compliance with the License. =0A= You may obtain a copy of the License at=0A= =0A= http://www.apache.org/licenses/LICENSE-2.0=0A= =0A= Unless required by applicable law or agreed to in writing, = software =0A= distributed under the License is distributed on an "AS IS" = BASIS, =0A= WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or = implied. =0A= See the License for the specific language governing permissions = and =0A= limitations under the License.=0A= */=0A= // SMASH.CRYPTO=0A= //=0A= // Small library containing some minimal crypto functionality for a=0A= // - a hash-function: SHA-1 (see FIPS PUB 180-2 for definition)=0A= // BigEndianWord[5] <- smash.crypto.sha1( BigEndianWord[*] dataWA, = int lenInBits)=0A= //=0A= // - a message authentication code (MAC): HMAC-SHA-1 (RFC2104/2202)=0A= // BigEndianWord[5] <- smash.crypto.hmac_sha1(=0A= // BigEndianWord[3-16] keyWA, =0A= // Ascii or Unicode string dataS,=0A= // int chrsz (8 for Asci/16 for Unicode)=0A= //=0A= // - pseudo-random number generator (PRNG): HMAC-SHA-1 in counter mode, = following=0A= // Barak & Halevi, An architecture for robust pseudo-random generation = and applications to /dev/random, CCS 2005=0A= // rngObj <- smash.crypto.newPRNG( String[>=3D12] seedS)=0A= // where rngObj has methods=0A= // addSeed(String seed)=0A= // BigEndianWord[len] <- nextRandomOctets(int len)=0A= // Base64-String[len] <- nextRandomB64Str(int len)=0A= // Note: HMAC-SHA1 in counter-mode does not provide forward-security = on corruption. =0A= // However, the PRNG state is kept inside a closure. So if = somebody can break the closure, he probably could=0A= // break a whole lot more and forward-security of the prng is = not the highest of concerns anymore :-)=0A= =0A= if ( typeof OpenAjax._smash =3D=3D 'undefined' ) { OpenAjax._smash =3D = {}; }=0A= =0A= OpenAjax._smash.crypto =3D {=0A= =0A= // Some utilities=0A= // convert a string to an array of big-endian words=0A= 'strToWA': function (/* Ascii or Unicode string */ str, /* int 8 for = Asci/16 for Unicode */ chrsz){=0A= var bin =3D Array();=0A= var mask =3D (1 << chrsz) - 1;=0A= for(var i =3D 0; i < str.length * chrsz; i +=3D chrsz)=0A= bin[i>>5] |=3D (str.charCodeAt(i / chrsz) & mask) << (32 - chrsz - = i%32);=0A= return bin;=0A= },=0A= =0A= =0A= // MAC=0A= 'hmac_sha1' : function(=0A= /* BigEndianWord[3-16]*/ keyWA,=0A= /* Ascii or Unicode string */ dataS,=0A= /* int 8 for Asci/16 for Unicode */ chrsz)=0A= {=0A= // write our own hmac derived from paj's so we do not have to do = constant key conversions and length checking ...=0A= var ipad =3D Array(16), opad =3D Array(16);=0A= for(var i =3D 0; i < 16; i++) {=0A= ipad[i] =3D keyWA[i] ^ 0x36363636;=0A= opad[i] =3D keyWA[i] ^ 0x5C5C5C5C;=0A= }=0A= =0A= var hash =3D this.sha1( ipad.concat(this.strToWA(dataS, chrsz)), 512 = + dataS.length * chrsz);=0A= return this.sha1( opad.concat(hash), 512 + 160);=0A= },=0A= =0A= =0A= // PRNG factory method=0A= // see below 'addSeed', 'nextRandomOctets' & 'nextRandomB64Octets' for = public methods of returnd prng object=0A= 'newPRNG' : function (/* String[>=3D12] */ seedS) {=0A= var that =3D this;=0A= =0A= // parameter checking=0A= // We cannot really verify entropy but obviously the string must = have at least a minimal length to have enough entropy=0A= // However, a 2^80 security seems ok, so we check only that at least = 12 chars assuming somewhat random ASCII=0A= if ( (typeof seedS !=3D 'string') || (seedS.length < 12) ) {=0A= alert("WARNING: Seed length too short ...");=0A= }=0A= =0A= // constants=0A= var __refresh_keyWA =3D [ 0xA999, 0x3E36, 0x4706, 0x816A,=0A= 0x2571, 0x7850, 0xC26C, 0x9CD0,=0A= 0xBA3E, 0xD89D, 0x1233, 0x9525,=0A= 0xff3C, 0x1A83, 0xD491, 0xFF15 ]; // some random key = for refresh ...=0A= =0A= // internal state=0A= var _keyWA =3D []; // BigEndianWord[5]=0A= var _cnt =3D 0; // int=0A= =0A= function extract(seedS) {=0A= return that.hmac_sha1(__refresh_keyWA, seedS, 8);=0A= }=0A= =0A= function refresh(seedS) {=0A= // HMAC-SHA1 is not ideal, Rijndal 256bit block/key in CBC mode = with fixed key might be better=0A= // but to limit the primitives and given that we anyway have only = limited entropy in practise=0A= // this seems good enough=0A= var uniformSeedWA =3D extract(seedS);=0A= for(var i =3D 0; i < 5; i++) {=0A= _keyWA[i] ^=3D uniformSeedWA[i];=0A= }=0A= }=0A= =0A= // inital state seeding=0A= refresh(seedS);=0A= =0A= // public methods=0A= return {=0A= // Mix some additional seed into the PRNG state=0A= 'addSeed' : function (/* String */ seed) {=0A= // no parameter checking. Any added entropy should be fine ...=0A= refresh(seed);=0A= },=0A= =0A= =0A= // Get an array of len random octets=0A= 'nextRandomOctets' : /* BigEndianWord[len] <- */ function (/* int = */ len) {=0A= var randOctets =3D [];=0A= while (len > 0) {=0A= _cnt+=3D1;=0A= var nextBlock =3D that.hmac_sha1(_keyWA, (_cnt).toString(16), 8);=0A= for (i=3D0; (i < 20) & (len > 0); i++, len--) {=0A= randOctets.push( (nextBlock[i>>2] >> (i % 4) ) % 256);=0A= }=0A= // Note: if len was not a multiple 20, some random octets are = ignored here but who cares ..=0A= }=0A= return randOctets;=0A= },=0A= =0A= =0A= // Get a random string of Base64-like (see below) chars of length = len=0A= // Note: there is a slightly non-standard Base64 with no padding = and '-' and '_' for '+' and '/', respectively=0A= 'nextRandomB64Str' : /* Base64-String <- */ function (/* int */ = len) {=0A= var b64StrMap =3D = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";=0A= =0A= var randOctets =3D this.nextRandomOctets(len);=0A= var randB64Str =3D '';=0A= for (var i=3D0; i < len; i++) {=0A= randB64Str +=3D b64StrMap.charAt(randOctets[i] & 0x3F);=0A= }=0A= return randB64Str;=0A= }=0A= =0A= }=0A= },=0A= =0A= =0A= // Digest function:=0A= // BigEndianWord[5] <- sha1( BigEndianWord[*] dataWA, int lenInBits)=0A= 'sha1' : function(){=0A= // Note: all Section references below refer to FIPS 180-2.=0A= =0A= // private utility functions=0A= =0A= // - 32bit addition with wrap-around=0A= var add_wa =3D function (x, y){=0A= var lsw =3D (x & 0xFFFF) + (y & 0xFFFF);=0A= var msw =3D (x >> 16) + (y >> 16) + (lsw >> 16);=0A= return (msw << 16) | (lsw & 0xFFFF);=0A= }=0A= =0A= // - 32bit rotatate left=0A= var rol =3D function(num, cnt) {=0A= return (num << cnt) | (num >>> (32 - cnt));=0A= }=0A= =0A= // - round-dependent function f_t from Section 4.1.1=0A= function sha1_ft(t, b, c, d) {=0A= if(t < 20) return (b & c) | ((~b) & d);=0A= if(t < 40) return b ^ c ^ d;=0A= if(t < 60) return (b & c) | (b & d) | (c & d);=0A= return b ^ c ^ d;=0A= }=0A= =0A= // - round-dependent SHA-1 constants from Section 4.2.1=0A= function sha1_kt(t) {=0A= return (t < 20) ? 1518500249 :=0A= (t < 40) ? 1859775393 :=0A= (t < 60) ? -1894007588 :=0A= /* (t < 80) */ -899497514 ;=0A= }=0A= =0A= // main algorithm. =0A= return function( /* BigEndianWord[*] */ dataWA, /* int */ lenInBits) = {=0A= =0A= // Section 6.1.1: Preprocessing=0A= //-----------------------------=0A= // 1. padding: (see also Section 5.1.1)=0A= // - append one 1 followed by 0 bits filling up 448 bits of last = (512bit) block=0A= dataWA[lenInBits >> 5] |=3D 0x80 << (24 - lenInBits % 32);=0A= // - encode length in bits in last 64 bits=0A= // Note: we rely on javascript to zero file elements which are = beyond last (partial) data-block=0A= // but before this length encoding!=0A= dataWA[((lenInBits + 64 >> 9) << 4) + 15] =3D lenInBits;=0A= =0A= // 2. 512bit blocks (actual split done ondemand later)=0A= var W =3D Array(80);=0A= =0A= // 3. initial hash using SHA-1 constants on page 13=0A= var H0 =3D 1732584193;=0A= var H1 =3D -271733879;=0A= var H2 =3D -1732584194;=0A= var H3 =3D 271733878;=0A= var H4 =3D -1009589776;=0A= =0A= // 6.1.2 SHA-1 Hash Computation=0A= for(var i =3D 0; i < dataWA.length; i +=3D 16) {=0A= // 1. Message schedule, done below=0A= // 2. init working variables=0A= var a =3D H0; var b =3D H1; var c =3D H2; var d =3D H3; var e = =3D H4;=0A= =0A= // 3. round-functions=0A= for(var j =3D 0; j < 80; j++)=0A= {=0A= // postponed step 2=0A= W[j] =3D ( (j < 16) ? dataWA[i+j] : rol(W[j-3] ^ W[j-8] ^ = W[j-14] ^ W[j-16], 1));=0A= =0A= var T =3D add_wa( add_wa( rol(a, 5), sha1_ft(j, b, c, d)),=0A= add_wa( add_wa(e, W[j]), sha1_kt(j)) );=0A= e =3D d;=0A= d =3D c;=0A= c =3D rol(b, 30);=0A= b =3D a;=0A= a =3D T;=0A= }=0A= =0A= // 4. intermediate hash=0A= H0 =3D add_wa(a, H0);=0A= H1 =3D add_wa(b, H1);=0A= H2 =3D add_wa(c, H2);=0A= H3 =3D add_wa(d, H3);=0A= H4 =3D add_wa(e, H4);=0A= }=0A= =0A= return Array(H0, H1, H2, H3, H4);=0A= }=0A= }()=0A= =0A= };=0A= ;=0A= /*=0A= * Licensed to the Apache Software Foundation (ASF) under one=0A= * or more contributor license agreements. See the NOTICE file=0A= * distributed with this work for additional information=0A= * regarding copyright ownership. The ASF licenses this file=0A= * to you under the Apache License, Version 2.0 (the=0A= * "License"); you may not use this file except in compliance=0A= * with the License. You may obtain a copy of the License at=0A= *=0A= * http://www.apache.org/licenses/LICENSE-2.0=0A= *=0A= * Unless required by applicable law or agreed to in writing,=0A= * software distributed under the License is distributed on an=0A= * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY=0A= * KIND, either express or implied. See the License for the=0A= * specific language governing permissions and limitations under the = License.=0A= */=0A= =0A= /**=0A= * @fileoverview Container-side message router for PubSub, a = gadget-to-gadget=0A= * communication library.=0A= * =0A= * Uses OpenAjax Hub's ManagedHub class to route pubsub messages and to = provide=0A= * manager callbacks that allow control over these messages.=0A= */=0A= =0A= /**=0A= * @static=0A= * @class Routes PubSub messages.=0A= * @name gadgets.pubsub2router=0A= */=0A= gadgets.pubsub2router =3D function() {=0A= return /** @scope gadgets.pubsub2router */ {=0A= /**=0A= * Initialize the pubsub message router.=0A= * =0A= * 'opt_params' is passed directly to the ManagedHub constructor.=0A= * For example:=0A= * =0A= * gadgets.pubsub2router.init({=0A= * onSubscribe: function(topic, container) {=0A= * ...=0A= * return true; // return false to reject the request.=0A= * },=0A= * onPublish: function(topic, data, pcont, scont) {=0A= * ...=0A= * return true; // return false to reject the request.=0A= * },=0A= * onUnsubscribe: function(topic, container) {=0A= * ...=0A= * }=0A= * });=0A= * =0A= * Alternatively, if you have already created a ManagedHub instance = and wish=0A= * to use that, you can specify it in 'opt_params.hub'.=0A= * =0A= * @param {Object} opt_params=0A= * @see = http://openajax.org/member/wiki/OpenAjax_Hub_2.0_Specification_Managed_Hu= b_APIs#OpenAjax.hub.ManagedHub_constructor=0A= */=0A= init: function( opt_params ) {=0A= if (opt_params.hub) {=0A= this.hub =3D opt_params.hub;=0A= } else {=0A= this.hub =3D new OpenAjax.hub.ManagedHub({=0A= onPublish: opt_params.onPublish,=0A= onSubscribe: opt_params.onSubscribe,=0A= onUnsubscribe: opt_params.onUnsubscribe=0A= });=0A= }=0A= }=0A= };=0A= }();=0A= ;=0A= gadgets.config.init({"shindig.auth":{"authToken":"-1:-1:*::*:0:default"},= "osapi":{"endPoints":["http://%host%/rpc"]},"osapi.services":{"gadgets.rp= c":["container.listMethods"],"http://%host%/rpc":["samplecontainer.update= ","albums.supportedFields","albums.update","activities.delete","gadgets.m= etadata","activities.update","activities.supportedFields","mediaItems.cre= ate","albums.get","activities.get","http.put","activitystreams.create","m= essages.modify","appdata.get","messages.get","system.listMethods","sample= container.get","cache.invalidate","people.supportedFields","http.head","h= ttp.delete","messages.create","people.get","activitystreams.get","mediaIt= ems.supportedFields","mediaItems.delete","albums.delete","activitystreams= .update","mediaItems.update","messages.delete","appdata.update","gadgets.= tokenSupportedFields","http.post","activities.create","samplecontainer.cr= eate","http.get","albums.create","appdata.delete","gadgets.token","appdat= a.create","activitystreams.delete","gadgets.supportedFields","mediaItems.= get","activitystreams.supportedFields"]},"rpc":{"passReferrer":"c2p:query= ","parentRelayUrl":"/container/rpc_relay.html","useLegacyProtocol":false,= "commSwf":"http://idc311-sciverse-shindig.elsevier.com/xpc.swf"},"core.io= ":{"proxyUrl":"//%host%/gadgets/proxy?container=3Ddefault&refresh=3D%refr= esh%&url=3D%url%%rewriteMime%","jsonProxyUrl":"//%host%/gadgets/makeReque= st"}});=0A= ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://www.scopus.com/gadgetcontext/gadgets/js/SciverseShindigService.js /************************************************************************= ******* This JavaScript File contains the Sciverse APIs . Gadgets can interact = with the container through these APIs and request information about the page = *************************************************************************= *****/ =20 /* variables to hold hoover view dimension constants */ var HOOVER_HEIGHT_DEFAULT=3D200; var HOOVER_WIDTH_DEFAULT=3D300; var HOOVER_MINIMUM_HEIGHT=3D120; var HOOVER_MINIMUM_WIDTH=3D180; var HOOVER_MAX_HEIGHT=3D600; var HOOVER_MAX_WIDTH=3D800; =20 shindig.SciverseService =3D function() { shindig.IfrGadgetService.call(this); gadgets.rpc.register('invokeResultsView', this.invokeResultsView); gadgets.rpc.register('getContextInfo', this.getContextInfo); gadgets.rpc.register('getAllResults', this.getAllResults); gadgets.rpc.register('getResults', this.getResults); gadgets.rpc.register('getArticleContent', this.getArticleContent); gadgets.rpc.register('getPageUrl', this.getPageUrl); gadgets.rpc.register('showHoverView', this.showHoverView); gadgets.rpc.register('closeHover', this.closeHover); gadgets.rpc.register('closeAllMyHovers', this.closeAllHovers); gadgets.rpc.register('linkText', this.linkText); gadgets.rpc.register('makeMeInvisible', this.makeMeInvisible); gadgets.rpc.register('makeMeVisible', this.makeMeVisible);=09 gadgets.rpc.register('suggest', this.returnQuerySuggestions); gadgets.rpc.register('subscribe', this.subscribe); } shindig.SciverseService.inherits(shindig.IfrGadgetService); shindig.SciverseService.prototype.getPageUrl =3D function (){ return document.location.href; } shindig.SciverseService.prototype.getArticleContent =3D function (){ if (jQuery(".svBigBox").length > 0) { return jQuery(".svBigBox").html(); } return null; } /* extended requestNavigateTo metod . This is used as a service by = gadgets to navigate to different views */ shindig.IfrGadgetService.prototype.requestNavigateTo =3D function(view, = opt_params) { var id =3D = shindig.container.gadgetService.getGadgetIdFromModuleId(this.f); var gadget =3D shindig.container.getGadget(id); if (view =3D=3D 'canvas') { gadget.openCanvasView(opt_params); return; } }; /* This is overidden method. Used to set the preferences by gadgets = itself */ shindig.IfrGadgetService.prototype.setUserPref =3D function (editToken, = name, value) { var id =3D = shindig.container.gadgetService.getGadgetIdFromModuleId(this.f); var gadget =3D shindig.container.getGadget(id); for (var i =3D 1, j =3D arguments.length; i < j; i +=3D 2) { gadget.userPrefs[arguments[i]].value =3D arguments[i + 1]; } gadget.saveUserPrefs(); }; /* Sciverse Service to invoke Resultsview from a gadget. * Takes the resultID and viewParams(optional) as input params */ shindig.SciverseService.prototype.invokeResultsView =3D function(divId, = viewParams) { if (jQuery('#resultsView_' + divId).length =3D=3D 0) { alert("Invalid location"); return false; } var id =3D = shindig.container.gadgetService.getGadgetIdFromModuleId(this.f); var gadget =3D shindig.container.getGadget(id); //show the div under the selected result jQuery('#resultsView_' + divId).show(); var resultsViewRoot =3D 'resultsView_' + divId; //check if the requesting app is already running in result view mode if(jQuery('#resultsView'+divId + = '_'+gadget.sciverseId_).length!=3D=3D0){ return false; } //Create a new float left layout manager with the above div as the = layout root shindig.container.layoutManager =3D new shindig.FloatLeftLayoutManager( resultsViewRoot); //Create a new gadget and populate it with the specUrl and title from = the current gadget var newgadget =3D shindig.container.createGadget( { specUrl :gadget.specUrl, title :gadget.title, userPrefs:this.userPrefs, requiresPubSub2:this.requiresPubSub2 }); newgadget.sciverseId_ =3D gadget.sciverseId_; newgadget.iconURL=3Dgadget.iconURL; newgadget.location =3D 'resultsView'+divId; //Add gadget shindig.container.addGadget(newgadget); var resultsViewChrome =3D shindig.container.layoutManager .getGadgetChrome(newgadget); //Build the frame url with the correct view name and any view params newgadget.prepareGadgetForView('sciverseResultsView', = resultsViewChrome, viewParams); }; /* Sciverse Service to return contextInfo to a gadget. * Returns : sciverse.contextInfo JSON object */ shindig.SciverseService.prototype.getContextInfo =3D function() { return sciverseObj.contextInfo; }; /* Sciverse Service to return the current Result List to a gadget. * Returns : resultList javascript object */ shindig.SciverseService.prototype.getAllResults =3D function() { return resultList; }; /* Sciverse Service to return the list of selected results to a gadget. *Input Parameters:array containing indices of the results to be = returned *Returns : resultList javascript object */ shindig.SciverseService.prototype.getResults =3D function(resultID_args) = { var selectedResultArr =3D []; var resultID_var; for ( var i =3D 0; i').html('   ' + suggestions[i].text) .addClass(i%2 =3D=3D 0 ? "ac_even" : "ac_odd") .appendTo(list)[0];=09 jQuery.data(li, "ac_data", = suggestions[i].gadgetId+","+suggestions[i].text); } =09 =09 var sOffset =3D jQuery('#suggestions').offset(); var sOffsetHeight =3D jQuery('#suggestions').attr('offsetHeight'); //alert(sOffset.top+sOffsetHeight); jQuery('#satab').css({top: sOffset.top+sOffsetHeight, "z-index":300}); =09 =09 };=09 /** * This feature enable the gadget to hide its iframe **/ shindig.SciverseService.prototype.makeMeInvisible =3D function() { var id =3D = shindig.container.gadgetService.getGadgetIdFromModuleId(this.f); var gadget =3D shindig.container.getGadget(id); var gState =3D(gadget.closed_) ? 'close' : 'open'; //jQuery('#'+this.f).parent().parent().addClass('invisible'); if (gadget.requiresPubSub2) { = jQuery('#'+this.f).parent().parent().parent().addClass('invisible'); jQuery('#'+this.f).css("visibility", "hidden"); } else { jQuery('#'+this.f).parent().parent().css({'visibility':'hidden', = 'position':'absolute'}); } =09 gState +=3D '|invisible'; ajaxKeyEventLog(gadget.title, 'displayGadget', gadget.sciverseId_, = '','','PageView','',gState,''); }; /** * This feature enable the gadget to reveal itself **/ shindig.SciverseService.prototype.makeMeVisible =3D function() { var id =3D = shindig.container.gadgetService.getGadgetIdFromModuleId(this.f); var gadget =3D shindig.container.getGadget(id); var gState =3D(gadget.closed_) ? 'close' : 'open'; =09 //jQuery('#'+this.f).parent().parent().removeClass('invisible'); if (gadget.requiresPubSub2) { = jQuery('#'+this.f).parent().parent().parent().removeClass('invisible'); jQuery('#'+this.f).css("visibility", ""); } else { jQuery('#'+this.f).parent().parent().css({'visibility':'visible', = 'position':''}); } gState +=3D '|visible'; ajaxKeyEventLog(gadget.title, 'displayGadget', gadget.sciverseId_, = '','','PageView','',gState,''); }; /** * Code Changes for HOOVER Starts - 12/08/2010 */ /* map to keep track of number of hoovers created by a gadget key:calling gadget frame id value: number of hoovers created by the calling gadget*/ var gHooversMap =3D {}; /* This service creates the hover view when invoked by a gadget.=20 Input Param: 1.view parameters json object containing data specific to = view e.g. link text term 2. a location json containing height,width and x,y = coordinates of the hoover view gadget to be rendered. */ shindig.SciverseService.prototype.showHoverView =3D function = (viewParams, location) { /* check if the calling gadget is already in gHooversMap map if not: create an entry with value as 0 else: increment the value mapped to the key i.e. iframe id */ if (typeof(gHooversMap[this.f]) =3D=3D 'undefined' || = gHooversMap[this.f] =3D=3D null) { gHooversMap[this.f] =3D 0; } else { gHooversMap[this.f] +=3D 1; } /* hoover index variable taken from the hoover map for current = hoover. It will be used in assigning div ID to current hoover*/ var hooverIndex =3D gHooversMap[this.f]; var hooverId =3D 'hoover_' + this.f + "_" + hooverIndex; // hoover = id variable to be assigned as hoover ID jQuery('#' + hooverId).remove(); //create hoover div to render hoover view var hooverDiv =3D document.createElement("div"); //assign hoover Id containing hoover Index from gHooversMap hooverDiv.id =3D hooverId; hooverDiv.style.position =3D "absolute"; var isLocationDefined=3Dfalse; if(typeof(location) !=3D 'undefined' && location!=3D '' || location = !=3D null)isLocationDefined=3Dtrue; var isXCordinateDefined=3Dfalse; if (isLocationDefined && typeof(location.x) !=3D 'undefined' && = location.x !=3D '' || location.x !=3D null)isXCordinateDefined=3Dtrue; var isYCordinateDefined=3Dfalse; if (isLocationDefined && typeof(location.y) !=3D 'undefined' && = location.y !=3D '' || location.y !=3D null)isYCordinateDefined=3Dtrue;=20 /*check if calling gadget has passed any preferred height for = hoover window and if not, pass default height as default height provided in UI = */ var hooverFrameHeight; if (isLocationDefined && typeof(location.height) !=3D 'undefined' && = location.height !=3D '' || location.height !=3D null) { /* if height passed by the gadget is less than the minimum = allowed height, pass the default minimum height as gadget height*/ if(location.heightHOOVER_MAX_HEIGHT){ hooverFrameHeight=3DHOOVER_MAX_HEIGHT; } else { hooverFrameHeight =3D location.height; } } else { hooverFrameHeight =3D HOOVER_HEIGHT_DEFAULT; } /*check if calling gadget has passed any preferred width for = hoover window and if not, pass default width as default width provided in UI*/ var hooverFrameWidth; if (isLocationDefined && typeof(location.width) !=3D 'undefined' && = location.width !=3D '' || location.width !=3D null) { /* if width passed by the gadget is less than the minimum = allowed width, pass the default minimum width as gadget width*/ if(location.widthHOOVER_MAX_WIDTH){ hooverFrameWidth=3DHOOVER_MAX_WIDTH; } else { hooverFrameWidth =3D location.width; } =20 } else { hooverFrameWidth =3D HOOVER_WIDTH_DEFAULT; } =20 var screenScrollHeight =3D jQuery(window).scrollTop(); // variable = to hold screen scroll height var screenScrollWidth =3D jQuery(window).scrollLeft(); // variable = to hold screen scroll width var viewportWidth =3D jQuery(window).width(); // viewport width var viewportHeight =3D jQuery(window).height(); // viewport height // defining and calculating hoover div's default coordinates when no = coordinates have been specified by calling gadget var hooverDefaultLeft; var hooverDefaultTop; if(!isXCordinateDefined && !isYCordinateDefined){ hooverDefaultLeft =3D viewportWidth / 2; hooverDefaultLeft =3D hooverDefaultLeft - (hooverFrameWidth / 2); // = loads hoover in the centre of the window hooverDefaultTop =3D viewportHeight / 2; hooverDefaultTop =3D hooverDefaultTop + screenScrollHeight - = 2*(hooverFrameHeight/3 ); } var adjustedXCoordinate; var adjustedYCoordinate; var diffyBottom; var diffxRight; var diffxLeft; var diffyTop; if(isXCordinateDefined&&isYCordinateDefined){ adjustedXCoordinate =3D location.x +8; // variable to hold x = coordinate of the hoover view div adjustedYCoordinate =3D location.y; // variable to hold y = coordinate of the hoover view div /*variables to calculate hoover position according to the link text = click*/ diffyBottom =3D (viewportHeight + screenScrollHeight) - (location.y = + hooverFrameHeight); // is >0 if there is enough space for hoover to = render below the link text clicked diffxRight =3D viewportWidth - (location.x + hooverFrameWidth); // = is >0 if there is enough space for hoover to render to the right of the = link text clicked diffxLeft =3D location.x - hooverFrameWidth - screenScrollWidth; // = is >0 if there is enough space for hoover to render to the left of the = link text clicked diffyTop =3D location.y - hooverFrameHeight - screenScrollHeight; = // is >0 if there is enough space for hoover to render above the link = text clicked /*if there is not enough space between clicked text and screen = bottom,=20 render hoover div above the text */ if (diffyBottom < 0) { adjustedYCoordinate =3D location.y - (hooverFrameHeight ); } /*if there is not enough space between clicked text and screen top = as well as bottom,=20 render hoover div below the text */ if (diffyTop < 0 && diffyBottom < 0) { adjustedYCoordinate =3D location.y; } /*if there is not enough space between clicked text and screen's = right edge,=20 render hoover div to the left of text */ if (diffxRight < 0) { adjustedXCoordinate =3D location.x - (hooverFrameWidth + 46); } /*if there is not enough space between clicked text and sscreen's = right edge as well as screen's left edge,render hoover div below towards the right of = the text */ if (diffxLeft < 0 && diffxRight < 0) { adjustedXCoordinate =3D location.x + 20; } } // pass the adjusted coordinates as hoover div top attribute hooverDiv.style.left =3D (isLocationDefined && isXCordinateDefined = && adjustedXCoordinate ? adjustedXCoordinate : hooverDefaultLeft) + = 'px';; //left+'px'; hooverDiv.style.top =3D (isLocationDefined && isYCordinateDefined && = adjustedYCoordinate ? adjustedYCoordinate : hooverDefaultTop) + 'px'; = //top+'px'; document.body.appendChild(hooverDiv); // create a new layout manager and pass hoover div ID as a parameter = =20 shindig.container.layoutManager =3D new = shindig.FloatLeftLayoutManager(hooverId); var id =3D = shindig.container.gadgetService.getGadgetIdFromModuleId(this.f); var gadget =3D shindig.container.getGadget(id); if(!gadget.isHoverViewAvailable){ alert("Hover view is not available in gadget xml."); return;} // call create gadget, add gadget and prepareGadgetForView() to = render the hoover view var hooverGadget =3D shindig.container.createGadget({ 'height': hooverFrameHeight-25, specUrl: gadget.specUrl, title: gadget.title, userPrefs: (gadgetPrefs[gadget.specUrl].uprefObj !=3D null ? = gadgetPrefs[gadget.specUrl].uprefObj : null), requiresPubSub2: gadget.requiresPubSub2 }); hooverGadget.sciverseId_ =3D gadget.id; hooverGadget.closed_ =3D gadget.closed; hooverGadget.iconURL =3D gadget.iconURL; hooverGadget.location =3D 'hoover'; hooverGadget.locationOnPage =3D 'hoover'; hooverGadget.hasUserPrefs =3D = gadgetPrefs[gadget.specUrl].hasUserPrefs; hooverGadget.hooverIndex =3D hooverIndex; hooverGadget.pinPosition =3D 'absolute'; shindig.container.addGadget(hooverGadget); hooverGadget.prepareGadgetForView('hover', hooverDiv, viewParams); // assign css attributes to hoover div according to the width and = height passed by the calling gadget var isQuirk=3DcheckCompliance(); var isQuirkFlag=3Dfalse;; if(isQuirk=3D=3D'Quirks'){isQuirkFlag=3Dtrue;} jQuery('#' + hooverId).css({ 'width': hooverFrameWidth ? (hooverFrameWidth) : = HOOVER_WIDTH_DEFAULT+'px', /*The height of this DIV will be calculated dynamically during = the createGadget() if the browser is in standard mode and will be passed if it is = in quirks mode*/ 'height': isQuirkFlag ? (hooverFrameHeight) :'', 'padding': '0px', 'margin': '0px', 'z-index':'60' }); // call jquery resizable and pass minimum height and width for = resize jQuery('#' + hooverId).resizable({ minHeight: HOOVER_MINIMUM_HEIGHT, minWidth: HOOVER_MINIMUM_WIDTH, // resize start event=20 start: function (event, ui) { /* * create a temporary empty div and append it to body. = This div will overlay the whole window * when resizing starts. This way it is ensured that = onmouseout event which invokes resizable stop, * happens on a container div instead of the various = iframes present on the page. This div will be removed in resizable stop = */ =20 var tempOverLayDiv =3D jQuery('
 
'); jQuery('body').prepend(tempOverLayDiv[0]); tempOverLayDiv[0].id =3D 'temp_OverLayDiv'; tempOverLayDiv.css({ position: 'absolute' }); tempOverLayDiv.css({ top: 0, left: 0 }); tempOverLayDiv.css('z-index', '1009'); tempOverLayDiv.height(2 * (jQuery(document).height())); tempOverLayDiv.width('100%'); var isQuirk=3DcheckCompliance(); if(isQuirk=3D=3D'Quirks' && truncateURL ){ jQuery('#' + = hooverGadget.getIframeId()).parent().css('position','absolute'); } }, resize: function (event, ui) { // to be executed while resize is = happening /* change the main content div and iframe height as the = resize is done by the user*/ =20 var frameHeight =3D (jQuery('#' + hooverId).height() - = jQuery('#hoover-' + hooverGadget.id).height()); jQuery('#' + = hooverGadget.getIframeId()).parent().css('height', frameHeight + 'px'); jQuery('#' + hooverGadget.getIframeId()).css({ 'height': frameHeight + 'px', 'margin': '0px' }); }, stop: function (event, ui) { jQuery('#temp_OverLayDiv').remove(); // remove the temporary = overlay div created in resize start if (hooverGadget.pinPosition =3D=3D 'fixed') = hooverGadget.togglePin(); } }); //assign image url for resize icon in hoover = jQuery('#'+hooverId).children('.ui-icon').css('background-image','url('+g= adgetIconPath+'/ui-icons_222222_256x240.png)'); // invoke jquery draggable on the hoover view div and with handle as = hoover view titlebar jQuery('#' + hooverId).draggable({ handle: '#hoover-' + hooverGadget.id, 'containment': 'parent', start: function (event, ui) { /* * create a temporary empty div and append it to body. = This div will overlay the whole window * when dragging starts. This way it is ensured that = onmouseout event which invokes draggable stop, * happens on a container div instead of the various = iframes present on the page. This div will be removed in draggable stop = */ =20 var tempOverLayDiv =3D jQuery('
'); jQuery('body').prepend(tempOverLayDiv[0]); tempOverLayDiv[0].id =3D 'temp_OverLayDiv'; tempOverLayDiv.css({ position: 'absolute' }); tempOverLayDiv.css({ top: 0, left: 0 }); tempOverLayDiv.css('z-index', '1009'); tempOverLayDiv.height(2 * (jQuery(window).height())); tempOverLayDiv.width('100%'); }, stop: function (event, ui) { jQuery('#temp_OverLayDiv').remove(); // remove the temporary = overlay div created in draggable start =20 } =20 }); return hooverIndex; }; shindig.SciverseService.prototype.closeHover =3D function(hooverId){ if (typeof(hooverId) =3D=3D 'undefined' || hooverId =3D=3D null) = return; =09 var frameName =3D this.f; if (jQuery('#hoover_'+frameName+'_'+hooverId).length > 0) { jQuery('#hoover_'+frameName+'_'+hooverId).remove(); } } /* This Service removes all the hover windows created by the gadget=20 */ shindig.SciverseService.prototype.closeAllHovers =3D function () { var frameName =3D this.f; var objs =3D jQuery('body>div').filter(function (index) { return this.id.indexOf(frameName) > 0; //return all hoovers = (divs) created by this gadget/frame }); jQuery.each(objs, function (index, obj) { jQuery('#' + obj.id).remove(); }); }; /** * Code Changes for HOOVER Ends - 12/08/2010 */ /** * Code Changes for Link TEXT Starts - 12/07/2010 */ var termListeners =3D {}; var allCategories =3D = {'author':'svAuthor','title':'svTitle','keywords':'svKeyWords','abstract'= :'svAbstract','article':'svArticle','references':'svRefs','all':'svBigBox= '}; /** This service will link the terms specified in the gadget. */ shindig.SciverseService.prototype.linkText =3D function (terms, = categories, frequency, occurence) { //terms is an array termListeners =3D {}; var termsString =3D ''; var termsCount =3D {}; var termsToLink =3D new Array(); for (var t=3D0;t 0) { if (frequency !=3D 'undefined' && (frequency =3D=3D 'first' || = frequency =3D=3D 'every')) { if (frequency =3D=3D 'first') { occurence =3D 1; } = if(occurence=3D=3D'undefined'||occurence=3D=3D''||occurence=3D=3Dnull){ occurence =3D 1; } /* If all is present in categories, link the terms in = complete article*/ var iframeID=3Dthis.f; if ( = jQuery("#"+iframeID).parents('svDoNotLink').length=3D=3D0 ) {=20 =20 if (jQuery.inArray('all', categories) !=3D -1) { iterateHTMLElements(jQuery('.'+allCategories['all']), = termsToLink, this.f, frequency, occurence, termsCount); =09 } else { for (var c =3D 0; c < categories.length; c++) { iterateHTMLElements(jQuery('.' + = allCategories[categories[c]]), termsToLink, this.f, frequency, = occurence, termsCount); } } } } else { alert('Invalid frequency. Frequency can only be either first = or every'); } } jQuery('.linkText').unbind(); jQuery('.linkText').click(function (event) { jQuery(this).css('text-decoration','none'); notifyGadgets(jQuery(this).text(),event); }); jQuery('.linkText').mouseover(function (event) { jQuery(this).css('text-decoration','underline'); }); jQuery('.linkText').mouseout(function (event) { jQuery(this).css('text-decoration','none'); }); }; /** This method will iterate over the html elements and link the terms based on the specified frequency and occurence=20 */ function iterateHTMLElements(elem, lstTerms, frame, frequency, = occurence, termsCount) { //Make a jquery selection pattern for css classes to be ignored. var classesToIgnore =3D 'svDoNotLink'; if (sciverseObj.contextInfo["LinkTextClassesToIgnore"]) { classesToIgnore +=3D = ','+sciverseObj.contextInfo["LinkTextClassesToIgnore"]; } var classSelector =3D ''; var cti =3D classesToIgnore.split(','); for (var c=3D0; c< cti.length; c++){ var cl =3D cti[c]; //make the selection pattern as: = '[class*=3D"reflect_"],[class*=3D"nbApiHighlight"]' if (classSelector =3D=3D '') classSelector =3D '[class*=3D\"' + cl + = '\"]'; else classSelector +=3D ',' + '[class*=3D\"' + cl + '\"]'; } =09 //alert(classSelector); =09 var textNodes =3D sgf.getTextNodesIn(jQuery(elem).get(0)); //Using = jquery for DOM traversal had a huge negative performance with IE only = ... so, just use the regular DOM methods for it. for (var i =3D 0, len =3D textNodes.length; i < len; i++) { var textNode =3D jQuery(textNodes[i]); var text =3D textNode.text(); //var parent =3D textNode.parent(); var temp; var buffer =3D new BufferText(''); var termsString =3D ''; /* Converting terms array to string = concatenated with | */ for (var term =3D0; term < lstTerms.length; term++) { if (!(termsCount[lstTerms[term].toLowerCase()] >=3D 1)) { termsCount[lstTerms[term].toLowerCase()] =3D 0; } termsString =3D termsString + '|' + = '\\b'+lstTerms[term]+'\\b';//match full words only - hence surround with = \b regexp } termsString =3D termsString.substr(1, termsString.length); /* creating regular expression to match any of the terms*/ patternSelector =3D new PatternSelector(text, termsString, = 'ig'); while (patternSelector.findPattern()) { temp =3D document.createElement('div'); var currentTerm =3D patternSelector.getMatchedPattern(); var currentTermLowerCase =3D currentTerm.toLowerCase(); termsCount[currentTermLowerCase] +=3D 1; if ((frequency =3D=3D=3D 'first' && termsCount[currentTermLowerCase] = =3D=3D 1) || (frequency =3D=3D=3D 'every' && (occurence =3D=3D 1 || = termsCount[currentTermLowerCase] =3D=3D 1 || = termsCount[currentTermLowerCase] % occurence =3D=3D 1)) ) { if (termListeners[currentTermLowerCase] && = !isListener(frame, currentTermLowerCase)) { termListeners[currentTermLowerCase].push(frame); =20 } else if (jQuery(textNode.parents('a')).length =3D=3D 0 = && jQuery(textNode.parents(classSelector)).length =3D=3D 0) { //link only if none of the ancestors are an node // OR none have one of the css classes to be ignored = ... these come from the variable: classSelector above patternSelector.appendReplacement(buffer, "" + currentTerm + ""); if (!isListener(frame, currentTermLowerCase)) { termListeners[currentTermLowerCase] =3D new = Array(); termListeners[currentTermLowerCase].push(frame); //alert(frame + " is a listener of " + term); //alert(term + " linked in " + = jQuery(parent).attr('tagName') + " :: " + text); =09 } } } } //alert('Text node before inner html = is'+textNode.innerText+'text is 'textNode.text()); if (buffer.toString().length > 0) { temp.innerHTML =3D patternSelector.appendTail(buffer); //alert('Text node after inner html is'+textNode.innerText); jQuery(textNode).before(jQuery(temp).contents()); jQuery(textNode).remove(); } } } var sgf =3D sgf || {}; /* * Get all text node descendents of the given node in the DOM * (Copied from = http://stackoverflow.com/questions/298750/how-do-i-select-text-nodes-with= -jquery) */ sgf.getTextNodesIn =3D function(node, includeWhitespaceNodes) { var textNodes =3D []; function getTextNodes(node) { if (node =3D=3D null) return; if (node.nodeType =3D=3D 3) { if (includeWhitespaceNodes || !/^\s*$/.test(node.nodeValue)) = { textNodes.push(node); } } else { for (var i =3D 0, len =3D node.childNodes.length; i < len; = ++i) { getTextNodes(node.childNodes[i]); } } } getTextNodes(node); return textNodes; } shindig.IfrContainer.prototype.SciverseService =3D new = shindig.SciverseService(); function notifyGadgets(term, evt) { /*changeLinkTextClass(evt);*/ var mousePosition =3D getMouseClickCoordinates(evt); var ls =3D termListeners[term.toLowerCase()]; for (var i =3D 0, len =3D ls.length; i < len; i++) { gadgets.rpc.call(ls[i], 'linkTextCallback', null, term, = mousePosition.x, mousePosition.y); } }; /* function to remove dotted underline from below the linked text*/ function changeLinkTextClass(e){ if (!e) var e =3D window.event; jQuery(e.target).removeClass('linkText'); jQuery(e.target).addClass('linkTextClicked'); }; function isListener(f, t) { if (typeof(termListeners[t]) =3D=3D 'undefined') return false; var ls =3D termListeners[t]; for (var i =3D 0, len =3D ls.length; i < len; i++) { if (ls[i] =3D=3D f) return true; } return false; }; function getMouseClickCoordinates(e) { var posx =3D 0; var posy =3D 0; posx =3D jQuery(e.target).offset().left + = jQuery(e.target).outerWidth(); posy=3DjQuery(e.target).offset().top; =20 return { x: posx, y: posy }; }; /* This is used to select the given pattern in the text*/ /* pattern is the regular expression */ /* swithces include i - case insensitive, g- global search */ function PatternSelector(text, pattern, switches) { this._text =3D "" + text; this._expression =3D new RegExp(pattern, switches); this.reset(); return; } PatternSelector.prototype =3D { =20 /*This method will check and append the text to the buffer*/ _appendText: function (buffer, text) { return ((buffer) ? buffer.append(text) : text); }, /* This method will replace the matched pattern with the replacement = text*/ appendReplacement: function (buffer, replacementText) { =20 /*Get the content from previous pattern end to the next pattern = beginning*/ =09 var content =3D this._text.substring(this._prevPatternEnd, = this._text.substring( this._prevPatternEnd).indexOf(this._patternMatchList[0]) + = this._prevPatternEnd); =09 /*Add the replacement text to the above content*/ content =3D content + replacementText; =20 return ((this._patternMatchList !=3D null) ? = this._appendText(buffer, content) : buffer); }, /* This method will apppend the text present after the last pattern = match till the=20 end of the text to the buffer.*/ appendTail: function (buffer) { return (this._appendText(buffer, = this._text.substring(this._prevPatternEnd))); }, /* This method will return true if the pattern is found and false = otherwise. This will also update the previous pattern's end index.*/ findPattern: function () { this._prevPatternEnd =3D this._expression.lastIndex; this._patternMatchList =3D this._expression.exec(this._text); return (this._patternMatchList !=3D null); }, /*This method will return the current matched pattern.*/ getMatchedPattern: function (index) { return (this._patternMatchList !=3D null ? = this._patternMatchList[0] : ''); }, /* This method will reset all the values.*/ reset: function (index) { this._patternMatchList =3D null; this._prevPatternEnd =3D -1; return; } } /*This will create an instance of an empty string array*/ function BufferText(initialString) { this.buffer =3D (typeof(initialString) =3D=3D "string") ? new = Array(initialString) : new Array(); return; } BufferText.prototype =3D { /*This method will add a string into the string array.*/ append: function (newString) { this.buffer.push(newString); return (this); }, =20 /*This method will join the strings in the array and return a single = string.*/ toString: function () { return (this.buffer.join("")); } } /** * Code Changes for Link TEXT Ends - 12/07/2010 */ /************************************************************************= ******* * ELSEVIER - SCIENCE CONFIDENTIAL * * This document is the property of Elsevier Science (ES), and its = contents are * proprietary to ES. Reproduction in any form by anyone of the = materials * contained herein without the permission of ES is prohibited. Finders = are * asked to return this document to the following Elsevier Science = location. * * Elsevier Science 360 Park Avenue South, New York, NY 10010-1710 * * Copyright (c) 2010 by Elsevier Science, a member of the Reed Elsevier = plc * group. All Rights Reserved. = *************************************************************************= *****/ ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://www.scopus.com/gadgetcontext/gadgets/js/GadgetToolBar.js /************************************************************************= ******* * This JavaScript file containes all the utility methods used by = applications * for loading the gadgets on their respective pages. = *************************************************************************= *****/ var isKeyEventURLExists; var isUserPrefURLExists; var isGadgetRemoveURLExists; var toolbarOrientation; var toolbarWidth; var tbWidthwithoutImage; var submenuID; var submenuID1; var subMenuIdBuf; var debug =3D false; // flag for debug mode if (document.location.href.indexOf('debug=3Dy') > 0) debug =3D true; var gadgetPrefs =3D {};// variable to store user preferences var sciverseObj; //variable to store parsed sciverse object var isUserEntitledtoGadgets; // global variables to store toolbarState info var isExtendedAreaEnabled; var showMoreApps; var g_toolbarState; /* varibales to hold the gadgetutils path */ var gadgetIconPath; var gadgetJSPath; var gadgetHTMLPath; /* To store Metadata varibales*/ var userPrefs; var browserVersion =3Dnavigator.appVersion; var MSIE7Flag; if (browserVersion.indexOf('MSIE 7.0')>0){MSIE7Flag=3Dtrue;} /* Code changes for EMBAPP Starts - 12/02/2010 */ var truncateURL; if(browserVersion.indexOf('IE')>0){ truncateURL =3D true; } /* Code changes for EMBAPP Ends - 12/02/2010 */ /* * This Function is called from the displaygadgetsHome() function. It in = turn * calls the shindig APIs to render the gadgets on the homepage */ function renderGadgetsHome(locationDivId) { // validate if 3 columns to render the gadgets are present on the = page if (jQuery('#column0').length =3D=3D 0 || jQuery('#column1').length = =3D=3D 0 || jQuery('#column2').length =3D=3D 0) { return false; } isUserEntitled(); isKeyEventURLAvailable(); isUserPrefURLAvailable(); isGadgetRemoveURLAvailable(); isAppManageEnabled(locationDivId); populateHelpIconPath(); var gadgetHeightFromPrefs; if (!isUserEntitledtoGadgets) { jQuery('#ErrormessageDiv').css('display', 'block'); jQuery('#ErrormessageDiv').html('You currently have no = applications'); return; } // call processMetadata to populate the user preferences in the = variable // gadgetPrefs processMetadata(); =20 gadgets.pubsub2router.init({ onSubscribe: function (topic, container) { return true; }, onUnsubscribe: function (topic, container) { log(container.getClientID() + " unsubscribes from topic '" + = topic + "'"); }, onPublish: function (topic, data, pcont, scont) { return true; } }); =20 var columnNo =3D -1; //create the Layout Manager shindig.container.layoutManager =3D new = shindig.FloatLeftLayoutManager(); var tempgadgetInfo =3D new Array(); //variable to hold gadgetInfo = elements,temporarily for a location var locationGadgetOrder =3D = gadgets.json.parse(sciverseObj.locationsOnPage[locationDivId]); // store = the gadget order array in a local variable /*Note:Gadget Framework relies on the consumer web applications to = provide the correct order of gadgets in the location. If gadget order = from last log-in=20 is null, locationsOnPage in sciverse object will be populated with = the order according to gadget entitlement date. If framework recieves a = null object for gadget order, no gadget will be loaded in the location. */ if (locationGadgetOrder) { for (var x =3D 0; x < locationGadgetOrder.length; x++) { = if(locationGadgetOrder[x]=3D=3Dnull||locationGadgetOrder[x]=3D=3D""){temp= gadgetInfo.push("");} for (var j =3D 0; j < sciverseObj.gadgetInfo.length; j++) { /*If the gadget ID in the order array, matches with the one in = gadgetInfo array,=20 push the gadgetInfo entry in the tempgadgetInfo array */ if (locationGadgetOrder[x] =3D=3D = sciverseObj.gadgetInfo[j].gadgetId) { tempgadgetInfo.push(sciverseObj.gadgetInfo[j]) } } } } // loop through the tempgadgetInfo object to render the gadgets in = the order passed by the application jQuery.each(tempgadgetInfo, function (index, g) { if (g =3D=3D '' || g =3D=3D null) { columnNo =3D columnNo + 1; if (columnNo % 3 =3D=3D 0) { columnNo =3D 0; } } else { /*Code for Change Request to handle the following scenarios 1. when the given gadget does not support hover view 2. when the gadget has userpref startMeInvisible=3Dy */ var isHoverViewAvailable =3D false; var isStartMeInvisible =3D false; if (typeof(g.gadgetMetadata) !=3D 'undefined' && = g.gadgetMetadata !=3D null && typeof(g.gadgetMetadata.views) !=3D = 'undefined' && g.gadgetMetadata.views !=3D null) { for (var k in g.gadgetMetadata.views) { if (k =3D=3D 'hover') { isHoverViewAvailable =3D = true; break; } } } jQuery.each(g.location, function (index, = locationId) { if (locationDivId =3D=3D locationId) { //assign the column id to the = gadget=20 columnNo =3D columnNo + 1; if (columnNo % 3 =3D=3D 0) { columnNo =3D 0; } = shindig.container.layoutManager.layoutRootId_ =3D 'column' + columnNo; if (typeof(g.gadgetMetadata) = !=3D 'undefined' && g.gadgetMetadata !=3D null) { gadgetHeightFromPrefs = =3D (typeof(g.gadgetMetadata.height) !=3D 'undefined' && = g.gadgetMetadata.height !=3D null && g.gadgetMetadata.height !=3D 0) ? = g.gadgetMetadata.height : null; } // check if debug flag is set = and if true, create // the debug window for the = gadget if (debug) debugArea =3D = shindig.container.layoutManager.getGadgetDebugChrome(g.gadgetId, = g.location); // if userPrefs are null, then = create a new Array object if (gadgetPrefs[g.url].uprefObj = =3D=3D null) { userPrefs =3D new = Array(); } else { userPrefs =3D = gadgetPrefs[g.url].uprefObj; } // if user updates the invisible = preference to 'y', set the the falg isStartMeInvisible to TRUE if (typeof(userPrefs) !=3D = 'undefined' && userPrefs !=3D null && typeof(userPrefs.startMeInvisible) = !=3D 'undefined' && userPrefs.startMeInvisible !=3D null) { if = (userPrefs.startMeInvisible.value =3D=3D 'y') isStartMeInvisible =3D = true; } // call creategadget API of = Shindig and pass title , // url and user preferences var gadget =3D = shindig.container.createGadget({ specUrl: g.url, title: g.gadgetName, userPrefs: userPrefs, height: = gadgetHeightFromPrefs, requiresPubSub2: = g.requiresPubSub2 }); // populate gadget variable with = additional info gadget.sciverseId_ =3D = g.gadgetId; //Added for Closing the gadgets = based on its state.Iterate the closed array object using location index. if (g.closed[index] =3D=3D = "true") { gadget.closed_ =3D true; } else { gadget.closed_ =3D = false; } gadget.location =3D locationId; gadget.iconURL =3D (g.gadgetIcon = =3D=3D null || g.gadgetIcon =3D=3D '') ? gadgetIconPath + '/netbase.gif' = : g.gadgetIcon; gadget.removable =3D = g.removable; gadget.hasUserPrefs =3D = gadgetPrefs[g.url].hasUserPrefs; gadget.isHoverViewAvailable =3D = isHoverViewAvailable; gadget.isStartMeInvisible =3D = isStartMeInvisible; // add the gadget = shindig.container.addGadget(gadget); // render the gadget on the page = shindig.container.renderGadget(gadget); var gadgetState =3D = (gadget.closed_) ? 'close' : 'open'; if (isStartMeInvisible) { gadgetState +=3D = "|invisible"; } else { gadgetState +=3D = "|visible"; } ajaxKeyEventLog('gadget', = 'displayGadget', g.gadgetId, sciverseObj.contextInfo.pageType, '', = 'PageView', false, gadgetState, '', locationId) } }); } =20 }); truncateGadgetTitleAsNecessary(); } /* * This Function is called from the displayGadgets() function. It in = turn * calls the shindig APIs to render the gadgets on the ResultsPage */ var visibleAppCount; var temptoolbarState=3Dtrue; function renderGadgets(locationDivId, titleBarReq, borderReq, = callingZone) { isUserEntitled(); isKeyEventURLAvailable(); isUserPrefURLAvailable(); isGadgetRemoveURLAvailable(); isAppManageEnabled(locationDivId); populateHelpIconPath(); var gadgetHeightFromPrefs; var startFromVisibleAppsCount; if (callingZone) { startFromVisibleAppsCount =3D (callingZone =3D=3D = 'showMoreLess') ? true : false; }=20 if (toolbarOrientation =3D=3D 'vertical' && (!callingZone) && = (!startFromVisibleAppsCount)) { onLoadToolbarStateVertical(locationDivId); } else if (toolbarOrientation =3D=3D 'horizontal' && (!callingZone) = && (!startFromVisibleAppsCount)) { onLoadToolbarStateHorizontal(); } //Display HelpText in case the user is not entitled to any = application if (!isUserEntitledtoGadgets) { jQuery('#toolbar_' + locationDivId).css('text-align', 'center'); jQuery('#toolbar_' + locationDivId).html('You currently have no = applications'); return; } =20 // call processMetadata to populate the user preferences in the = variable // gadgetPrefs processMetadata(); =20 gadgets.pubsub2router.init({ onSubscribe: function (topic, container) { return true; }, onUnsubscribe: function (topic, container) { log(container.getClientID() + " unsubscribes from topic '" + = topic + "'"); }, onPublish: function (topic, data, pcont, scont) { return true; } }); =20 //Code changes for EMBAPP Starts - 21/11/2010=20 // Create a new float left layout manager and pass the layout root if (jQuery('#' + locationDivId).hasClass('sgfShowMyApps') && = !temptoolbarState) { return; } shindig.container.layoutManager =3D new = shindig.FloatLeftLayoutManager(); var tempgadgetInfo =3D new Array(); //variable to hold gadgetInfo = elements,temporarily for a location var locationGadgetOrder =3D = gadgets.json.parse(sciverseObj.locationsOnPage[locationDivId]); // store = the gadget order array in a local variable /*Note:Gadget Framework relies on the consumer web applications to = provide the correct order of gadgets in the location. If gadget order = from last log-in=20 is null, locationsOnPage in sciverse object will be populated with = the order according to gadget entitlement date. If framework recieves a = null object for gadget order, no gadget will be loaded in the location. */ if (locationGadgetOrder) { for (var x =3D 0; x < locationGadgetOrder.length; x++) { for (var j =3D 0; j < sciverseObj.gadgetInfo.length; j++) { /*If the gadget ID in the order array, matches with the one in = gadgetInfo array,=20 push the gadgetInfo entry in the tempgadgetInfo array */ if (locationGadgetOrder[x] =3D=3D = sciverseObj.gadgetInfo[j].gadgetId) { tempgadgetInfo.push(sciverseObj.gadgetInfo[j]) } } } } var defaultGadgetNumber =3D (startFromVisibleAppsCount) ? = visibleAppCount : 0; //start loading apps from the visibleApps count = value in sciverse.smapiVars if true=20 var isExtendedAreaApp =3D false; //variable to be passed as a flag = to the container script. true if gadget loads after default visible apps = count is reached var comparecount =3D (startFromVisibleAppsCount) ? = tempgadgetInfo.length : visibleAppCount; //variable to hold the limit = value of apps in the location.=20 // loop through the tempgadgetInfo object to render the gadgets in = the order passed by the application jQuery.each(tempgadgetInfo, function (index, g) { if (startFromVisibleAppsCount && index < visibleAppCount) { return; } //return for first n gadgets if renderGadgets has been invoked = by ShowMore() function where n=3DvisibleAppsCount =20 /*Code for Change Request to handle the following scenarios 1. when the given gadget does not support hover view 2. when the gadget has userpref startMeInvisible=3Dy */ var isHoverViewAvailable =3D false; var isStartMeInvisible =3D false; if (typeof(g.gadgetMetadata) !=3D 'undefined' && = g.gadgetMetadata !=3D null && typeof(g.gadgetMetadata.views) !=3D = 'undefined' && g.gadgetMetadata.views !=3D null) { for (var k in g.gadgetMetadata.views) { if (k =3D=3D 'hover') { isHoverViewAvailable =3D true; break; } } } //location array jQuery.each(g.location, function (index, locationId) { //Check locationDivId and locationId if (locationDivId =3D=3D locationId) { if (jQuery('#' + = locationDivId).hasClass('sgfShowMyApps') || jQuery('#' + = locationDivId).hasClass('sgfHorToolbar') || jQuery('#' + = locationDivId).hasClass('sgfVertToolbar')) { shindig.container.layoutManager.layoutRootId_ =3D = 'toolbar_' + locationId; if (startFromVisibleAppsCount) { isExtendedAreaApp =3D true; } // set isExtendedAreaApp to true in order to = identify it as an extended area app later if (defaultGadgetNumber =3D=3D comparecount && = jQuery('#' + locationDivId).hasClass('sgfShowMoreLessApps')) //enter = only if the gadget location has a class 'sgfShowMoreLessApps' { if (jQuery('#showMoreApps').length =3D=3D 0 && = !isExtendedAreaEnabled) //write the show more apps div in the DOM if it = has not been done already { var bodyHtml =3D jQuery('#toolbarBody').html(); jQuery('#toolbarBody').html(bodyHtml+""); =20 } if (jQuery('#showMoreApps').length =3D=3D 0 && = isExtendedAreaEnabled) { isExtendedAreaApp =3D true; } if (!isExtendedAreaEnabled) return; } defaultGadgetNumber +=3D 1; } else { shindig.container.layoutManager.layoutRootId_ =3D = locationId; } // check if debug flag is set and if true, create the = debug // window for the gadget if (debug) debugArea =3D = shindig.container.layoutManager.getGadgetDebugChrome(g.gadgetId, = locationId); if (typeof(g.gadgetMetadata) !=3D 'undefined' && = g.gadgetMetadata !=3D null) { gadgetHeightFromPrefs =3D = (typeof(g.gadgetMetadata.height) !=3D 'undefined' && = g.gadgetMetadata.height !=3D null && g.gadgetMetadata.height !=3D 0) ? = g.gadgetMetadata.height : null; } // if userPrefs are null, then create a new Array object = =09 if (gadgetPrefs[g.url].uprefObj =3D=3D null) { userPrefs =3D new Array(); } else { userPrefs =3D gadgetPrefs[g.url].uprefObj; } // if user updates the invisible preference to 'y', set = the the falg isStartMeInvisible to TRUE if (typeof(userPrefs) !=3D 'undefined' && userPrefs !=3D = null && typeof(userPrefs.startMeInvisible) !=3D 'undefined' && = userPrefs.startMeInvisible !=3D null) { if (userPrefs.startMeInvisible.value =3D=3D 'y') = isStartMeInvisible =3D true; } // call creategadget API of Shindig and pass title , url = and // user preferences var gadget =3D shindig.container.createGadget({ specUrl: g.url, title: g.gadgetName, userPrefs: userPrefs, height: gadgetHeightFromPrefs, requiresPubSub2: g.requiresPubSub2=20 }); // populate gadget variable with additional info gadget.sciverseId_ =3D g.gadgetId; //Added for Closing the gadgets based on its = state.Iterate the closed array object using location index. if (g.closed[index] =3D=3D "true") { gadget.closed_ =3D true; } else { gadget.closed_ =3D false; } gadget.includeTitle =3D titleBarReq; gadget.isExtendedAreaApp =3D isExtendedAreaApp; gadget.includeBorder =3D borderReq; gadget.location =3D locationId; gadget.isHoverViewAvailable =3D isHoverViewAvailable; gadget.isStartMeInvisible =3D isStartMeInvisible; gadget.removable =3D g.removable; gadget.iconURL =3D (g.gadgetIcon =3D=3D null || = g.gadgetIcon =3D=3D '') ? gadgetIconPath + '/netbase.gif' : = g.gadgetIcon; //Code changes for EMBAPP ends - 30/11/2010 gadget.hasUserPrefs =3D gadgetPrefs[g.url].hasUserPrefs; log(gadget.sciverseId_, gadget.location, 'gadget = created'); // Add the gadget by calling addGadget() shindig API shindig.container.addGadget(gadget); log(gadget.sciverseId_, gadget.location, 'gadget = added'); // render the gadget by calling renderGadget() shindig = API shindig.container.renderGadget(gadget); var gadgetState =3D (gadget.closed_) ? 'close' : 'open'; if (isStartMeInvisible) gadgetState +=3D "|invisible"; else gadgetState +=3D "|visible"; ajaxKeyEventLog('gadget', 'displayGadget', g.gadgetId, = sciverseObj.contextInfo.pageType, '', 'PageView', false, gadgetState, = '', locationId) } }); }); =20 truncateGadgetTitleAsNecessary(); }; /* * This function populates the gadgetPrefs variable with gadget user = preferences */ function processMetadata() { //function to populate metaData for gadgets getMetadataFromShindig(); var prefs; for (var i =3D 0; i <=3D sciverseObj.gadgetInfo.length - 1; i++) { var ps =3D '{'; gadgetPrefs[sciverseObj.gadgetInfo[i].url] =3D null; gadgetPrefs[sciverseObj.gadgetInfo[i].url] =3D {}; gadgetPrefs[sciverseObj.gadgetInfo[i].url].uprefObj =3D null; gadgetPrefs[sciverseObj.gadgetInfo[i].url].hasUserPrefs =3D = false; if (sciverseObj.gadgetInfo[i].gadgetMetadata) { if (typeof(sciverseObj.gadgetInfo[i].gadgetMetadata) !=3D = 'undefined' && sciverseObj.gadgetInfo[i].gadgetMetadata !=3D=3D null) { prefs =3D = sciverseObj.gadgetInfo[i].gadgetMetadata.userPrefs; for (var p in prefs) { if (sgf.isPrefInContextInfo(p)) { var up =3D '"' + p + '":{"name":"' + p + '", = "value":"' + escape(sciverseObj.contextInfo[p]) + = '","datatype":"hidden"}'; if (ps =3D=3D '{') ps +=3D up; else ps +=3D ', ' + up; }/** Code changes for EMBAPP Starts Date = 29-Nov-2010 **/=20 else if( p =3D=3D "md5MessageDigest" && = sciverseObj.gadgetInfo[i].md5MessageDigest !=3D=3D null ) { var up =3D '"' + p + '":{"name":"' + p + '", "value":"' + = escape(sciverseObj.gadgetInfo[i].md5MessageDigest) + = '","datatype":"hidden"}'; if (ps =3D=3D '{') ps +=3D up; else ps +=3D ', ' + up; =20 }=20 else if( p =3D=3D "md5TimeStamp" && = sciverseObj.gadgetInfo[i].md5TimeStamp !=3D=3D null ){ var up =3D '"' + p + '":{"name":"' + p + '", = "value":"' + escape(sciverseObj.gadgetInfo[i].md5TimeStamp) + = '","datatype":"hidden"}'; if (ps =3D=3D '{') ps +=3D up; else ps +=3D ', ' + up; =20 } /** Code changes for EMBAPP Ends - Date = 29-Nov-2010 **/ =20 else { var prefValue =3D prefs[p]['default']; if (sciverseObj.gadgetInfo[i].userPreferences) { =20 var storedPref =3D = sciverseObj.gadgetInfo[i].userPreferences; =20 prefValue =3D storedPref[p].value; = =20 } var up =3D '"' + p + '":{"name":"' + p + '", = "value":"' + prefValue + '","datatype":"' + prefs[p].type + '"}'; if (ps =3D=3D '{') ps +=3D up; else ps +=3D ', ' + up; } //} } //for p in prefs =20 =20 //check if this gadget uses the pubsub-2 feature //If so, then we use OpenAjax Hub in order to create and = manage // the iframe. Otherwise, we create the iframe ourselves. var requiresPubSub2 =3D false; var arr =3D = sciverseObj.gadgetInfo[i].gadgetMetadata.features; if(typeof(arr) !=3D 'undefined' && arr.length > 0) { for(var f =3D 0; f < arr.length; f++) { if (arr[f] =3D=3D=3D "pubsub-2") { requiresPubSub2 =3D true; break; } } } sciverseObj.gadgetInfo[i].requiresPubSub2 =3D requiresPubSub2; =20 =20 } ps +=3D '}'; if (ps !=3D '{}') { // non empty user prefs // check if there are any non-hidden type prefs var uprefs =3D gadgets.json.parse(ps); var hasUserPrefs =3D false; for (var up in uprefs) { if (uprefs[up].datatype !=3D 'hidden') { hasUserPrefs =3D true; break; } } gadgetPrefs[sciverseObj.gadgetInfo[i].url].uprefObj =3D = uprefs; =20 gadgetPrefs[sciverseObj.gadgetInfo[i].url].hasUserPrefs = =3D hasUserPrefs; =20 } } // if gadgetMetadata =20 } } var sgf =3D sgf || {}; sgf.isPrefInContextInfo =3D function(pref){ for (var c in sciverseObj.contextInfo){ if (pref =3D=3D c) { return true; } } return false; }; /* This function calculates the maximum allowed width for gadget title=20 and assigns ellipsis when that limit is reached.=20 */ function truncateGadgetTitleAsNecessary() { var ellipsArray =3D jQuery(".truncateTitle"); var titleElementWidth =3D jQuery('.truncateTitle').width(); if(typeof(titleElementWidth) !=3D 'undefined' && titleElementWidth = !=3D 0) { var titleLength =3D Math.floor(titleElementWidth / 7); for (i =3D 0; i < ellipsArray.length; i++) { var t =3D jQuery(ellipsArray[i]).text(); if (t.length > titleLength) { jQuery(ellipsArray[i]).text(t.substring(0, (titleLength - = 3)) + '...'); } } }=09 } /*This function calls shindig metadata service and populates * the metadata for gadgets=20 */=20 function getMetadataFromShindig(){ var gadgetparams=3Dnew Array(); var moduleId =3D 0; for (var i =3D 0; i <=3D sciverseObj.gadgetInfo.length - 1; i++) { if (sciverseObj.gadgetInfo[i].url !=3D '' && = !sciverseObj.gadgetInfo[i].gadgetMetadata) { gadgetparams[moduleId] =3D ({ url: sciverseObj.gadgetInfo[i].url }); moduleId++; } } if(gadgetparams.length=3D=3D0){return false;} =09 var request =3D { context: {country: "US", language: "en", view: "profile", = container: "default"}, gadgets: gadgetparams =20 };=09 var req =3D gadgets.json.stringify(request); jQuery.ajax({ type: 'POST', url: sciverseObj.smapiVars.metadataService, async: false, data: req, success: function(response) { var data =3D gadgets.json.parse(response); if (gadgets.json.stringify(data)=3D=3D'{}'){return false;} if(data.gadgets) { var gadgetList=3D data.gadgets; for ( var j =3D 0, gadget; gadget =3D gadgetList[j]; j++) { for(var i=3D0; i< = sciverseObj.gadgetInfo.length; i++){ = if(sciverseObj.gadgetInfo[i].url=3D=3DgadgetList[j].url){ = sciverseObj.gadgetInfo[i].gadgetMetadata =3D gadget; break; } } =20 } } } }); } /* This function sets all the global variables pertaining to the=20 toolbar state and the number of apps present in it*/ function setGlobalToolbarStateVars() { g_toolbarState =3D (sciverseObj.contextInfo.toolbarState.length > 1) = ? sciverseObj.contextInfo.toolbarState : 'Open'; if (sciverseObj.contextInfo.toolbarState =3D=3D 'Close') { temptoolbarState =3D false; } if (sciverseObj.contextInfo.isViewMore =3D=3D 'Y') { isExtendedAreaEnabled =3D true; showMoreApps=3D'Y'; } else { isExtendedAreaEnabled =3D false; showMoreApps=3D'N'; } visibleAppCount =3D sciverseObj.smapiVars.visibleAppsCount;=20 } /* * This function gets called by the client web apps to start the gadget = loading process. */ //Code changes for EMBAPP starts - 21/11/2010 function displayGadgets() { sciverseObj =3D gadgets.json.parse(sciverse); if (typeof(sciverseObj) =3D=3D 'undefined' || sciverseObj =3D=3D = false || sciverseObj =3D=3D '') { if (debug) { alert('No data available to render the = gadgets'); } return false; } setGadgetIHSURL(); setGlobalToolbarStateVars(); setTimeout('adjustHideimageHeight()', 8000); for (var locationDivId in sciverseObj.locationsOnPage) { var isClassExists =3D false; var borderReq =3D true; var titlbarReq =3D true; // validate if the div to render the gadgets exists on = the page if (jQuery('#' + locationDivId).length =3D=3D 0) { // alert("invalid toolbar location") return; } if (jQuery('#' + locationDivId).hasClass('sgfHomePage')) = { jQuery('#' + locationDivId).load(gadgetHTMLPath = + '/HomePageToolBar.html', function () { jQuery('#iconadd').live('click', = function(event) { openAddAppPage(event); }); renderGadgetsHome(locationDivId); // = call rendergadgetsHome if location div has the class sgfHomePage setTimeout('adjustColHeight()', 3000); jQuery("#column0, #column1, = #column2").sortable({ // call sortable to enable drag and drop of = gadgets within the toolbar placeholder: = "ui-state-highlight", connectWith: = ".connectedSortable", start: function (event, ui) { var tempOverLayDiv =3D = jQuery('
 
'); = jQuery('body').prepend(tempOverLayDiv[0]); tempOverLayDiv[0].id =3D = 'temp_OverLayDiv'; tempOverLayDiv.css({ position: = 'absolute', cursor: 'move' }); tempOverLayDiv.css({ top: 0, left: 0 }); = tempOverLayDiv.css('z-index', '1009'); tempOverLayDiv.height(2 = * (jQuery(document).height())); = tempOverLayDiv.width('100%'); }, stop: function (event, ui) { = jQuery('#temp_OverLayDiv').remove(); var isQuirkmode =3D = (checkCompliance() =3D=3D "Quirks") ? true : false; if (isQuirkmode) { = jQuery('.Controls').css('position', ''); } else { = jQuery('.Controls').css('position', 'relative'); } var order =3D = getGadgetOrderHomePage(locationDivId); // call getGadgetOrderHomePage() = to obtain the order of gadgets in the homepageafter the latest sort = saveToolBarState(g_toolbarState, 'gadgetReorder', '', false, = locationDivId, order, showMoreApps); // call saveToolBarState to make an = ajax call to server and save the toolbar state }, update: function (event, ui) { = resetHomePageColumnHeights(); = adjustHomePageColumnHeights(); } }).disableSelection(); }); var isQuirkmode =3D (checkCompliance() =3D=3D = "Quirks") ? true : false; if (isQuirkmode) { jQuery('.Controls').css('position', ''); } else { jQuery('.Controls').css('position', = 'relative'); } return; } if (jQuery('#' + = locationDivId).hasClass('sgfVertToolbar') || jQuery('#' + = locationDivId).hasClass('sgfHorToolbar') || jQuery('#' + = locationDivId).hasClass('sgfShowMyApps')) { jQuery.ajax({ url: gadgetHTMLPath + '/ToolBar.html', type: "GET", dataType: "html", async: false, success: function (msg) { jQuery('#' + = locationDivId).html(msg); jQuery('#iconadd').live('click', = function(event) { openAddAppPage(event); }); =20 jQuery('#toolbar').attr('id', = 'toolbar_' + locationDivId); if (jQuery('#' + = locationDivId).hasClass('sgfVertToolbar')) { toolbarOrientation =3D = 'vertical'; jQuery('#' + = locationDivId).children('#toggleImg').css("display", "block"); toolbarWidth =3D = parseInt(jQuery('#' + locationDivId).css('width'), 10); var toolbarImgWidth =3D = 15; tbWidthwithoutImage =3D = (toolbarWidth - toolbarImgWidth); toolbarWidth +=3D 'px'; tbWidthwithoutImage +=3D = 'px'; } if (jQuery('#' + = locationDivId).hasClass('sgfHorToolbar')) { toolbarOrientation =3D = 'horizontal'; jQuery('#' + = locationDivId).children('#toggleImgHorizon').css("display", "block"); } if (jQuery('#' + = locationDivId).hasClass('sgfShowMyApps')) { jQuery('#' + = locationDivId).find('#toolbarHead').css("display", "block"); } renderGadgets(locationDivId, = titlbarReq, borderReq); if = (jQuery('#showLessApps').length =3D=3D 0 && isExtendedAreaEnabled && = jQuery('#' + locationDivId).hasClass('sgfShowMoreLessApps')) { var bodyHtml =3D = jQuery('#toolbarBody').html(); = jQuery('#toolbarBody').html(bodyHtml + "
"); } applySortable(locationDivId); // = apply sortable to the location Div by calling the util function = applySortable } }); } else { if (toolbarOrientation =3D=3D 'vertical') { toolbarWidth =3D "100%"; } if (jQuery('#' + = locationDivId).hasClass('sgfNoTitleBar')) { titlbarReq =3D false; } if (jQuery('#' + = locationDivId).hasClass('sgfNoGadgetBorder')) { borderReq =3D false; } renderGadgets(locationDivId, titlbarReq, = borderReq); applySortable(locationDivId); } } var k =3D checkCompliance(); if (k =3D=3D 'Quirks') { jQuery('.Controls ul .submenu').css('left', '-75px') }; } //Code changes for EMBAPP ends - 08/12/2010 /* * Function to load the toolbar (collapsed/shown)in case of horizontal = orientation, depending on the value stored * in the session */ function onLoadToolbarStateVertical(locationDivId) { jQuery(document).ready(function () { jQuery('#toggleImg').click(function (event) { toggleToolbarVertical(event); }); }); var toolbarHeight =3D parseInt(jQuery('#sciverse_toolbar').height()-7); toolbarHeight+=3D'px';=20 var divObj =3D jQuery('#'+locationDivId)=20 if (sciverseObj.contextInfo.toolbarState =3D=3D 'Close') { = divObj.find('#toggleImg').css('background-image','url('+gadgetIconPath+'/= Show-applications.gif)'); divObj.css('width', '15px'); divObj.children('#sciverse_toolbar').css('display', 'none'); divObj.find('#toggleImg').css('height', '460px'); divObj.find('#toggleImg').attr('title', 'show'); divObj.find('#toggleImg').css('border-right','1px solid #c7c7c7'); } else { = jQuery('#toggleImg').css('background-image','url('+gadgetIconPath+'/Hide-= applications.gif)'); jQuery('#'+locationDivId).css('width', toolbarWidth); jQuery('#'+locationDivId).children('#sciverse_toolbar').css('width', = tbWidthwithoutImage); jQuery('#'+locationDivId).find('#sciverse_toolbar').css('display', = 'block'); jQuery('#'+locationDivId).find('#toggleImg').attr('title', 'hide'); = jQuery('#'+locationDivId).find('#toggleImg').css('height',toolbarHeight = ); = jQuery('#'+locationDivId).find('#toggleImg').css('border-right','0px'); } } /* Function to toggle the toolbar on the results Page */ function toggleToolbarVertical(event) { if (sciverseObj.contextInfo.toolbarState =3D=3D 'Close') { temptoolbarState =3D true; } var divID =3D jQuery(event.target).parent().attr('id'); var divObj =3D jQuery('#' + divID); var toolbarState; var keyEventType =3D 'SubmitAction'; var eventName =3D ''; var failureStatus =3D false; toolbarHeight +=3D 'px'; if (divObj.children('#sciverse_toolbar').css('display') =3D=3D = 'block') { divObj.find('#toggleImg').css('background-image', 'url(' + = gadgetIconPath + '/Show-applications.gif)'); divObj.css('width', '15px'); divObj.children('#sciverse_toolbar').css('display', 'none'); divObj.find('#toggleImg').attr('title', 'show'); divObj.find('#toggleImg').css('height', '460px'); divObj.find('#toggleImg').css('border-right', '1px solid = #c7c7c7'); toolbarState =3D 'Close'; eventName =3D 'closeToolBar'; } else { divObj.find('#toggleImg').css('background-image', 'url(' + = gadgetIconPath + '/Hide-applications.gif)'); divObj.css('width', toolbarWidth); divObj.children('#sciverse_toolbar').css('width', = tbWidthwithoutImage); divObj.children('#sciverse_toolbar').css('display', 'block'); var toolbarHeight =3D = (divObj.children('#sciverse_toolbar').height() - 7) + "px"; divObj.find('#toggleImg').attr('title', 'hide'); divObj.find('#toggleImg').css('height', toolbarHeight); divObj.find('#toggleImg').css('border-right', '0px'); toolbarState =3D 'Open'; eventName =3D 'openToolBar'; } g_toolbarState =3D toolbarState; if (jQuery('#toolbar_' + divID).children().length =3D=3D 0 && = eventName =3D=3D 'openToolBar') { renderGadgets(divID, true, true, 'togglezone'); // call = renderGadgets if the toolbar state was closed on page load } truncateGadgetTitleAsNecessary(); =20 saveToolBarState(toolbarState, eventName, keyEventType, = failureStatus, divID, '', showMoreApps); } /* * Function to load the toolbar (collapsed/shown) in case of horizontal = orientation, depending on the value stored * in the session */ function onLoadToolbarStateHorizontal() { jQuery(document).ready(function () { jQuery('#toggleImgHorizon').unbind("click"); jQuery('#toggleImgHorizon').click(function (event) { toggleToolbarHorizontal(event); }); }); if (sciverseObj.contextInfo.toolbarState =3D=3D 'Close') { jQuery('#arrowImg').attr('src', gadgetIconPath + = '/showDownArrow.gif'); jQuery('#arrowImg1').attr('src', gadgetIconPath + = '/showDownArrow.gif'); jQuery('#FooterText').text('Show Applications'); jQuery('#sciverse_toolbar').css('display', 'none'); } else { jQuery('#arrowImg').attr('src', gadgetIconPath + = '/hideUpArrow.gif'); jQuery('#arrowImg1').attr('src', gadgetIconPath + = '/hideUpArrow.gif'); jQuery('#FooterText').text('Hide Applications'); jQuery('#sciverse_toolbar').css('display', 'block'); } } /* Function to toggle the toolbar on the results Page when orientation is = horizontal */ function toggleToolbarHorizontal(event) { if (sciverseObj.contextInfo.toolbarState =3D=3D 'Close') { temptoolbarState =3D true; } var toolbarState; var keyEventType =3D 'SubmitAction'; var eventName =3D ''; var failureStatus =3D false; var locationID =3D jQuery(event.target).parent().attr('id'); if (locationID =3D=3D 'toggleImgHorizon') { locationID =3D jQuery('#' + locationID).parent().attr('id'); } if (jQuery('#sciverse_toolbar').css('display') =3D=3D 'block') { jQuery('#sciverse_toolbar').slideToggle('normal'); jQuery('#arrowImg').attr('src', gadgetIconPath + = '/showDownArrow.gif'); jQuery('#arrowImg1').attr('src', gadgetIconPath + = '/showDownArrow.gif'); jQuery('#FooterText').text('Show Applications'); toolbarState =3D 'Close'; eventName =3D 'closeToolBar'; } else { jQuery('#sciverse_toolbar').slideToggle('normal'); jQuery('#arrowImg').attr('src', gadgetIconPath + = '/hideUpArrow.gif'); jQuery('#arrowImg1').attr('src', gadgetIconPath + = '/hideUpArrow.gif'); jQuery('#FooterText').text('Hide Applications'); toolbarState =3D 'Open'; eventName =3D 'openToolBar'; } g_toolbarState =3D toolbarState; if (jQuery('#toolbar_' + locationID).children().length =3D=3D 0 && = eventName =3D=3D 'openToolBar') { renderGadgets(locationID, true, true, 'togglezone'); // call = rendergadgets if toolbar was closed on page load=20 } truncateGadgetTitleAsNecessary(); =20 if (sciverseObj.smapiVars.toolbarStateURL !=3D null || = typeof(sciverseObj.smapiVars.toolbarStateURL) !=3D=3D 'undefined') = saveToolBarState(toolbarState, eventName, keyEventType, failureStatus, = locationID, '', showMoreApps); } /* * Function to call the gadgetState actionbean, * through AJAX and save the toolbar state in session */ function saveToolBarState(toolbarState, eventName, keyEventType, = failureStatus, location, order, showMore) { var req =3D "originPage=3D" + sciverseObj.contextInfo.pageType + "&" = + "toolbarOpen=3D" + toolbarState + "&" + "eventName=3D" + eventName + = "&" + "pageName=3D" + sciverseObj.contextInfo.pageType; req +=3D "&" + "location=3D" + location + "&" + "keyEventType=3D" + = keyEventType; req +=3D "&" + "zone=3D" + location + "&" + "failureStatus=3D" + = failureStatus + "&" + "isKeyEventURLAvailble=3D" + isKeyEventURLExists; req +=3D "&" + "gadgetOrder=3D" + order + "&" + "isViewMore=3D" + = showMore; jQuery.ajax({ type: 'GET', url: sciverseObj.smapiVars.toolbarStateURL + "?", async: true, data: req }); } /** * Function lo log the Key event to GadgetUsageActionBean * */ ajaxKeyEventLog =3D function (gadgetName, activity, gadgetID, = landingPage, targetURL, eventType, failureStatus, gadgetState, = isPartnerIdRequired,location) { =20 = if((gadgetState=3D=3D'open'||gadgetState=3D=3D'close')&&activity=3D=3D'di= splayGadget'){return;} for (var i =3D 0; i <=3D arguments.length; i++) { if (arguments[i] =3D=3D null) arguments[i] =3D ''; } = if(location=3D=3D'undefined'||typeof(location)=3D=3D'undefined')location=3D= ''; var keyString =3D "moduleName=3D" + gadgetName + "&" + "location=3D" = + location + "&" + "eventName=3D" + activity + "&" + "moduleId=3D" + = gadgetID + "&" + "pageName=3D" + sciverseObj.contextInfo.pageType + "&" = + "zone=3D" + location + "&" + "failed=3D" + failureStatus + "&" + = "keyEventType=3D" + eventType + "&" + "partner=3D" + isPartnerIdRequired = + "&" + "gadgetState=3D" + gadgetState + "&" + "targetURL=3D" + = targetURL; if (isKeyEventURLExists) { jQuery.ajax({ type: "GET", url: sciverseObj.smapiVars.keyEventURL + "?", data: keyString }); } }; /* not a generic function. Being used to log two key events in one go.=20 */ function openAboutPage(aboutAppLink, failureStatus, gadgetId, = gadgetName,location) { window.open(aboutAppLink); ajaxKeyEventLog(gadgetName, 'aboutGadget', gadgetId, = 'AboutPage',aboutAppLink, 'outwardLink', failureStatus,'','',location); } /* function to open application gallery page and log the key event */ function openAddAppPage(event) { =20 var url =3D sciverseObj.smapiVars.gadgetAddURL; =09 var addManageAppLocationId = =3DjQuery(event.target).parents('.sgfShowMyApps').attr("id"); =20 window.location =3D url;=09 ajaxKeyEventLog(null, 'addGadget', null, 'AppGallery', url, 'SubmitAction', false,'','',addManageAppLocationId); } /* function to open manage my application page and log the key event */ function openManageAppPage(event) { =20 =09 var url =3D sciverseObj.smapiVars.gadgetManagePage; =09 =09 =09 var addManageAppLocationId = =3DjQuery(event.target).parents('.sgfShowMyApps').attr("id"); =09 //window.location =3D url; ajaxKeyEventLog(null, 'outwardLink', null, 'AppGallery', url, 'outwardLink', false,'',true,addManageAppLocationId); } /* function to open Help page and log the key event */ function openHelpPage(location) { var helpURL; var helpContextPath =3D sciverseObj.contextInfo.gadgetUtilsURL; helpContextPath =3D = helpContextPath.substring(0,helpContextPath.indexOf("gadgets")); jQuery.ajax({ type: 'POST', url: helpContextPath+'toolbarHelp', async: false, data: null, success: function(response) { helpURL =3D response; } }); = window.open(helpURL,'help','resizable=3Dyes,scrollbars=3Dyes,width=3D760,= height=3D570'); ajaxKeyEventLog(null, 'outwardLink', null, 'AppGallery', helpURL, 'outwardLink', false,'','',''); } /* function to Check if keyEvent URL is available in sciverse object or not */ function isKeyEventURLAvailable(){ if (typeof(sciverseObj.smapiVars.keyEventURL)!=3D=3D'undefined' && = sciverseObj.smapiVars.keyEventURL!=3Dnull) { isKeyEventURLExists=3Dtrue; } else=20 { isKeyEventURLExists=3Dfalse; } } =09 /* function to Check if UserPref URL is available in sciverse object or not */ =09 function isUserPrefURLAvailable(){ if (sciverseObj.smapiVars.gadgetUserPrefsURL=3D=3Dnull) { isUserPrefURLExists=3Dfalse; } else{ isUserPrefURLExists=3Dtrue; } } =09 /* function to Check if gadget remove URL is available in sciverse object = or not */ =09 function isGadgetRemoveURLAvailable(){ if (sciverseObj.smapiVars.removeGadgetURL=3D=3Dnull) { isGadgetRemoveURLExists=3Dfalse; } else{ isGadgetRemoveURLExists=3Dtrue; } } =09 =09 /* function to Check if user has the privileges to manage his apps.=20 */ =09 function isAppManageEnabled(locationDivId) { var divObj =3D jQuery('#' + locationDivId); =20 if (sciverseObj.contextInfo.individualUser && = (divObj.hasClass('sgfShowMyApps')||divObj.hasClass('sgfHomePage'))) { if(jQuery('#iconManage').length=3D=3D0){ jQuery('#addManage').append(' |  Manage Applications'); =20 jQuery('#iconManage').live('click', function(event) { openManageAppPage(event); }) =20 }} =20 =20 =20 } /* Function to set the gadgetUtils URL to access the gadget images, = javascript files & common html files */ function setGadgetIHSURL() { gadgetIconPath =3DsciverseObj.contextInfo.gadgetUtilsURL+'/images'; gadgetJSPath =3D sciverseObj.contextInfo.gadgetUtilsURL+'/js'; gadgetHTMLPath =3DsciverseObj.contextInfo.gadgetUtilsURL+'/html'; } =09 /* This method is to set the absolute path for toolbar help icon.=20 */ =09 function populateHelpIconPath() { var iconName=3DjQuery('#HelpImageId').attr('src'); jQuery('#HelpImageId').attr('src',gadgetIconPath+'/help_toolbar.gif'); = jQuery('.iconadd').css('background-image','url('+gadgetIconPath+'/add.gif= )'); }=09 /* finds out if user has any entitlements sets the flag = isUserEntitledtoGadgets accordingly */ function isUserEntitled(){ = if(sciverseObj.gadgetInfo.length=3D=3D0||sciverseObj.gadgetInfo=3D=3D''){= isUserEntitledtoGadgets=3Dfalse; } else{ isUserEntitledtoGadgets=3Dtrue; } } /* returns the gadget Ids according to the order in which the gadgets = lie in the Div Id passed as param */ function getGadgetOrder(locationID) { var locationLayOutID; var orderedGadgetIds =3D new Array(); // holds the ids of sorted = gadgets=20 if (jQuery('#' + locationID).hasClass('sgfShowMyApps')) { locationLayOutID =3D 'toolbar_' + locationID; } else { locationLayOutID =3D locationID; } var orderedChromeIdArray =3D jQuery('#' + = locationLayOutID).sortable('toArray'); // returns the ids of all the = immediate children of=20 //location DIV(i.e. gadget chrome Id) in an array var divIdLength =3D locationID.length + 1; for (var i =3D 0; i < orderedChromeIdArray.length; i++) { if (orderedChromeIdArray[i].length > 1) { = orderedGadgetIds.push(orderedChromeIdArray[i].substring(divIdLength)); = // truncate the location divID from the gadget chrome ID and obtain the = gadget ID } else { orderedGadgetIds.push(''); } } var locationOriginalOrderArray =3D new Array(); locationOriginalOrderArray =3D = gadgets.json.parse(sciverseObj.locationsOnPage[locationID]); var gadgetDiff =3D new Array(); gadgetDiff =3D = calculateArrayDifference(locationOriginalOrderArray, = orderedGadgetIds);//calculate the difference between the entitled = gadgets and gadgets rendered in DOM=20 var finalOrder =3D = gadgets.json.stringify(orderedGadgetIds).substring(0, = gadgets.json.stringify(orderedGadgetIds).length - 1); //if there is a difference , append the difference in the order if (gadgetDiff !=3D '[]') { finalOrder +=3D ','; finalOrder +=3D gadgetDiff.substring(1); } else { finalOrder +=3D ']'; } return finalOrder; } /*This function applies jQuery sortable to the div whose DIV ID is = passed as param */ function applySortable(locationID) { var divID =3D (jQuery('#' + locationID).hasClass('sgfShowMyApps')) ? = "toolbar_" + locationID : locationID; jQuery('#' + divID).sortable({ start: function(event, ui){ var placeholder =3D jQuery(".ui-sortable-placeholder"); placeholder.css({'border':'1px solid #FED22F = ','margin':'2px','visibility':'visible','background':'#FED22F'}) ; =20 var tempOverLayDiv =3D jQuery('
 
'); jQuery('body').prepend(tempOverLayDiv[0]); tempOverLayDiv[0].id =3D 'temp_OverLayDiv'; tempOverLayDiv.css({ position: 'absolute', cursor:'move' }); tempOverLayDiv.css({ top: 0, left: 0 }); tempOverLayDiv.css('z-index', '1009'); tempOverLayDiv.height(2 * (jQuery(document).height())); tempOverLayDiv.width('100%'); =20 }, =09 stop: function (event, ui) { jQuery('#temp_OverLayDiv').remove(); var orderedGadgets =3D jQuery('#' + = divID).sortable('toArray'); for (var x =3D 0; x < visibleAppCount; x++) { if (jQuery('#' + = orderedGadgets[x]).hasClass('tempExtendedAreaApp')) { jQuery('#' + = orderedGadgets[x]).removeClass('tempExtendedAreaApp'); } } if (orderedGadgets.length > visibleAppCount) { for (var y =3D visibleAppCount; y < = orderedGadgets.length; y++) { if (!jQuery('#' + = orderedGadgets[y]).hasClass('tempExtendedAreaApp')) { jQuery('#' + = orderedGadgets[y]).addClass('tempExtendedAreaApp'); } } } var order=3D getGadgetOrder(locationID); saveToolBarState(g_toolbarState, 'gadgetReorder', '', = false,locationID,order,showMoreApps); } }); } /* this function gets invoked when the user clicks the link show more = applications in the gadget toolbar*/ function showMore() { showMoreApps =3D 'Y'; var toolbarId =3D = jQuery('#showMoreApps').parents('.sgfShowMyApps').attr("id"); jQuery('#showMoreApps').remove(); var ExtendedApps =3D jQuery('.ExtendedAreaApp'); //find all the divs = with class ExtendedAreaApps for the case when the apps are already in = the DOM but hidden if (ExtendedApps.length > 0) { for (var i =3D 0; i < ExtendedApps.length; i++) { jQuery(ExtendedApps[i]).removeClass('ExtendedAreaApp'); jQuery(ExtendedApps[i]).addClass('tempExtendedAreaApp'); // = change the class to tempExtendedArea in order to gadget chromes visible = } } else { renderGadgets(toolbarId, true, true, 'showMoreLess'); =20 } // call rendergadgets if the apps are not in the DOM already =20 =20 var bodyHtml =3D jQuery('#toolbarBody').html(); jQuery('#toolbarBody').html(bodyHtml+""); if (toolbarOrientation =3D=3D 'vertical') { var toolbarHeight =3D = parseInt(jQuery('#sciverse_toolbar').height() - 7); jQuery('#toggleImg').css('height', toolbarHeight + 'px'); } =20 jQuery('#toolbar_'+toolbarId).sortable("disable"); applySortable(toolbarId); var order =3D getGadgetOrder(toolbarId); saveToolBarState(g_toolbarState, 'showMoreApps', '', false, = toolbarId, order, showMoreApps); // save toolbar state in the = session/database } /*this function hides all the apps that have rendered after default = visible apps count has reached*/ function showLess() { showMoreApps =3D 'N'; var toolbarId =3D = jQuery('#showLessApps').parents('.sgfShowMyApps').attr("id"); jQuery('#showLessApps').remove(); var ExtendedApps =3D jQuery('.tempExtendedAreaApp'); //find all the = divs with class tempExtendedAreaApp=20 for (var i =3D 0; i < ExtendedApps.length; i++) { jQuery(ExtendedApps[i]).removeClass('tempExtendedAreaApp'); jQuery(ExtendedApps[i]).addClass('ExtendedAreaApp'); // change = class to ExtendedAreaApp so that the gadget chrome gets hidden } var bodyHtml =3D jQuery('#toolbarBody').html(); jQuery('#toolbarBody').html(bodyHtml+""); if (toolbarOrientation =3D=3D 'vertical') { var toolbarHeight =3D = parseInt(jQuery('#sciverse_toolbar').height() - 7); jQuery('#toggleImg').css('height', toolbarHeight + 'px'); } jQuery('#toolbar_'+toolbarId).sortable("disable"); applySortable(toolbarId); var order =3D getGadgetOrder(toolbarId); saveToolBarState(g_toolbarState, 'showLessApps', '', false, = toolbarId, order, showMoreApps); // save toolbar state in the = session/database } =09 =09 /*returns the gadget ids of the gadgets in the home page, according to = the order appearing after last sort */ function getGadgetOrderHomePage(locationDivID) { /* below three variables hold the gadget chrome Ids order after the = sort has been done in three different columns of the home page*/ var Col0Ord =3D jQuery('#column0').sortable('toArray'); var Col1Ord =3D jQuery('#column1').sortable('toArray'); var Col2Ord =3D jQuery('#column2').sortable('toArray'); var orderedGadgets =3D new Array(); // find out the column with maximum number of gadgets to put as limit = for for loop var maxLength =3D Math.max(Col0Ord.length, Col1Ord.length, = Col2Ord.length);=20 /* loop through the three columns of the home page and=20 push the gadget chrome ids in a cyclic order starting from column 1=20 */ for (var x =3D 0; x <=3D maxLength - 1; x++) { if (Col0Ord[x]) { orderedGadgets.push(Col0Ord[x]); } else { orderedGadgets.push(''); // push '' in case there is no = gadget in the current row in this particular column } if (Col1Ord[x]) { orderedGadgets.push(Col1Ord[x]); } else { orderedGadgets.push(''); } if (Col2Ord[x]) { orderedGadgets.push(Col2Ord[x]); } else { orderedGadgets.push(''); } } var truncatedIDs =3D new Array(); var divIdLength =3D locationDivID.length + 1; /*once gadget chrome ids are placed in the array orderedGadgets ,=20 truncate the location id from the starting all it's elemnts and push = into the array truncatedIDs */ for (var i =3D 0; i < orderedGadgets.length; i++) { if (orderedGadgets[i].length > 1) { truncatedIDs.push(orderedGadgets[i].substring(divIdLength)); } else { truncatedIDs.push(''); } } return gadgets.json.stringify(truncatedIDs); // stringify and return = ordered gadget IDs }=09 /* utility function to find the elements that are not present in two input arrays input params: arr1,arr2 javascript arrays returns : difference of arrays in stringified form */ function calculateArrayDifference(arr1, arr2) { var result =3D new Array(); for (var x =3D 0; x < arr1.length; x++) { if (jQuery.inArray(arr1[x], arr2) =3D=3D -1) = result.push(arr1[x]) } return gadgets.json.stringify(result); } =09 =09 =09 function adjustHideimageHeight(){ if(toolbarOrientation!=3D'vertical'){return;} var = toolbarHeight=3DparseInt(jQuery("#sciverse_toolbar").height(),10)-7; toolbarHeight+=3D'px'; jQuery('#toggleImg').css('height', toolbarHeight); } =09 function resetHomePageColumnHeights(){ jQuery("#column0").css("height","auto"); jQuery("#column1").css("height","auto"); jQuery("#column2").css("height","auto"); } function adjustHomePageColumnHeights(){ =09 var col0Height=3DjQuery("#column0").height(); var col1Height=3DjQuery("#column1").height(); var col2Height=3DjQuery("#column2").height(); var maxHeight =3D Math.max(col0Height, col1Height, col2Height);=20 =20 =20 jQuery("#column0").height(maxHeight); jQuery("#column1").height(maxHeight); jQuery("#column2").height(maxHeight); jQuery("#column0").parents(".toolbarBodyFull").height(maxHeight+30); } function adjustColHeight(){ resetHomePageColumnHeights(); adjustHomePageColumnHeights(); } /************************************************************************= ******* * ELSEVIER - SCIENCE CONFIDENTIAL *=20 * This document is the property of Elsevier Science (ES), and its = contents are * proprietary to ES. Reproduction in any form by anyone of the = materials * contained herein without the permission of ES is prohibited. Finders = are * asked to return this document to the following Elsevier Science = location. *=20 * Elsevier Science 360 Park Avenue South, New York, NY 10010-1710 *=20 * Copyright (c) 2010 by Elsevier Science, a member of the Reed Elsevier = plc * group. All Rights Reserved. = *************************************************************************= *****/ ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://www.scopus.com/gadgetcontext/gadgets/js/jquery-outside.js /*!=0A= * jQuery outside events - v1.1 - 3/16/2010=0A= * http://benalman.com/projects/jquery-outside-events-plugin/=0A= *=0A= * Copyright (c) 2010 "Cowboy" Ben Alman=0A= * Dual licensed under the MIT and GPL licenses.=0A= * http://benalman.com/about/license/=0A= */=0A= =0A= // Script: jQuery outside events=0A= //=0A= // *Version: 1.1, Last updated: 3/16/2010*=0A= //=0A= // Project Home - = http://benalman.com/projects/jquery-outside-events-plugin/=0A= // GitHub - http://github.com/cowboy/jquery-outside-events/=0A= // Source - = http://github.com/cowboy/jquery-outside-events/raw/master/jquery.ba-outsi= de-events.js=0A= // (Minified) - = http://github.com/cowboy/jquery-outside-events/raw/master/jquery.ba-outsi= de-events.min.js (0.9kb)=0A= //=0A= // About: License=0A= //=0A= // Copyright (c) 2010 "Cowboy" Ben Alman,=0A= // Dual licensed under the MIT and GPL licenses.=0A= // http://benalman.com/about/license/=0A= //=0A= // About: Examples=0A= //=0A= // These working examples, complete with fully commented code, = illustrate a few=0A= // ways in which this plugin can be used.=0A= //=0A= // clickoutside - = http://benalman.com/code/projects/jquery-outside-events/examples/clickout= side/=0A= // dblclickoutside - = http://benalman.com/code/projects/jquery-outside-events/examples/dblclick= outside/=0A= // mouseoveroutside - = http://benalman.com/code/projects/jquery-outside-events/examples/mouseove= routside/=0A= // focusoutside - = http://benalman.com/code/projects/jquery-outside-events/examples/focusout= side/=0A= //=0A= // About: Support and Testing=0A= //=0A= // Information about what version or versions of jQuery this plugin has = been=0A= // tested with, what browsers it has been tested in, and where the unit = tests=0A= // reside (so you can test it yourself).=0A= //=0A= // jQuery Versions - 1.4.2=0A= // Browsers Tested - Internet Explorer 6-8, Firefox 2-3.6, Safari 3-4, = Chrome, Opera 9.6-10.1.=0A= // Unit Tests - = http://benalman.com/code/projects/jquery-outside-events/unit/=0A= //=0A= // About: Release History=0A= //=0A= // 1.1 - (3/16/2010) Made "clickoutside" plugin more general, resulting = in a=0A= // whole new plugin with more than a dozen default "outside" events and=0A= // a method that can be used to add new ones.=0A= // 1.0 - (2/27/2010) Initial release=0A= //=0A= // Topic: Default "outside" events=0A= //=0A= // Note that each "outside" event is powered by an "originating" event. = Only=0A= // when the originating event is triggered on an element outside the = element=0A= // to which that outside event is bound will the bound event be = triggered.=0A= //=0A= // Because each outside event is powered by a separate originating event,=0A= // stopping propagation of that originating event will prevent its = related=0A= // outside event from triggering.=0A= //=0A= // OUTSIDE EVENT - ORIGINATING EVENT=0A= // clickoutside - click=0A= // dblclickoutside - dblclick=0A= // focusoutside - focusin=0A= // bluroutside - focusout=0A= // mousemoveoutside - mousemove=0A= // mousedownoutside - mousedown=0A= // mouseupoutside - mouseup=0A= // mouseoveroutside - mouseover=0A= // mouseoutoutside - mouseout=0A= // keydownoutside - keydown=0A= // keypressoutside - keypress=0A= // keyupoutside - keyup=0A= // changeoutside - change=0A= // selectoutside - select=0A= // submitoutside - submit=0A= =0A= (function($,doc,outside){=0A= '$:nomunge'; // Used by YUI compressor.=0A= =0A= $.map(=0A= // All these events will get an "outside" event counterpart by = default.=0A= 'click dblclick mousemove mousedown mouseup mouseover mouseout = change select submit keydown keypress keyup'.split(' '),=0A= function( event_name ) { jq_addOutsideEvent( event_name ); }=0A= );=0A= =0A= // The focus and blur events are really focusin and focusout when it = comes=0A= // to delegation, so they are a special case.=0A= jq_addOutsideEvent( 'focusin', 'focus' + outside );=0A= jq_addOutsideEvent( 'focusout', 'blur' + outside );=0A= =0A= // Method: jQuery.addOutsideEvent=0A= //=0A= // Register a new "outside" event to be with this method. Adding an = outside=0A= // event that already exists will probably blow things up, so check the=0A= // list before trying to add a new one.=0A= //=0A= // Usage:=0A= //=0A= // > jQuery.addOutsideEvent( event_name [, outside_event_name ] );=0A= //=0A= // Arguments:=0A= //=0A= // event_name - (String) The name of the originating event that the new=0A= // "outside" event will be powered by. This event can be a native or=0A= // custom event, as long as it bubbles up the DOM tree.=0A= // outside_event_name - (String) An optional name for the new "outside"=0A= // event. If omitted, the outside event will be named whatever the=0A= // value of `event_name` is plus the "outside" suffix.=0A= //=0A= // Returns:=0A= //=0A= // Nothing.=0A= =0A= $.addOutsideEvent =3D jq_addOutsideEvent;=0A= =0A= function jq_addOutsideEvent( event_name, outside_event_name ) {=0A= =0A= // The "outside" event name.=0A= outside_event_name =3D outside_event_name || event_name + outside;=0A= =0A= // A jQuery object containing all elements to which the "outside" = event is=0A= // bound.=0A= var elems =3D $(),=0A= =0A= // The "originating" event, namespaced for easy unbinding.=0A= event_namespaced =3D event_name + '.' + outside_event_name + = '-special-event';=0A= =0A= // Event: outside events=0A= //=0A= // An "outside" event is triggered on an element when its = corresponding=0A= // "originating" event is triggered on an element outside the = element in=0A= // question. See the list for more = information.=0A= //=0A= // Usage:=0A= //=0A= // > jQuery('selector').bind( 'clickoutside', function(event) {=0A= // > var clicked_elem =3D $(event.target);=0A= // > ...=0A= // > });=0A= //=0A= // > jQuery('selector').bind( 'dblclickoutside', function(event) {=0A= // > var double_clicked_elem =3D $(event.target);=0A= // > ...=0A= // > });=0A= //=0A= // > jQuery('selector').bind( 'mouseoveroutside', function(event) {=0A= // > var moused_over_elem =3D $(event.target);=0A= // > ...=0A= // > });=0A= //=0A= // > jQuery('selector').bind( 'focusoutside', function(event) {=0A= // > var focused_elem =3D $(event.target);=0A= // > ...=0A= // > });=0A= //=0A= // You get the idea, right?=0A= =0A= $.event.special[ outside_event_name ] =3D {=0A= =0A= // Called only when the first "outside" event callback is bound per=0A= // element.=0A= setup: function(){=0A= =0A= // Add this element to the list of elements to which this = "outside"=0A= // event is bound.=0A= elems =3D elems.add( this );=0A= =0A= // If this is the first element getting the event bound, bind a = handler=0A= // to document to catch all corresponding "originating" events.=0A= if ( elems.length =3D=3D=3D 1 ) {=0A= $(doc).bind( event_namespaced, handle_event );=0A= }=0A= },=0A= =0A= // Called only when the last "outside" event callback is unbound = per=0A= // element.=0A= teardown: function(){=0A= =0A= // Remove this element from the list of elements to which this=0A= // "outside" event is bound.=0A= elems =3D elems.not( this );=0A= =0A= // If this is the last element removed, remove the "originating" = event=0A= // handler on document that powers this "outside" event.=0A= if ( elems.length =3D=3D=3D 0 ) {=0A= $(doc).unbind( event_namespaced );=0A= }=0A= },=0A= =0A= // Called every time a "outside" event callback is bound to an = element.=0A= add: function( handleObj ) {=0A= var old_handler =3D handleObj.handler;=0A= =0A= // This function is executed every time the event is triggered. = This is=0A= // used to override the default event.target reference with one = that is=0A= // more useful.=0A= handleObj.handler =3D function( event, elem ) {=0A= =0A= // Set the event object's .target property to the element that = the=0A= // user interacted with, not the element that the "outside" = event was=0A= // was triggered on.=0A= event.target =3D elem;=0A= =0A= // Execute the actual bound handler.=0A= old_handler.apply( this, arguments );=0A= };=0A= }=0A= };=0A= =0A= // When the "originating" event is triggered..=0A= function handle_event( event ) {=0A= =0A= // Iterate over all elements to which this "outside" event is = bound.=0A= $(elems).each(function(){=0A= var elem =3D $(this);=0A= =0A= // If this element isn't the element on which the event was = triggered,=0A= // and this element doesn't contain said element, then said = element is=0A= // considered to be outside, and the "outside" event will be = triggered!=0A= if ( this !=3D=3D event.target && !elem.has(event.target).length = ) {=0A= =0A= // Use triggerHandler instead of trigger so that the "outside" = event=0A= // doesn't bubble. Pass in the "originating" event's .target = so that=0A= // the "outside" event.target can be overridden with something = more=0A= // meaningful.=0A= elem.triggerHandler( outside_event_name, [ event.target ] );=0A= }=0A= });=0A= };=0A= =0A= };=0A= =0A= })(jQuery,document,"outside");=0A= =0A= (function($) {=0A= $.fn.ellipsis =3D function(enableUpdating){=0A= var s =3D document.documentElement.style;=0A= if (!('textOverflow' in s || 'OTextOverflow' in s)) {=0A= return this.each(function(){=0A= var el =3D $(this);=0A= if(el.css("overflow") =3D=3D "hidden"){=0A= var originalText =3D el.html();=0A= var w =3D el.width();=0A= =0A= var t =3D $(this.cloneNode(true)).hide().css({=0A= 'position': 'absolute',=0A= 'width': 'auto',=0A= 'overflow': 'visible',=0A= 'max-width': 'inherit'=0A= });=0A= el.after(t);=0A= =0A= var text =3D originalText;=0A= while(text.length > 0 && t.width() > el.width()){=0A= text =3D text.substr(0, text.length - 1);=0A= t.html(text + "...");=0A= }=0A= el.html(t.html());=0A= =0A= t.remove();=0A= =0A= if(enableUpdating =3D=3D true){=0A= var oldW =3D el.width();=0A= setInterval(function(){=0A= if(el.width() !=3D oldW){=0A= oldW =3D el.width();=0A= el.html(originalText);=0A= el.ellipsis();=0A= }=0A= }, 200);=0A= }=0A= }=0A= });=0A= } else return this;=0A= };=0A= })(jQuery); ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://www.scopus.com/gadgetcontext/gadgets/js/SciverseShindigContainer.js /************************************************************************= ******* This JavaScript file contains all the Shindig APIs which have been = inherited=20 or newly written in order to customize Sciverse Gadgets functionalty. =20 = *************************************************************************= *****/ var channels =3D {}; var listeners =3D {};=09 =20 shindig.SciverseContainer =3D function(){ shindig.IfrContainer.call(this); this.view_ =3D 'profile'; } shindig.SciverseContainer.inherits(shindig.IfrContainer); shindig.container =3D new shindig.SciverseContainer(); var terms; shindig.SciverseGadget =3D function(opt_params) { shindig.BaseIfrGadget.call(this, opt_params); this.setServerBase(sciverseObj.smapiVars.serverBaseURL+"/"); // = default tomcat gadget server }; shindig.SciverseGadget.inherits(shindig.BaseIfrGadget); shindig.IfrContainer.prototype.gadgetClass =3D shindig.SciverseGadget; shindig.SciverseGadget.prototype.queryIfrGadgetType_ =3D function() { =09 var gadget =3D this; var subClass =3D shindig.IfrGadget; for (var name in subClass) if (subClass.hasOwnProperty(name)) { this[name] =3D subClass[name]; =20 } }; /** * Gets the HTML element that is the chrome of a gadget into which the = cotnent * of the gadget can be rendered.=20 * @param {Object} gadget Gadget instance * @param {Object} location variable * @return {Object} HTML element that is the chrome for the given gadget */ shindig.FloatLeftLayoutManager.prototype.getGadgetChrome =3D function (gadget, location) { var layoutRoot =3D document.getElementById(this.layoutRootId_); if (layoutRoot) { var chrome =3D document.createElement('div'); chrome.id =3D gadget.location + '_' + gadget.sciverseId_; chrome.className =3D 'containerApplOver'; if (gadget.isExtendedAreaApp && !gadget.isStartMeInvisible) { /* = For gadgets rendering after visibleappscount is reached*/ chrome.className =3D 'containerApplOver tempExtendedAreaApp = '; } /* For gadgets with userpref startMeinvisible=3Dy and = rendering after visibleappscount is reached*/ else if (gadget.isExtendedAreaApp && gadget.isStartMeInvisible) = { chrome.className =3D 'containerApplOver tempExtendedAreaApp = invisible'; } else if (!gadget.isExtendedAreaApp && = gadget.isStartMeInvisible) { /* For gadgets with userpref = startMeinvisible=3Dy */ chrome.className =3D 'containerApplOver invisible'; } layoutRoot.appendChild(chrome); return chrome; } else { return null; } }; /** * Gets the HTML element into which the cotnent * of the gadget debug window can be rendered.=20 * @param {Object} gadget Gadget instance * @param {Object} location variable * @return {Object} HTML element that is the chrome for=20 * the gadget debug window of the given gadget */ shindig.FloatLeftLayoutManager.prototype.getGadgetDebugChrome =3D function(gid,location) { var layoutRoot =3D document.getElementById(this.layoutRootId_); if (layoutRoot) { var debugArea =3D document.createElement('textarea'); debugArea.id =3D location + '_debug_'+gid; debugArea.style.width=3D"97%";=20 debugArea.style.textAlign=3D"center"; debugArea.readonly=3D'readonly'; layoutRoot.appendChild(debugArea); return debugArea; } else { return null; } }; /** * Renders a gadget using ifr. * @param {Object} gadget Gadget object */ shindig.IfrContainer.prototype.renderGadget =3D function(gadget, view, = url, chrome) {=20 if (view =3D=3D 'canvas') { =20 jQuery('#'+sciverseObj.contextInfo.pageContentDivTagName).hide(); sgf.startTimer('canvas', 'canvas', gadget.id); gadget.renderCanvas(url); } else if (view =3D=3D 'sciverseResultsView') { sgf.startTimer(gadget.sciverseId_, gadget.location, gadget.id); gadget.renderResultsView(chrome, url); } /* Change for AMP11-1 : Hoover =20 New clause for hoover view, gets executed when=20 renderGadget is called with view argument as hoover*/ else if (view =3D=3D 'hover') { =20 sgf.startTimer(gadget.sciverseId_, gadget.location, gadget.id); gadget.renderHooverView(chrome, url); =09 } else {=20 var chrome =3D this.layoutManager.getGadgetChrome(gadget); log(gadget.sciverseId_, gadget.location, 'chrome created');=20 sgf.startTimer(gadget.sciverseId_, gadget.location, gadget.id); log(gadget.sciverseId_, gadget.location, 'timer created'); gadget.render(chrome); log(gadget.sciverseId_, gadget.location, 'gadget rendered'); log(gadget.sciverseId_, gadget.location, = gadgets.json.stringify(sciverseObj.contextInfo)); } }; /* This function gets fired just=20 * before the rendergadget call is made*/ var sgf =3D sgf || {}; sgf.startTimer =3D function(chromeid, location, gid){ if (typeof(timers_) =3D=3D 'undefined' || timers_ =3D=3D null){ timers_ =3D new Array(); } timers_[location+chromeid] =3D setTimeout("sgf.timeout('"+chromeid+"', = '"+ location+"', '"+gid+"')",sciverseObj.smapiVars.gadgetLoadTimeout); =09 }; /* This function gets fired =20 * inside the startTimer function and prints the time=20 * out message in the gadget chrome */ =20 sgf.timeout =3D function(chromeid, location, gid){ if(toolbarOrientation=3D=3D'vertical'){ var toolbarHeight =3D parseInt(jQuery('#sciverse_toolbar').height()-7); jQuery('#toggleImg').css('height',toolbarHeight+'px' );} =09 =09 jQuery('#Controls_'+gid).css('display', 'none'); jQuery('#Close_'+gid).css('display', ''); jQuery('#maincontremote_iframe_'+gid).css('height','125px') jQuery('#maincontremote_iframe_'+gid).html("Gadget timed out while = loading");=09 log(chromeid,location, 'Gadget timedout while loading.'); =09 } /* This function gets fired =20 * on gadget onload event * and clear the time out */ sgf.killTimer =3D function(chromeid, location) { clearTimeout(timers_[location+chromeid]); log(chromeid,location, 'Timer Killed'); //load the toolbar hide/show image once the iframe has loaded=20 if(!sciverseObj.contextInfo.toolbarState){ var toolbarHeight =3D = parseInt(jQuery('#sciverse_toolbar').height()-7); jQuery('#toggleImg').css('height',toolbarHeight+'px' ); } }; /* This function renders the gadget in profile view */ shindig.SciverseGadget.prototype.render =3D function(chrome) { if (chrome) { var gadget =3D this; this.getContent(function(content) { chrome.innerHTML =3D content; if(this.requiresPubSub2 =3D=3D=3D true) gadget.oaaIframeId =3D = gadget.finishRender();=20 }); } }; /* This function renders the gadget's main content in profile view */ shindig.IfrGadget.getMainContent =3D function(continuation) { var = aboutAppLink=3DsciverseObj.smapiVars.gadgetDetailPage+"/"+this.sciverseId= _; var iframeId =3D this.getIframeId(); var content =3D ''; var zone =3D this.location; var failureStatus =3D false; var iframeWidth; var height_; if (typeof(this.height) !=3D 'undefined' && this.height !=3D null) { height_ =3D this.height; } else { height_ =3D '' } if(MSIE7Flag){ if(toolbarWidth=3D=3Dnull||toolbarWidth=3D=3D''){ iframeWidth=3D'100%'; } else{ if(toolbarOrientation.toLowerCase()=3D=3D'vertical'){ iframeWidth=3DparseInt(tbWidthwithoutImage,10)-15; iframeWidth+=3D'px'; } else{ iframeWidth=3DparseInt(toolbarWidth,10)-15; iframeWidth+=3D'px'; } } } else{ if (toolbarWidth =3D=3D null || toolbarWidth =3D=3D '') { iframeWidth =3D '100%'; } else { iframeWidth =3D '99.5%'; } } //Code changes for EMBAPP Starts - 21/11/2010=20 var gadgetBorder =3D ''; var gadgetTopBorder =3D ''; if (typeof(this.includeBorder) !=3D 'undefined' && !this.includeBorder) = { gadgetBorder =3D 'none'; } else { gadgetBorder =3D 'solid'; } if (this.includeBorder && !this.includeTitle) { gadgetTopBorder =3D '1px solid #FEC76D'; } if (this.closed_) { var state =3D 'none'; } else { state =3D ''; } content +=3D '
'; content +=3D ''; content+=3D'
'; =20 continuation(content); gadgets.rpc.setRelayUrl(iframeId, this.serverBase_ + this.rpcRelay); gadgets.rpc.setAuthToken(iframeId, this.rpcToken); }; /*This function calls the getCanvasContent function to load canvas view = */ shindig.SciverseGadget.prototype.renderCanvas =3D function(url){ this.getCanvasContent(url, function(content) { jQuery('#canvas').html(content); =20 }); if (this.requiresPubSub2 =3D=3D true)this.finishRender(url);=20 }; /*Function to load the ICSResults view */ shindig.SciverseGadget.prototype.renderResultsView =3D function(chrome, = url){ this.getResultsViewContent(url, chrome, function(content) { chrome.innerHTML =3D content; }); if (this.requiresPubSub2 =3D=3D true) this.finishRender(url); }; /*This function gets called withing the renderResultsView function to = load ICSResults view */ shindig.SciverseGadget.prototype.getResultsViewContent =3D function(url, = chrome, continuation) { this.resultsViewUrl =3D url; this.resultsViewChrome =3D chrome; var iframeId =3D this.getIframeId(); gadgets.rpc.setRelayUrl(iframeId, this.serverBase_ + this.rpcRelay); gadgets.rpc.setAuthToken(iframeId, this.rpcToken); =20 shindig.callAsyncAndJoin([this.getResultsViewTitleBarContent, = this.getResultsViewMainContent],=20 function(results) { continuation(results.join('')); }, this); }; /*Function to load the titlebar of the gadget in ICSResults view */ shindig.SciverseGadget.prototype.getResultsViewTitleBarContent =3D = function(continuation) { var gtitle; if (this.title) gtitle =3D this.title; else gtitle =3D 'title'; var content=3D''; continuation(content); =20 }; /*Function to load the maincontent of the gadget in ICSResults view */ shindig.IfrGadget.getResultsViewMainContent =3D function(continuation) { var iframeId =3D this.getIframeId(); var content=3D''; content +=3D '
'; content +=3D '
'; content+=3D''; continuation(content); }; =09 /*Function to close the gadget in ICSResults view */ shindig.SciverseGadget.prototype.closeResultView =3D function(){ = jQuery('#footer_res_gadgets-gadget-title-bar-'+this.id).parent().remove()= ; }; /*Changes for AMP11-1: Hoover*/ =20 /*function to render gadget in hoover view. */ shindig.SciverseGadget.prototype.renderHooverView =3D function(chrome, = url){ this.getHooverViewContent(url, chrome, function(content) { chrome.innerHTML =3D content; }); }; /* function to get hoover view content from different content functions = and merge the content in one div */ shindig.SciverseGadget.prototype.getHooverViewContent =3D function(url, = chrome, continuation) { this.resultsViewUrl =3D url; this.resultsViewChrome =3D chrome; var iframeId =3D this.getIframeId(); gadgets.rpc.setRelayUrl(iframeId, this.serverBase_ + this.rpcRelay); gadgets.rpc.setAuthToken(iframeId, this.rpcToken); =20 shindig.callAsyncAndJoin([this.getHooverViewTitleBarContent, = this.getHooverViewMainContent],=20 function(results) { continuation(results.join('')); }, this); }; /*function to get hoover view titlebar content */ shindig.SciverseGadget.prototype.getHooverViewTitleBarContent =3D = function (continuation) { var content =3D '
'; content +=3D ''; content +=3D '

' + this.title + '

' + '
' + ''; content +=3D '
'; content +=3D '
'; continuation(content); }; /*function to get hoover view main content */ shindig.SciverseGadget.prototype.getHooverViewMainContent =3D = function(continuation) { =20 continuation('
' + =20 '
'); }; /*function to close hoover view */ shindig.SciverseGadget.prototype.closeHooverView =3D function(){ jQuery('#hoover-'+this.id).parent().remove(); }; /* function to pin hoover gadget to the viewport */ shindig.SciverseGadget.prototype.togglePin =3D function() { var chromeId =3D = jQuery('#'+this.getIframeId()).parent().parent().attr('id');=09 var hooverDiv =3Ddocument.getElementById(chromeId); var adjustedScrollHeight; var browserMode; =09 if (jQuery('#'+chromeId).css('position') =3D=3D 'absolute') { jQuery('#'+chromeId).css('position', 'fixed'); // adjust hoover div's top attribute as it's position is being changed = from absolute to fixed = adjustedScrollHeight=3DparseInt(hooverDiv.style.top,10)-jQuery(window).sc= rollTop(); adjustedScrollHeight+=3D"px"; jQuery('#pin_'+this.id).attr('src', gadgetIconPath+'/pin-dn-off.gif'); jQuery('#pin_'+this.id).attr('title', 'Un-pin'); this.pinPosition =3D 'fixed';=09 browserMode =3D checkCompliance(); if(browserMode =3D=3D "Quirks"){ if(jQuery('#'+chromeId).attr('lang') =3D=3D ""){ jQuery('#'+chromeId).css('position', 'absolute'); jQuery('#'+chromeId).attr('lang',adjustedScrollHeight); jQuery(window).scroll(function () { var topBuf =3D jQuery('#'+chromeId).attr('lang'); var lang =3D topBuf.substring(0,topBuf.length-2); var top =3D jQuery(document).scrollTop()+Number(lang); jQuery("#"+chromeId).css("top", top+"px");=20 }); }else{ =20 jQuery('#pin_'+this.id).attr('src', = gadgetIconPath+'/pin-up-off.gif'); jQuery('#pin_'+this.id).attr('title', 'Pin'); jQuery(window).unbind("scroll"); jQuery('#'+chromeId).css('position', 'absolute'); jQuery('#'+chromeId).attr('lang',""); this.pinPosition =3D 'absolute'; } }else{ jQuery('#'+chromeId).css('top',adjustedScrollHeight); } =09 =09 // change pin image to unpin =09 }else{ browserMode =3D checkCompliance();=09 jQuery('#'+chromeId).css('position', 'absolute'); // re-adjust hoover div's top attribute as it's position is being = changed from fixed to absolute = adjustedScrollHeight=3DparseInt(hooverDiv.style.top,10)+jQuery(window).sc= rollTop(); adjustedScrollHeight+=3D"px"; jQuery('#'+chromeId).css('top',adjustedScrollHeight); this.pinPosition =3D 'absolute'; jQuery('#pin_'+this.id).attr('src', gadgetIconPath+'/pin-up-off.gif'); jQuery('#pin_'+this.id).attr('title', 'Pin'); =09 } }; /*Changes for AMP11-1:Hoover end here */ /*Function to log the messages in debug mode*/ function log(gid, location, text){ if (debug) { jQuery('#'+location+ '_debug_'+gid).append('\n
' + text+ "->" + = calculateUTCTime()); =09 } }; function calculateUTCTime() { var utcDateTime; var d =3D new Date(); var utcDate =3D d.getUTCDate(); var utcMonth =3D d.getUTCMonth(); var utcYear =3D d.getUTCFullYear(); var utcHour =3D d.getUTCHours(); var utcMin =3D d.getUTCMinutes(); var utcSec =3D d.getUTCSeconds(); var utcMsc =3D d.getUTCMilliseconds(); utcDateTime =3D utcDate + "-" + utcMonth + "-" + utcYear + " "; var a_p =3D "AM"; if (utcHour =3D=3D 0) { utcHour =3D 12; } if (utcHour > 12) { utcHour =3D utcHour - 12; a_p =3D "PM" } utcMin =3D utcMin + ""; if (utcMin.length =3D=3D 1) { utcMin =3D "0" + utcMin; } utcSec =3D utcSec + ""; if (utcSec.length =3D=3D 1) { utcSec =3D "0" + utcSec; } utcDateTime +=3D utcHour + ":" + utcMin + ":" + utcSec + ":" + utcMsc + = " " + a_p; return utcDateTime; }; /* Code changes for EMBAPP Starts - 12/02/2010 */ /**=20 * This is overridden method of shindig container's getIframeURL(). * This method is used to truncate the iFrameURL max length to 2083=20 * if the browser is Internet Explorer only. * @author: RamaKrishna=20 */ shindig.IfrGadget.getIframeUrl =3D function() { //Add the required parameters of Gadget FrameURL to iframeURL var iframeURL =3D this.serverBase_ + 'ifr?' + 'container=3D' + this.CONTAINER + '&mid=3D' + this.id + '&nocache=3D' + shindig.container.nocache_ + '&country=3D' + shindig.container.country_ + '&lang=3D' + shindig.container.language_ + '&view=3D' + shindig.container.view_ + (this.specVersion ? '&v=3D' + this.specVersion : '') + (shindig.container.parentUrl_ ? '&parent=3D' + = encodeURIComponent(shindig.container.parentUrl_) : '') + (this.debug ? '&debug=3D1' : '')+this.getAdditionalParams() ; =20 =20 =20 //If the browser is IE, then truncateURL value is true.=20 //This block of code limits the iFrameURL max length as 2083=20 if(truncateURL) { var isURLTruncated =3D false; for(var name in this.getUserPrefs()) { var params =3D ''; params +=3D '&up_' + encodeURIComponent(name) + '=3D' + encodeURIComponent(this.getUserPrefValue(name)); //2083 is the max length of iFrameURL.=20 //If the URL is truncated we will have add 'urlMgld=3Dy' to the = iFrame URL. //This is 9 characters. So we are verifying for 2074 characters if((iframeURL+params).length < 2074){ iframeURL +=3D params; } else { isURLTruncated =3D true;=09 } } if(isURLTruncated) { =20 iframeURL +=3D '&urlMgld=3Dy'; =20 } } else { // If the browser is other than IE, container directly adds all // the user prefrences using the default method. iframeURL +=3D this.getUserPrefsParams(); } =09 iframeURL +=3D(this.secureToken ? '&st=3D' + this.secureToken : '') + '&url=3D' + encodeURIComponent(this.specUrl) + '#rpctoken=3D' + this.rpcToken + (this.viewParams ? '&view-params=3D' + = encodeURIComponent(gadgets.json.stringify(this.viewParams)) : '') + (this.hashData ? '&' + this.hashData : ''); return iframeURL; =20 }; /* Code changes for EMBAPP Ends - 12/02/2010 */ // --------- // OAAIfrGadget shindig.OAAIfrGadget =3D { getMainContent: function(continuation) { =20 continuation('
'); =20 sgf.killTimer(this.sciverseId_, this.location); }, getCanvasMainContent: function(continuation) { continuation('
'); =20 sgf.killTimer("canvas", "canvas"); }, getResultsViewMainContent: function(continuation) { continuation('
'); =20 sgf.killTimer(this.sciverseId_, this.location); }, =20 getHooverViewMainContent: function(continuation) { =20 continuation('
'); =20 sgf.killTimer(this.sciverseId_, this.location); }, =20 finishRender: function(url) { =20 var iframeAttrs =3D { className: this.cssClassGadget, frameborder: "no", scrolling: "auto" }; if (this.height) { iframeAttrs.height =3D this.height; }else { iframeAttrs.height =3D 150; } if (this.width) { iframeAttrs.width =3D this.width; } =20 =20 iframeContainer =3D new OpenAjax.hub.IframeContainer( gadgets.pubsub2router.hub, this.getIframeId(), { Container: { onSecurityAlert: function( source, alertType) { =09 gadgets.error("Security error for container " + = source.getClientID() + " : " + alertType); =20 // for debugging }, onConnect: function( container ) { =20 } }, IframeContainer: { =20 parent: = document.getElementById("maincont"+this.getIframeId()), =20 uri: url ? url : this.getIframeUrl(), tunnelURI: shindig.uri(this.serverBase_ + = this.rpcRelay).resolve(shindig.uri(window.location.href)), iframeAttrs: iframeAttrs } } ); var iframeId =3D iframeContainer.getIframe().id; =20 return iframeId; }, =20 getIframeUrl: function() { furl =3D this.serverBase_ + 'ifr?' + 'container=3D' + this.CONTAINER + '&mid=3D' + this.id + '&nocache=3D' + shindig.container.nocache_ + '&country=3D' + shindig.container.country_ + '&lang=3D' + shindig.container.language_ + '&view=3D' + shindig.container.view_ + (this.specVersion ? '&v=3D' + this.specVersion : '') + (shindig.container.parentUrl_ ? '&parent=3D' + = encodeURIComponent(shindig.container.parentUrl_) : '') + (this.debug ? '&debug=3D1' : '') + this.getAdditionalParams() + this.getUserPrefsParams() + (this.secureToken ? '&st=3D' + this.secureToken : '') + '&url=3D' + encodeURIComponent(this.specUrl) + '#rpctoken=3D' + this.rpcToken + (this.viewParams ? '&view-params=3D' + = encodeURIComponent(gadgets.json.stringify(this.viewParams)) : '') + (this.hashData ? '#' + this.hashData : ''); =20 return furl; } }; function checkCompliance(){ var browserMode=3Ddocument.compatMode; var modeBuffer =3D ""; if(browserMode){ if(browserMode=3D=3D'BackCompat'){ modeBuffer=3D'Quirks'; }else if(browserMode=3D=3D'CSS1Compat'){ modeBuffer=3D'Standards Compliance'; } return modeBuffer; } } // This method is used to trigger the subscribed gadget to load = application-provided data, and // display graphically sgf.resultsChanged =3D function(){ // var obj =3D gadgets.json.parse(data); //var navDim =3D (obj.contextInfo.navDimension); //var b =3D jQuery.parseJSON(decodeURIComponent(navDim.replace(/\+/g, = " "))); var channel =3D 'results';=09 if (listeners[channel] !=3D null){ var subscribers =3D listeners[channel]; } if (subscribers =3D=3D null ) { =09 return; } for(var i =3D 0;i < subscribers.length; i++){ var sub =3D subscribers[i]; =09 gadgets.rpc.call(sub.frame, sub.callback, null, null); } } sgf.getSelectedText =3D function(e) { if (!e) var e =3D window.event; =09 var selectedText =3D ""; if (window.getSelection) { // all browsers, except IE before = version 9 range =3D window.getSelection ();=20 //alert (range.toString ()); selectedText =3D range.toString(); }=20 else { if (document.selection.createRange) { // Internet Explorer range =3D document.selection.createRange (); // alert (range.text); selectedText =3D range.text; } } if (selectedText.length =3D=3D 0 || selectedText.length > 50) = return; // if (e =3D=3D null) alert("e is null"); // var sb =3D ""; // var o =3D e.srcElement; // for (var k in o){ // sb +=3D k + "\n"; // } // alert(sb); // alert("tagName =3D " + e.srcElement.tagName + ", nodeName =3D " + = e.srcElement.nodeName + ", nodeType =3D " + e.srcElement.nodeType); // alert(e.srcElement.type); // alert(selectedText); var subscribedGadgets =3D listeners['highlightedText']; for(var i=3D0, len=3DsubscribedGadgets.length; i < len; i++){ var subscribedGadget =3D subscribedGadgets[i]; gadgets.rpc.call(subscribedGadget.frame, subscribedGadget.callback, = null, selectedText); } } if (!document.all) document.captureEvents(Event.DBCLICK | = Event.MOUSEUP); document.onmouseup =3D sgf.getSelectedText; /************************************************************************= ******* * ELSEVIER - SCIENCE CONFIDENTIAL *=20 * This document is the property of Elsevier Science (ES), and its = contents are * proprietary to ES. Reproduction in any form by anyone of the = materials * contained herein without the permission of ES is prohibited. Finders = are * asked to return this document to the following Elsevier Science = location. *=20 * Elsevier Science 360 Park Avenue South, New York, NY 10010-1710 *=20 * Copyright (c) 2010 by Elsevier Science, a member of the Reed Elsevier = plc * group. All Rights Reserved. = *************************************************************************= *****/ ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://www.scopus.com/gadgetcontext/gadgets/js/Draggable_jquery-ui-1.8.4.custom.min.js /*!=0A= * jQuery UI 1.8.4=0A= *=0A= * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)=0A= * Dual licensed under the MIT or GPL Version 2 licenses.=0A= * http://jquery.org/license=0A= *=0A= * http://docs.jquery.com/UI=0A= */=0A= (function(c,j){function = k(a){return!c(a).parents().andSelf().filter(function(){return = c.curCSS(this,"visibility")=3D=3D=3D"hidden"||c.expr.filters.hidden(this)= }).length}c.ui=3Dc.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.4= ",plugin:{add:function(a,b,d){a=3Dc.ui[a].prototype;for(var e in = d){a.plugins[e]=3Da.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:fun= ction(a,b,d){if((b=3Da.plugins[b])&&a.element[0].parentNode)for(var = e=3D0;e0)return true;a[b]=3D1;d=3Da[b]>0;a[b]=3D0;return = d},isOverAxis:function(a,b,d){return = a>b&&a=3D0)&&c(a).is(":focusable")}= })}})(jQuery);=0A= ;/*!=0A= * jQuery UI Widget 1.8.4=0A= *=0A= * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)=0A= * Dual licensed under the MIT or GPL Version 2 licenses.=0A= * http://jquery.org/license=0A= *=0A= * http://docs.jquery.com/UI/Widget=0A= */=0A= (function(b,j){var k=3Db.fn.remove;b.fn.remove=3Dfunction(a,c){return = this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).a= dd([this]).each(function(){b(this).triggerHandler("remove")});return = k.call(b(this),a,c)})};b.widget=3Dfunction(a,c,d){var = e=3Da.split(".")[0],f;a=3Da.split(".")[1];f=3De+"-"+a;if(!d){d=3Dc;c=3Db.= Widget}b.expr[":"][f]=3Dfunction(h){return!!b.data(h,a)};b[e]=3Db[e]||{};= b[e][a]=3Dfunction(h,g){arguments.length&&this._createWidget(h,g)};c=3Dne= w c;c.options=3Db.extend(true,{},c.options);=0A= b[e][a].prototype=3Db.extend(true,c,{namespace:e,widgetName:a,widgetEvent= Prefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.wid= get.bridge(a,b[e][a])};b.widget.bridge=3Dfunction(a,c){b.fn[a]=3Dfunction= (d){var e=3Dtypeof = d=3D=3D=3D"string",f=3DArray.prototype.slice.call(arguments,1),h=3Dthis;d= =3D!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.substri= ng(0,1)=3D=3D=3D"_")return h;e?this.each(function(){var = g=3Db.data(this,a),i=3Dg&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!=3D=3D= g&&i!=3D=3Dj){h=3Di;return false}}):=0A= this.each(function(){var = g=3Db.data(this,a);if(g){d&&g.option(d);g._init()}else b.data(this,a,new = c(d,this))});return = h}};b.Widget=3Dfunction(a,c){arguments.length&&this._createWidget(a,c)};b= .Widget.prototype=3D{widgetName:"widget",widgetEventPrefix:"",options:{di= sabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);= this.element=3Db(c);this.options=3Db.extend(true,{},this.options,b.metada= ta&&b.metadata.get(c)[this.widgetName],a);var = d=3Dthis;this.element.bind("remove."+this.widgetName,function(){d.destroy= ()});=0A= this._create();this._init()},_create:function(){},_init:function(){},dest= roy:function(){this.element.unbind("."+this.widgetName).removeData(this.w= idgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-dis= abled").removeClass(this.widgetBaseClass+"-disabled = ui-state-disabled")},widget:function(){return = this.element},option:function(a,c){var = d=3Da,e=3Dthis;if(arguments.length=3D=3D=3D0)return = b.extend({},e.options);if(typeof = a=3D=3D=3D"string"){if(c=3D=3D=3Dj)return = this.options[a];d=3D{};d[a]=3Dc}b.each(d,function(f,=0A= h){e._setOption(f,h)});return = e},_setOption:function(a,c){this.options[a]=3Dc;if(a=3D=3D=3D"disabled")t= his.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled = ui-state-disabled").attr("aria-disabled",c);return = this},enable:function(){return = this._setOption("disabled",false)},disable:function(){return = this._setOption("disabled",true)},_trigger:function(a,c,d){var = e=3Dthis.options[a];c=3Db.Event(c);c.type=3D(a=3D=3D=3Dthis.widgetEventPr= efix?a:this.widgetEventPrefix+a).toLowerCase();d=3Dd||{};if(c.originalEve= nt){a=3D=0A= b.event.props.length;for(var = f;a;){f=3Db.event.props[--a];c[f]=3Dc.originalEvent[f]}}this.element.trig= ger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)=3D=3D=3Dfal= se||c.isDefaultPrevented())}}})(jQuery);=0A= ;/*!=0A= * jQuery UI Mouse 1.8.4=0A= *=0A= * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)=0A= * Dual licensed under the MIT or GPL Version 2 licenses.=0A= * http://jquery.org/license=0A= *=0A= * http://docs.jquery.com/UI/Mouse=0A= *=0A= * Depends:=0A= * jquery.ui.widget.js=0A= */=0A= (function(c){c.widget("ui.mouse",{options:{cancel:":input,option",distanc= e:1,delay:0},_mouseInit:function(){var = a=3Dthis;this.element.bind("mousedown."+this.widgetName,function(b){retur= n = a._mouseDown(b)}).bind("click."+this.widgetName,function(b){if(a._prevent= ClickEvent){a._preventClickEvent=3Dfalse;b.stopImmediatePropagation();ret= urn = false}});this.started=3Dfalse},_mouseDestroy:function(){this.element.unbi= nd("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=3Da.origi= nalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&=0A= this._mouseUp(a);this._mouseDownEvent=3Da;var = b=3Dthis,e=3Da.which=3D=3D1,f=3Dtypeof = this.options.cancel=3D=3D"string"?c(a.target).parents().add(a.target).fil= ter(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))re= turn = true;this.mouseDelayMet=3D!this.options.delay;if(!this.mouseDelayMet)this= ._mouseDelayTimer=3DsetTimeout(function(){b.mouseDelayMet=3Dtrue},this.op= tions.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._= mouseStarted=3Dthis._mouseStart(a)!=3D=3Dfalse;if(!this._mouseStarted){a.= preventDefault();=0A= return true}}this._mouseMoveDelegate=3Dfunction(d){return = b._mouseMove(d)};this._mouseUpDelegate=3Dfunction(d){return = b._mouseUp(d)};c(document).bind("mousemove."+this.widgetName,this._mouseM= oveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);c.bro= wser.safari||a.preventDefault();return = a.originalEvent.mouseHandled=3Dtrue}},_mouseMove:function(a){if(c.browser= .msie&&!a.button)return = this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return = a.preventDefault()}if(this._mouseDistanceMet(a)&&=0A= this._mouseDelayMet(a))(this._mouseStarted=3Dthis._mouseStart(this._mouse= DownEvent,a)!=3D=3Dfalse)?this._mouseDrag(a):this._mouseUp(a);return!this= ._mouseStarted},_mouseUp:function(a){c(document).unbind("mousemove."+this= .widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,th= is._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=3Dfalse;th= is._preventClickEvent=3Da.target=3D=3Dthis._mouseDownEvent.target;this._m= ouseStop(a)}return false},_mouseDistanceMet:function(a){return = Math.max(Math.abs(this._mouseDownEvent.pageX-=0A= a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=3Dthis.options.di= stance},_mouseDelayMet:function(){return = this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mou= seStop:function(){},_mouseCapture:function(){return true}})})(jQuery);=0A= ;/*=0A= * jQuery UI Draggable 1.8.4=0A= *=0A= * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)=0A= * Dual licensed under the MIT or GPL Version 2 licenses.=0A= * http://jquery.org/license=0A= *=0A= * http://docs.jquery.com/UI/Draggables=0A= *=0A= * Depends:=0A= * jquery.ui.core.js=0A= * jquery.ui.mouse.js=0A= * jquery.ui.widget.js=0A= */=0A= (function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag"= ,options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:= false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:fa= lse,helper:"original",iframeFix:false,opacity:false,refreshPositions:fals= e,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensi= tivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stac= k:false,zIndex:false},_create:function(){if(this.options.helper=3D=3D=0A= "original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element= [0].style.position=3D"relative";this.options.addClasses&&this.element.add= Class("ui-draggable");this.options.disabled&&this.element.addClass("ui-dr= aggable-disabled");this._mouseInit()},destroy:function(){if(this.element.= data("draggable")){this.element.removeData("draggable").unbind(".draggabl= e").removeClass("ui-draggable ui-draggable-dragging = ui-draggable-disabled");this._mouseDestroy();return = this}},_mouseCapture:function(a){var b=3D=0A= this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-ha= ndle"))return = false;this.handle=3Dthis._getHandle(a);if(!this.handle)return = false;return true},_mouseStart:function(a){var = b=3Dthis.options;this.helper=3Dthis._createHelper(a);this._cacheHelperPro= portions();if(d.ui.ddmanager)d.ui.ddmanager.current=3Dthis;this._cacheMar= gins();this.cssPosition=3Dthis.helper.css("position");this.scrollParent=3D= this.helper.scrollParent();this.offset=3Dthis.positionAbs=3Dthis.element.= offset();this.offset=3D{top:this.offset.top-=0A= this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.o= ffset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},= parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.= originalPosition=3Dthis.position=3Dthis._generatePosition(a);this.origina= lPageX=3Da.pageX;this.originalPageY=3Da.pageY;b.cursorAt&&this._adjustOff= setFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._= trigger("start",a)=3D=3D=3Dfalse){this._clear();return = false}this._cacheHelperProportions();=0A= d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);t= his.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);retu= rn = true},_mouseDrag:function(a,b){this.position=3Dthis._generatePosition(a);= this.positionAbs=3Dthis._convertPositionTo("absolute");if(!b){b=3Dthis._u= iHash();if(this._trigger("drag",a,b)=3D=3D=3Dfalse){this._mouseUp({});ret= urn = false}this.position=3Db.position}if(!this.options.axis||this.options.axis= !=3D"y")this.helper[0].style.left=3Dthis.position.left+"px";if(!this.opti= ons.axis||=0A= this.options.axis!=3D"x")this.helper[0].style.top=3Dthis.position.top+"px= ";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return = false},_mouseStop:function(a){var = b=3Dfalse;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=3Dd.ui.ddmanag= er.drop(this,a);if(this.dropped){b=3Dthis.dropped;this.dropped=3Dfalse}if= (!this.element[0]||!this.element[0].parentNode)return = false;if(this.options.revert=3D=3D"invalid"&&!b||this.options.revert=3D=3D= "valid"&&b||this.options.revert=3D=3D=3Dtrue||d.isFunction(this.options.r= evert)&&this.options.revert.call(this.element,=0A= b)){var = c=3Dthis;d(this.helper).animate(this.originalPosition,parseInt(this.optio= ns.revertDuration,10),function(){c._trigger("stop",a)!=3D=3Dfalse&&c._cle= ar()})}else this._trigger("stop",a)!=3D=3Dfalse&&this._clear();return = false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._m= ouseUp({}):this._clear();return this},_getHandle:function(a){var = b=3D!this.options.handle||!d(this.options.handle,this.element).length?tru= e:false;d(this.options.handle,this.element).find("*").andSelf().each(func= tion(){if(this=3D=3D=0A= a.target)b=3Dtrue});return b},_createHelper:function(a){var = b=3Dthis.options;a=3Dd.isFunction(b.helper)?d(b.helper.apply(this.element= [0],[a])):b.helper=3D=3D"clone"?this.element.clone():this.element;a.paren= ts("body").length||a.appendTo(b.appendTo=3D=3D"parent"?this.element[0].pa= rentNode:b.appendTo);a[0]!=3Dthis.element[0]&&!/(fixed|absolute)/.test(a.= css("position"))&&a.css("position","absolute");return = a},_adjustOffsetFromHelper:function(a){if(typeof = a=3D=3D"string")a=3Da.split(" = ");if(d.isArray(a))a=3D{left:+a[0],top:+a[1]||=0A= 0};if("left"in = a)this.offset.click.left=3Da.left+this.margins.left;if("right"in = a)this.offset.click.left=3Dthis.helperProportions.width-a.right+this.marg= ins.left;if("top"in = a)this.offset.click.top=3Da.top+this.margins.top;if("bottom"in = a)this.offset.click.top=3Dthis.helperProportions.height-a.bottom+this.mar= gins.top},_getParentOffset:function(){this.offsetParent=3Dthis.helper.off= setParent();var = a=3Dthis.offsetParent.offset();if(this.cssPosition=3D=3D"absolute"&&this.= scrollParent[0]!=3Ddocument&&d.ui.contains(this.scrollParent[0],=0A= this.offsetParent[0])){a.left+=3Dthis.scrollParent.scrollLeft();a.top+=3D= this.scrollParent.scrollTop()}if(this.offsetParent[0]=3D=3Ddocument.body|= |this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()= =3D=3D"html"&&d.browser.msie)a=3D{top:0,left:0};return{top:a.top+(parseIn= t(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(t= his.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:func= tion(){if(this.cssPosition=3D=3D"relative"){var = a=3Dthis.element.position();return{top:a.top-=0A= (parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),le= ft:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scr= ollLeft()}}else = return{top:0,left:0}},_cacheMargins:function(){this.margins=3D{left:parse= Int(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("= marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperPropor= tions=3D{width:this.helper.outerWidth(),height:this.helper.outerHeight()}= },_setContainment:function(){var a=3Dthis.options;if(a.containment=3D=3D=0A= "parent")a.containment=3Dthis.helper[0].parentNode;if(a.containment=3D=3D= "document"||a.containment=3D=3D"window")this.containment=3D[0-this.offset= .relative.left-this.offset.parent.left,0-this.offset.relative.top-this.of= fset.parent.top,d(a.containment=3D=3D"document"?document:window).width()-= this.helperProportions.width-this.margins.left,(d(a.containment=3D=3D"doc= ument"?document:window).height()||document.body.parentNode.scrollHeight)-= this.helperProportions.height-this.margins.top];if(!/^(document|window|pa= rent)$/.test(a.containment)&&=0A= a.containment.constructor!=3DArray){var = b=3Dd(a.containment)[0];if(b){a=3Dd(a.containment).offset();var = c=3Dd(b).css("overflow")!=3D"hidden";this.containment=3D[a.left+(parseInt= (d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10= )||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),10)||0= )+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Mat= h.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("bor= derLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),=0A= 10)||0)-this.helperProportions.width-this.margins.left,a.top+(c?Math.max(= b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("border= TopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helpe= rProportions.height-this.margins.top]}}else = if(a.containment.constructor=3D=3DArray)this.containment=3Da.containment}= ,_convertPositionTo:function(a,b){if(!b)b=3Dthis.position;a=3Da=3D=3D"abs= olute"?1:-1;var = c=3Dthis.cssPosition=3D=3D"absolute"&&!(this.scrollParent[0]!=3Ddocument&= &d.ui.contains(this.scrollParent[0],=0A= this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=3D/(html|bod= y)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.= offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPos= ition=3D=3D"fixed"?0:(this.cssPosition=3D=3D"fixed"?-this.scrollParent.sc= rollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+t= his.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.c= ssPosition=3D=3D"fixed"?0:(this.cssPosition=3D=3D"fixed"?-this.scrollPare= nt.scrollLeft():=0A= f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var = b=3Dthis.options,c=3Dthis.cssPosition=3D=3D"absolute"&&!(this.scrollParen= t[0]!=3Ddocument&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]= ))?this.offsetParent:this.scrollParent,f=3D/(html|body)/i.test(c[0].tagNa= me),e=3Da.pageX,g=3Da.pageY;if(this.originalPosition){if(this.containment= ){if(a.pageX-this.offset.click.leftthis.containment[= 2])e=3Dthis.containment[2]+this.offset.click.left;if(a.pageY-this.offset.= click.top>this.containment[3])g=3Dthis.containment[3]+this.offset.click.t= op}if(b.grid){g=3Dthis.originalPageY+Math.round((g-this.originalPageY)/b.= grid[1])*b.grid[1];g=3Dthis.containment?!(g-this.offset.click.topthis.containment[3])?g:!(g-this.off= set.click.topthis.containment[2])?e:!(e-this.offset.click.left').css({width:this.offsetWidth+"px",height:this.offsetHeight= +"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset= ()).appendTo("body")})},stop:function(){d("div.ui-draggable-iframeFix").e= ach(function(){this.parentNode.removeChild(this)})}});d.ui.plugin.add("dr= aggable","opacity",{start:function(a,b){a=3Dd(b.helper);b=3Dd(this).data(= "draggable").options;=0A= if(a.css("opacity"))b._opacity=3Da.css("opacity");a.css("opacity",b.opaci= ty)},stop:function(a,b){a=3Dd(this).data("draggable").options;a._opacity&= &d(b.helper).css("opacity",a._opacity)}});d.ui.plugin.add("draggable","sc= roll",{start:function(){var = a=3Dd(this).data("draggable");if(a.scrollParent[0]!=3Ddocument&&a.scrollP= arent[0].tagName!=3D"HTML")a.overflowOffset=3Da.scrollParent.offset()},dr= ag:function(a){var = b=3Dd(this).data("draggable"),c=3Db.options,f=3Dfalse;if(b.scrollParent[0= ]!=3Ddocument&&b.scrollParent[0].tagName!=3D=0A= "HTML"){if(!c.axis||c.axis!=3D"x")if(b.overflowOffset.top+b.scrollParent[= 0].offsetHeight-a.pageY=3D0;h--){var = i=3Dc.snapElements[h].left,k=3Di+c.snapElements[h].width,j=3Dc.snapElemen= ts[h].top,l=3Dj+c.snapElements[h].height;if(i-e0)return true;a[b]=3D1;d=3Da[b]>0;a[b]=3D0;return = d},isOverAxis:function(a,b,d){return = a>b&&a=3D0)&&c(a).is(":focusable")}= })}})(jQuery);=0A= ;/*!=0A= * jQuery UI Widget 1.8.4=0A= *=0A= * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)=0A= * Dual licensed under the MIT or GPL Version 2 licenses.=0A= * http://jquery.org/license=0A= *=0A= * http://docs.jquery.com/UI/Widget=0A= */=0A= (function(b,j){var k=3Db.fn.remove;b.fn.remove=3Dfunction(a,c){return = this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).a= dd([this]).each(function(){b(this).triggerHandler("remove")});return = k.call(b(this),a,c)})};b.widget=3Dfunction(a,c,d){var = e=3Da.split(".")[0],f;a=3Da.split(".")[1];f=3De+"-"+a;if(!d){d=3Dc;c=3Db.= Widget}b.expr[":"][f]=3Dfunction(h){return!!b.data(h,a)};b[e]=3Db[e]||{};= b[e][a]=3Dfunction(h,g){arguments.length&&this._createWidget(h,g)};c=3Dne= w c;c.options=3Db.extend(true,{},c.options);=0A= b[e][a].prototype=3Db.extend(true,c,{namespace:e,widgetName:a,widgetEvent= Prefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.wid= get.bridge(a,b[e][a])};b.widget.bridge=3Dfunction(a,c){b.fn[a]=3Dfunction= (d){var e=3Dtypeof = d=3D=3D=3D"string",f=3DArray.prototype.slice.call(arguments,1),h=3Dthis;d= =3D!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.substri= ng(0,1)=3D=3D=3D"_")return h;e?this.each(function(){var = g=3Db.data(this,a),i=3Dg&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!=3D=3D= g&&i!=3D=3Dj){h=3Di;return false}}):=0A= this.each(function(){var = g=3Db.data(this,a);if(g){d&&g.option(d);g._init()}else b.data(this,a,new = c(d,this))});return = h}};b.Widget=3Dfunction(a,c){arguments.length&&this._createWidget(a,c)};b= .Widget.prototype=3D{widgetName:"widget",widgetEventPrefix:"",options:{di= sabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);= this.element=3Db(c);this.options=3Db.extend(true,{},this.options,b.metada= ta&&b.metadata.get(c)[this.widgetName],a);var = d=3Dthis;this.element.bind("remove."+this.widgetName,function(){d.destroy= ()});=0A= this._create();this._init()},_create:function(){},_init:function(){},dest= roy:function(){this.element.unbind("."+this.widgetName).removeData(this.w= idgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-dis= abled").removeClass(this.widgetBaseClass+"-disabled = ui-state-disabled")},widget:function(){return = this.element},option:function(a,c){var = d=3Da,e=3Dthis;if(arguments.length=3D=3D=3D0)return = b.extend({},e.options);if(typeof = a=3D=3D=3D"string"){if(c=3D=3D=3Dj)return = this.options[a];d=3D{};d[a]=3Dc}b.each(d,function(f,=0A= h){e._setOption(f,h)});return = e},_setOption:function(a,c){this.options[a]=3Dc;if(a=3D=3D=3D"disabled")t= his.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled = ui-state-disabled").attr("aria-disabled",c);return = this},enable:function(){return = this._setOption("disabled",false)},disable:function(){return = this._setOption("disabled",true)},_trigger:function(a,c,d){var = e=3Dthis.options[a];c=3Db.Event(c);c.type=3D(a=3D=3D=3Dthis.widgetEventPr= efix?a:this.widgetEventPrefix+a).toLowerCase();d=3Dd||{};if(c.originalEve= nt){a=3D=0A= b.event.props.length;for(var = f;a;){f=3Db.event.props[--a];c[f]=3Dc.originalEvent[f]}}this.element.trig= ger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)=3D=3D=3Dfal= se||c.isDefaultPrevented())}}})(jQuery);=0A= ;/*!=0A= * jQuery UI Mouse 1.8.4=0A= *=0A= * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)=0A= * Dual licensed under the MIT or GPL Version 2 licenses.=0A= * http://jquery.org/license=0A= *=0A= * http://docs.jquery.com/UI/Mouse=0A= *=0A= * Depends:=0A= * jquery.ui.widget.js=0A= */=0A= (function(c){c.widget("ui.mouse",{options:{cancel:":input,option",distanc= e:1,delay:0},_mouseInit:function(){var = a=3Dthis;this.element.bind("mousedown."+this.widgetName,function(b){retur= n = a._mouseDown(b)}).bind("click."+this.widgetName,function(b){if(a._prevent= ClickEvent){a._preventClickEvent=3Dfalse;b.stopImmediatePropagation();ret= urn = false}});this.started=3Dfalse},_mouseDestroy:function(){this.element.unbi= nd("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=3Da.origi= nalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&=0A= this._mouseUp(a);this._mouseDownEvent=3Da;var = b=3Dthis,e=3Da.which=3D=3D1,f=3Dtypeof = this.options.cancel=3D=3D"string"?c(a.target).parents().add(a.target).fil= ter(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))re= turn = true;this.mouseDelayMet=3D!this.options.delay;if(!this.mouseDelayMet)this= ._mouseDelayTimer=3DsetTimeout(function(){b.mouseDelayMet=3Dtrue},this.op= tions.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._= mouseStarted=3Dthis._mouseStart(a)!=3D=3Dfalse;if(!this._mouseStarted){a.= preventDefault();=0A= return true}}this._mouseMoveDelegate=3Dfunction(d){return = b._mouseMove(d)};this._mouseUpDelegate=3Dfunction(d){return = b._mouseUp(d)};c(document).bind("mousemove."+this.widgetName,this._mouseM= oveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);c.bro= wser.safari||a.preventDefault();return = a.originalEvent.mouseHandled=3Dtrue}},_mouseMove:function(a){if(c.browser= .msie&&!a.button)return = this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return = a.preventDefault()}if(this._mouseDistanceMet(a)&&=0A= this._mouseDelayMet(a))(this._mouseStarted=3Dthis._mouseStart(this._mouse= DownEvent,a)!=3D=3Dfalse)?this._mouseDrag(a):this._mouseUp(a);return!this= ._mouseStarted},_mouseUp:function(a){c(document).unbind("mousemove."+this= .widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,th= is._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=3Dfalse;th= is._preventClickEvent=3Da.target=3D=3Dthis._mouseDownEvent.target;this._m= ouseStop(a)}return false},_mouseDistanceMet:function(a){return = Math.max(Math.abs(this._mouseDownEvent.pageX-=0A= a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=3Dthis.options.di= stance},_mouseDelayMet:function(){return = this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mou= seStop:function(){},_mouseCapture:function(){return true}})})(jQuery);=0A= ;/*=0A= * jQuery UI Resizable 1.8.4=0A= *=0A= * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)=0A= * Dual licensed under the MIT or GPL Version 2 licenses.=0A= * http://jquery.org/license=0A= *=0A= * http://docs.jquery.com/UI/Resizables=0A= *=0A= * Depends:=0A= * jquery.ui.core.js=0A= * jquery.ui.mouse.js=0A= * jquery.ui.widget.js=0A= */=0A= (function(e){e.widget("ui.resizable",e.ui.mouse,{widgetEventPrefix:"resiz= e",options:{alsoResize:false,animate:false,animateDuration:"slow",animate= Easing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:f= alse,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:nul= l,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var = b=3Dthis,a=3Dthis.options;this.element.addClass("ui-resizable");e.extend(= this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElem= ent:this.element,=0A= _proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.h= elper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/ca= nvas|textarea|input|select|button|img/i)){/relative/.test(this.element.cs= s("position"))&&e.browser.opera&&this.element.css({position:"relative",to= p:"auto",left:"auto"});this.element.wrap(e('
').css({position:this.element.css("position"),width:this.e= lement.outerWidth(),height:this.element.outerHeight(),=0A= top:this.element.css("top"),left:this.element.css("left")}));this.element= =3Dthis.element.parent().data("resizable",this.element.data("resizable"))= ;this.elementIsWrapper=3Dtrue;this.element.css({marginLeft:this.originalE= lement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),= marginRight:this.originalElement.css("marginRight"),marginBottom:this.ori= ginalElement.css("marginBottom")});this.originalElement.css({marginLeft:0= ,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=3D=0A= this.originalElement.css("resize");this.originalElement.css("resize","non= e");this._proportionallyResizeElements.push(this.originalElement.css({pos= ition:"static",zoom:1,display:"block"}));this.originalElement.css({margin= :this.originalElement.css("margin")});this._proportionallyResize()}this.h= andles=3Da.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,= se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-r= esizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable= -ne",=0A= nw:".ui-resizable-nw"});if(this.handles.constructor=3D=3DString){if(this.= handles=3D=3D"all")this.handles=3D"n,e,s,w,se,sw,ne,nw";var = c=3Dthis.handles.split(",");this.handles=3D{};for(var = d=3D0;d');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++= a.zIndex});"se"=3D=3Df&&g.addClass("ui-icon = ui-icon-gripsmall-diagonal-se");this.handles[f]=3D".ui-resizable-"+f;this= .element.append(g)}}this._renderAxis=3Dfunction(h){h=3Dh||this.element;fo= r(var i in this.handles){if(this.handles[i].constructor=3D=3D=0A= String)this.handles[i]=3De(this.handles[i],this.element).show();if(this.e= lementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|s= elect|button/i)){var = j=3De(this.handles[i],this.element),k=3D0;k=3D/sw|ne|nw|se|n|s/.test(i)?j= .outerHeight():j.outerWidth();j=3D["padding",/ne|nw|n/.test(i)?"Top":/se|= sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,k);= this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.e= lement);this._handles=3De(".ui-resizable-handle",this.element).disableSel= ection();=0A= this._handles.mouseover(function(){if(!b.resizing){if(this.className)var = h=3Dthis.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=3D= h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).= addClass("ui-resizable-autohide").hover(function(){e(this).removeClass("u= i-resizable-autohide");b._handles.show()},function(){if(!b.resizing){e(th= is).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseIni= t()},destroy:function(){this._mouseDestroy();var = b=3Dfunction(c){e(c).removeClass("ui-resizable ui-resizable-disabled = ui-resizable-resizing").removeData("resizable").unbind(".resizable").find= (".ui-resizable-handle").remove()};=0A= if(this.elementIsWrapper){b(this.element);var = a=3Dthis.element;a.after(this.originalElement.css({position:a.css("positi= on"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.= css("left")})).remove()}this.originalElement.css("resize",this.originalRe= sizeStyle);b(this.originalElement);return = this},_mouseCapture:function(b){var a=3Dfalse;for(var c in = this.handles)if(e(this.handles[c])[0]=3D=3Db.target)a=3Dtrue;return!this.= options.disabled&&a},_mouseStart:function(b){var = a=3Dthis.options,c=3Dthis.element.position(),=0A= d=3Dthis.element;this.resizing=3Dtrue;this.documentScroll=3D{top:e(docume= nt).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||= /absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,l= eft:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({= position:"relative",top:"auto",left:"auto"});this._renderProxy();c=3Dm(th= is.helper.css("left"));var = f=3Dm(this.helper.css("top"));if(a.containment){c+=3De(a.containment).scr= ollLeft()||0;f+=3De(a.containment).scrollTop()||0}this.offset=3D=0A= this.helper.offset();this.position=3D{left:c,top:f};this.size=3Dthis._hel= per?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height= :d.height()};this.originalSize=3Dthis._helper?{width:d.outerWidth(),heigh= t:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosit= ion=3D{left:c,top:f};this.sizeDiff=3D{width:d.outerWidth()-d.width(),heig= ht:d.outerHeight()-d.height()};this.originalMousePosition=3D{left:b.pageX= ,top:b.pageY};this.aspectRatio=3Dtypeof = a.aspectRatio=3D=3D"number"?a.aspectRatio:=0A= this.originalSize.width/this.originalSize.height||1;a=3De(".ui-resizable-= "+this.axis).css("cursor");e("body").css("cursor",a=3D=3D"auto"?this.axis= +"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start"= ,b);return true},_mouseDrag:function(b){var = a=3Dthis.helper,c=3Dthis.originalMousePosition,d=3Dthis._change[this.axis= ];if(!d)return = false;c=3Dd.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);if(this._a= spectRatio||b.shiftKey)c=3Dthis._updateRatio(c,b);c=3Dthis._respectSize(c= ,b);this._propagate("resize",=0A= b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:t= his.size.width+"px",height:this.size.height+"px"});!this._helper&&this._p= roportionallyResizeElements.length&&this._proportionallyResize();this._up= dateCache(c);this._trigger("resize",b,this.ui());return = false},_mouseStop:function(b){this.resizing=3Dfalse;var = a=3Dthis.options,c=3Dthis;if(this._helper){var = d=3Dthis._proportionallyResizeElements,f=3Dd.length&&/textarea/i.test(d[0= ].nodeName);d=3Df&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;=0A= f=3D{width:c.size.width-(f?0:c.sizeDiff.width),height:c.size.height-d};d=3D= parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.le= ft)||null;var = g=3DparseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.= top)||null;a.animate||this.element.css(e.extend(f,{top:g,left:d}));c.help= er.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.an= imate&&this._proportionallyResize()}e("body").css("cursor","auto");this.e= lement.removeClass("ui-resizable-resizing");this._propagate("stop",=0A= b);this._helper&&this.helper.remove();return = false},_updateCache:function(b){this.offset=3Dthis.helper.offset();if(l(b= .left))this.position.left=3Db.left;if(l(b.top))this.position.top=3Db.top;= if(l(b.height))this.size.height=3Db.height;if(l(b.width))this.size.width=3D= b.width},_updateRatio:function(b){var = a=3Dthis.position,c=3Dthis.size,d=3Dthis.axis;if(b.height)b.width=3Dc.hei= ght*this.aspectRatio;else = if(b.width)b.height=3Dc.width/this.aspectRatio;if(d=3D=3D"sw"){b.left=3Da= .left+(c.width-b.width);b.top=3Dnull}if(d=3D=3D"nw"){b.top=3D=0A= a.top+(c.height-b.height);b.left=3Da.left+(c.width-b.width)}return = b},_respectSize:function(b){var = a=3Dthis.options,c=3Dthis.axis,d=3Dl(b.width)&&a.maxWidth&&a.maxWidthb.width,h=3Dl(b.height)&&a.minHeight&&a.minHeight>b= .height;if(g)b.width=3Da.minWidth;if(h)b.height=3Da.minHeight;if(d)b.widt= h=3Da.maxWidth;if(f)b.height=3Da.maxHeight;var = i=3Dthis.originalPosition.left+this.originalSize.width,j=3Dthis.position.= top+this.size.height,=0A= k=3D/sw|nw|w/.test(c);c=3D/nw|ne|n/.test(c);if(g&&k)b.left=3Di-a.minWidth= ;if(d&&k)b.left=3Di-a.maxWidth;if(h&&c)b.top=3Dj-a.minHeight;if(f&&c)b.to= p=3Dj-a.maxHeight;if((a=3D!b.width&&!b.height)&&!b.left&&b.top)b.top=3Dnu= ll;else if(a&&!b.top&&b.left)b.left=3Dnull;return = b},_proportionallyResize:function(){if(this._proportionallyResizeElements= .length)for(var = b=3Dthis.helper||this.element,a=3D0;a');var = a=3De.browser.msie&&e.browser.version<7,c=3Da?1:0;a=3Da?2:-1;this.helper.= addClass(this._helper).css({width:this.element.outerWidth()+a,height:this= .element.outerHeight()+a,position:"absolute",left:this.elementOffset.left= -c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper= .appendTo("body").disableSelection()}else = this.helper=3Dthis.element},_change:{e:function(b,a){return{width:this.or= iginalSize.width+=0A= a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.o= riginalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.= top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height= :this.originalSize.height+c}},se:function(b,a,c){return = e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[= b,a,c]))},sw:function(b,a,c){return = e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[= b,a,c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,=0A= arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return= = e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[= b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]= );b!=3D"resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){r= eturn{originalElement:this.originalElement,element:this.element,helper:th= is.helper,position:this.position,size:this.size,originalSize:this.origina= lSize,originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,=0A= {version:"1.8.4"});e.ui.plugin.add("resizable","alsoResize",{start:functi= on(){var = b=3De(this).data("resizable").options,a=3Dfunction(c){e(c).each(function(= ){var = d=3De(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),h= eight:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseIn= t(d.css("top"),10),position:d.css("position")})})};if(typeof = b.alsoResize=3D=3D"object"&&!b.alsoResize.parentNode)if(b.alsoResize.leng= th){b.alsoResize=3Db.alsoResize[0];a(b.alsoResize)}else = e.each(b.alsoResize,=0A= function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var = c=3De(this).data("resizable");b=3Dc.options;var = d=3Dc.originalSize,f=3Dc.originalPosition,g=3D{height:c.size.height-d.hei= ght||0,width:c.size.width-d.width||0,top:c.position.top-f.top||0,left:c.p= osition.left-f.left||0},h=3Dfunction(i,j){e(i).each(function(){var = k=3De(this),q=3De(this).data("resizable-alsoresize"),p=3D{},r=3Dj&&j.leng= th?j:k.parents(a.originalElement[0]).length?["width","height"]:["width","= height","top","left"];e.each(r,function(n,o){if((n=3D=0A= (q[o]||0)+(g[o]||0))&&n>=3D0)p[o]=3Dn||null});if(e.browser.opera&&/relati= ve/.test(k.css("position"))){c._revertToRelativePosition=3Dtrue;k.css({po= sition:"absolute",top:"auto",left:"auto"})}k.css(p)})};typeof = b.alsoResize=3D=3D"object"&&!b.alsoResize.nodeType?e.each(b.alsoResize,fu= nction(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var = b=3De(this).data("resizable"),a=3Db.options,c=3Dfunction(d){e(d).each(fun= ction(){var = f=3De(this);f.css({position:f.data("resizable-alsoresize").position})})};= if(b._revertToRelativePosition){b._revertToRelativePosition=3D=0A= false;typeof = a.alsoResize=3D=3D"object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,fu= nction(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize= ")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var = a=3De(this).data("resizable"),c=3Da.options,d=3Da._proportionallyResizeEl= ements,f=3Dd.length&&/textarea/i.test(d[0].nodeName),g=3Df&&e.ui.hasScrol= l(d[0],"left")?0:a.sizeDiff.height;f=3D{width:a.size.width-(f?0:a.sizeDif= f.width),height:a.size.height-g};g=3DparseInt(a.element.css("left"),10)+(= a.position.left-=0A= a.originalPosition.left)||null;var = h=3DparseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.= top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration= :c.animateDuration,easing:c.animateEasing,step:function(){var = i=3D{width:parseInt(a.element.css("width"),10),height:parseInt(a.element.= css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.e= lement.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,height:i.= height});a._updateCache(i);a._propagate("resize",=0A= b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var = b=3De(this).data("resizable"),a=3Db.element,c=3Db.options.containment;if(= a=3Dc instanceof = e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=3De(a= );if(/document/.test(c)||c=3D=3Ddocument){b.containerOffset=3D{left:0,top= :0};b.containerPosition=3D{left:0,top:0};b.parentData=3D{element:e(docume= nt),left:0,top:0,width:e(document).width(),height:e(document).height()||d= ocument.body.parentNode.scrollHeight}}else{var d=3De(a),f=3D[];e(["Top",=0A= "Right","Left","Bottom"]).each(function(i,j){f[i]=3Dm(d.css("padding"+j))= });b.containerOffset=3Dd.offset();b.containerPosition=3Dd.position();b.co= ntainerSize=3D{height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=3D= b.containerOffset;var = g=3Db.containerSize.height,h=3Db.containerSize.width;h=3De.ui.hasScroll(a= ,"left")?a.scrollWidth:h;g=3De.ui.hasScroll(a)?a.scrollHeight:g;b.parentD= ata=3D{element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:functi= on(b){var = a=3De(this).data("resizable"),c=3Da.options,d=3Da.containerOffset,=0A= f=3Da.position;b=3Da._aspectRatio||b.shiftKey;var = g=3D{top:0,left:0},h=3Da.containerElement;if(h[0]!=3Ddocument&&/static/.t= est(h.css("position")))g=3Dd;if(f.left<(a._helper?d.left:0)){a.size.width= +=3Da._helper?a.position.left-d.left:a.position.left-g.left;if(b)a.size.h= eight=3Da.size.width/c.aspectRatio;a.position.left=3Dc.helper?d.left:0}if= (f.top<(a._helper?d.top:0)){a.size.height+=3Da._helper?a.position.top-d.t= op:a.position.top;if(b)a.size.width=3Da.size.height*c.aspectRatio;a.posit= ion.top=3Da._helper?d.top:0}a.offset.left=3D=0A= a.parentData.left+a.position.left;a.offset.top=3Da.parentData.top+a.posit= ion.top;c=3DMath.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left= )+a.sizeDiff.width);d=3DMath.abs((a._helper?a.offset.top-g.top:a.offset.t= op-d.top)+a.sizeDiff.height);f=3Da.containerElement.get(0)=3D=3Da.element= .parent().get(0);g=3D/relative|absolute/.test(a.containerElement.css("pos= ition"));if(f&&g)c-=3Da.parentData.left;if(c+a.size.width>=3Da.parentData= .width){a.size.width=3Da.parentData.width-c;if(b)a.size.height=3Da.size.w= idth/a.aspectRatio}if(d+=0A= a.size.height>=3Da.parentData.height){a.size.height=3Da.parentData.height= -d;if(b)a.size.width=3Da.size.height*a.aspectRatio}},stop:function(){var = b=3De(this).data("resizable"),a=3Db.options,c=3Db.containerOffset,d=3Db.c= ontainerPosition,f=3Db.containerElement,g=3De(b.helper),h=3Dg.offset(),i=3D= g.outerWidth()-b.sizeDiff.width;g=3Dg.outerHeight()-b.sizeDiff.height;b._= helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left= :h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&/static/.= test(f.css("position"))&&=0A= e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.= add("resizable","ghost",{start:function(){var = b=3De(this).data("resizable"),a=3Db.options,c=3Db.size;b.ghost=3Db.origin= alElement.clone();b.ghost.css({opacity:0.25,display:"block",position:"rel= ative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui= -resizable-ghost").addClass(typeof = a.ghost=3D=3D"string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:func= tion(){var = b=3De(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",=0A= height:b.size.height,width:b.size.width})},stop:function(){var = b=3De(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeCh= ild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:functio= n(){var = b=3De(this).data("resizable"),a=3Db.options,c=3Db.size,d=3Db.originalSize= ,f=3Db.originalPosition,g=3Db.axis;a.grid=3Dtypeof = a.grid=3D=3D"number"?[a.grid,a.grid]:a.grid;var = h=3DMath.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=3DMath.= round((c.height-d.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.= test(g)){b.size.width=3D=0A= d.width+h;b.size.height=3Dd.height+a}else = if(/^(ne)$/.test(g)){b.size.width=3Dd.width+h;b.size.height=3Dd.height+a;= b.position.top=3Df.top-a}else{if(/^(sw)$/.test(g)){b.size.width=3Dd.width= +h;b.size.height=3Dd.height+a}else{b.size.width=3Dd.width+h;b.size.height= =3Dd.height+a;b.position.top=3Df.top-a}b.position.left=3Df.left-h}}});var= m=3Dfunction(b){return = parseInt(b,10)||0},l=3Dfunction(b){return!isNaN(parseInt(b,10))}})(jQuery= );=0A= ; ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://www.scopus.com/gadgetcontext/gadgets/js/jquery-ui-1.8rc3.custom.min.js /*! * jQuery UI 1.8rc3 * * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI */ /* * jQuery UI 1.8rc3 * * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI */ jQuery.ui || (function (b) { var a =3D b.browser.mozilla && (parseFloat(b.browser.version) < = 1.9); b.ui =3D { version: "1.8rc3", plugin: { add: function (d, e, g) { var f =3D b.ui[d].prototype; for (var c in g) { f.plugins[c] =3D f.plugins[c] || []; f.plugins[c].push([e, g[c]]) } }, call: function (c, e, d) { var g =3D c.plugins[e]; if (!g || !c.element[0].parentNode) { return } for (var f =3D 0; f < g.length; f++) { if (c.options[g[f][0]]) { g[f][1].apply(c.element, d) } } } }, contains: function (d, c) { return document.compareDocumentPosition ? = d.compareDocumentPosition(c) & 16 : d !=3D=3D c && d.contains(c) }, hasScroll: function (f, d) { if (b(f).css("overflow") =3D=3D "hidden") { return false } var c =3D (d && d =3D=3D "left") ? "scrollLeft" : = "scrollTop", e =3D false; if (f[c] > 0) { return true } f[c] =3D 1;e =3D (f[c] > 0);f[c] =3D 0; return e }, isOverAxis: function (d, c, e) { return (d > c) && (d < (c + e)) }, isOver: function (h, d, g, f, c, e) { return b.ui.isOverAxis(h, g, c) && b.ui.isOverAxis(d, f, e) }, keyCode: { BACKSPACE: 8, CAPS_LOCK: 20, COMMA: 188, CONTROL: 17, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, INSERT: 45, LEFT: 37, NUMPAD_ADD: 107, NUMPAD_DECIMAL: 110, NUMPAD_DIVIDE: 111, NUMPAD_ENTER: 108, NUMPAD_MULTIPLY: 106, NUMPAD_SUBTRACT: 109, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SHIFT: 16, SPACE: 32, TAB: 9, UP: 38 } }; b.fn.extend({ _focus: b.fn.focus, focus: function (c, d) { return typeof c =3D=3D=3D "number" ? this.each(function () { var e =3D this; setTimeout(function () { b(e).focus(); (d && d.call(e)) }, c) }) : this._focus.apply(this, arguments) }, enableSelection: function () { return this.attr("unselectable", "off").css("MozUserSelect", = "").unbind("selectstart.ui") }, disableSelection: function () { return this.attr("unselectable", "on").css("MozUserSelect", = "none").bind("selectstart.ui", function () { return false }) }, scrollParent: function () { var c; if ((b.browser.msie && = (/(static|relative)/).test(this.css("position"))) || = (/absolute/).test(this.css("position"))) { c =3D this.parents().filter(function () { return = (/(relative|absolute|fixed)/).test(b.curCSS(this, "position", 1)) && = (/(auto|scroll)/).test(b.curCSS(this, "overflow", 1) + b.curCSS(this, = "overflow-y", 1) + b.curCSS(this, "overflow-x", 1)) }).eq(0) } else { c =3D this.parents().filter(function () { return (/(auto|scroll)/).test(b.curCSS(this, = "overflow", 1) + b.curCSS(this, "overflow-y", 1) + b.curCSS(this, = "overflow-x", 1)) }).eq(0) } return (/fixed/).test(this.css("position")) || !c.length ? = b(document) : c }, zIndex: function (f) { if (f !=3D=3D undefined) { return this.css("zIndex", f) } if (this.length) { var d =3D b(this[0]), c, e; while (d.length && d[0] !=3D=3D document) { c =3D d.css("position"); if (c =3D=3D "absolute" || c =3D=3D "relative" || c = =3D=3D "fixed") { e =3D parseInt(d.css("zIndex")); if (!isNaN(e) && e !=3D 0) { return e } } d =3D d.parent() } } return 0 } }); b.extend(b.expr[":"], { data: function (e, d, c) { return !!b.data(e, c[3]) }, focusable: function (d) { var e =3D d.nodeName.toLowerCase(), c =3D b.attr(d, "tabindex"); return (/input|select|textarea|button|object/.test(e) ? = !d.disabled : "a" =3D=3D e || "area" =3D=3D e ? d.href || !isNaN(c) : = !isNaN(c)) && !b(d)["area" =3D=3D e ? "parents" : = "closest"](":hidden").length }, tabbable: function (d) { var c =3D b.attr(d, "tabindex"); return (isNaN(c) || c >=3D 0) && b(d).is(":focusable") } }) })(jQuery);; /*! * jQuery UI Widget 1.8rc3 * * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Widget */ /* * jQuery UI Widget 1.8rc3 * * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Widget */ (function (b) { var a =3D b.fn.remove; b.fn.remove =3D function (c, d) { return this.each(function () { if (!d) { if (!c || b.filter(c, [this]).length) { b("*", this).add(this).each(function () { b(this).triggerHandler("remove") }) } } return a.call(b(this), c, d) }) }; b.widget =3D function (d, f, c) { var e =3D d.split(".")[0], h; d =3D d.split(".")[1]; h =3D e + "-" + d; if (!c) { c =3D f; f =3D b.Widget } b.expr[":"][h] =3D function (i) { return !!b.data(i, d) }; b[e] =3D b[e] || {}; b[e][d] =3D function (i, j) { if (arguments.length) { this._createWidget(i, j) } }; var g =3D new f(); g.options =3D b.extend({}, g.options); b[e][d].prototype =3D b.extend(true, g, { namespace: e, widgetName: d, widgetEventPrefix: b[e][d].prototype.widgetEventPrefix || d, widgetBaseClass: h }, c); b.widget.bridge(d, b[e][d]) }; b.widget.bridge =3D function (d, c) { b.fn[d] =3D function (g) { var e =3D typeof g =3D=3D=3D "string", f =3D Array.prototype.slice.call(arguments, 1), h =3D this; g =3D !e && f.length ? b.extend.apply(null, [true, = g].concat(f)) : g; if (e && g.substring(0, 1) =3D=3D=3D "_") { return h } if (e) { this.each(function () { var i =3D b.data(this, d), j =3D i && b.isFunction(i[g]) ? i[g].apply(i, f) = : i; if (j !=3D=3D i && j !=3D=3D undefined) { h =3D j; return false } }) } else { this.each(function () { var i =3D b.data(this, d); if (i) { if (g) { i.option(g) } i._init() } else { b.data(this, d, new c(g, this)) } }) } return h } }; b.Widget =3D function (c, d) { if (arguments.length) { this._createWidget(c, d) } }; b.Widget.prototype =3D { widgetName: "widget", widgetEventPrefix: "", options: { disabled: false }, _createWidget: function (d, e) { this.element =3D b(e).data(this.widgetName, this); this.options =3D b.extend(true, {}, this.options, b.metadata = && b.metadata.get(e)[this.widgetName], d); var c =3D this; this.element.bind("remove." + this.widgetName, function () { c.destroy() }); this._create(); this._init() }, _create: function () {}, _init: function () {}, destroy: function () { this.element.unbind("." + = this.widgetName).removeData(this.widgetName); this.widget().unbind("." + = this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseC= lass + "-disabled " + this.namespace + "-state-disabled") }, widget: function () { return this.element }, option: function (e, f) { var d =3D e, c =3D this; if (arguments.length =3D=3D=3D 0) { return b.extend({}, c.options) } if (typeof e =3D=3D=3D "string") { if (f =3D=3D=3D undefined) { return this.options[e] } d =3D {}; d[e] =3D f } b.each(d, function (g, h) { c._setOption(g, h) }); return c }, _setOption: function (c, d) { this.options[c] =3D d; if (c =3D=3D=3D "disabled") { this.widget()[d ? "addClass" : = "removeClass"](this.widgetBaseClass + "-disabled " + this.namespace + = "-state-disabled").attr("aria-disabled", d) } return this }, enable: function () { return this._setOption("disabled", false) }, disable: function () { return this._setOption("disabled", true) }, _trigger: function (d, e, f) { var h =3D this.options[d]; e =3D b.Event(e); e.type =3D (d =3D=3D=3D this.widgetEventPrefix ? d : = this.widgetEventPrefix + d).toLowerCase(); f =3D f || {}; if (e.originalEvent) { for (var c =3D b.event.props.length, g; c;) { g =3D b.event.props[--c]; e[g] =3D e.originalEvent[g] } } this.element.trigger(e, f); return !(b.isFunction(h) && h.call(this.element[0], e, f) = =3D=3D=3D false || e.isDefaultPrevented()) } } })(jQuery);; /*! * jQuery UI Mouse 1.8rc3 * * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Mouse * * Depends: * jquery.ui.widget.js */ /* * jQuery UI Mouse 1.8rc3 * * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Mouse * * Depends: * jquery.ui.widget.js */ (function (a) { a.widget("ui.mouse", { options: { cancel: ":input,option", distance: 1, delay: 0 }, _mouseInit: function () { var b =3D this; this.element.bind("mousedown." + this.widgetName, function = (c) { return b._mouseDown(c) }).bind("click." + this.widgetName, function (c) { if (b._preventClickEvent) { b._preventClickEvent =3D false; c.stopImmediatePropagation(); return false } }); this.started =3D false }, _mouseDestroy: function () { this.element.unbind("." + this.widgetName) }, _mouseDown: function (d) { d.originalEvent =3D d.originalEvent || {}; if (d.originalEvent.mouseHandled) { return }(this._mouseStarted && this._mouseUp(d)); this._mouseDownEvent =3D d; var c =3D this, e =3D (d.which =3D=3D 1), b =3D (typeof this.options.cancel =3D=3D "string" ? = a(d.target).parents().add(d.target).filter(this.options.cancel).length : = false); if (!e || b || !this._mouseCapture(d)) { return true } this.mouseDelayMet =3D !this.options.delay; if (!this.mouseDelayMet) { this._mouseDelayTimer =3D setTimeout(function () { c.mouseDelayMet =3D true }, this.options.delay) } if (this._mouseDistanceMet(d) && this._mouseDelayMet(d)) { this._mouseStarted =3D (this._mouseStart(d) !=3D=3D = false); if (!this._mouseStarted) { d.preventDefault(); return true } } this._mouseMoveDelegate =3D function (f) { return c._mouseMove(f) }; this._mouseUpDelegate =3D function (f) { return c._mouseUp(f) }; a(document).bind("mousemove." + this.widgetName, = this._mouseMoveDelegate).bind("mouseup." + this.widgetName, = this._mouseUpDelegate); (a.browser.safari || d.preventDefault()); d.originalEvent.mouseHandled =3D true; return true }, _mouseMove: function (b) { if (a.browser.msie && !b.button) { return this._mouseUp(b) } if (this._mouseStarted) { this._mouseDrag(b); return b.preventDefault() } if (this._mouseDistanceMet(b) && this._mouseDelayMet(b)) { this._mouseStarted =3D = (this._mouseStart(this._mouseDownEvent, b) !=3D=3D false); (this._mouseStarted ? this._mouseDrag(b) : = this._mouseUp(b)) } return !this._mouseStarted }, _mouseUp: function (b) { a(document).unbind("mousemove." + this.widgetName, = this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, = this._mouseUpDelegate); if (this._mouseStarted) { this._mouseStarted =3D false; this._preventClickEvent =3D (b.target =3D=3D = this._mouseDownEvent.target); this._mouseStop(b) } return false }, _mouseDistanceMet: function (b) { return (Math.max(Math.abs(this._mouseDownEvent.pageX - = b.pageX), Math.abs(this._mouseDownEvent.pageY - b.pageY)) >=3D = this.options.distance) }, _mouseDelayMet: function (b) { return this.mouseDelayMet }, _mouseStart: function (b) {}, _mouseDrag: function (b) {}, _mouseStop: function (b) {}, _mouseCapture: function (b) { return true } }) })(jQuery);; /* * jQuery UI Sortable 1.8rc3 * * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Sortables * * Depends: * jquery.ui.core.js * jquery.ui.mouse.js * jquery.ui.widget.js */ (function (a) { a.widget("ui.sortable", a.ui.mouse, { widgetEventPrefix: "sort", options: { appendTo: "parent", axis: false, connectWith: false, containment: false, cursor: "auto", cursorAt: false, dropOnEmpty: true, forcePlaceholderSize: false, forceHelperSize: false, grid: false, handle: false, helper: "original", items: "> *", opacity: false, placeholder: false, revert: false, scroll: true, scrollSensitivity: 20, scrollSpeed: 20, scope: "default", tolerance: "intersect", zIndex: 1000 }, _create: function () { var b =3D this.options; this.containerCache =3D {}; this.element.addClass("ui-sortable"); this.refresh(); this.floating =3D this.items.length ? = (/left|right/).test(this.items[0].item.css("float")) : false;this.offset = =3D this.element.offset();this._mouseInit() }, destroy: function () { this.element.removeClass("ui-sortable = ui-sortable-disabled").removeData("sortable").unbind(".sortable"); this._mouseDestroy(); for (var b =3D this.items.length - 1; b >=3D 0; b--) { this.items[b].item.removeData("sortable-item") } return this }, _mouseCapture: function (e, f) { if (this.reverting) { return false } if (this.options.disabled || this.options.type =3D=3D = "static") { return false } this._refreshItems(e); var d =3D null, c =3D this, b =3D a(e.target).parents().each(function () { if (a.data(this, "sortable-item") =3D=3D c) { d =3D a(this); return false } }); if (a.data(e.target, "sortable-item") =3D=3D c) { d =3D a(e.target) } if (!d) { return false } if (this.options.handle && !f) { var g =3D false; a(this.options.handle, = d).find("*").andSelf().each(function () { if (this =3D=3D e.target) { g =3D true } }); if (!g) { return false } } this.currentItem =3D d; this._removeCurrentsFromItems(); return true }, _mouseStart: function (e, f, b) { var g =3D this.options, c =3D this; this.currentContainer =3D this; this.refreshPositions(); this.helper =3D this._createHelper(e); this._cacheHelperProportions(); this._cacheMargins(); this.scrollParent =3D this.helper.scrollParent(); this.offset =3D this.currentItem.offset(); this.offset =3D { top: this.offset.top - this.margins.top, left: this.offset.left - this.margins.left }; this.helper.css("position", "absolute"); this.cssPosition =3D this.helper.css("position"); a.extend(this.offset, { click: { left: e.pageX - this.offset.left, top: e.pageY - this.offset.top }, parent: this._getParentOffset(), relative: this._getRelativeOffset() }); this.originalPosition =3D this._generatePosition(e); this.originalPageX =3D e.pageX; this.originalPageY =3D e.pageY; (g.cursorAt && this._adjustOffsetFromHelper(g.cursorAt)); this.domPosition =3D { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; if (this.helper[0] !=3D this.currentItem[0]) { this.currentItem.hide() } this._createPlaceholder(); if (g.containment) { this._setContainment() } if (g.cursor) { if (a("body").css("cursor")) { this._storedCursor =3D a("body").css("cursor") } a("body").css("cursor", g.cursor) } if (g.opacity) { if (this.helper.css("opacity")) { this._storedOpacity =3D this.helper.css("opacity") } this.helper.css("opacity", g.opacity) } if (g.zIndex) { if (this.helper.css("zIndex")) { this._storedZIndex =3D this.helper.css("zIndex") } this.helper.css("zIndex", g.zIndex) } if (this.scrollParent[0] !=3D document && = this.scrollParent[0].tagName !=3D "HTML") { this.overflowOffset =3D this.scrollParent.offset() } this._trigger("start", e, this._uiHash()); if (!this._preserveHelperProportions) { this._cacheHelperProportions() } if (!b) { for (var d =3D this.containers.length - 1; d >=3D 0; = d--) { this.containers[d]._trigger("activate", e, = c._uiHash(this)) } } if (a.ui.ddmanager) { a.ui.ddmanager.current =3D this } if (a.ui.ddmanager && !g.dropBehaviour) { a.ui.ddmanager.prepareOffsets(this, e) } this.dragging =3D true; this.helper.addClass("ui-sortable-helper"); this._mouseDrag(e); return true }, _mouseDrag: function (f) { this.position =3D this._generatePosition(f); this.positionAbs =3D this._convertPositionTo("absolute"); if (!this.lastPositionAbs) { this.lastPositionAbs =3D this.positionAbs } if (this.options.scroll) { var g =3D this.options, b =3D false; if (this.scrollParent[0] !=3D document && = this.scrollParent[0].tagName !=3D "HTML") { if ((this.overflowOffset.top + = this.scrollParent[0].offsetHeight) - f.pageY < g.scrollSensitivity) { this.scrollParent[0].scrollTop =3D b =3D = this.scrollParent[0].scrollTop + g.scrollSpeed } else { if (f.pageY - this.overflowOffset.top < = g.scrollSensitivity) { this.scrollParent[0].scrollTop =3D b =3D = this.scrollParent[0].scrollTop - g.scrollSpeed } } if ((this.overflowOffset.left + = this.scrollParent[0].offsetWidth) - f.pageX < g.scrollSensitivity) { this.scrollParent[0].scrollLeft =3D b =3D = this.scrollParent[0].scrollLeft + g.scrollSpeed } else { if (f.pageX - this.overflowOffset.left < = g.scrollSensitivity) { this.scrollParent[0].scrollLeft =3D b =3D = this.scrollParent[0].scrollLeft - g.scrollSpeed } } } else { if (f.pageY - a(document).scrollTop() < = g.scrollSensitivity) { b =3D = a(document).scrollTop(a(document).scrollTop() - g.scrollSpeed) } else { if (a(window).height() - (f.pageY - = a(document).scrollTop()) < g.scrollSensitivity) { b =3D = a(document).scrollTop(a(document).scrollTop() + g.scrollSpeed) } } if (f.pageX - a(document).scrollLeft() < = g.scrollSensitivity) { b =3D = a(document).scrollLeft(a(document).scrollLeft() - g.scrollSpeed) } else { if (a(window).width() - (f.pageX - = a(document).scrollLeft()) < g.scrollSensitivity) { b =3D = a(document).scrollLeft(a(document).scrollLeft() + g.scrollSpeed) } } } if (b !=3D=3D false && a.ui.ddmanager && = !g.dropBehaviour) { a.ui.ddmanager.prepareOffsets(this, f) } } this.positionAbs =3D this._convertPositionTo("absolute"); if (!this.options.axis || this.options.axis !=3D "y") { this.helper[0].style.left =3D this.position.left + "px" } if (!this.options.axis || this.options.axis !=3D "x") { this.helper[0].style.top =3D this.position.top + "px" } for (var d =3D this.items.length - 1; d >=3D 0; d--) { var e =3D this.items[d], c =3D e.item[0], h =3D this._intersectsWithPointer(e); if (!h) { continue } if (c !=3D this.currentItem[0] && this.placeholder[h = =3D=3D 1 ? "next" : "prev"]()[0] !=3D c && = !a.ui.contains(this.placeholder[0], c) && (this.options.type =3D=3D = "semi-dynamic" ? !a.ui.contains(this.element[0], c) : true)) { this.direction =3D h =3D=3D 1 ? "down" : "up"; if (this.options.tolerance =3D=3D "pointer" || = this._intersectsWithSides(e)) { this._rearrange(f, e) } else { break } this._trigger("change", f, this._uiHash()); break } } this._contactContainers(f); if (a.ui.ddmanager) { a.ui.ddmanager.drag(this, f) } this._trigger("sort", f, this._uiHash()); this.lastPositionAbs =3D this.positionAbs; return false }, _mouseStop: function (c, d) { if (!c) { return } if (a.ui.ddmanager && !this.options.dropBehaviour) { a.ui.ddmanager.drop(this, c) } if (this.options.revert) { var b =3D this; var e =3D b.placeholder.offset(); b.reverting =3D true; a(this.helper).animate({ left: e.left - this.offset.parent.left - = b.margins.left + (this.offsetParent[0] =3D=3D document.body ? 0 : = this.offsetParent[0].scrollLeft), top: e.top - this.offset.parent.top - b.margins.top = + (this.offsetParent[0] =3D=3D document.body ? 0 : = this.offsetParent[0].scrollTop) }, parseInt(this.options.revert, 10) || 500, function () = { b._clear(c) }) } else { this._clear(c, d) } return false }, cancel: function () { var b =3D this; if (this.dragging) { this._mouseUp(); if (this.options.helper =3D=3D "original") { = this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") } else { this.currentItem.show() } for (var c =3D this.containers.length - 1; c >=3D 0; = c--) { this.containers[c]._trigger("deactivate", null, = b._uiHash(this)); if (this.containers[c].containerCache.over) { this.containers[c]._trigger("out", null, = b._uiHash(this)); this.containers[c].containerCache.over =3D 0 } } } if (this.placeholder[0].parentNode) { = this.placeholder[0].parentNode.removeChild(this.placeholder[0]) } if (this.options.helper !=3D "original" && this.helper && = this.helper[0].parentNode) { this.helper.remove() } a.extend(this, { helper: null, dragging: false, reverting: false, _noFinalSort: null }); if (this.domPosition.prev) { a(this.domPosition.prev).after(this.currentItem) } else { a(this.domPosition.parent).prepend(this.currentItem) } return this }, serialize: function (d) { var b =3D this._getItemsAsjQuery(d && d.connected); var c =3D []; d =3D d || {}; a(b).each(function () { var e =3D (a(d.item || this).attr(d.attribute || "id") = || "").match(d.expression || (/(.+)[-=3D_](.+)/)); if (e) { c.push((d.key || e[1] + "[]") + "=3D" + (d.key && = d.expression ? e[1] : e[2])) } }); return c.join("&") }, toArray: function (d) { var b =3D this._getItemsAsjQuery(d && d.connected); var c =3D []; d =3D d || {}; b.each(function () { c.push(a(d.item || this).attr(d.attribute || "id") || = "") }); return c }, _intersectsWith: function (m) { var e =3D this.positionAbs.left, d =3D e + this.helperProportions.width, k =3D this.positionAbs.top, j =3D k + this.helperProportions.height; var f =3D m.left, c =3D f + m.width, n =3D m.top, i =3D n + m.height; var o =3D this.offset.click.top, h =3D this.offset.click.left; var g =3D (k + o) > n && (k + o) < i && (e + h) > f && (e + = h) < c; if (this.options.tolerance =3D=3D "pointer" || = this.options.forcePointerForContainers || (this.options.tolerance !=3D = "pointer" && this.helperProportions[this.floating ? "width" : "height"] = > m[this.floating ? "width" : "height"])) { return g } else { return (f < e + (this.helperProportions.width / 2) && d = - (this.helperProportions.width / 2) < c && n < k + = (this.helperProportions.height / 2) && j - = (this.helperProportions.height / 2) < i) } }, _intersectsWithPointer: function (d) { var e =3D a.ui.isOverAxis(this.positionAbs.top + = this.offset.click.top, d.top, d.height), c =3D a.ui.isOverAxis(this.positionAbs.left + = this.offset.click.left, d.left, d.width), g =3D e && c, b =3D this._getDragVerticalDirection(), f =3D this._getDragHorizontalDirection(); if (!g) { return false } return this.floating ? (((f && f =3D=3D "right") || b =3D=3D = "down") ? 2 : 1) : (b && (b =3D=3D "down" ? 2 : 1)) }, _intersectsWithSides: function (e) { var c =3D a.ui.isOverAxis(this.positionAbs.top + = this.offset.click.top, e.top + (e.height / 2), e.height), d =3D a.ui.isOverAxis(this.positionAbs.left + = this.offset.click.left, e.left + (e.width / 2), e.width), b =3D this._getDragVerticalDirection(), f =3D this._getDragHorizontalDirection(); if (this.floating && f) { return ((f =3D=3D "right" && d) || (f =3D=3D "left" && = !d)) } else { return b && ((b =3D=3D "down" && c) || (b =3D=3D "up" && = !c)) } }, _getDragVerticalDirection: function () { var b =3D this.positionAbs.top - this.lastPositionAbs.top; return b !=3D 0 && (b > 0 ? "down" : "up") }, _getDragHorizontalDirection: function () { var b =3D this.positionAbs.left - this.lastPositionAbs.left; return b !=3D 0 && (b > 0 ? "right" : "left") }, refresh: function (b) { this._refreshItems(b); this.refreshPositions(); return this }, _connectWith: function () { var b =3D this.options; return b.connectWith.constructor =3D=3D String ? = [b.connectWith] : b.connectWith }, _getItemsAsjQuery: function (b) { var l =3D this; var g =3D []; var e =3D []; var h =3D this._connectWith(); if (h && b) { for (var d =3D h.length - 1; d >=3D 0; d--) { var k =3D a(h[d]); for (var c =3D k.length - 1; c >=3D 0; c--) { var f =3D a.data(k[c], "sortable"); if (f && f !=3D this && !f.options.disabled) { e.push([a.isFunction(f.options.items) ? = f.options.items.call(f.element) : a(f.options.items, = f.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), f]) } } } } e.push([a.isFunction(this.options.items) ? = this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : a(this.options.items, = this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),= this]); for (var d =3D e.length - 1; d >=3D 0; d--) { e[d][0].each(function () { g.push(this) }) } return a(g) }, _removeCurrentsFromItems: function () { var d =3D this.currentItem.find(":data(sortable-item)"); for (var c =3D 0; c < this.items.length; c++) { for (var b =3D 0; b < d.length; b++) { if (d[b] =3D=3D this.items[c].item[0]) { this.items.splice(c, 1) } } } }, _refreshItems: function (b) { this.items =3D []; this.containers =3D [this]; var h =3D this.items; var p =3D this; var f =3D [ [a.isFunction(this.options.items) ? = this.options.items.call(this.element[0], b, { item: this.currentItem }) : a(this.options.items, this.element), this] ]; var l =3D this._connectWith(); if (l) { for (var e =3D l.length - 1; e >=3D 0; e--) { var m =3D a(l[e]); for (var d =3D m.length - 1; d >=3D 0; d--) { var g =3D a.data(m[d], "sortable"); if (g && g !=3D this && !g.options.disabled) { f.push([a.isFunction(g.options.items) ? = g.options.items.call(g.element[0], b, { item: this.currentItem }) : a(g.options.items, g.element), g]); this.containers.push(g) } } } } for (var e =3D f.length - 1; e >=3D 0; e--) { var k =3D f[e][1]; var c =3D f[e][0]; for (var d =3D 0, n =3D c.length; d < n; d++) { var o =3D a(c[d]); o.data("sortable-item", k); h.push({ item: o, instance: k, width: 0, height: 0, left: 0, top: 0 }) } } }, refreshPositions: function (b) { if (this.offsetParent && this.helper) { this.offset.parent =3D this._getParentOffset() } for (var d =3D this.items.length - 1; d >=3D 0; d--) { var e =3D this.items[d]; var c =3D this.options.toleranceElement ? = a(this.options.toleranceElement, e.item) : e.item; if (!b) { e.width =3D c.outerWidth(); e.height =3D c.outerHeight() } var f =3D c.offset();e.left =3D f.left;e.top =3D f.top } if (this.options.custom && = this.options.custom.refreshContainers) { this.options.custom.refreshContainers.call(this) } else { for (var d =3D this.containers.length - 1; d >=3D 0; = d--) { var f =3D this.containers[d].element.offset(); this.containers[d].containerCache.left =3D f.left; this.containers[d].containerCache.top =3D f.top; this.containers[d].containerCache.width =3D = this.containers[d].element.outerWidth(); this.containers[d].containerCache.height =3D = this.containers[d].element.outerHeight() } } return this }, _createPlaceholder: function (d) { var b =3D d || this, e =3D b.options; if (!e.placeholder || e.placeholder.constructor =3D=3D = String) { var c =3D e.placeholder; e.placeholder =3D { element: function () { var f =3D = a(document.createElement(b.currentItem[0].nodeName)).addClass(c || = b.currentItem[0].className + " = ui-sortable-placeholder").removeClass("ui-sortable-helper")[0]; if (!c) { f.style.visibility =3D "hidden" } return f }, update: function (f, g) { if (c && !e.forcePlaceholderSize) { return } if (!g.height()) { g.height(b.currentItem.innerHeight() - = parseInt(b.currentItem.css("paddingTop") || 0, 10) - = parseInt(b.currentItem.css("paddingBottom") || 0, 10)) } if (!g.width()) { g.width(b.currentItem.innerWidth() - = parseInt(b.currentItem.css("paddingLeft") || 0, 10) - = parseInt(b.currentItem.css("paddingRight") || 0, 10)) } } } } b.placeholder =3D a(e.placeholder.element.call(b.element, = b.currentItem)); b.currentItem.after(b.placeholder); e.placeholder.update(b, b.placeholder) }, _contactContainers: function (b) { var d =3D null, k =3D null; for (var f =3D this.containers.length - 1; f >=3D 0; f--) { if (a.ui.contains(this.currentItem[0], = this.containers[f].element[0])) { continue } if = (this._intersectsWith(this.containers[f].containerCache)) { if (d && = a.ui.contains(this.containers[f].element[0], d.element[0])) { continue } d =3D this.containers[f]; k =3D f } else { if (this.containers[f].containerCache.over) { this.containers[f]._trigger("out", b, = this._uiHash(this)); this.containers[f].containerCache.over =3D 0 } } } if (!d) { return } if (this.currentContainer !=3D this.containers[k]) { var h =3D 10000; var g =3D null; var c =3D this.positionAbs[this.containers[k].floating ? = "left" : "top"]; for (var e =3D this.items.length - 1; e >=3D 0; e--) { if (!a.ui.contains(this.containers[k].element[0], = this.items[e].item[0])) { continue } var l =3D this.items[e][this.containers[k].floating = ? "left" : "top"]; if (Math.abs(l - c) < h) { h =3D Math.abs(l - c); g =3D this.items[e] } } if (!g && !this.options.dropOnEmpty) { return } this.currentContainer =3D this.containers[k]; g ? this._rearrange(b, g, null, true) : = this._rearrange(b, null, this.containers[k].element, = true);this._trigger("change", b, = this._uiHash());this.containers[k]._trigger("change", b, = this._uiHash(this));this.options.placeholder.update(this.currentContainer= , this.placeholder);this.containers[k]._trigger("over", b, = this._uiHash(this));this.containers[k].containerCache.over =3D 1 } }, _createHelper: function (c) { var d =3D this.options; var b =3D a.isFunction(d.helper) ? = a(d.helper.apply(this.element[0], [c, this.currentItem])) : (d.helper = =3D=3D "clone" ? this.currentItem.clone() : this.currentItem); if (!b.parents("body").length) { a(d.appendTo !=3D "parent" ? d.appendTo : = this.currentItem[0].parentNode)[0].appendChild(b[0]) } if (b[0] =3D=3D this.currentItem[0]) { this._storedCSS =3D { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") } } if (b[0].style.width =3D=3D "" || d.forceHelperSize) { b.width(this.currentItem.width()) } if (b[0].style.height =3D=3D "" || d.forceHelperSize) { b.height(this.currentItem.height()) } return b }, _adjustOffsetFromHelper: function (b) { if (typeof b =3D=3D "string") { b =3D b.split(" ") } if (a.isArray(b)) { b =3D { left: +b[0], top: +b[1] || 0 } } if ("left" in b) { this.offset.click.left =3D b.left + this.margins.left } if ("right" in b) { this.offset.click.left =3D this.helperProportions.width = - b.right + this.margins.left } if ("top" in b) { this.offset.click.top =3D b.top + this.margins.top } if ("bottom" in b) { this.offset.click.top =3D this.helperProportions.height = - b.bottom + this.margins.top } }, _getParentOffset: function () { this.offsetParent =3D this.helper.offsetParent(); var b =3D this.offsetParent.offset(); if (this.cssPosition =3D=3D "absolute" && = this.scrollParent[0] !=3D document && = a.ui.contains(this.scrollParent[0], this.offsetParent[0])) { b.left +=3D this.scrollParent.scrollLeft(); b.top +=3D this.scrollParent.scrollTop() } if ((this.offsetParent[0] =3D=3D document.body) || = (this.offsetParent[0].tagName && = this.offsetParent[0].tagName.toLowerCase() =3D=3D "html" && = a.browser.msie)) { b =3D { top: 0, left: 0 } } return { top: b.top + = (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: b.left + = (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) } }, _getRelativeOffset: function () { if (this.cssPosition =3D=3D "relative") { var b =3D this.currentItem.position(); return { top: b.top - (parseInt(this.helper.css("top"), 10) = || 0) + this.scrollParent.scrollTop(), left: b.left - (parseInt(this.helper.css("left"), = 10) || 0) + this.scrollParent.scrollLeft() } } else { return { top: 0, left: 0 } } }, _cacheMargins: function () { this.margins =3D { left: (parseInt(this.currentItem.css("marginLeft"), 10) = || 0), top: (parseInt(this.currentItem.css("marginTop"), 10) || = 0) } }, _cacheHelperProportions: function () { this.helperProportions =3D { width: this.helper.outerWidth(), height: this.helper.outerHeight() } }, _setContainment: function () { var e =3D this.options; if (e.containment =3D=3D "parent") { e.containment =3D this.helper[0].parentNode } if (e.containment =3D=3D "document" || e.containment =3D=3D = "window") { this.containment =3D [0 - this.offset.relative.left - = this.offset.parent.left, 0 - this.offset.relative.top - = this.offset.parent.top, a(e.containment =3D=3D "document" ? document : = window).width() - this.helperProportions.width - this.margins.left, = (a(e.containment =3D=3D "document" ? document : window).height() || = document.body.parentNode.scrollHeight) - this.helperProportions.height - = this.margins.top] } if (!(/^(document|window|parent)$/).test(e.containment)) { var c =3D a(e.containment)[0]; var d =3D a(e.containment).offset(); var b =3D (a(c).css("overflow") !=3D "hidden"); this.containment =3D [d.left + = (parseInt(a(c).css("borderLeftWidth"), 10) || 0) + = (parseInt(a(c).css("paddingLeft"), 10) || 0) - this.margins.left, d.top = + (parseInt(a(c).css("borderTopWidth"), 10) || 0) + = (parseInt(a(c).css("paddingTop"), 10) || 0) - this.margins.top, d.left + = (b ? Math.max(c.scrollWidth, c.offsetWidth) : c.offsetWidth) - = (parseInt(a(c).css("borderLeftWidth"), 10) || 0) - = (parseInt(a(c).css("paddingRight"), 10) || 0) - = this.helperProportions.width - this.margins.left, d.top + (b ? = Math.max(c.scrollHeight, c.offsetHeight) : c.offsetHeight) - = (parseInt(a(c).css("borderTopWidth"), 10) || 0) - = (parseInt(a(c).css("paddingBottom"), 10) || 0) - = this.helperProportions.height - this.margins.top] } }, _convertPositionTo: function (f, h) { if (!h) { h =3D this.position } var c =3D f =3D=3D "absolute" ? 1 : -1; var e =3D this.options, b =3D this.cssPosition =3D=3D "absolute" && = !(this.scrollParent[0] !=3D document && = a.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? = this.offsetParent : this.scrollParent, g =3D (/(html|body)/i).test(b[0].tagName); return { top: (h.top + this.offset.relative.top * c + = this.offset.parent.top * c - (a.browser.safari && this.cssPosition = =3D=3D "fixed" ? 0 : (this.cssPosition =3D=3D "fixed" ? = -this.scrollParent.scrollTop() : (g ? 0 : b.scrollTop())) * c)), left: (h.left + this.offset.relative.left * c + = this.offset.parent.left * c - (a.browser.safari && this.cssPosition = =3D=3D "fixed" ? 0 : (this.cssPosition =3D=3D "fixed" ? = -this.scrollParent.scrollLeft() : g ? 0 : b.scrollLeft()) * c)) } }, _generatePosition: function (e) { var h =3D this.options, b =3D this.cssPosition =3D=3D "absolute" && = !(this.scrollParent[0] !=3D document && = a.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? = this.offsetParent : this.scrollParent, i =3D (/(html|body)/i).test(b[0].tagName); if (this.cssPosition =3D=3D "relative" && = !(this.scrollParent[0] !=3D document && this.scrollParent[0] !=3D = this.offsetParent[0])) { this.offset.relative =3D this._getRelativeOffset() } var d =3D e.pageX; var c =3D e.pageY; if (this.originalPosition) { if (this.containment) { if (e.pageX - this.offset.click.left < = this.containment[0]) { d =3D this.containment[0] + = this.offset.click.left } if (e.pageY - this.offset.click.top < = this.containment[1]) { c =3D this.containment[1] + = this.offset.click.top } if (e.pageX - this.offset.click.left > = this.containment[2]) { d =3D this.containment[2] + = this.offset.click.left } if (e.pageY - this.offset.click.top > = this.containment[3]) { c =3D this.containment[3] + = this.offset.click.top } } if (h.grid) { var g =3D this.originalPageY + Math.round((c - = this.originalPageY) / h.grid[1]) * h.grid[1]; c =3D this.containment ? (!(g - = this.offset.click.top < this.containment[1] || g - this.offset.click.top = > this.containment[3]) ? g : (!(g - this.offset.click.top < = this.containment[1]) ? g - h.grid[1] : g + h.grid[1])) : g; var f =3D this.originalPageX + Math.round((d - = this.originalPageX) / h.grid[0]) * h.grid[0];d =3D this.containment ? = (!(f - this.offset.click.left < this.containment[0] || f - = this.offset.click.left > this.containment[2]) ? f : (!(f - = this.offset.click.left < this.containment[0]) ? f - h.grid[0] : f + = h.grid[0])) : f } } return { top: (c - this.offset.click.top - = this.offset.relative.top - this.offset.parent.top + (a.browser.safari && = this.cssPosition =3D=3D "fixed" ? 0 : (this.cssPosition =3D=3D "fixed" ? = -this.scrollParent.scrollTop() : (i ? 0 : b.scrollTop())))), left: (d - this.offset.click.left - = this.offset.relative.left - this.offset.parent.left + (a.browser.safari = && this.cssPosition =3D=3D "fixed" ? 0 : (this.cssPosition =3D=3D = "fixed" ? -this.scrollParent.scrollLeft() : i ? 0 : b.scrollLeft()))) } }, _rearrange: function (g, f, c, e) { c ? c[0].appendChild(this.placeholder[0]) : = f.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction = =3D=3D "down" ? f.item[0] : f.item[0].nextSibling));this.counter =3D = this.counter ? ++this.counter : 1; var d =3D this, b =3D this.counter;window.setTimeout(function () { if (b =3D=3D d.counter) { d.refreshPositions(!e) } }, 0) }, _clear: function (d, e) { this.reverting =3D false; var f =3D [], b =3D this; if (!this._noFinalSort && this.currentItem[0].parentNode) { this.placeholder.before(this.currentItem) } this._noFinalSort =3D null; if (this.helper[0] =3D=3D this.currentItem[0]) { for (var c in this._storedCSS) { if (this._storedCSS[c] =3D=3D "auto" || = this._storedCSS[c] =3D=3D "static") { this._storedCSS[c] =3D "" } } = this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") } else { this.currentItem.show() } if (this.fromOutside && !e) { f.push(function (g) { this._trigger("receive", g, = this._uiHash(this.fromOutside)) }) } if ((this.fromOutside || this.domPosition.prev !=3D = this.currentItem.prev().not(".ui-sortable-helper")[0] || = this.domPosition.parent !=3D this.currentItem.parent()[0]) && !e) { f.push(function (g) { this._trigger("update", g, this._uiHash()) }) } if (!a.ui.contains(this.element[0], this.currentItem[0])) { if (!e) { f.push(function (g) { this._trigger("remove", g, this._uiHash()) }) } for (var c =3D this.containers.length - 1; c >=3D 0; = c--) { if (a.ui.contains(this.containers[c].element[0], = this.currentItem[0]) && !e) { f.push((function (g) { return function (h) { g._trigger("receive", h, = this._uiHash(this)) } }).call(this, this.containers[c])); f.push((function (g) { return function (h) { g._trigger("update", h, = this._uiHash(this)) } }).call(this, this.containers[c])) } } } for (var c =3D this.containers.length - 1; c >=3D 0; c--) { if (!e) { f.push((function (g) { return function (h) { g._trigger("deactivate", h, = this._uiHash(this)) } }).call(this, this.containers[c])) } if (this.containers[c].containerCache.over) { f.push((function (g) { return function (h) { g._trigger("out", h, this._uiHash(this)) } }).call(this, this.containers[c])); this.containers[c].containerCache.over =3D 0 } } if (this._storedCursor) { a("body").css("cursor", this._storedCursor) } if (this._storedOpacity) { this.helper.css("opacity", this._storedOpacity) } if (this._storedZIndex) { this.helper.css("zIndex", this._storedZIndex =3D=3D = "auto" ? "" : this._storedZIndex) } this.dragging =3D false; if (this.cancelHelperRemoval) { if (!e) { this._trigger("beforeStop", d, this._uiHash()); for (var c =3D 0; c < f.length; c++) { f[c].call(this, d) } this._trigger("stop", d, this._uiHash()) } return false } if (!e) { this._trigger("beforeStop", d, this._uiHash()) } = this.placeholder[0].parentNode.removeChild(this.placeholder[0]); if (this.helper[0] !=3D this.currentItem[0]) { this.helper.remove() } this.helper =3D null; if (!e) { for (var c =3D 0; c < f.length; c++) { f[c].call(this, d) } this._trigger("stop", d, this._uiHash()) } this.fromOutside =3D false; return true }, _trigger: function () { if (a.Widget.prototype._trigger.apply(this, arguments) = =3D=3D=3D false) { this.cancel() } }, _uiHash: function (c) { var b =3D c || this; return { helper: b.helper, placeholder: b.placeholder || a([]), position: b.position, originalPosition: b.originalPosition, offset: b.positionAbs, item: b.currentItem, sender: c ? c.element : null } } }); a.extend(a.ui.sortable, { version: "1.8rc3" }) })(jQuery);; /* * jQuery UI Accordion 1.8rc3 * * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Accordion * * Depends: * jquery.ui.core.js * jquery.ui.widget.js */ (function (a) { a.widget("ui.accordion", { options: { active: 0, animated: "slide", autoHeight: true, clearStyle: false, collapsible: false, event: "click", fillSpace: false, header: "> li > :first-child,> :not(li):even", icons: { header: "ui-icon-triangle-1-e", headerSelected: "ui-icon-triangle-1-s" }, navigation: false, navigationFilter: function () { return this.href.toLowerCase() =3D=3D = location.href.toLowerCase() } }, _create: function () { var d =3D this.options, b =3D this; this.running =3D 0; this.element.addClass("ui-accordion ui-widget = ui-helper-reset"); if (this.element[0].nodeName =3D=3D "UL") { = this.element.children("li").addClass("ui-accordion-li-fix") } this.headers =3D = this.element.find(d.header).addClass("ui-accordion-header = ui-helper-reset ui-state-default = ui-corner-all").bind("mouseenter.accordion", function () { a(this).addClass("ui-state-hover") }).bind("mouseleave.accordion", function () { a(this).removeClass("ui-state-hover") }).bind("focus.accordion", function () { a(this).addClass("ui-state-focus") }).bind("blur.accordion", function () { a(this).removeClass("ui-state-focus") }); this.headers.next().addClass("ui-accordion-content = ui-helper-reset ui-widget-content ui-corner-bottom"); if (d.navigation) { var c =3D = this.element.find("a").filter(d.navigationFilter); if (c.length) { var e =3D c.closest(".ui-accordion-header"); if (e.length) { this.active =3D e } else { this.active =3D = c.closest(".ui-accordion-content").prev() } } } this.active =3D this._findActive(this.active || = d.active).toggleClass("ui-state-default").toggleClass("ui-state-active").= toggleClass("ui-corner-all").toggleClass("ui-corner-top"); this.active.next().addClass("ui-accordion-content-active"); this._createIcons(); if (a.browser.msie) { this.element.find("a").css("zoom", "1") } this.resize(); this.element.attr("role", "tablist"); this.headers.attr("role", "tab").bind("keydown", function = (f) { return b._keydown(f) }).next().attr("role", "tabpanel"); this.headers.not(this.active || "").attr("aria-expanded", = "false").attr("tabIndex", "-1").next().hide(); if (!this.active.length) { this.headers.eq(0).attr("tabIndex", "0") } else { this.active.attr("aria-expanded", = "true").attr("tabIndex", "0") } if (!a.browser.safari) { this.headers.find("a").attr("tabIndex", "-1") } if (d.event) { this.headers.bind((d.event) + ".accordion", function (f) = { b._clickHandler.call(b, f, this); f.preventDefault() }) } }, _createIcons: function () { var b =3D this.options; if (b.icons) { a("").addClass("ui-icon " + = b.icons.header).prependTo(this.headers); = this.active.find(".ui-icon").toggleClass(b.icons.header).toggleClass(b.ic= ons.headerSelected); this.element.addClass("ui-accordion-icons") } }, _destroyIcons: function () { this.headers.children(".ui-icon").remove(); this.element.removeClass("ui-accordion-icons") }, destroy: function () { var c =3D this.options; this.element.removeClass("ui-accordion ui-widget = ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("acc= ordion"); = this.headers.unbind(".accordion").removeClass("ui-accordion-header = ui-helper-reset ui-state-default ui-corner-all ui-state-active = ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr= ("tabindex"); this.headers.find("a").removeAttr("tabindex"); this._destroyIcons(); var b =3D this.headers.next().css("display", = "").removeAttr("role").removeClass("ui-helper-reset ui-widget-content = ui-corner-bottom ui-accordion-content ui-accordion-content-active"); if (c.autoHeight || c.fillHeight) { b.css("height", "") } return this }, _setOption: function (b, c) { a.Widget.prototype._setOption.apply(this, arguments); if (b =3D=3D "active") { this.activate(c) } if (b =3D=3D "icons") { this._destroyIcons(); if (c) { this._createIcons() } } }, _keydown: function (e) { var g =3D this.options, f =3D a.ui.keyCode; if (g.disabled || e.altKey || e.ctrlKey) { return } var d =3D this.headers.length; var b =3D this.headers.index(e.target); var c =3D false; switch (e.keyCode) { case f.RIGHT: case f.DOWN: c =3D this.headers[(b + 1) % d]; break; case f.LEFT: case f.UP: c =3D this.headers[(b - 1 + d) % d]; break; case f.SPACE: case f.ENTER: this._clickHandler({ target: e.target }, e.target); e.preventDefault() } if (c) { a(e.target).attr("tabIndex", "-1"); a(c).attr("tabIndex", "0"); c.focus(); return false } return true }, resize: function () { var d =3D this.options, c; if (d.fillSpace) { if (a.browser.msie) { var b =3D this.element.parent().css("overflow"); this.element.parent().css("overflow", "hidden") } c =3D this.element.parent().height(); if (a.browser.msie) { this.element.parent().css("overflow", b) } this.headers.each(function () { c -=3D a(this).outerHeight(true) }); this.headers.next().each(function () { a(this).height(Math.max(0, c - a(this).innerHeight() = + a(this).height())) }).css("overflow", "auto") } else { if (d.autoHeight) { c =3D 0; this.headers.next().each(function () { c =3D Math.max(c, a(this).height()) }).height(c) } } return this }, activate: function (b) { this.options.active =3D b; var c =3D this._findActive(b)[0]; this._clickHandler({ target: c }, c); return this }, _findActive: function (b) { return b ? typeof b =3D=3D "number" ? = this.headers.filter(":eq(" + b + ")") : = this.headers.not(this.headers.not(b)) : b =3D=3D=3D false ? a([]) : = this.headers.filter(":eq(0)") }, _clickHandler: function (b, f) { var d =3D this.options; if (d.disabled) { return } if (!b.target) { if (!d.collapsible) { return } this.active.removeClass("ui-state-active = ui-corner-top").addClass("ui-state-default = ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addC= lass(d.icons.header); = this.active.next().addClass("ui-accordion-content-active"); var h =3D this.active.next(), e =3D { options: d, newHeader: a([]), oldHeader: d.active, newContent: a([]), oldContent: h }, c =3D (this.active =3D a([])); this._toggle(c, h, e); return } var g =3D a(b.currentTarget || f); var i =3D g[0] =3D=3D this.active[0]; d.active =3D d.collapsible && i ? false : = a(".ui-accordion-header", this.element).index(g); if (this.running || (!d.collapsible && i)) { return } this.active.removeClass("ui-state-active = ui-corner-top").addClass("ui-state-default = ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addC= lass(d.icons.header); if (!i) { g.removeClass("ui-state-default = ui-corner-all").addClass("ui-state-active = ui-corner-top").find(".ui-icon").removeClass(d.icons.header).addClass(d.i= cons.headerSelected); g.next().addClass("ui-accordion-content-active") } var c =3D g.next(), h =3D this.active.next(), e =3D { options: d, newHeader: i && d.collapsible ? a([]) : g, oldHeader: this.active, newContent: i && d.collapsible ? a([]) : c, oldContent: h }, j =3D this.headers.index(this.active[0]) > = this.headers.index(g[0]);this.active =3D i ? a([]) : g;this._toggle(c, = h, e, i, j); return }, _toggle: function (b, i, g, j, k) { var d =3D this.options, m =3D this; this.toShow =3D b; this.toHide =3D i; this.data =3D g; var c =3D function () { if (!m) { return } return m._completed.apply(m, arguments) }; this._trigger("changestart", null, this.data); this.running =3D i.size() =3D=3D=3D 0 ? b.size() : i.size(); if (d.animated) { var f =3D {}; if (d.collapsible && j) { f =3D { toShow: a([]), toHide: i, complete: c, down: k, autoHeight: d.autoHeight || d.fillSpace } } else { f =3D { toShow: b, toHide: i, complete: c, down: k, autoHeight: d.autoHeight || d.fillSpace } } if (!d.proxied) { d.proxied =3D d.animated } if (!d.proxiedDuration) { d.proxiedDuration =3D d.duration } d.animated =3D a.isFunction(d.proxied) ? d.proxied(f) : = d.proxied;d.duration =3D a.isFunction(d.proxiedDuration) ? = d.proxiedDuration(f) : d.proxiedDuration; var l =3D a.ui.accordion.animations, e =3D d.duration, h =3D d.animated; if (h && !l[h] && !a.easing[h]) { h =3D "slide" } if (!l[h]) { l[h] =3D function (n) { this.slide(n, { easing: h, duration: e || 700 }) } } l[h](f) } else { if (d.collapsible && j) { b.toggle() } else { i.hide(); b.show() } c(true) } i.prev().attr("aria-expanded", "false").attr("tabIndex", = "-1").blur();b.prev().attr("aria-expanded", "true").attr("tabIndex", = "0").focus() }, _completed: function (b) { var c =3D this.options; this.running =3D b ? 0 : --this.running; if (this.running) { return } if (c.clearStyle) { this.toShow.add(this.toHide).css({ height: "", overflow: "" }) } = this.toHide.removeClass("ui-accordion-content-active");this._trigger("cha= nge", null, this.data) } }); a.extend(a.ui.accordion, { version: "1.8rc3", animations: { slide: function (j, h) { j =3D a.extend({ easing: "swing", duration: 300 }, j, h); if (!j.toHide.size()) { j.toShow.animate({ height: "show" }, j); return } if (!j.toShow.size()) { j.toHide.animate({ height: "hide" }, j); return } var c =3D j.toShow.css("overflow"), g =3D 0, d =3D {}, f =3D {}, e =3D ["height", "paddingTop", "paddingBottom"], b; var i =3D j.toShow; b =3D i[0].style.width; i.width(parseInt(i.parent().width(), 10) - = parseInt(i.css("paddingLeft"), 10) - parseInt(i.css("paddingRight"), 10) = - (parseInt(i.css("borderLeftWidth"), 10) || 0) - = (parseInt(i.css("borderRightWidth"), 10) || 0)); a.each(e, function (k, m) { f[m] =3D "hide"; var l =3D ("" + a.css(j.toShow[0], = m)).match(/^([\d+-.]+)(.*)$/); d[m] =3D { value: l[1], unit: l[2] || "px" } }); j.toShow.css({ height: 0, overflow: "hidden" }).show(); = j.toHide.filter(":hidden").each(j.complete).end().filter(":visible").anim= ate(f, { step: function (k, l) { if (l.prop =3D=3D "height") { g =3D (l.end - l.start =3D=3D=3D 0) ? 0 : = (l.now - l.start) / (l.end - l.start) } j.toShow[0].style[l.prop] =3D (g * = d[l.prop].value) + d[l.prop].unit }, duration: j.duration, easing: j.easing, complete: function () { if (!j.autoHeight) { j.toShow.css("height", "") } j.toShow.css("width", b); j.toShow.css({ overflow: c }); j.complete() } }) }, bounceslide: function (b) { this.slide(b, { easing: b.down ? "easeOutBounce" : "swing", duration: b.down ? 1000 : 200 }) } } }) })(jQuery);; ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://www.scopus.com/gzip_811761059/bundles/remoteAccMsg.js =0A= function showRemoteAccPopUp(message,timeOut)=0A= {document.getElementById("popUpDisplay").style.display=3D"block";setCente= rAlign();setTimeout(hideRemoteAccessModalBox,timeOut);}=0A= function hideRemoteAccessModalBox()=0A= {document.getElementById("popUpDisplay").style.display=3D"none";}=0A= function setCenterAlign()=0A= {var msgBox=3Ddocument.getElementById('modalWindowMsgBox');var = winWidth=3DgetWindowWidth();var winHeight=3DgetWindowHeight();var = top=3D(winHeight-msgBox.offsetHeight)/2;var = left=3D(winWidth-msgBox.offsetWidth)/2;msgBox.style.top=3Dtop+'px';msgBox= .style.left=3Dleft+'px';document.getElementById('modalWindow').style.heig= ht=3DwinHeight+'px';};function getWindowHeight()=0A= {var = myHeight=3D0;if(typeof(window.innerWidth)=3D=3D'number'){myHeight=3Dwindo= w.innerHeight;}else = if(document.documentElement&&(document.documentElement.clientWidth||docum= ent.documentElement.clientHeight)){myHeight=3Ddocument.documentElement.cl= ientHeight;}else = if(document.body&&(document.body.clientWidth||document.body.clientHeight)= ){myHeight=3Ddocument.body.clientHeight;}=0A= return myHeight;};function getWindowWidth()=0A= {var = myWidth=3D0;if(typeof(window.innerWidth)=3D=3D'number'){myWidth=3Dwindow.= innerWidth;}else = if(document.documentElement&&(document.documentElement.clientWidth||docum= ent.documentElement.clientHeight)){myWidth=3Ddocument.documentElement.cli= entWidth;}else = if(document.body&&(document.body.clientWidth||document.body.clientHeight)= ){myWidth=3Ddocument.body.clientWidth;}=0A= return myWidth;}; ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://www.scopus.com/gzip_N1905502271/bundles/AllBottom.js =0A= function = openFormhelp(pageToLoad,winName,width,height,center){args=3DgetArgs(width= ,height,center,0,0);if((parseInt(navigator.appVersion)>=3D4)&&(center)){i= f(window.formhelp){formhelp.close();formhelp=3Dwindow.open(pageToLoad,win= Name,args);}}=0A= formhelp=3Dwindow.open(pageToLoad,winName,args);return false;}=0A= function openSeperateWindow(pageToLoad,winName,width,height,center)=0A= {if(winName=3D=3D'popuptip'){loc=3D2}else{loc=3D0}=0A= args=3DgetArgs(width,height,center,0,loc);if((parseInt(navigator.appVersi= on)>=3D4)&&(center)){if(window.sepwindow){sepwindow.close();sepwindow=3Dw= indow.open(pageToLoad,winName,args);}}=0A= sepwindow=3Dwindow.open(pageToLoad,winName,args);return false;}=0A= function = openGlobalhelp(pageToLoad,winName,width,height,center){if(winName=3D=3D'p= opuptip'){loc=3D2}else{loc=3D0}=0A= args=3DgetArgs(width,height,center,0,loc);if((parseInt(navigator.appVersi= on)>=3D4)&&(center)){if(window.globalhelp){globalhelp.close();globalhelp=3D= window.open(pageToLoad,winName,args);}}=0A= globalhelp=3Dwindow.open(pageToLoad,winName,args);return false;}=0A= function = getArgs(width,height,center,menu,loc){xposition=3D10;yposition=3D10;if((p= arseInt(navigator.appVersion)>=3D4)&&(center)){if(loc=3D=3D0){xposition=3D= (screen.width-width)-10;yposition=3D(screen.height-height)-58;}=0A= else = if(loc=3D=3D1){xposition=3D(screen.width-width)/2;yposition=3D((screen.he= ight-height)/2)-67;}=0A= else if(loc=3D=3D2){xposition=3D(screen.width-width)-10;yposition=3D0;}}=0A= if(navigator.appName=3D=3D'Netscape'){width=3Dwidth+25;height=3Dheight+25= ;}=0A= args=3D"width=3D"+width+",height=3D"+height=0A= +",toolbar=3D"+menu+",menubar=3D"+menu=0A= +",screenx=3D"+xposition+",screeny=3D"+yposition=0A= +",left=3D"+xposition+",top=3D"+yposition=0A= +",resizable=3D1,scrollbars=3D1,";return args;}=0A= function = openSizedWindow(url,winname){if((navigator.appName=3D=3D"Microsoft = Internet Explorer")&&(parseFloat(navigator.appVersion)<4))=0A= {return false;}=0A= var = parms=3D'width=3D750'+',height=3D450'+',screenX=3D0'+',screenY=3D0'+',lef= t=3D0'+',top=3D0'+',status=3Dyes,toolbar=3Dyes,menubar=3Dyes,location=3Dy= es'+',scrollbars=3Dyes,resizable=3Dyes';win=3Dwindow.open(url,winname,par= ms);win.focus();return false;}=0A= function = openBareWindow(url,winname){if((navigator.appName=3D=3D"Microsoft = Internet Explorer")&&(parseFloat(navigator.appVersion)<4))=0A= {return false;}=0A= var = parms=3D'width=3D750'+',height=3D450'+',screenX=3D0'+',screenY=3D0'+',lef= t=3D0'+',top=3D0'+',status=3Dno,toolbar=3Dno,menubar=3Dno,location=3Dno'+= ',scrollbars=3Dno,resizable=3Dno';win=3Dwindow.open(url,winname,parms);wi= n.focus();return false;}=0A= function = openPopUpWindow(url,title,width,height,pos,menubar,toolbar,status,resizab= le,scrollbars,location){var = features=3DcreateWindowFeatures(width,height,pos,menubar,toolbar,status,r= esizable,scrollbars,location);return window.open(url,title,features);}=0A= function = createWindowFeatures(width,height,pos,menubar,toolbar,status,resizable,sc= rollbars,location){var xpos=3D0;var ypos=3D0;var xfudge=3D20;var = yfudge=3D40;switch(pos){case 1:xpos=3D0;ypos=3D0;break;case = 2:xpos=3D(screen.width-width-xfudge)/2;ypos=3D0;break;case = 3:xpos=3Dscreen.width-width-xfudge;ypos=3D0;break;case = 4:xpos=3D0;ypos=3D(screen.height-height-yfudge)/2;break;case = 5:xpos=3D(screen.width-width-xfudge)/2;ypos=3D(screen.height-height-yfudg= e)/2;break;case = 6:xpos=3Dscreen.width-width-xfudge;ypos=3D(screen.height-height-yfudge)/2= ;break;case 7:xpos=3D0;ypos=3D(screen.height-height-yfudge);break;case = 8:xpos=3D(screen.width-width-xfudge)/2;ypos=3D(screen.height-height-yfudg= e);break;case = 9:xpos=3D(screen.width-width-xfudge);ypos=3D(screen.height-height-yfudge-= 20);break;case 10:xpos=3D(screen.width-width-10);ypos=3D0;break;}=0A= args=3D"width=3D"+width+",height=3D"+height+",screenx=3D"+xpos+",left=3D"= +xpos+",screeny=3D"+ypos+",top=3D"+ypos+",menubar=3D"+menubar+",toolbar=3D= "+toolbar+",location=3D"+location+",status=3D"+status+",resizable=3D"+res= izable+",scrollbars=3D"+scrollbars;return args;}=0A= function getJSCheckedUrl(url){url=3Durl+"&javascript=3Dt";return url;}=0A= function onBodyLoad()=0A= {preloadImages();writeScreenInfoCookie();}=0A= function writeScreenInfoCookie()=0A= {document.cookie=3D"screenInfo=3D"+screen.height+":"+screen.width+"; = path=3D/";}=0A= function clearForm(form){for(var = i=3D0;i=3Dopt;},maxLength:function(v,elm,opt){return = v.length<=3Dopt;},min:function(v,elm,opt){return = v>=3DparseFloat(opt);},max:function(v,elm,opt){return = v<=3DparseFloat(opt);},notOneOf:function(v,elm,opt){return = $A(opt).all(function(value){return = v!=3D=3Dvalue;});},oneOf:function(v,elm,opt){return = $A(opt).any(function(value){return = v=3D=3D=3Dvalue;});},'is':function(v,elm,opt){return = v=3D=3D=3Dopt;},isNot:function(v,elm,opt){return = v!=3D=3Dopt;},equalToField:function(v,elm,opt){return = v=3D=3D=3D$F(opt);},notEqualToField:function(v,elm,opt){return = v!=3D=3D$F(opt);},include:function(v,elm,opt){return = $A(opt).all(function(value){return = Validation.get(value).test(v,elm);});}};var = Validation=3DClass.create();Validation.prototype=3D{initialize:function(f= orm,options){this.options=3DObject.extend({onSubmit:true,stopOnFirst:fals= e,immediate:false,focusOnError:true,useTitles:false,onFormValidate:functi= on(result,form){},onElementValidate:function(result,elm){}},options||{});= this.form=3D$(form);if(this.options.onSubmit){Event.observe(this.form,'su= bmit',this.onSubmit.bind(this),false);}=0A= if(this.options.immediate){var useTitles=3Dthis.options.useTitles;var = callback=3Dthis.options.onElementValidate;Form.getElements(this.form).eac= h(function(input){Event.observe(input,'blur',function(ev){Validation.vali= date(Event.element(ev),{useTitle:useTitles,onElementValidate:callback});}= );});}},onSubmit:function(ev){if(!this.validate()){Event.stop(ev);}},vali= date:function(){var result=3Dfalse;var = useTitles=3Dthis.options.useTitles;var = callback=3Dthis.options.onElementValidate;if(this.options.stopOnFirst){re= sult=3DForm.getElements(this.form).all(function(elm){return = Validation.validate(elm,{useTitle:useTitles,onElementValidate:callback});= });}else{result=3DForm.getElements(this.form).collect(function(elm){retur= n = Validation.validate(elm,{useTitle:useTitles,onElementValidate:callback});= }).all();}=0A= if(!result&&this.options.focusOnError){Form.getElements(this.form).findAl= l(function(elm){return = $(elm).hasClassName('validation-failed');}).first().focus();}=0A= this.options.onFormValidate(result,this.form);return = result;},reset:function(){Form.getElements(this.form).each(Validation.res= et);}};Object.extend(Validation,{validate:function(elm,options){options=3D= Object.extend({useTitle:false,onElementValidate:function(result,elm){}},o= ptions||{});elm=3D$(elm);var cn=3Delm.classNames();var = result=3Dcn.all(function(value){var = test=3DValidation.test(value,elm,options.useTitle);options.onElementValid= ate(test,elm);return test;});return = result;},test:function(name,elm,useTitle){var = v=3DValidation.get(name);var = prop=3D'__advice'+name.camelize();try{if(Validation.isVisible(elm)&&!v.te= st($F(elm),elm)){if(!elm[prop]){var = advice=3DValidation.getAdvice(name,elm);if(advice=3D=3D=3Dnull){var = errorMsg=3DuseTitle?((elm&&elm.title)?elm.title:v.error):v.error;advice=3D= '';switch(el= m.type.toLowerCase()){case'checkbox':case'radio':var = p=3Delm.parentNode;if(p){new Insertion.Bottom(p,advice);}else{new = Insertion.After(elm,advice);}=0A= break;default:new Insertion.After(elm.parentNode,advice);}=0A= advice=3DValidation.getAdvice(name,elm);}=0A= if(typeof = Effect=3D=3D'undefined'){advice.style.display=3D'block';}else{new = Effect.Appear(advice,{duration:1});}}=0A= elm[prop]=3Dtrue;elm.removeClassName('validation-passed');elm.addClassNam= e('validation-failed');return false;}else{var = advice=3DValidation.getAdvice(name,elm);if(advice!=3Dnull)advice.hide();e= lm[prop]=3D'';elm.removeClassName('validation-failed');elm.addClassName('= validation-passed');return = true;}}catch(e){throw(e);}},isVisible:function(elm){while(elm.tagName!=3D= 'BODY'){if(!$(elm).visible())return false;elm=3Delm.parentNode;}=0A= return true;},getAdvice:function(name,elm){return = $('advice-'+name+'-'+Validation.getElmID(elm))||$('advice-'+Validation.ge= tElmID(elm));},getElmID:function(elm){return = elm.id?elm.id:elm.name;},reset:function(elm){elm=3D$(elm);var = cn=3Delm.classNames();cn.each(function(value){var = prop=3D'__advice'+value.camelize();if(elm[prop]){var = advice=3DValidation.getAdvice(value,elm);advice.hide();elm[prop]=3D'';}=0A= elm.removeClassName('validation-failed');elm.removeClassName('validation-= passed');});},add:function(className,error,test,options){var = nv=3D{};nv[className]=3Dnew = Validator(className,error,test,options);Object.extend(Validation.methods,= nv);},addAllThese:function(validators){var = nv=3D{};$A(validators).each(function(value){nv[value[0]]=3Dnew = Validator(value[0],value[1],value[2],(value.length>3?value[3]:{}));});Obj= ect.extend(Validation.methods,nv);},get:function(name){return = Validation.methods[name]?Validation.methods[name]:Validation.methods['_Li= keNoIDIEverSaw_'];},methods:{'_LikeNoIDIEverSaw_':new = Validator('_LikeNoIDIEverSaw_','',{})}});Validation.add('IsEmpty','',func= tion(v){return((v=3D=3Dnull)||(v.length=3D=3D0));});Validation.addAllThes= e([['required','This is a required = field.',function(v){return!Validation.get('IsEmpty').test(v);}],['validat= e-number','Please enter a valid number in this = field.',function(v){return = Validation.get('IsEmpty').test(v)||(!isNaN(v)&&!/^\s+$/.test(v));}],['val= idate-digits','Please use numbers only in this field. please avoid = spaces or other characters such as dots or commas.',function(v){return = Validation.get('IsEmpty').test(v)||!/[^\d]/.test(v);}],['validate-alpha',= 'Please use letters only (a-z) in this field.',function(v){return = Validation.get('IsEmpty').test(v)||/^[a-zA-Z]+$/.test(v)}],['validate-alp= hanum','Please use only letters (a-z) or numbers (0-9) only in this = field. No spaces or other characters are allowed.',function(v){return = Validation.get('IsEmpty').test(v)||!/\W/.test(v)}],['validate-ascii','Ple= ase use only letters (a-z) or numbers (0-9) only in this field. No = special characters are allowed.',function(v){return = Validation.get('IsEmpty').test(v)||!/\S*[^\x00-\x7f]\S*/.test(v)}],['vali= date-date','Please enter a valid = date.',function(v){if(Validation.get('IsEmpty').test(v))return true;var = regex=3D/^(\d{2})\/(\d{2})\/(\d{4})$/;if(!regex.test(v))return false;var = d=3Dnew = Date(v);return(parseInt(RegExp.$2,10)=3D=3D(1+d.getMonth()))&&(parseInt(R= egExp.$1,10)=3D=3Dd.getDate())&&(parseInt(RegExp.$3,10)=3D=3Dd.getFullYea= r());}],['validate-email','Please enter a valid email address. For = example fred@domain.com .',function(v){return = Validation.get('IsEmpty').test(v)||/\w{1,}[@][\w\-]{1,}([.]([\w\-]{1,})){= 1,3}$/.test(v)}],['validate-url','Please enter a valid = URL.',function(v){return = Validation.get('IsEmpty').test(v)||/^(http|https|ftp):\/\/(([A-Z0-9][A-Z0= -9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i.test(v)}],['validate-date-= au','Please use this date format: dd/mm/yyyy. For example 17/03/2006 for = the 17th of March, = 2006.',function(v){if(Validation.get('IsEmpty').test(v))return true;var = regex=3D/^(\d{2})\/(\d{2})\/(\d{4})$/;if(!regex.test(v))return false;var = d=3Dnew = Date(v.replace(regex,'$2/$1/$3'));return(parseInt(RegExp.$2,10)=3D=3D(1+d= .getMonth()))&&(parseInt(RegExp.$1,10)=3D=3Dd.getDate())&&(parseInt(RegEx= p.$3,10)=3D=3Dd.getFullYear());}],['validate-one-required','Please = select one of the above options.',function(v,elm){var = p=3Delm.parentNode;var options=3Dp.getElementsByTagName('INPUT');return = $A(options).any(function(elm){return $F(elm);});}]]);function = validateSSOREG(){var ssoregRegistration=3Dnew = Validation('ssoregForm');Validation.addAllThese([['validate-firstName','<= em class=3D"errText">First Name is = required.
 Please = enter a first name and click = Submit.',{minLength:1}],['validate-firstNameInvalid','Your First Name contains special characters which are = not recognized by our registration system.
=  The text you entered may not = contain non-Roman or other special characters \(e.g. =EF=BF=BD, = =EF=BF=BD, =EF=BF=BD\). Please try = again.',{include:['validate-ascii']}],['validate-familyName','Family Name is = required.
 Please = enter a family name and click = Submit.',{minLength:1}],['validate-familyNameInvalid','Your Family Name contains special characters which are = not recognized by our registration = system.
  The text = you entered may not contain non-Roman or other special characters \(e.g. = =EF=BF=BD, =EF=BF=BD, =EF=BF=BD\). Please try = again.',{include:['validate-ascii']}],['validate-emailAddress','E-mail Address is = required.
 Please = enter a complete e-mail address and click = Submit.
 Example: = john.smith@abc-university.edu',{minLength:1}],['validate-emailInvali= dAddress','Incomplete E-mail Address = entered.
 Please enter = a complete e-mail address and click = Submit.
 Example: = john.smith@abc-university.edu',{include:['validate-email']}],['valid= ate-password','Password is = required.
 Please = enter a password and click = Submit.',{minLength:1}],['validate-passwordInvalid','Your Password contains special characters which are = not recognized by our registration system.
=  The text you entered may not = contain non-Roman or other special characters \(e.g. =EF=BF=BD, = =EF=BF=BD, =EF=BF=BD\). Please try = again.',{include:['validate-ascii']}],['validate-passwordLength','Password must be between 5 and 20 characters in = length.
 Please enter = a new = password.',{minLength:5,maxLength:20}],['validate-confirmPassword','= Confirm Password is = required.
 Please = confirm your password and click = Submit.',{minLength:1}],['validate-confirmPasswordInvalid','Your Confirm Password contains special characters = which are not recognized by our registration = system.
  The text you = entered may not contain non-Roman or other special characters \(e.g. = =EF=BF=BD, =EF=BF=BD, =EF=BF=BD\). Please try = again.',{minLength:1,include:['validate-ascii']}],['validate-confirm= PasswordLength','Confirm Password must be between = 5 and 20 characters in length.
 Please re-enter all = Passwords.',{minLength:5,maxLength:20}],['validate-passwordsMatch','= New Passwords do not = match.
 Please = re-enter all = Passwords.',{equalToField:'regPassword'}],['validate-role','An invalid role was selected in the "Role" = field.
 Please select = a valid role and click = Submit.',{oneOf:['1','2','3','4','5','6','7','8','9']}],['validate-o= rganizationType','An invalid organization type was = selected in the "Organization Type" = field.
 Please select = a valid organization type and click = Submit',{oneOf:['42','81','27','101','3']}],['validate-organizationT= ypeInvalid','Your Organization Type contains = special characters which are not recognized by our registration = system.
 The text you = entered may not contain non-Roman or other special characters \(e.g. = =EF=BF=BD, =EF=BF=BD, =EF=BF=BD\). Please try = again.',{include:['validate-ascii']}],['validate-fieldOfInterest','<= label class=3D"error txtSmaller">Primary field of = interest is required.
Please select one = or more fields of interest and click = Submit.',{include:['validate-one-required']}],['validate-job= title','Your Job Title contains special characters = which are not recognized by our registration = system.
  The text you = entered may not contain non-Roman or other special characters \(e.g. = =EF=BF=BD, =EF=BF=BD, =EF=BF=BD\). Please try = again.',{include:['validate-ascii']}],['validate-jobtitlelong','Job Title cannot be longer than 40 characters. Please = try again.',{maxLength:40}],['validate-phonenumber','Your Phone Number contains special characters which = are not recognized by our registration system.
=  The text you entered may not = contain non-Roman or other special characters \(e.g. =EF=BF=BD, = =EF=BF=BD, =EF=BF=BD\). Please try = again.',{include:['validate-ascii']}],['validate-mailingAddress','Your Mailing Address contains special characters = which are not recognized by our registration = system.
  The text you = entered may not contain non-Roman or other special characters \(e.g. = =EF=BF=BD, =EF=BF=BD, =EF=BF=BD\). Please try = again.',{include:['validate-ascii']}],['validate-address1','First line of mailing address cannot be longer than 40 = characters. Please try = again.',{maxLength:40}],['validate-address2','Second line of mailing address cannot be longer than = 40 characters. Please try = again.',{maxLength:40}],['validate-address3','Third line of mailing address cannot be longer than 40 = characters. Please try = again.',{maxLength:40}],['validate-city','Your City name contains special characters which are = not recognized by our registration system.
=  The text you entered may not = contain non-Roman or other special characters \(e.g. =EF=BF=BD, = =EF=BF=BD, =EF=BF=BD\). Please try = again.',{include:['validate-ascii']}],['validate-citylong','City cannot be longer than 40 characters. Please try = again.',{maxLength:40}],['validate-postalcode','Your Postal Code contains special characters which are = not recognized by our registration = system.
  The text you = entered may not contain non-Roman or other special characters \(e.g. = =EF=BF=BD, =EF=BF=BD, =EF=BF=BD\). Please try = again.',{include:['validate-ascii']}],['validate-postalcodelong','Postal code cannot be longer than 15 characters. = Please try = again.',{maxLength:40}],['validate-RegFormuserAgreement','',{include:['validate-one-required']}],['validate-userAg= reement','',{include:['validate-one-required']}],['validate-p= rofileFirstName','First Name is = required.
 Please = enter a first name and click = Update.',{minLength:1}],['validate-profileFirstNameInvalid','Your First Name contains special characters which are = not recognized by our registration system.
=  The text you entered may not = contain non-Roman or other special characters \(e.g. =EF=BF=BD, = =EF=BF=BD, =EF=BF=BD\). Please try = again.',{include:['validate-ascii']}],['validate-profileFamilyName',= 'Family Name is = required.
 Please = enter a family name and click = Update.',{minLength:1}],['validate-profileFamilyNameInvalid','Your Family Name contains special characters which are = not recognized by our registration = system.
  The text = you entered may not contain non-Roman or other special characters \(e.g. = =EF=BF=BD, =EF=BF=BD, =EF=BF=BD\). Please try = again.',{include:['validate-ascii']}],['validate-profileEmailAddress= ','E-mail Address is = required.
 Please = enter a complete e-mail address and click = Update.
 Example: = john.smith@abc-university.edu',{minLength:1}],['validate-profileEmai= lInvalidAddress','Incomplete E-mail Address = entered.
 Please enter = a complete e-mail address and click = Update.
 Example: = john.smith@abc-university.edu',{include:['validate-email']}],['valid= ate-profileRole','An invalid role was selected in = the "Role" field.
 Please select a valid role and click = Update.',{oneOf:['Doctor','Faculty','Librarian','Other','Research = Administrator','Researcher','Student','Teacher','1','2','3','4','5','6','= 7','8','9']}],['validate-profileFieldOfInterest','',{include:['validate-one-required']}]]);} ------=_NextPart_000_0000_01CCCC5A.479C2480 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://www.scopus.com/gzip_N846900234/bundles/RecordPageBottom.js =0A= function = PDFdownloadFromResultsPage(control){checkMaxDownloadDocsExceeded(control)= ;var = returnVal=3Dtrue;if(g_maxDownloadSelectedExceeded){g_maxDownloadSelectedE= xceeded=3Dfalse;returnVal=3Dconfirm(maxDownloadSelectedExceededMsg);}=0A= selCount=3DgetSelectedDocumentCount(control);if(selCount<=3D0){alert('No = results are selected.');}=0A= if(!g_maxDownloadSelectedExceeded&&selCount>0&&returnVal){openDownloadWin= dow('');document.SearchResultsForm.clickedLink.value=3D"downloadButton";d= ocument.SearchResultsForm.target=3D"downloadMain";document.SearchResultsF= orm.submit();}=0A= return false;}=0A= function = PDFdownloadFromRecordPage(control,url){openDownloadWindow(url);return = true;}=0A= function openDownloadWindow(url){if((navigator.appName=3D=3D"Microsoft = Internet Explorer")&&(parseFloat(navigator.appVersion)<4))=0A= {return false;}=0A= var = parms=3D'width=3D800'+',height=3D560'+',screenX=3D0'+',screenY=3D0'+',lef= t=3D0'+',top=3D0'+',status=3Dyes,toolbar=3Dno,menubar=3Dno,location=3Dno'= +',scrollbars=3Dyes,resizable=3Dyes';win=3Dwindow.open(url,'downloadMain'= ,parms);win.focus();return false;}=0A= var g_formSubmitOK=3Dtrue;var g_MAX_EMAIL_REF_COUNT;var = g_MAX_PRINT_REF_COUNT;var g_MAX_EXPORT_REF_COUNT;var = allowed=3Dtrue;function = ValidateCheckBoxes(obj){g_formSubmitOK=3Dtrue;var = control=3Dobj.form.selectedEIDs;switch(obj.name){case"printRefButton":var= = refsChecked=3Dfalse;refsChecked=3DassertChecked(control,printAlertMsg);va= r refsCount=3D0;if(refsChecked){for(var = i=3D0;ig_MAX_PRINT_REF_COUNT){g_formSubmitOK=3Dconfirm(printMaxRefM= sg);}}=0A= else{g_formSubmitOK=3Dfalse;}=0A= break;case"emailRefButton":var = refsChecked=3Dfalse;refsChecked=3DassertChecked(control,emailAlertMsg);va= r refsCount=3D0;if(refsChecked){for(var = i=3D0;ig_MAX_EMAIL_REF_COUNT){g_formSubmitOK=3Dconfirm(emailMaxRefM= sg);}}=0A= else{g_formSubmitOK=3Dfalse;}=0A= break;case"exportRefButton":var = refsChecked=3Dfalse;refsChecked=3DassertChecked(control,exportAlertMsg);v= ar refsCount=3D0;if(refsChecked){for(var = i=3D0;ig_MAX_EXPORT_REF_COUNT){g_formSubmitOK=3Dconfirm(exportMaxRe= fMsg);}}=0A= else{g_formSubmitOK=3Dfalse;}=0A= break;}}=0A= function toggleRefChkBoxes(control){for(var = i=3D0;i