source: documented-examples/trunk/style-e/script/custom-script.js@ 36370

Last change on this file since 36370 was 36370, checked in by anupama, 21 months ago

Committing first iteration of GS3 port of style-e DEC collection before the actual styling. This is just the basic GS3 version of the collection (collectionConfig file and display strings)

File size: 476 bytes
Line 
1// This function copied from extra.dm of style-e DEC collection
2// It changes the current stylesheet to the named one of parameter
3function SetStyle(stylename) {
4 var body = document.getElementsByTagName('body')[0];
5 body.style.backgroundImage = "";
6
7 styles = document.styleSheets;
8 var i;
9 for (i=0;i<styles.length;i++) {
10 style = styles[i];
11 if (style.title == stylename)
12 style.disabled = false;
13 else
14 style.disabled = true;
15 }
16}
Note: See TracBrowser for help on using the repository browser.