function openlink(url) {
	window.location.href=url;
}

function OpenWin(url, w, h) {
	props=window.open(url, 'poppage', 'toolbars=0, scrollbars=1, location=0, statusbars=0, menubars=0, resizable=0, width='+ w +', height='+ h +', left = 150, top = 50');
}

/* Ajax code */
var http = createRequestObject();
function createRequestObject()
{
	if (window.XMLHttpRequest) 
	{ // Mozilla, Safari,...
		http = new XMLHttpRequest();
	} 
	else if (window.ActiveXObject) 
	{ // IE
		try 
		{
			http = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (error) 
		{
			try 
			{
				http = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (error) 
			{
				http = null; 
				return false;
			}
		}
	}
	return http;
}

function send_poll_vote(pid, opid){
	http.open('get', 'index_lite.php?show=poll&action=addvote&id='+ pid +'&opid='+ opid);
	http.onreadystatechange = poll_handle;
	http.send(null);
}
function poll_result(pid){
	http.open('get', 'index_lite.php?show=poll&action=view&id='+ pid );
	http.onreadystatechange = poll_handle;
	http.send(null);
}
function poll_handle(){
	if(http.readyState == 1){
		document.getElementById('poll').innerHTML = '<div align="center"><br /><img src="'+ imgsPath +'images/ajax_load.gif" border="0" /></div>';
	}
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('poll').innerHTML = response;
	}
}