
var checkarray=new Array(6)
checkarray[1]="font-weight:bold; "
checkarray[2]="font-style:italic; "
checkarray[3]="text-decoration:underline; "
checkarray[4]="text-transform:uppercase; "

//document.linkeffect.colorvalue.value=''
document.linkeffect.sizevalue.value=''
//document.linkeffect.highlightvalue.value=''

thesheet=''

alert(document.linkeffect.thestyles.length)
for (i=0;i<6;i++)
document.linkeffect.thestyles[i].checked=false
function applysheet(){
if (!document.all && !document.getElementById){
alert("You need a DOM capable browser such as IE5+ and NS6+ to use this tool!")
return
}
checkarray[0]="color:"+document.linkeffect.colorvalue.value+"; "
checkarray[5]="font-size:"+document.linkeffect.sizevalue.value+"; "
checkarray[6]="background-color:"+document.linkeffect.highlightvalue.value+"; "
thesheet=''
for (i=0;i<7;i++){
if (document.linkeffect.thestyles[i].checked==true)
thesheet+=checkarray[i]
}
if (thesheet=='')
thesheet="color: default"


if (document.styleSheets[0].removeRule){
document.styleSheets[0].removeRule(1)
document.styleSheets[0].addRule("a:hover",thesheet)
}
else if (document.styleSheets[0].deleteRule){
thesheetNS6="a:hover{"+thesheet+"}"
document.styleSheets[0].deleteRule(1)
document.styleSheets[0].insertRule(thesheetNS6, 1)
}
}


function generatecss(){
document.csscode.csscode2.value='<!-DHTML scripts by Dynamic Drive (http://www.dynamicdrive.com)-->\n<style>\na:hover{'+thesheet+'}\n</style>'
}


