﻿function changemysize(myvalue)
{
var div = document.getElementById("mymain");
div.style.fontSize = myvalue + "px";
document.cookie="mysize=" + myvalue;
var div = document.getElementById("myfont");

{
if (myvalue==13)
{
document.getElementById("f1").innerHTML = "<img src=f1_on.jpg border=0></img>";
document.getElementById("f2").innerHTML = "<img src=f2.jpg border=0></img>";
document.getElementById("f3").innerHTML = "<img src=f3.jpg border=0></img>";
}
else if (myvalue==14)
{
document.getElementById("f1").innerHTML = "<img src=f1.jpg border=0></img>";
document.getElementById("f2").innerHTML = "<img src=f2_on.jpg border=0></img>";
document.getElementById("f3").innerHTML = "<img src=f3.jpg border=0></img>";
}
else if (myvalue==15)
{
document.getElementById("f1").innerHTML = "<img src=f1.jpg border=0></img>";
document.getElementById("f2").innerHTML = "<img src=f2.jpg border=0></img>";
document.getElementById("f3").innerHTML = "<img src=f3_on.jpg border=0></img>";
}
}
}

function getmycookie(myname)
// this function is called by the function mydefaultsize()
// this function merely looks for any previously set cookie and then returns its value
{
// if any cookies have been stored then
if (document.cookie.length>0)
{
// where does our cookie begin its existence within the array of cookies
mystart=document.cookie.indexOf(myname + "=");
// if we found our cookie name within the array then if (mystart!=-1)
{
// lets move to the end of the name thus the beginning of the value
// the '+1' grabs the '=' symbol also
mystart=mystart + myname.length+1;
// because our document is only storing a single cookie, the end of the cookie is found easily
myend=document.cookie.length;
// return the value of the cookie which exists after the cookie name and before the end of the cookie
return document.cookie.substring(mystart,myend);
}
}
// if we didn't find a cookie then return nothing
{
document.getElementById("f1").innerHTML = "<img src=f1_on.jpg border=0></img>";
document.getElementById("f2").innerHTML = "<img src=f2.jpg border=0></img>";
document.getElementById("f3").innerHTML = "<img src=f3.jpg border=0></img>";
}
// return "";
}


function mydefaultsize()
{
// this function is called by the body onload event
// this function is used by all sub pages visited by the user after the main page
var div = document.getElementById("mymain");
// call the function getmycookie() and pass it the name of the cookie we are searching for
// if we found the cookie then

if (getmycookie("mysize")>0)
{
// apply the text size change	
div.style.fontSize = getmycookie("mysize") + "px";
}
var div = document.getElementById("myfont");
{
if (getmycookie("mysize")==13)
{
document.getElementById("f1").innerHTML = "<img src=f1_on.jpg border=0></img>";
document.getElementById("f2").innerHTML = "<img src=f2.jpg border=0></img>";
document.getElementById("f3").innerHTML = "<img src=f3.jpg border=0></img>";
}
else if (getmycookie("mysize")==14)
{
document.getElementById("f1").innerHTML = "<img src=f1.jpg border=0></img>";
document.getElementById("f2").innerHTML = "<img src=f2_on.jpg border=0></img>";
document.getElementById("f3").innerHTML = "<img src=f3.jpg border=0></img>";
}
else if (getmycookie("mysize")==15)
{
document.getElementById("f1").innerHTML = "<img src=f1.jpg border=0></img>";
document.getElementById("f2").innerHTML = "<img src=f2.jpg border=0></img>";
document.getElementById("f3").innerHTML = "<img src=f3_on.jpg border=0></img>";
}
}
}






