<!-- Hide from JavaScript-Impaired Browsers
function dblchk() {
if (document.ct2.pgclr.value == "") {
alert ("Please enter a page color.")
return false;
}
if (document.ct2.lnkclr.value == "") {
alert("Please enter a text color.");
return false;
}
if (document.ct2.taclr.value == "") {
alert("Please enter a textarea background color.");
return false;
}
if (document.ct2.fntclr.value == "") {
alert("Please enter a textarea text color.");
return false;
}
if (document.ct2.crsclr.value == "") {
alert("Please enter a cursor color.");
return false;
}
if (document.ct2.btclr.value == "") {
alert("Please enter a button text color.");
return false;
}
}
//Cookie script by Geoff Inglis
TheCookieName = 'ct2';
numDays = 183;  //Days 'till Cookie expires.(eg. 183 days = 6 months)
function WriteOneBigCookie () {
var expire = new Date ();
expire.setTime (expire.getTime() + (numDays * 24 * 3600000));
var WholeCookie = expire;
WholeCookie = WholeCookie + '`' +
document.ct2.pgclr.value;
WholeCookie = WholeCookie + '`' +
document.ct2.lnkclr.value;
WholeCookie = WholeCookie + '`' +
document.ct2.fntsze.value;
WholeCookie = WholeCookie + '`' +
document.ct2.taclr.value;
WholeCookie = WholeCookie + '`' +
document.ct2.fntclr.value;
WholeCookie = WholeCookie + '`' +
document.ct2.crsclr.value;
WholeCookie = WholeCookie + '`' +
document.ct2.btclr.value;
WholeCookie = WholeCookie + '`' +
document.ct2.tarws.value;
document.cookie = TheCookieName +"=" + escape
(WholeCookie) + "; expires=" + expire.toGMTString();
alert('Your information has been stored for 6 months and will be loaded next time you visit this page.');
}
function UpdateForm () {
MakeCookieArray(GetCookie(TheCookieName));
('ckArray: ' + ckArray[0]);
if (ckArray[0] != "*") {
document.ct2.ExpDate.value = ckArray[0];
document.ct2.pgclr.value = ckArray[1];
document.ct2.lnkclr.value = ckArray[2];
document.ct2.fntsze.value = ckArray[3];
document.ct2.taclr.value = ckArray[4];
document.ct2.fntclr.value = ckArray[5];
document.ct2.crsclr.value = ckArray[6];
document.ct2.btclr.value = ckArray[7];
document.ct2.tarws.value = ckArray[8];
}
}
function GetCookie (CookieName) {
var cname = CookieName + "=";
var i = 0;
while (i < document.cookie.length) {
var j = i + cname.length;
if (document.cookie.substring(i, j) == cname){
var leng = document.cookie.indexOf (";", j);
if (leng == -1) leng = document.cookie.length;
return unescape(document.cookie.substring(j, leng));
}
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return "*";
}
function MakeCookieArray(cookieValue) {
var i = 0,indx = 0, citemlen =0;
ckArray = new Array();
if ( cookieValue == null ) {ckArray[0]= "*";return}
if ( cookieValue == "*"  ) {ckArray[0]= "*";return}
while (citemlen < cookieValue.length) {
citemlen=(cookieValue.indexOf("`", indx)>0)
?cookieValue.indexOf("`", indx):cookieValue.length;
ckArray[i]= cookieValue.substring(indx, citemlen); i++;
indx = citemlen + 1;
}
}
function custm(form){
var txt ='<form name="ct2" action="'
+'http://riverdrift.com/cgi/custombed.pl"'
+' method="post">\n';
if(document.ct2.fntsze.value != "")          
txt+='<input type="hidden" name="fntsze"'
+' value="'+document.ct2.fntsze.value+'" />\n';
if(document.ct2.pgclr.value != "")          
txt+='<input type="hidden" name="pgclr"'
+' value="'+document.ct2.pgclr.value+'" />\n';
if(document.ct2.lnkclr.value != "")          
txt+='<input type="hidden" name="lnkclr"'
+' value="'+document.ct2.lnkclr.value+'" />\n';
if(document.ct2.btclr.value != "")          
txt+='<input type="hidden" name="btclr"'
+' value="'+document.ct2.btclr.value+'" />\n';
if(document.ct2.taclr.value != "")          
txt+='<input type="hidden" name="taclr"'
+' value="'+document.ct2.taclr.value+'" />\n';
if(document.ct2.fntclr.value != "")          
txt+='<input type="hidden" name="fntclr"'
+' value="'+document.ct2.fntclr.value+'" />\n';
if(document.ct2.crsclr.value != "")          
txt+='<input type="hidden" name="crsclr"'
+' value="'+document.ct2.crsclr.value+'" />\n';
if(document.ct2.tarws.value != "")          
txt+='<input type="hidden" name="tarws"'
+' value="'+document.ct2.tarws.value+'" />\n';
if(document.ct2.tagrw.checked)
txt+='<input type="hidden" name="tagrw"'
+' value="growable" />\n';
txt+='<input type="submit" value="Custom Testbed"'
+' />\n</form>\n';
document.ct2.bx.value=txt;
}
// End Hiding -->
