function runClock() {
		
if (isNaN(hh) || hh <0 || hh > 23) {
alert ("Invalid Value for HOURS")
return false;
}

if (isNaN(mm) || mm <0 || mm > 59) {
alert ("Invalid Value for MINUTES")
return false;
}

if (isNaN(ss) || ss <0 || ss > 59) {
alert ("Invalid Value for SECONDS")
return false;
}

var start = new Date(2009,1,1,hh,mm,ss);
startTime = start.getTime();
incClock()
}

function incClock() {   
startTime = startTime + 1000;
var x = new Date(startTime);
var hours = x.getHours();
var minutes = x .getMinutes()
var secs = x.getSeconds();
minutes = ( minutes < 10 ? "0" : "" ) + minutes;
 secs = ( secs < 10 ? "0" : "" ) + secs;
var currentTimeString = hours + ":" + minutes + ":" + secs;
document.getElementById("clock").firstChild.nodeValue = currentTimeString;
tim = setTimeout('incClock()',1000);
}

function stopClock() {
window.clearTimeout(tim);
}

function resetClock() {
window.clearTimeout(tim);
}

var xmlHttp;

function useAjax(changeurlinfo, pagediv) { 
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null) {
 		alert ("Browser does not support HTTP Request");
 		return;
	}
	var url=changeurlinfo + "ajax=1";
	xmlHttp.onreadystatechange=function() {
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
			document.getElementById(pagediv).innerHTML=xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function GetXmlHttpObject() {
	var xmlHttp=null;
	try {
		// Firefox, Opera 8.0+, Safari
	 	xmlHttp=new XMLHttpRequest();
 	}
	catch (e) {
		//Internet Explorer
		try {
  			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  		}
		catch (e) {
  			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  		}
	}
	return xmlHttp;
}

function openfaq(id, id2) {
	if(faq_o!=0 && faq_o!=id && q_o!=0) {
		document.getElementById(faq_o).style.display = 'none';
		document.getElementById(q_o).className='faq-closed';
	}
	if(document.getElementById(id).style.display=='none') {
		document.getElementById(id).style.display='';
		document.getElementById(id2).className='faq-opened';
	}
	else {
		document.getElementById(id).style.display='none';
		document.getElementById(id2).className='faq-closed';
	}
	faq_o = id;
	q_o = id2;
}

function show(id) {
	if(document.getElementById(id).style.display=='none')
		document.getElementById(id).style.display='block';
	else document.getElementById(id).style.display='none';
}

function changeClass(id) {
	if(document.getElementById(id).className=='vote_arch_link01')
		document.getElementById(id).className='vote_arch_link02';
	else document.getElementById(id).className='vote_arch_link01';
}

function switchClass(id1, id2) {
	document.getElementById(id1).className = id1 + '-a';
	document.getElementById(id2).className = id2;
}

function handleTableActions(obj, act, value){
	if(act == 'over') obj.style.backgroundColor = value;
	else if(act == 'out') obj.style.backgroundColor = value;
	else if(act == 'click') window.location.href = value;
}
