|
Post by Schnooble on Oct 28, 2006 0:25:30 GMT
Global Header
Simple and easy makes so you dont keep having to switch gradients for each skin.
<script type="text/javascript"> <!--
// Different Gradients for Different Skins. Open source // Use the following format: ['menubg url', 'titlebg url', 'catbg url'];
var skin1Settings = ['skin 1 menubg url', 'skin 1 titlebg url', 'skin 1 catbg url']; // Edit here var skin2Settings = ['skin 2 menubg url', 'skin 2 titlebg url', 'skin 2 catbg url']; // Edit here var skin3Settings = ['skin 3 menubg url', 'skin 3 titlebg url', 'skin 3 catbg url']; // Edit here
var dSheets = document.styleSheets.item(0); switch (pb_skinid) { case 1 : mImg = skin1Settings[0]; tImg = skin1Settings[1]; cImg = skin1Settings[2]; break; case 2 : mImg = skin2Settings[0]; tImg = skin2Settings[1]; cImg = skin2Settings[2]; break; case 3 : mImg = skin3Settings[0]; tImg = skin3Settings[1]; cImg = skin4Settings[2]; break; } switch (navigator.userAgent.split('/')[1].split('.')[0]) { case '4' : dSheets.addRule('.menubg', 'background: url(' + mImg + ')'); dSheets.addRule('.titlebg', 'background: url(' + tImg + ')'); dSheets.addRule('.catbg', 'background: url(' + cImg + ')'); break; case '5' : dSheets.insertRule('.menubg { background: url(' + mImg + '); }', 0); dSheets.insertRule('.titlebg { background: url(' + tImg + '); }', 0); dSheets.insertRule('.catbg { background: url(' + cImg + '); }', 0); break; }
//--> </script>
|
|