function showHidden(str,str2){
	var check = document.getElementById(str).style.display	

	if(check=='none'){
		document.getElementById(str).style.display='block';
		document.getElementById(str2).style.color='pink';
		document.getElementById(str2).style.fontWeight='bold';
	}else{
		document.getElementById(str).style.display='none';
		document.getElementById(str2).style.color='#79BAEC';
		document.getElementById(str2).style.fontWeight='normal';
	}

		
}



function showMessage2(){

var xmlHttp = ajaxFunction()

	if (xmlHttp==null){
		 alert ("Browser does not support HTTP Request")
	}
	
	var url="test.php"
	url=url+"?q="+str
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=stateChanged 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function stateChanged() 
{ 	
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
		 document.getElementById("showMessage").innerHTML=xmlHttp.responseText 
	} 
}



















function ajaxFunction(){
  var xmlHttp;  
  var browser = whichBrs();

try{
	if(browser=='Internet Explorer'){	
		try{
			 xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e){
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		} 	
	}else{
			xmlHttp=new XMLHttpRequest();
	}
}catch(e){	
	alert("Your browser does not support AJAX!");
     return false;
} 
 	return xmlHttp; 
}  
  
  

function whichBrs() {

	var agt=navigator.userAgent.toLowerCase();
	if (agt.indexOf("opera") != -1) return 'Opera';
	if (agt.indexOf("staroffice") != -1) return 'Star Office';
	if (agt.indexOf("webtv") != -1) return 'WebTV';
	if (agt.indexOf("beonex") != -1) return 'Beonex';
	if (agt.indexOf("chimera") != -1) return 'Chimera';
	if (agt.indexOf("netpositive") != -1) return 'NetPositive';
	if (agt.indexOf("phoenix") != -1) return 'Phoenix';
	if (agt.indexOf("firefox") != -1) return 'Firefox';
	if (agt.indexOf("safari") != -1) return 'Safari';
	if (agt.indexOf("skipstone") != -1) return 'SkipStone';
	if (agt.indexOf("msie") != -1) return 'Internet Explorer';
	if (agt.indexOf("netscape") != -1) return 'Netscape';
	if (agt.indexOf("mozilla/5.0") != -1) return 'Mozilla';
	if (agt.indexOf('\/') != -1) {
	if (agt.substr(0,agt.indexOf('\/')) != 'mozilla') {
	return navigator.userAgent.substr(0,agt.indexOf('\/'));}
	else return 'Netscape';} else if (agt.indexOf(' ') != -1)
	return navigator.userAgent.substr(0,agt.indexOf(' '));
	else return navigator.userAgent;

}


function getCSSID(getID){
 document.getElementById(getID).style.borderBottom='1px solid red';
}


function showTopicForm(str){

	var check = document.getElementById(str).style.display
	
	if(check=='none'){
		document.getElementById(str).style.display='block';
		document.getElementById('displayPosts').style.display='none';		
	}else{
		document.getElementById(str).style.display='none';
		document.getElementById('displayPosts').style.display='block';
	}
}
