//-------------------------------------------------------------------------------------
function Get_Cookie(name) {
    var start = document.cookie.indexOf(name+"=");
    var len = start+name.length+1;
    if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
    if (start == -1) return null;
    var end = document.cookie.indexOf(";",len);
    if (end == -1) end = document.cookie.length;
    return unescape(document.cookie.substring(len,end));
}

//-------------------------------------------------------------------------------------

function Set_Cookie(name,value,expires,path,domain,secure) {
    document.cookie = name + "=" +escape(value) +
        ( (expires) ? ";expires=" + expires.toGMTString() : "") +
        ( (path) ? ";path=" + path : "") + 
        ( (domain) ? ";domain=" + domain : "") +
        ( (secure) ? ";secure" : "");
}

//-----------------------------------------------------------------
function Enlarge(p)
{
// window.open("temp.htm",p,"height="+screen.height*4/5+" scrollbars=yes");
// window.open("temp.htm",p,"width="+screen.width*4/5+" scrollbars=yes");
// window.open("temp.htm",p,"scrollbars=yes");
 window.open("temp.htm",p);
}

//-------------------------------------------------------------------------------------

function changeSheet(choice) {
    if (choice == 1) mySheet = 'style1';
    if (choice == 2) mySheet = 'style2';
    if (choice == 3) mySheet = 'style3';
    if (choice == 4) mySheet = 'style4';
    if (choice == 5) mySheet = 'style5';
    if (choice == 6) mySheet = 'style6';
    if (choice == 7) mySheet = 'style7';
    if (choice == 8) mySheet = 'style8';
    if (choice == 8) mySheet = 'style9';

    if (document.styleSheets)
        document.getElementById("CSS").href = mySheet + '.css';
}
 
//-------------------------------------------------------------------------------------

function checkStyle() 
{
    if (mySheet != null) {
        document.getElementById("CSS").href = mySheet + '.css';
    }
}

//-------------------------------------------------------------------------------------

var expires = new Date();
expires.setTime(expires.getTime() + (365 * 24 * 60 * 60 * 1000 * 365));

mySheet = Get_Cookie('stylesheet');

if (mySheet != null)
    document.write('<LINK ID="CSS" REL="stylesheet" HREF="' + mySheet + '.css">');
else
    document.write('<LINK ID="CSS" REL="stylesheet" HREF="style1.css">');



