// JavaScript Document
function changeFont(){
	i = document.f.cfont.value;
	 if(i == 2){
		document.getElementById("con").style.fontSize = "17px";
	} else if(i == 3){
		document.getElementById("con").style.fontSize = "21px";
	} else {
		document.getElementById("con").style.fontSize = "";
	}
	return false;
}
function yr(){
 d = new Date(); 
g = d.getFullYear(); 
document.getElementById("i").innerHTML = g;
}

function clearme(thisForm, txt){
	if(thisForm.value ==  txt){
	thisForm.value = "";
	}
}

function help(i){
	switch(i){
		case 1 :
	window.open("helpa.html", "win1", "width = 300px, height = 200px");
	break;
	case 2 :
	window.open("helpn.html", "win1", "width = 300px, height = 200px");
	break;
	case 3 :
	window.open("helpm.html", "win1", "width = 300px, height = 200px");
	break;
	}
}
	//ajax///////////////
function ct_ajax() {	
if (window.XMLHttpRequest) {		
return new XMLHttpRequest(); 	
} else if(window.ActiveXObject) {		
return new ActiveXObject("Microsoft.XMLHTTP"); 	
} else {				
alert("Your browser doesn't support the XmlHttpRequest object.  Better upgrade, to effectively use this site");
	}
}
//Get our browser specific XmlHttpRequest object.
var receiveReq = ct_ajax();
//Initiate the asyncronous request.
function ct_open() {
	ct_open2();
	if (receiveReq.readyState == 4 || receiveReq.readyState == 0) {
		receiveReq.open("GET", 'log.php', true);
		receiveReq.onreadystatechange = ct_resp; 
		receiveReq.send(null);
	}			
}
//Called every time our XmlHttpRequest objects state changes.
function ct_resp() {
	if (receiveReq.readyState == 4) {
		document.getElementById('log').innerHTML = receiveReq.responseText;
	}
}
//////
//the secon
var receiveReq2 = ct_ajax();
//Initiate the asyncronous request.
function ct_open2() {
	if (receiveReq2.readyState == 4 || receiveReq2.readyState == 0) {
		receiveReq2.open("GET", 'news.php', true);
		receiveReq2.onreadystatechange = ct_resp2; 
		receiveReq2.send(null);
	}			
}
//Called every time our XmlHttpRequest objects state changes.
function ct_resp2() {
	if (receiveReq2.readyState == 4) {
		document.getElementById('news').innerHTML = receiveReq2.responseText;
	}
}

