function createCookie(name,value,days) 
{ if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; 
parent.header.document.styleSheets[0].href =  value + '.css';
parent.main.document.styleSheets[0].href =  value + '.css'; 
parent.menu.document.styleSheets[0].href =  value + '.css'; 
} 


function readCookie(name) 
{ var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; 
} 


function set_style_from_cookie(){
var whatstyle = readCookie('mytheme'); 
if (whatstyle != null) {document.styleSheets[0].href =  whatstyle + '.css';} 
else {document.styleSheets[0].href =  'stylewhite.css'; parent.header.document.styleSheets[0].href =  value + '.css'; parent.main.document.styleSheets[0].href =  value + '.css'; 
parent.menu.document.styleSheets[0].href =  value + '.css';}
}

function switchStyle(sty){ var links = document.getElementsByTagName('link'); for (var i = 0; i < links.length; i++) { var a = links[i]; if (a.rel.indexOf('style') != -1 && a.title) { a.disabled = true; if (a.title == sty){ a.disabled = false; } } } ;} 

if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ 
var ffversion=new Number(RegExp.$1)}

