<!--displaying day, time and date-->
function doClock() {
    // By Paul Davis - www.kaosweaver.com;
    var t = new Date(), a = doClock.arguments, str = "", i, a1, lang = "1";
    var month = new Array('January','Jan', 'February','Feb', 'March','Mar', 'April','Apr', 'May','May', 'June','Jun', 'July','Jul', 'August','Aug', 'September','Sep', 'October','Oct', 'November','Nov', 'December','Dec');
    var tday = new Array('Sunday','Sun','Monday','Mon', 'Tuesday','Tue', 'Wednesday','Wed','Thursday','Thr','Friday','Fri','Saturday','Sat');
    for (i = 0; i < a.length; i++) {
        a1 = a[i].charAt(1);
        switch (a[i].charAt(0)) {
          case "M":
            if ((Number(a1) == 3) && ((t.getMonth() + 1) < 10)) {
                str += "0";
            }
            str += (Number(a1) > 1) ? t.getMonth() + 1 : month[t.getMonth() * 2 + Number(a1)];
            break;
          case "D":
            if ((Number(a1) == 1) && (t.getDate() < 10)) {
                str += "0";
            }
            str += t.getDate();
            break;
          case "Y":
            str += (a1 == "0") ? t.getFullYear() : t.getFullYear().toString().substring(2);
            break;
          case "W":
            str += tday[t.getDay() * 2 + Number(a1)];
            break;
          default:
            str += unescape(a[i]);
        }
    }
    return str;
}



function PcPopup() {
	NewWindow("../cp.php","cp_win","378","202","no","no","yes","no","no","no");
}

function NewWindow(mypage, myname, w, h, scroll, menu, resize, status, toolbar, location) {
	var winl = (screen.width-w)/2;
	var wint = ((screen.height-h)/2);
	var winprops = 'width='+w+',height='+h+',';
	winprops += 'top='+wint+',left='+winl+',';
	winprops += 'scrollbars='+scroll+',';
	winprops += 'menubar='+menu+',';
	winprops += 'resizable='+resize+',';
	winprops += 'status='+status+',';
	winprops += 'toolbar='+toolbar+',';
	winprops += 'location='+location;
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}



<!--changing style of text areas-->
function onFocuss(area) {
	area.style.background = "#E7E7F1";
}
function onBlurr(area) {
	area.style.background = "#EEEEEE";
}


function ConfirmCancel(f_location) {
	if (confirm(' Are you sure you wish to cancel? ')){
		window.location = f_location;
	} else {
		return false;	
	}
}

function ValidCharacters(field) {
	
	var valid = "abcdefghijklmnopqrstuvwxyz0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ~-_."
	var ok = "yes";
	var temp;
	for (var i=0; i<field.value.length; i++) {
		temp = "" + field.value.substring(i, i+1);
		if (valid.indexOf(temp) == "-1") ok = "no";
	}
	if (ok == "no") return false;
	return true;
	
}


